✗ Mechanism failed 2026

Multi-source conditional OT adversarial training

Implementation & benchmark of arXiv:2607.19761 — Harnessing Heterogeneous Data for Conditional Optimization via Optimal Transport

Usefulness8/10
Difficulty6/10
Novelty5/10

Source paper: Harnessing Heterogeneous Data for Conditional Optimization via Optimal Transport arXiv:2607.19761 ⓘ · analyzed Aug 30, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Replace ordinary empirical-risk minimization on pooled heterogeneous data with worst-case conditional risk over joint distributions that remain close to every source under an optimal-transport budget. The adversary transports source context-label pairs toward high-loss, target-event-like examples, while source-specific radii prevent arbitrary shifts. This should improve performance on rare target contexts and unseen domains without requiring abundant target labels.

Formulas

$$\min_{\boldsymbol{\beta}\in\mathcal{D}}\;\mathbb{E}_{Q}[\ell(\boldsymbol{\beta},\boldsymbol{\xi})\mid\boldsymbol{\xi}\in\mathcal{N}]$$
$$\sum_{k=1}^{K}\theta_k W\left(Q,\sum_{j=1}^{N_k}a_{k,j}\delta_{\widehat{\boldsymbol{\xi}}_{k,j}}\right)\leq m\varepsilon-\sum_{\boldsymbol{\alpha}\in\mathcal{A}}\boldsymbol{\theta}^{\top}\mathbf{s}_{\boldsymbol{\alpha}}$$
$$\|\mathbf{z}_{l,k,\alpha_k}\|_*\leq\lambda\theta_k$$
$$\widehat{L}_{\mathrm{rob}}(\theta)=\max_{\{\pi_{k,ij}\}}\frac{\sum_{k,i,j}\pi_{k,ij}\,\ell_\theta(\boldsymbol{\xi}_{k,j})\,g(\boldsymbol{\xi}_{k,j})}{\sum_{k,i,j}\pi_{k,ij}\,g(\boldsymbol{\xi}_{k,j})}$$

Mathematical statement

The conditional objective is $\min_{\boldsymbol{\beta}\in\mathcal{D}}\mathbb{E}_{Q}[\ell(\boldsymbol{\beta},\boldsymbol{\xi})\mid\boldsymbol{\xi}\in\mathcal{N}]$, where $\boldsymbol{\beta}$ is the model decision, $Q$ is a joint distribution over context and label, $\ell$ is the loss, and $\mathcal{N}$ is the conditioning event. For source $k$, the empirical law is $P_k=\sum_{j=1}^{N_k}w_{k,j}\delta_{\widehat{\boldsymbol{\xi}}_{k,j}}$, where $\widehat{\boldsymbol{\xi}}_{k,j}$ is a source sample and $w_{k,j}$ is its mass. The weighted ambiguity constraint is $\sum_{k=1}^{K}\theta_k W(Q,\sum_j a_{k,j}\delta_{\widehat{\boldsymbol{\xi}}_{k,j}})\leq m\varepsilon-\sum_{\boldsymbol{\alpha}\in\mathcal{A}}\boldsymbol{\theta}^{\top}\mathbf{s}_{\boldsymbol{\alpha}}$, where $W$ is Wasserstein distance induced by transport cost $c$, $\theta_k\geq0$ are source weights, $a_{k,j}$ are admissible reweighted source masses, $m$ is a conditional-mass scaling variable, and $\varepsilon$ is the transport budget. The paper's dual formulation imposes $\|\mathbf{z}_{l,k,\alpha_k}\|_*\leq\lambda\theta_k$, where $\mathbf{z}_{l,k,\alpha_k}$ is a source-specific dual slope, $\lambda$ is the global transport price, and $\|\cdot\|_*$ is the dual norm. In a finite minibatch, implement the equivalent primal adversary by maximizing weighted loss over nonnegative couplings subject to marginal constraints and a weighted transport-cost budget.

Implementation notes

Integrate the method at the loss layer during training, after each source minibatch is assembled and before the ordinary supervised loss is evaluated. For source $k$, use samples $\boldsymbol{\xi}_{k,i}=(x_{k,i},y_{k,i})$ and define a differentiable cost $C_{k,ij}=\|h_\phi(x_{k,i})-h_\phi(x_{k,j})\|_2^2+\rho\,\mathbf{1}[y_{k,i}\neq y_{k,j}]$, where $h_\phi$ is the encoder and $\rho$ controls label mismatch. Define a context gate $g(x)\in[0,1]$ that is one inside the target conditioning event and a sigmoid approximation for continuous conditions. Initialize each coupling matrix $\pi_k\in\mathbb{R}_+^{n_k\times n_k}$ with uniform entries. For five adversary steps, compute $L_{k,j}=\ell_\theta(x_{k,j},y_{k,j})$, ascend on $A=\sum_k\theta_k\sum_{i,j}\pi_{k,ij}L_{k,j}g(x_{k,j})$, project each $\pi_k$ onto nonnegative matrices with fixed row and column marginals using Sinkhorn normalization, then enforce the weighted budget by setting $R=\sum_k\theta_k\langle\pi_k,C_k\rangle$ and $\pi_k\leftarrow\pi_k\min(1,\varepsilon/R)$. Stop gradients through $\pi_k$ for the first experiment, then compare with differentiating through Sinkhorn. The model minimizes the resulting robust conditional loss, alternating one model update with the adversary updates. Set $\theta_k$ uniformly initially; a second variant uses $\theta_k\propto1/(\widehat{W}(P_k,P_{\mathrm{pool}})+\delta)$ so highly discrepant sources receive less influence. Compute the paper's mathematical quantities exactly at minibatch scale: weighted OT cost, source weights, and the global budget. Estimate $\varepsilon$ by normalizing costs and sweeping $0.01$, $0.05$, and $0.1$, or by held-out cross-source Wasserstein distances. First test on Colored-MNIST or DomainBed with three training domains and one held-out domain. Compare ERM, pooled training, single-source DRO, and this method. Success means higher worst-domain accuracy, higher accuracy on the rare conditioning subset, and lower variance across domains at comparable FLOPs; failure is no improvement over ERM or substantial instability as $\varepsilon$ increases.

Verification

Mechanism failed

Stage 1 · Toy mechanism gate: Failed ✗

Stage 2 · Mechanism transferred to benchmark: Not tested

Stage 2 · Practical benchmark result: Not run

Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works

Stage 1 — Mechanism check agent confidence 9/10

Built a finite-minibatch conditional OT adversary using linear-program coupling optimization, Sinkhorn normalization, and a tiny pooled-vs-OT classifier comparison. With fixed destination/column marginals and losses depending only on destination samples, the adversarial objective is exactly invariant to the coupling: maximum error was 0.0 and Sinkhorn error was 5.6e-17. The OT variant matched ERM on held-out accuracy, so the claimed mechanism did not manifest.

Agent confidence
9/10
Baseline
ERM: train accuracy 0.9778, held-out accuracy 0.9833
Idea
Conditional OT: train accuracy 0.9778, held-out accuracy 0.9833; difference 0.0000. Mechanism checks: fixed-column invariance error 0.0, source-weight normalized invariance difference 0.0, budget sweep values all 0.35 and monotone.

Limitations: Only a small synthetic binary classification experiment was tested; no Colored-MNIST, DomainBed, GPU benchmark, genuinely variable target marginals, or differentiable end-to-end Sinkhorn training was evaluated. The stated fixed-marginal formulation needs altered marginals or a loss/cost structure that depends on transported source-destination pairs before it can produce a nontrivial adversarial effect.

How to run: python3 ot_experiment.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Artifacts

Implementation overview ⬇ Download all as ZIP 3 files · code, reports and structured results