CausalSmith · seminar slides
When Covariance Designs Can Be Randomized
An optimized covariance may ask for assignments no experiment can produce; community-size parity tells us when that happens and how to build the best feasible randomization.
slides for Exact Randomized Designs for Two-Block Interference Experiments
Motivation
With interference, one unit’s treatment can affect other units. Choosing correlated assignments can therefore improve experimental design.
- Ugander et al. (2013) use graph-cluster randomization to manage network exposure.
- Thiyageswaran et al. (2026), our closest predecessor, optimize assignment covariance to trade off interference, homophily, and robustness.
Let Z be the vector of treatment signs, +1 or −1, and P its randomization law. An actual design produces
X(P)=EP[ZZ⊤].
This matrix records the second moments of treatment assignments.
The standard relaxation optimizes over positive semidefinite matrices with diagonal entries one. Those conditions permit matrices that no binary assignment law can generate.
When does the covariance optimum describe an actual randomization?
Key Idea
Consider two equal communities, each containing m≥2 units, with stronger interactions within communities: a>b>0. The criterion weights r and κ are nonnegative.
Symmetry reduces the covariance problem to allocating variance among three directions.
Binary assignments add one restriction:
- Even communities can have treatment-sign sum zero.
- Odd communities must retain some variance in their community totals.
That restriction completely characterizes feasibility in this model. We can construct a randomization for every covariance that passes it.
The result is an exact procedure: optimize the covariance, check parity, and correct the allocation if necessary. Even community size always gives zero loss.
Example
Take two communities of three units each, with within-community intensity a=2, across-community intensity b=1, tradeoff weight r=8, and norm weight κ=0.
The relaxed optimum asks for zero treatment-sign sum in each community. Three signs cannot sum to zero.
The relaxed criterion value is 34; the best feasible randomization has value 308/9.
Writing Δm±(r,κ) for feasible-minus-relaxed loss,
Δ3±(8,0)=9308−34=92≈0.222,
This is the cost of requiring an actual assignment law. We will recover both the calculation and the randomization that attains it.
Model
The n=2m units are fixed. Only their treatment assignment is random. Communities Am and Bm each contain m units.
For distinct units in the same community, the interaction weight is
Wij=ma;
for units in opposite communities, it is
Wij=mb;
and Wii=0. Homophily means a>b>0: stronger interaction within communities.
Require sign symmetry:
P(Z=z)=P(Z=−z).
Here z is an assignment realization. Reversing every treatment label leaves its probability unchanged, so each unit is treated with probability one-half. The treated count may vary across realizations.
Design Criterion
Let Lm be the graph Laplacian: weighted degrees on its diagonal and −Wij off the diagonal. Its pseudoinverse Lm† inverts the nonzero graph directions.
For r,κ≥0, minimize
Fr,κ(X)=tr(LmX)+rtr(Lm†X)+κ∥X∥S2+tr(JnX).
- The first term penalizes treatment disagreement across strongly connected units.
- The pseudoinverse term weights graph directions with smaller Laplacian eigenvalues more heavily; r controls that tradeoff.
- ∥X∥S2 is the Frobenius norm, the square root of the sum of squared entries. Here robustness is a chosen norm regularization criterion: κ penalizes concentrated covariance, conditional on the chosen graph.
- Jn is the all-ones matrix. Its term penalizes the expected squared total treatment-sign sum.
Under sign symmetry, X(P) is also the assignment covariance.
Symmetry Reduction
Average over permutations within each community and over swapping the two communities.
The graph and criterion are unchanged by these relabelings. Convexity means averaging cannot increase the objective.
informal · Lemma L-1 For m≥2, a>b>0, and r,κ≥0, averaging within communities and over community swaps preserves both optimal values: the covariance relaxation and the optimization over sign-symmetric assignment laws.
The resulting matrix X(u,v) has only two off-diagonal entries:
- u: covariance between distinct units in the same community.
- v: covariance between units in opposite communities.
The assignment law can likewise treat units within each community exchangeably: permuting their labels does not change its distribution.
Three Variance Directions
A symmetric covariance has three kinds of eigenvalues, measuring variance along orthonormal directions:
q=2(m−1),x=1−u,y=1+(m−1)u−mv,zsp=1+(m−1)u+mv.
- x: variance in contrasts among units within communities; there are q such directions.
- y: variance in the contrast between communities.
- zsp: variance in the aggregate direction shared by all units.
The subscript distinguishes zsp from an assignment realization z.
Positive semidefiniteness becomes nonnegative variance. The relaxed feasible set is
Tm={(x,y,zsp):x,y,zsp≥0, qx+y+zsp=2m},
This triangle allocates a fixed total variance of 2m, because every treatment sign has variance one.
Direction Costs
The reduced coefficients are
cx=q((a+b)+a+br),cy=2b+2br,cz=2m.
They price the three variance directions. The criterion becomes
ϕr,κ(x,y,zsp)=cxx+cyy+czzsp+κqx2+y2+zsp2,
Here ϕr,κ is the original objective expressed in variance coordinates.
The costs per unit of total variance are cx/q, cy, and cz. When κ=0, the cheapest directions receive all the mass.
The norm term can favor spreading mass across directions. But optimizing these costs still does not enforce binary feasibility.
Main Result
Define the parity requirement dm=0 for even m, and dm=2/m for odd m.
The exact implementability loss is
Δm±(r,κ)=(x,y,zsp)∈Tmy+zsp≥dminfϕr,κ(x,y,zsp)−(x,y,zsp)∈Tminfϕr,κ(x,y,zsp).
The first minimum is the best actual randomization; the second is the covariance benchmark. They differ only by the parity restriction.
informal · Theorem T-4 For m≥2, a>b>0, and r,κ≥0, a finite calculation gives the exact loss. Loss is zero iff some relaxed optimizer passes parity; the relaxed optimizer is unique when κ>0.
Even m gives zero loss throughout. For odd m, we need to explain why parity is both necessary and sufficient.
Why Parity Is Necessary
The community treatment-sign sums are
(SA,SB)=(i∈Am∑Zi,i∈Bm∑Zi).
Their second moments determine the two community-level variances:
y=E[(SA−SB)2]/(2m) measures variation in the community contrast.
zsp=E[(SA+SB)2]/(2m) measures variation in the aggregate.
Consequently, y+zsp=(E[SA2]+E[SB2])/m.
For odd m, each sum has absolute value at least one. Hence
y+zsp≥dm.
In the example, m=3, so at least 2/3 of variance must remain outside the within-community contrasts.
Vertex Randomizations
For odd m, the feasible triangle has four vertices. Each has a concrete assignment law.
Choose the community sums in the table, place the required signs uniformly within each community, and apply a fair global sign flip.
| Community sums before the flip | Variance coordinates (x,y,zsp) | Assignment pattern | |---|---|---| | (m,−m) | (0,2m,0) | Each community is homogeneous; labels oppose | | (m,m) | (0,0,2m) | All units have the same label | | (1,−1) | ((2m−dm)/q,dm,0) | Communities are minimally balanced; sums oppose | | (1,1) | ((2m−dm)/q,0,dm) | Communities are minimally balanced; sums agree |
Uniform placement makes unit labels exchangeable within communities. The global flip ensures sign symmetry; these laws also respect community swapping.
The first two laws attain the original community-level corners. The last two attain the endpoints created by the parity restriction.
Every point in the parity-truncated triangle is a convex combination of its vertices.
To implement a desired point:
- Choose a vertex with the weights of that convex combination.
- Draw an assignment from that vertex’s law.
Second-moment matrices average under mixtures. The resulting covariance therefore has exactly the desired variance coordinates.
For even m, uniform assignments with sums (0,0) attain the remaining corner, (m/(m−1),0,0). Together with the two homogeneous laws, they generate the entire relaxed triangle.
informal · Lemma L-6 For integer m≥2, a block-symmetric relaxed covariance is generated by a sign-symmetric, block-exchangeable assignment law iff y+zsp≥dm.
Parity exhausts feasibility because we have constructed every vertex and every mixture of them.
Cut Exactness
The cut law Pcut flips a fair coin between assigning treatment to all of Am and assigning it to all of Bm.
Its covariance is Xcut=X(1,−1), with coordinates (0,2m,0).
If cx/q>cy+κ and cz>cy+κ, moving variance away from the community contrast costs more than it can save in the norm penalty.
A sufficient parameter region is
r<rcut(m,a,b,κ):=max{0,min(2b(a+b)(1−a−bκ),2b(2m−2b−κ))}.
The threshold rcut guarantees those two cost comparisons.
informal · Theorem T-1 For m≥2, a>b>0, r,κ≥0, and r<rcut, the cut law attains the unique relaxed optimum and Δm±(r,κ)=0.
Positive Loss
At the pure within-community corner, the cost per unit of mass includes the norm contribution: cx/q+κ/q.
If both alternatives cost more—cy>cx/q+κ/q and cz>cx/q+κ/q—moving mass out of that corner raises the criterion.
The unique relaxed optimum is then Xspread=X(−1/(m−1),0), with coordinates (m/(m−1),0,0).
For odd m, it fails parity: it assigns no variance to either community total. Every actual design must move some mass into a more expensive direction.
In the example, the costs are 17/3, 6, and 6. With κ=0, the within-community direction is strictly cheapest.
Assume odd m and a+3b<2m. This scale condition leaves room for the within-community direction to be strictly cheapest.
The norm weight must lie below the ceiling
q=2(m−1),κgap(m,a,b)=a+b(2m−a−3b)(a−b)q,
with 0≤κ<κgap.
The cost comparisons give bounds Rx−=2b(a+b)(1+κ/((a−b)q)) and Rx+=(a+b)(2m−a−b−κ/q).
They define the stated interval endpoints:
rgap−(m,a,b,κ)=2Rx−(m,a,b,κ)+Rx+(m,a,b,κ),rgap+(m,a,b,κ)=Rx+(m,a,b,κ).
informal · Theorem T-3 For m≥2, a>b>0, odd m, a+3b<2m, 0≤κ<κgap, and rgap−<r<rgap+, Xspread is uniquely relaxed-optimal and Δm±>0.
For our example, this interval is (7.5,9), containing r=8.
Solving the Relaxation
Use variance masses tx=qx, ty=y, and tz=zsp, totaling M=2m.
Write their linear costs as α=(cx/q,cy,cz), and their norm weights as β=(1/q,1,1).
The objective in mass coordinates is
Φ(t)=i∈I∑αiti+κi∈I∑βiti2.
Here I={x,y,zsp} indexes the three directions.
For κ>0, enumerate nonempty supports S: candidate sets of directions receiving positive mass. Their common marginal cost λ satisfies
i∈S∑βi(λ−αi)2=κ2,αi<λ for every i∈S,λ≤αj for every j∈/S.
The equality determines the multiplier; the inequalities check that active directions receive mass and inactive directions need none. Exactly one pair passes these checks.
The selected support S and common marginal cost λ give the relaxed allocation explicitly:
ti⋆=⎩⎨⎧M∑h∈S(λ−αh)/βh(λ−αi)/βi,0,i∈S,i∈/S.
Each active direction receives a share proportional to its cost advantage λ−αi, adjusted by its norm weight βi. The denominator makes the shares sum to total mass M.
The relaxed criterion value is
Φ(t⋆)=Mλ.
Recover variance coordinates as (tx⋆/q,ty⋆,tz⋆), then check parity.
When κ=0, put mass only in directions with the smallest αi. If costs tie, retain a parity-feasible optimum whenever one exists.
Correcting the Optimum
If no relaxed optimizer passes parity, convexity puts the feasible optimum on the boundary segment
Hdm={(2m−dm,s,dm−s):0≤s≤dm}
These are mass coordinates. The within-community mass is fixed; s divides the required remaining mass between the community contrast and aggregate directions.
Set M=2m, d=dm, δ=αy−αz, and A=βx(M−d)2. Thus δ is their linear cost difference, and A is the fixed contribution to the squared norm.
For κ>0, the minimizing split is
s⋆=⎩⎨⎧0,d,2d−δ(A+d2/2)/(κ2−δ2/2),δ≥A+d2κd,δ≤−A+d2κd,otherwise.
A large cost difference selects an endpoint; otherwise the norm penalty favors an interior split. For κ=0, choose the cheaper endpoint.
Evaluate the criterion, subtract the relaxed value, and implement the corrected point by mixing vertex laws.
Example Completed
Return to m=3, a=2, b=1, r=8, and κ=0.
The direction costs are 17/3, 6, and 6. The relaxation puts all six units of variance mass into the cheapest direction: coordinates (3/2,0,0), with value 34.
Parity requires moving 2/3 of mass out. The corrected coordinates (4/3,2/3,0) have value 308/9.
The implementing law is concrete:
- Flip a fair coin between community sums (1,−1) and (−1,1).
- In each community, choose uniformly among assignments with its selected sum.
Then E[SA2]=E[SB2]=1, the aggregate sum is zero, and the squared difference of sums is four. Thus y=2/3, zsp=0, and the fixed total variance gives x=4/3.
Δ3±(8,0)=9308−34=92≈0.222,
The value calculation and the assignment law attain the same optimum.
Takeaways
- Symmetry turns covariance design into allocating variance among three directions. Binary feasibility adds exactly the community-size parity restriction.
- Homogeneous and minimally balanced community assignments generate every feasible covariance by mixtures. Even communities therefore have zero loss throughout.
- Solve the finite support problem and check parity. If it fails, optimize on one boundary segment, compute the exact loss, and construct its randomization.
Appendix: Cut-corner Exactness
The strict cut region makes the two-point cut law attain the unique relaxed optimum with zero implementability loss.
Assume the two-block homophily condition in Assumption A-1. Let r,κ∈R satisfy
- (Nonnegative tradeoff.) 0≤r.
- (Nonnegative robustness.) 0≤κ.
- (Cut region.) r<rcut(m,a,b,κ):=max{0,min(2b(a+b)(1−a−bκ),2b(2m−2b−κ))}.
Then Xcut∈Emblk, and for every X∈Emblk with X=Xcut, Fr,κ(Xcut)<Fr,κ(X), where Fr,κ is the objective in Definition P-6. Moreover, Δm±(r,κ)=0, with Δm± as in Definition P-7. Finally, Xcut∈Cm±, and for every X∈Cm± with X=Xcut, Fr,κ(Xcut)<Fr,κ(X), where Cm± is the class in Definition P-5; the cut design satisfies Pcut∈PmsymandX(Pcut)=Xcut, with Pmsym as in Definition P-4.
Appendix: Robust Corner Exactness
Independent fair assignment is exactly optimal at finite robustness only on the specified parameter locus, and is the limiting relaxed target elsewhere.
Let m∈N and a,b,r∈R. Suppose that
- (Two-block homophily.) Assumption A-1 holds for (m,a,b).
- (Nonnegative pseudoinverse weight.) r≥0.
For the objective Fr,κ of Definition P-6, the following statements hold. First, there exists a finite nonnegative robustness weight κ such that In∈Emblk and Fr,κ(In)≤Fr,κ(X)for every X∈Emblk, if and only if a+3b=2mandr=2b(a+b). Second, on this affine-balanced locus, every positive robustness weight makes In the unique relaxed minimizer: if a+3b=2mandr=2b(a+b), then for every κ>0, In∈Emblk and, for every X∈Emblk with X=In, Fr,κ(In)<Fr,κ(X). Third, the iid design satisfies Piid∈Pmsym for the block-exchangeable class of Definition P-4, and X(Piid)=In. Finally, off the affine-balanced locus, In is never a minimizer at any positive finite robustness weight, and relaxed minimizers converge entrywise to In as κ→∞. Precisely, if ¬(a+3b=2m and r=2b(a+b)), then for every κ>0 it is not the case that Fr,κ(In)≤Fr,κ(X)for every X∈Emblk. Moreover, for any family (Xκ)κ∈R such that, for every κ>0, Xκ∈EmblkandFr,κ(Xκ)≤Fr,κ(X) for every X∈Emblk, each matrix entry converges to the corresponding entry of In: (Xκ)ij⟶(In)ijas κ→∞ for every i,j∈{1,…,n}.
Appendix: Positive-gap Window
Odd community size creates a nonempty parameter interval with a unique unattainable relaxed optimum and strictly positive loss.
Suppose Assumption A-1 and Assumption A-3 hold for the two-block model with block size m and weights a,b. Let q=2(m−1),κgap(m,a,b)=a+b(2m−a−3b)(a−b)q, and rcut,gap(m,a,b,κ)=max{0,2b(a+b)(1−a−bκ)}. Define Rx−(m,a,b,κ)=2b(a+b)(1+(a−b)qκ),Rx+(m,a,b,κ)=(a+b)(2m−a−b−qκ), and rgap−(m,a,b,κ)=2Rx−(m,a,b,κ)+Rx+(m,a,b,κ),rgap+(m,a,b,κ)=Rx+(m,a,b,κ). Then the following two statements hold.
- (Odd block size.) If Assumption A-4 holds, then for every κ satisfying 0≤κ<κgap(m,a,b), one has rcut,gap(m,a,b,κ)<rgap−(m,a,b,κ)<rgap+(m,a,b,κ). Moreover, for every rgap−(m,a,b,κ)<r<rgap+(m,a,b,κ), the spread covariance Xspread belongs to Emblk, and it is the unique strict minimizer of the design objective Fr,κ from Definition P-6 over Emblk: for every X∈Emblk with X=Xspread, Fr,κ(Xspread)<Fr,κ(X). At the same time, Xspread∈/Cm±, where Cm± is the implementable covariance class of Definition P-5, and the implementability loss of Definition P-7 satisfies Δm±(r,κ)>0.
- (Even block size.) If m is even, then every covariance in the block elliptope is implementable: Emblk⊆Cm±.
Appendix: Sharp Rounding Loss
The finite support calculation and parity-boundary correction compute the exact implementability loss for every admissible parameter choice.
Under Assumption A-1, fix r,κ∈[0,∞). Let q=2(m−1),cx=q((a+b)+a+br),cy=2b+2br,cz=2m, let Tm={(x,y,zsp):x,y,zsp≥0, qx+y+zsp=2m}, let ϕr,κ(x,y,zsp)=cxx+cyy+czzsp+κqx2+y2+zsp2, and let dm=0 if m is even and dm=2/m if m is odd. Then:
- (Sharp equality and range.) ρ⋆(m,a,b,r,κ)=Δm±(r,κ),ρ⋆(m,a,b,r,κ)≥0,Δm±(r,κ)≥0, where Δm± is the implementability gap of Definition P-7.
- (Zero loss.) ρ⋆(m,a,b,r,κ)=0 if and only if there exists (x,y,zsp)∈Tm such that ϕr,κ(x,y,zsp)≤ϕr,κ(x′,y′,zsp′)for every (x′,y′,zsp′)∈Tm, and dm≤y+zsp.
- (Strict robustness.) If κ>0, then there is a unique relaxed minimizer of ϕr,κ over Tm. Moreover, ρ⋆(m,a,b,r,κ)=0 if and only if every relaxed minimizer (x,y,zsp)∈Tm satisfies dm≤y+zsp.
- (Linear case.) If κ=0, then for every (x,y,zsp)∈Tm, the point (x,y,zsp) minimizes ϕr,0 over Tm if and only if x=0⇒qcx≤cy and qcx≤cz, y=0⇒cy≤qcx and cy≤cz, and zsp=0⇒cz≤qcx and cz≤cy.
- (Active-set formula.) If κ>0, then there exist an active support S⊆{x,y,zsp} and a multiplier λ∈R such that S and λ are admissible for α♯=(qcx,cy,cz),β♯=(q1,1,1),κ. Writing tS,λ=(txS,λ,tyS,λ,tzS,λ) for the associated active-set point on the simplex of mass 2m, the reduced point (qtxS,λ,tyS,λ,tzS,λ) belongs to Tm, minimizes ϕr,κ over Tm, and the relaxed reduced value is 2mλ.
- (Truncation correction.) If no relaxed minimizer (x,y,zsp)∈Tm satisfies dm≤y+zsp, then the implementable reduced value equals the weighted-simplex objective with coefficients α♯, weights β♯, and robustness weight κ, evaluated at the point on the truncation segment Hdm={(2m−dm,s,dm−s):0≤s≤dm} selected by truncSelector(2m,dm,α♯,β♯,κ): valimpl(m,a,b,r,κ)=Φα♯,β♯,κ(2m−dm,s⋆,dm−s⋆), where s⋆=truncSelector(2m,dm,α♯,β♯,κ).
- (Even block size.) If m is even, then ρ⋆(m,a,b,r,κ)=0.