CausalSmith · seminar slides

Estimating Average Treatment Effects with Many Categories

Rare covariate categories need not prevent accurate estimation of an average treatment effect.

Research Question

We observe nn independent units with binary treatment AA, binary outcome YY, and an adjustment covariate with dd categories. Treatment probabilities and outcome means can vary arbitrarily across categories.

The standard rule estimates each category’s treatment–control contrast and weights it by empirical prevalence.

  • Its all-category estimate is ∑k=1dh^k\sum_{k=1}^{d}\widehat h_k, where h^k\widehat h_k is the empirical ratio contribution shown on “Heavy categories,” evaluated using the full sample.
  • An unobserved treatment arm contributes zero.
  • Zeng et al. (2024) show that regression, inverse probability weighting, and doubly robust estimators coincide with this rule when categorywise quantities are fitted on the same sample.

Their worst-case mean-squared error has scale d2/n2+1/nd^2/n^2+1/n, and consistency requires d/n→0d/n\to0.

Can estimating the average directly improve on estimating every category’s contrast?

Key Idea

Use ratios for abundant categories and polynomial estimates for sparse categories’ contributions to the average.

Let πk\pi_k be the treatment probability in category kk. Fixed overlap means ϵ≤πk≤1−ϵ\epsilon\le\pi_k\le1-\epsilon: both arms have positive population probability within every relevant category.

For fixed 0<ϵ<1/20<\epsilon<1/2, we attain the mean-squared-error scale

rn,d:=1n+d2n2(log⁡n)2, r_{n,d}:=\frac1n+\frac{d^2}{n^2(\log n)^2},

where rn,dr_{n,d} combines ordinary sampling error with the cost of many categories.

The guarantee holds for n≥Nϵn\ge N_\epsilon and 0<d≤ρϵnlog⁡n0<d\le\rho_\epsilon n\log n, with constants depending only on overlap.

The polynomial estimates use counts without dividing by an observed treatment-arm count. This repairs the sparse-category failure of empirical ratios.

Example

At exact randomization, πk=1/2\pi_k=1/2 in every category. Outcome means can still differ arbitrarily across categories.

τ^ctr=1n∑i=1n2(2Ai−1)(Yi−12). \widehat\tau_{\mathrm{ctr}} = \frac1n\sum_{i=1}^n 2(2A_i-1)\left(Y_i-\frac12\right).

The centered estimator τ^ctr\widehat\tau_{\mathrm{ctr}} averages outcomes centered at one-half, with opposite signs for treatment and control.

For every positive n,dn,d, its worst-case mean-squared error is at most 1/n1/n; minimax error is at least 1/(100n)1/(100n).

Known randomization removes the need to estimate category treatment probabilities. With unknown probabilities, how can sparse categories still contribute useful information?

Model

We observe independent, identically distributed units Oi=(Xi,Ai,Yi)O_i=(X_i,A_i,Y_i) from a law PP, with Xi∈{1,…,d}X_i\in\{1,\ldots,d\}.

For category kk:

  • pk=P(X=k)p_k=P(X=k) is its population prevalence.
  • μak=EP[Y∣A=a,X=k]\mu_{ak}=E_P[Y\mid A=a,X=k] is its outcome mean in arm aa.
  • qaky=P(A=a,X=k,Y=y)q_{aky}=P(A=a,X=k,Y=y) is a joint treatment–outcome mass.
  • qk=(q0k0,q0k1,q1k0,q1k1)q_k=(q_{0k0},q_{0k1},q_{1k0},q_{1k1}) collects its four masses.

τ(P)=∑k=1dϕ(qk). \tau(P) = \sum_{k=1}^{d}\phi(q_k).

The target τ(P)\tau(P) adds the contributions ϕ(qk)=pk(μ1k−μ0k)\phi(q_k)=p_k(\mu_{1k}-\mu_{0k}): prevalence times the treatment–control contrast.

Small prevalence limits a category’s contribution even when its contrast is difficult to estimate.

Assumptions

Every category with pk>0p_k>0 satisfies

ϵ≤πk≤1−ϵ. \epsilon \le \pi_k \le 1-\epsilon .

Overlap guarantees population support for both arms. A finite sample can still contain no observations from one arm.

The statistical result allows arbitrary category prevalences and outcome means, without smoothness or sparsity connecting categories.

For τ(P)\tau(P) to be the causal ATE, additionally require:

  • Consistency: Y=Y(A)Y=Y(A); the recorded outcome is the potential outcome under the treatment received.
  • Conditional exchangeability: (Y(0),Y(1))⊥A∣X(Y(0),Y(1))\perp A\mid X; treatment carries no additional information about potential outcomes within a category.

In the randomized example, ϵ=1/2\epsilon=1/2 forces every πk=1/2\pi_k=1/2.

Main Result

Let En,d,ϵ\mathcal E_{n,d,\epsilon} be the class of iid sample laws satisfying overlap. The notation P⊗nP^{\otimes n} means nn independent draws from PP.

The minimax risk Rn,d,ϵ\mathsf R_{n,d,\epsilon} is the smallest worst-case mean-squared error attainable by any estimator.

informal · Theorem T-2 For fixed 0<ϵ<1/20<\epsilon<1/2, n≥Nϵn\ge N_\epsilon, and 0<d≤ρϵnlog⁡n0<d\le\rho_\epsilon n\log n, hybrid worst-case MSE is at most Cϵrn,dC_\epsilon r_{n,d}, and minimax MSE is at least aϵrn,da_\epsilon r_{n,d}.

aϵrn,d≤Rn,d,ϵ≤sup⁡P⊗n∈En,d,ϵEP ⁣[(τ^nhyb−τ(P))2]≤Cϵrn,d. a_\epsilon r_{n,d} \le \mathsf R_{n,d,\epsilon} \le \sup_{P^{\otimes n}\in\mathcal E_{n,d,\epsilon}} E_P\!\left[\left(\widehat\tau_n^{\mathrm{hyb}}-\tau(P)\right)^2\right] \le C_\epsilon r_{n,d}.

Here τ^nhyb\widehat\tau_n^{\mathrm{hyb}} is our ratio–polynomial estimator. The positive constants aϵ,Cϵ,ρϵa_\epsilon,C_\epsilon,\rho_\epsilon and cutoff NϵN_\epsilon depend only on overlap.

Its upper bound matches the lower bound for every estimator, improving the category term by a squared logarithmic factor over standard ratios.

Heavy Categories

Split the sample in half: the pilot half selects categories, and the independent estimation half estimates their contributions.

Let m0,m1m_0,m_1 be the split sizes and L=log⁡(en)L=\log(en). A category is heavy when its pilot count exceeds 256L256L; the remaining categories are light.

For heavy categories, retain the standard ratio contribution:

h^k=Nk(1)m1{N1k1(1)N1k(1)1{N1k(1)>0}−N0k1(1)N0k(1)1{N0k(1)>0}}. \widehat h_k = \frac{N_k^{(1)}}{m_1} \left\{ \frac{N^{(1)}_{1k1}}{N^{(1)}_{1k}}\mathbf1\{N^{(1)}_{1k}>0\} - \frac{N^{(1)}_{0k1}}{N^{(1)}_{0k}}\mathbf1\{N^{(1)}_{0k}>0\} \right\}.

Superscript 11 denotes estimation-half counts: Nk(1)N_k^{(1)} is the category total, Nak(1)N_{ak}^{(1)} its arm total, and Nak1(1)N_{ak1}^{(1)} its outcome-one count.

This computes empirical prevalence times empirical contrast, setting an empty arm’s contribution to zero.

Pilot abundance and overlap control missing-arm error. The improvement comes from changing what we do with light categories.

Light Categories

Consider one light category with four population masses u=(u00,u01,u10,u11)u=(u_{00},u_{01},u_{10},u_{11}) and an unknown treatment probability.

Write sa(u)=ua0+ua1s_a(u)=u_{a0}+u_{a1} for arm mass, s(u)=s0(u)+s1(u)s(u)=s_0(u)+s_1(u) for total mass, and ta(u)=ua1t_a(u)=u_{a1} for outcome-one mass.

Its contribution is ϕ(u)=s(u)[t1(u)/s1(u)−t0(u)/s0(u)]\phi(u)=s(u)[t_1(u)/s_1(u)-t_0(u)/s_0(u)].

Replace the reciprocals by a polynomial:

PM,B(u)=s(u)t1(u)BGM ⁣(s1(u)B)−s(u)t0(u)BGM ⁣(s0(u)B). P_{M,B}(u) = \frac{s(u)t_1(u)}B G_M\!\left(\frac{s_1(u)}B\right) - \frac{s(u)t_0(u)}B G_M\!\left(\frac{s_0(u)}B\right).

Here BB bounds light-category mass, MM controls degree, and GMG_M supplies the reciprocal approximation. The expression computes an approximation to the category’s mass-weighted contrast.

We approximate the contribution to the average, allowing small categories to tolerate inaccurate conditional contrasts.

Polynomial Construction

Let TMT_M be the degree-MM Chebyshev polynomial, characterized by TM(cos⁡θ)=cos⁡(Mθ)T_M(\cos\theta)=\cos(M\theta).

HM(x)=1−TM(1−2x)2M2,EM(x)=HM(x)x,GM(x)=1−EM(x)x, H_M(x)=\frac{1-T_M(1-2x)}{2M^2}, \qquad E_M(x)=\frac{H_M(x)}{x}, \qquad G_M(x)=\frac{1-E_M(x)}{x},

These formulas construct the reciprocal approximation GMG_M. The quotients extend to polynomials at zero.

For positive xx, xGM(x)=1−EM(x)xG_M(x)=1-E_M(x): EME_M measures the error from replacing the reciprocal.

Under overlap and s(u)≤Bs(u)\le B, the contribution error is at most 2B/(ϵM2)2B/(\epsilon M^2).

For our light category, overlap keeps each arm’s mass at least an ϵ\epsilon fraction of total mass. This converts reciprocal error into an absolute contribution error that shrinks quadratically with degree.

Unbiased Polynomial Estimation

Expand the approximating polynomial:

PM,B(u)=∑∣r∣≤Mcrur. P_{M,B}(u)=\sum_{|r|\le M}c_ru^r.

Here rr lists the four cell exponents, ∣r∣|r| is total degree, uru^r is their monomial, and crc_r is its coefficient.

Estimate it from counts:

P^k=∑∣r∣≤Mcr∏a,y(Naky(1))ray(m1)∣r∣. \widehat P_k = \sum_{|r|\le M} c_r \frac{\prod_{a,y}(N^{(1)}_{aky})_{r_{ay}}}{(m_1)_{|r|}}.

The falling factorial (z)t=z(z−1)⋯(z−t+1)(z)_t=z(z-1)\cdots(z-t+1), with (z)0=1(z)_0=1, counts ordered choices of distinct observations. Its normalization estimates each population monomial without bias.

Thus EP[P^k]=PM,B(qk)E_P[\widehat P_k]=P_{M,B}(q_k): sampling adds noise without adding approximation bias.

This approximation-and-moment strategy follows Jiao et al. (2015).

Return to the light category with unknown treatment probability.

The factor s(u)t1(u)s(u)t_1(u) includes the monomial u01u11u_{01}u_{11}: control outcome-one mass times treated outcome-one mass.

Its unbiased estimate is N0k1(1)N1k1(1)/(m1)2N^{(1)}_{0k1}N^{(1)}_{1k1}/(m_1)_2.

  • The numerator counts pairs of distinct observations, one from each outcome-one cell.
  • The denominator counts all ordered pairs in the estimation half.
  • If the treated arm is unobserved, this term equals zero and remains defined.

Every term of P^k\widehat P_k works this way. The denominators depend on sample size and degree, rather than the observed arm counts.

Across repeated samples, these terms recover the polynomial’s population value. The procedure estimates a contribution without first recovering an accurate treatment probability or conditional contrast.

Logarithmic Bias Improvement

The degree and mass scale are calibrated together:

M(n)=max⁡{2,⌊α0L⌋},B(n)=b0L/m1. M(n)=\max\{2,\lfloor\alpha_0L\rfloor\},\qquad B(n)=b_0L/m_1.

Here α0\alpha_0 is a fixed small numerical constant, b0=4096b_0=4096, and L=log⁡(en)L=\log(en). These choices are the same for every overlap level.

With high probability, pilot-light categories have pk≤B/4p_k\le B/4. Classification errors receive a separate mean-square bound.

  • Per-category approximation error is at most 2B/(ϵM2)2B/(\epsilon M^2).
  • With BB proportional to log⁡n/n\log n/n and MM proportional to log⁡n\log n, this is of order 1/(nlog⁡n)1/(n\log n).
  • Summing over at most dd categories and squaring gives the category term d2/(n2(log⁡n)2)d^2/(n^2(\log n)^2).

The remaining question is whether estimating a growing-degree polynomial costs too much sampling variance.

Sampling Cost per Category

Let Pˉk=PM,B(qk)\bar P_k=P_{M,B}(q_k) be the polynomial’s population value.

For a light category satisfying pk+4M/m1≤Bp_k+4M/m_1\le B and 4M2≤m14M^2\le m_1,

Var⁡P(P^k)≤8(e+1)(B6M)2\operatorname{Var}_P(\widehat P_k)\le8(\mathrm e+1)(B6^M)^2.

Why does the bound contain a small mass factor B2B^2?

  • Coefficients of GMG_M can grow exponentially: their absolute sum at arguments at most one is bounded by 6M6^M.
  • A degree-j+2j+2 contribution has coefficient scale B−j−1B^{-j-1}, but its count moments supply powers of the small cell masses.
  • Falling-factorial normalization cancels the corresponding sample-size powers.
  • When two observation tuples share observations, the moment bound inflates each cell mass by at most M/m1M/m_1. The mass condition keeps the scaled arguments within one.

These ingredients leave a second-moment scale (B6M)2(B6^M)^2. Small category mass offsets coefficient growth.

Aggregate Sampling Variance

Condition on the pilot and consider its selected categories with pk≤B/4p_k\le B/4. Independence of the estimation half makes this a fixed set.

Categories share a multinomial sample, so covariance also matters. For distinct light categories, covariance is at most 8M2(B6M)2/m18M^2(B6^M)^2/m_1.

Consequently, their aggregate sampling variance is at most

C{d+d2M2/m1}(B6M)2C\{d+d^2M^2/m_1\}(B6^M)^2,

where CC is a numerical constant.

The small degree constant ensures, for sufficiently large nn, (62M)2L6≤n(6^{2M})^2L^6\le n. Exponential coefficient growth is therefore affordable:

  • The diagonal term is at most Cd/(n3/2L)C d/(n^{3/2}L), bounded by C{1/n+d2/(n2L2)}C\{1/n+d^2/(n^2L^2)\}.
  • The covariance term is at most Cd2L/n5/2C d^2L/n^{5/2}, bounded by Cd2/(n2L2)C d^2/(n^2L^2).

Logarithmic degree improves bias while keeping aggregate sampling fluctuations within the target risk scale.

Putting the Pieces Together

Let H^n\widehat{\mathcal H}_n and L^n\widehat{\mathcal L}_n denote the pilot-selected heavy and light sets.

T^H=∑k∈H^nh^k,T^L=∑k∈L^nP^k. \widehat T_{\mathcal H} = \sum_{k\in\widehat{\mathcal H}_n}\widehat h_k, \qquad \widehat T_{\mathcal L} = \sum_{k\in\widehat{\mathcal L}_n}\widehat P_k.

These are the heavy ratio total and light polynomial total.

τ^nhyb=max⁡{−1,min⁡(1,T^H+T^L)}. \widehat\tau_n^{\mathrm{hyb}} = \max\{-1,\min(1,\widehat T_{\mathcal H}+\widehat T_{\mathcal L})\}.

Clipping keeps the estimate within the ATE’s feasible range and cannot increase squared error.

Heavy-category error, light approximation bias, light sampling variance, and pilot classification errors are all controlled at the target mean-square scale.

The matching lower bound from Zeng et al. (2024) establishes optimality.

Further Results

  • Computation: the estimator can be evaluated from split counts in at most K d M(n)4K\,d\,M(n)^4 arithmetic and comparison operations, for a universal constant KK.
  • Near randomization: for every positive n,dn,d and 0<ϵ≤1/20<\epsilon\le1/2, the centered estimator’s worst-case mean-squared error is at most 1/n+4(1/2−ϵ)21/n+4(1/2-\epsilon)^2.

The randomized example is the endpoint of the second bound: when every πk=1/2\pi_k=1/2, its category penalty vanishes.

Open Questions

What is the matching minimax lower envelope when overlap varies with sample size, ϵ=ϵn\epsilon=\epsilon_n, especially near exact randomization?

Our fixed-interior theorem establishes the sharp rate for each fixed 0<ϵ<1/20<\epsilon<1/2 in its calibrated range. The randomized endpoint has parametric risk for every positive dd.

A matching lower envelope for varying overlap would characterize the transition between these regimes.

Takeaways

  • For fixed 0<ϵ<1/20<\epsilon<1/2, n≥Nϵn\ge N_\epsilon, and 0<d≤ρϵnlog⁡n0<d\le\rho_\epsilon n\log n, minimax mean-squared error has scale rn,d=1/n+d2/(n2(log⁡n)2)r_{n,d}=1/n+d^2/(n^2(\log n)^2).
  • Ratios handle abundant categories. Sparse categories use polynomial contribution estimates whose factorial moments are unbiased; small masses and a small logarithmic degree control their sampling cost.
  • Within this range, parametric accuracy extends to d=O(nlog⁡n)d=O(\sqrt n\log n), and consistency holds exactly when d=o(nlog⁡n)d=o(n\log n).

Appendix: Sharp Fixed-interior Minimax Rate

Matching risk bounds establish the optimal scale, its parametric regime, and its consistency threshold for each fixed interior overlap level.

Theorem T-2 (Sharp fixed-interior minimax rate)

Fix an overlap level ϵ\epsilon with 0<ϵ<1/20<\epsilon<1/2. Then there are constants aϵ,ρϵ,Cϵ>0a_\epsilon,\rho_\epsilon,C_\epsilon>0 and an integer Nϵ<∞N_\epsilon<\infty such that, writing rn,d:=1n+d2n2(log⁡n)2, r_{n,d}:=\frac1n+\frac{d^2}{n^2(\log n)^2}, the following statements hold.

  • (Matched minimax envelope.) For every n,dn,d, every single-observation law PP, and every sample law μn\mu_n in the experiment class En,d,ϵ\mathcal E_{n,d,\epsilon} of Definition P-1, if d>0,n≥Nϵ,d≤ρϵnlog⁡n, d>0,\qquad n\ge N_\epsilon,\qquad d\le \rho_\epsilon n\log n, then the minimax risk Rn,d,ϵ\mathsf R_{n,d,\epsilon} of Definition P-6 and the truncated balanced ratio-polynomial hybrid estimator τ^nhyb\widehat\tau_n^{\mathrm{hyb}} of Definition P-5 satisfy aϵrn,d≤Rn,d,ϵ≤sup⁡P⊗n∈En,d,ϵEP ⁣[(τ^nhyb−τ(P))2]≤Cϵrn,d. a_\epsilon r_{n,d} \le \mathsf R_{n,d,\epsilon} \le \sup_{P^{\otimes n}\in\mathcal E_{n,d,\epsilon}} E_P\!\left[\left(\widehat\tau_n^{\mathrm{hyb}}-\tau(P)\right)^2\right] \le C_\epsilon r_{n,d}.
  • (Parametric interior.) For every K>0K>0 there is a constant CK>0C_K>0 such that, for every n,dn,d, every single-observation law PP, and every sample law μn\mu_n in En,d,ϵ\mathcal E_{n,d,\epsilon}, if d>0,n≥Nϵ,d≤Knlog⁡n,d≤ρϵnlog⁡n, d>0,\qquad n\ge N_\epsilon,\qquad d\le K\sqrt n\log n,\qquad d\le \rho_\epsilon n\log n, then aϵn≤Rn,d,ϵ≤CKn. \frac{a_\epsilon}{n} \le \mathsf R_{n,d,\epsilon} \le \frac{C_K}{n}.
  • (Consistency threshold.) For every pair of integer sequences nj,djn_j,d_j with nj→∞n_j\to\infty, dj>0d_j>0 eventually, and dj≤ρϵnjlog⁡nj d_j\le \rho_\epsilon n_j\log n_j eventually, the minimax risk converges to zero exactly along the sequences satisfying the vanishing normalized dimension condition: Rnj,dj,ϵ→0⟺djnjlog⁡nj→0. \mathsf R_{n_j,d_j,\epsilon}\to 0 \quad\Longleftrightarrow\quad \frac{d_j}{n_j\log n_j}\to 0.

Appendix: Overlap Adaptive Hybrid Envelope

One statement gives computation, universal hybrid tuning, the oracle comparison, and the near-randomization and endpoint guarantees.

Theorem T-3 (Overlap adaptive hybrid envelope)

With τ^nhyb\widehat\tau_n^{\mathrm{hyb}} as in Definition P-5 and Rn,d,ϵ\mathsf R_{n,d,\epsilon} as in Definition P-6, the following assertions hold.

  • Computability. There is a universal integer K>0K>0 such that, for every n,d∈Nn,d\in\mathbb N, a real-arithmetic program based on the hybrid count input has operation count at most K d M(n)4 K\,d\,M(n)^4 and, for every sample O1,…,OnO_1,\ldots,O_n, evaluates exactly to τ^nhyb\widehat\tau_n^{\mathrm{hyb}}.
  • Fixed-overlap hybrid calibration. For every overlap level ϵ\epsilon with 0<ϵ<1/20<\epsilon<1/2, there are constants Cϵ,ρϵ>0C_\epsilon,\rho_\epsilon>0 and an integer NϵN_\epsilon such that, for all n,d∈Nn,d\in\mathbb N with n>0n>0, d>0d>0, n≥Nϵn\ge N_\epsilon, and d≤ρϵnlog⁡n, d\le \rho_\epsilon n\log n, the hybrid estimator satisfies sup⁡P⊗n∈En,d,ϵEP ⁣[(τ^nhyb−τ(P))2]≤Cϵ{1n+d2n2(log⁡n)2}. \sup_{P^{\otimes n}\in\mathcal E_{n,d,\epsilon}} E_P\!\left[\left(\widehat\tau_n^{\mathrm{hyb}}-\tau(P)\right)^2\right] \le C_\epsilon\left\{\frac1n+\frac{d^2}{n^2(\log n)^2}\right\}. For the deterministic estimator τ^Cϵ,ϵ={τ^nhyb,if Cϵ{1n+d2n2(log⁡n)2}≤1n+4(1/2−ϵ)2,τ^ctr,otherwise, \widehat\tau_{C_\epsilon,\epsilon} = \begin{cases} \widehat\tau_n^{\mathrm{hyb}}, & \text{if } C_\epsilon\left\{\frac1n+\frac{d^2}{n^2(\log n)^2}\right\} \le \frac1n+4(1/2-\epsilon)^2,\\ \widehat\tau_{\mathrm{ctr}}, & \text{otherwise,} \end{cases} one also has Rn,d,ϵ≤sup⁡P⊗n∈En,d,ϵEP ⁣[(τ^Cϵ,ϵ−τ(P))2]≤max⁡{Cϵ,4}[1n+min⁡{d2n2(log⁡n)2,(1/2−ϵ)2}]. \mathsf R_{n,d,\epsilon} \le \sup_{P^{\otimes n}\in\mathcal E_{n,d,\epsilon}} E_P\!\left[\left(\widehat\tau_{C_\epsilon,\epsilon}-\tau(P)\right)^2\right] \le \max\{C_\epsilon,4\} \left[ \frac1n+ \min\left\{ \frac{d^2}{n^2(\log n)^2},(1/2-\epsilon)^2 \right\} \right].
  • Centered randomization bound. For every overlap level ϵ\epsilon with 0<ϵ≤1/20<\epsilon\le 1/2 and every n,d∈Nn,d\in\mathbb N with n>0n>0 and d>0d>0, the centered estimator τ^ctr=1n∑i=1n2(2Ai−1)(Yi−12) \widehat\tau_{\mathrm{ctr}} = \frac1n\sum_{i=1}^n 2(2A_i-1)\left(Y_i-\frac12\right) satisfies sup⁡P⊗n∈En,d,ϵEP ⁣[(τ^ctr−τ(P))2]≤1n+4(1/2−ϵ)2. \sup_{P^{\otimes n}\in\mathcal E_{n,d,\epsilon}} E_P\!\left[\left(\widehat\tau_{\mathrm{ctr}}-\tau(P)\right)^2\right] \le \frac1n+4(1/2-\epsilon)^2.
  • Endpoint randomization bracket. For every n,d∈Nn,d\in\mathbb N with n>0n>0 and d>0d>0, 1100n≤Rn,d,1/2≤1n. \frac{1}{100n}\le \mathsf R_{n,d,1/2}\le \frac1n.