TL;DR
Pure randomization in clinical trials and A/B tests frequently introduces "accidental bias"—imbalances in baseline covariates between control and treatment groups that elevate Type I and Type II errors. WHOMP (Wasserstein Homogeneous Partitioning) formulates data splitting as an optimal transport problem that minimizes the Wasserstein-2 distance between each subgroup and the full sample. By proving an equivalence to balanced $K$-means clustering, the authors provide polynomial-time approximation algorithms that ensure subgroups faithfully preserve the underlying multidimensional data distribution.
What Problem Does This Paper Address?
In randomized controlled trials (RCTs) and causal inference experiments, researchers rely on random assignment to balance confounding covariates across groups. However, the theoretical guarantees of randomization rely on the Law of Large Numbers. In practice—especially in clinical trials with modest sample sizes or high-dimensional covariates—randomization often results in accidental bias: treatment and control groups end up with mismatched distributions by sheer chance.
Existing remedies have significant drawbacks:
- Covariate-adaptive randomization / minimization typically discretizes continuous variables heuristically and matches only the first moments (means), ignoring variance, covariance, and higher-order statistics.
- Rerandomization rejects imbalanced splits based on manual thresholds, introducing subjectivity.
- Anti-clustering maximizes within-group diversity, but often inadvertently causes severe scale and variance discrepancies across subgroups (e.g., balancing means by pairing extreme points together).
The central question is: How can we partition a finite sample into uniform-sized subgroups that maximize within-group diversity while strictly preserving distributional similarity across subgroups?
Methods
The paper introduces the Wasserstein Homogeneity Partition (WHOMP) objective. Given a sample dataset $X$ of size $N = K \cdot c$, the goal is to partition the data into $c$ subgroups $Q = \{q_1, \dots, q_c\}$, each containing $K$ items, to minimize the sum of squared Wasserstein-2 distances to the original sample: $$\min_{Q \in \mathcal{P}(N, c), |q| \equiv K} \sum_{q \in Q} \mathcal{W}_2^2(X_q, X)$$
Because computing the exact global optimum is NP-hard, the authors derive fundamental theoretical equivalences to design practical algorithms:
- Duality with Balanced $K$-Means: Solving WHOMP is mathematically equivalent to partitioning the dataset into $K$ clusters of size $c$ using balanced $K$-means (which minimizes within-cluster variance). Once balanced clusters are formed, a valid WHOMP solution is obtained by selecting exactly one item from each cluster.
- Mean vs. Variance Trade-Off: The Law of Total Variance reveals an inherent trade-off: $\operatorname{Var}(X) = \operatorname{Var}(\mathbb{E}(X_Q)) + \frac{1}{|Q|}\sum_{q \in Q}\operatorname{Var}(X_q)$. Extreme "anti-clustering" minimizes centroid variance at the cost of distorting subgroup variances.
- Two Algorithmic Realizations:
- WHOMP Random: Computes balanced $K$-means clusters, then samples one element per cluster without replacement. This balances centroid stability and variance stability.
- WHOMP Matching: Uses multi-marginal optimal transport to align cluster points against their Wasserstein barycenter, minimizing expected within-subgroup variance.
Balanced $K$-means is implemented via iterative optimal transport (resembling a capacity-constrained Lloyd's algorithm using Birkhoff's theorem).
Dataset (N points)
│
▼ [Balanced K-Means via Iterative Optimal Transport]
K balanced clusters (each of size c)
│
├──► WHOMP Random: Sample 1 point per cluster without replacement
└──► WHOMP Matching: Optimal transport coupling via Wasserstein barycenter
│
▼
c maximally homogeneous subgroups (each of size K)
Datasets
The authors evaluated WHOMP across diverse modalities:
- Synthetic Tabular Data (Gaussian Mixture Model): 60 data points drawn from three 2D Gaussian components to simulate small-sample clinical settings.
- Real-World Tabular Data (NPI Dataset): Responses from the Narcissistic Personality Inventory psychometric test (evaluating 60-sample splits across 500 trials).
- High-Dimensional Image Data (MNIST): 10,000 digit images projected into 2D using t-SNE prior to partitioning.
- Graph Data (Stochastic Block Model): 3-block random graphs mapped to 2D Euclidean space using spectral embedding (eigenvectors of the normalized graph Laplacian).
Key Insights and Ideas
- Zero WHOMP Eliminates Split-Induced Errors: When subgroups have zero Wasserstein distance to the full sample ($\mathcal{W}_2(X_q, X) = 0$), any treatment effect test truthfully reflects population effectiveness without Type I or Type II errors caused by splitting.
- Variance Bound on Treatment Effect: For uniformly $L$-Lipschitz outcome functions, the mean squared error of the treatment effect estimator $\hat{\tau}$ is directly bounded by the WHOMP objective: $\mathbb{E}[\|\hat{\tau} - \tau\|^2] \le L^2 \frac{|Q|}{|Q|-1}\sum_{q \in Q} \mathcal{W}_2^2(X_q, X)$.
- Connecting Anti-Clustering to Barycenters: Anti-clustering and Wasserstein barycenter matching sit at opposite ends of a spectrum. While anti-clustering forces group centroids together (often causing scale distortions), Wasserstein barycenter matching guarantees consistent scale across subgroups.
Key Results
WHOMP consistently outperformed standard random splitting and Pocock & Simon's covariate-adaptive randomization across all domains:
- Wasserstein Distance to Sample (GMM, 4 subgroups): WHOMP Random ($2.575 \pm 0.200$) and WHOMP Matching ($2.634 \pm 0.199$) more than halved the distance compared to Random ($5.600 \pm 0.849$) and Covariate-Adaptive ($5.469 \pm 0.886$). In fact, the worst-case WHOMP split was on par with the best-case random split.
- Generalization Across Subgroups: In train/test evaluation across generated splits (predicting labels via Logistic Regression and SVM), WHOMP maintained higher test accuracy with dramatically lower standard deviation as subgroup count increased (e.g., SVM on 6 subgroups achieved $1.000 \pm 0.000$ accuracy for WHOMP matching vs. $0.982 \pm 0.061$ for covariate-adaptive).
- Images & Graphs: On MNIST, WHOMP subgroups achieved higher normalized digit entropy ($0.973$ vs. $0.963$ baseline), confirming more uniform class representation. On graph data, WHOMP preserved the Laplacian spectrum across subgraphs with lower variation across trials.
Limitations and Future Work
- Static vs. Sequential Allocation: The current algorithm requires the entire sample upfront to compute balanced $K$-means and barycenters, making it inapplicable to sequentially arriving trial participants without adaptation.
- Dimensionality: Because optimal transport scales poorly in high dimensions, high-dimensional inputs (e.g., images, graphs) rely on dimensionality reduction (t-SNE, spectral embedding), inheriting any distortions introduced by those embeddings.
- Future Directions: The authors outline two immediate avenues: adapting WHOMP for sequentially arriving patient data, and calibrating WHOMP thresholds to intentionally allow controlled distributional shifts for cross-validation and holdout validation schemes.
Summary updated