# Conditional OT barycenter feature augmentation

- ID: 1162
- Canonical URL: https://synthcore.org/idea/1162/conditional-ot-barycenter-feature-augmentation
- API JSON: https://synthcore.org/api/idea/1162.json
- API Markdown: https://synthcore.org/api/idea/1162.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2607.19761](https://arxiv.org/abs/2607.19761)
- Category: architecture
- Solves: generalization, sample-efficiency, accuracy
- ML areas: data-augmentation, embedding, regularization
- Math tags: optimal-transport, geometry, probability
- Ratings: usefulness 7/10; difficulty 5/10; novelty 4/10

## Idea description

Construct synthetic latent examples from an optimal-transport barycenter of several source domains, restricting the barycentric mass to the context region relevant to the prediction. The resulting representations preserve cross-source consensus while reducing domain-specific nuisance variation. Train on the original examples plus barycentric latent examples with transported soft labels.

## Mathematical statement

For source empirical laws $P_k=\sum_jw_{k,j}\delta_{\widehat{\boldsymbol{\xi}}_{k,j}}$, the OT barycenter is $Q_{\mathrm{bar}}\in\arg\min_Q\sum_{k=1}^{K}\theta_kW(Q,P_k)$, where $\theta_k\geq0$, $\sum_k\theta_k=1$, and $W$ is Wasserstein distance. The paper couples one sample from each source using an index tuple $\boldsymbol{\alpha}=(\alpha_1,\ldots,\alpha_K)$ and defines $\mathcal{V}_{\boldsymbol{\alpha}}=\operatorname{conv}(\{(c(\boldsymbol{\xi},\widehat{\boldsymbol{\xi}}_{1,\alpha_1}),\ldots,c(\boldsymbol{\xi},\widehat{\boldsymbol{\xi}}_{K,\alpha_K})):\boldsymbol{\xi}\in\mathcal{N}^{c}\})$. Here $c$ is the transport cost and $\mathcal{N}^{c}$ is the complement of the conditioning region. This convex set means that simultaneous source costs can be combined through nonnegative mixture coefficients. Adapt the barycenter to latent representations $z_{k,i}=h_\phi(x_{k,i})$ and condition its weights using a gate $g(x)$, so the synthetic latent point is a weighted consensus of source features rather than an arbitrary interpolation.

## Key formulas

- $$Q_{\mathrm{bar}}\in\arg\min_Q\sum_{k=1}^{K}\theta_kW(Q,P_k),\qquad P_k=\sum_{j=1}^{N_k}w_{k,j}\delta_{\widehat{\boldsymbol{\xi}}_{k,j}}$$
- $$\mathcal{V}_{\boldsymbol{\alpha}}=\operatorname{conv}\left(\left\{\left(c(\boldsymbol{\xi},\widehat{\boldsymbol{\xi}}_{1,\alpha_1}),\ldots,c(\boldsymbol{\xi},\widehat{\boldsymbol{\xi}}_{K,\alpha_K})\right):\boldsymbol{\xi}\in\mathcal{N}^{c}\right\}\right)$$
- $$\widetilde{z}_{\boldsymbol{\alpha}}=\sum_{k=1}^{K}u_kz_{k,\alpha_k},\qquad u_k\geq0,\qquad\sum_{k=1}^{K}u_k=1$$
- $$\mathcal{L}_{\mathrm{mix}}=\mathcal{L}_{\mathrm{ERM}}+\eta\,\mathbb{E}_{\widetilde{z}\sim Q_{\mathrm{bar}}}\left[g(x)\,\ell_\theta(\widetilde{x},\widetilde{y})\right]$$

## Implementation notes

Integrate the module between the encoder $h_\phi$ and the prediction head. At every step, draw an equal-size minibatch from each of $K$ source domains and compute latent vectors $z_{k,i}=h_\phi(x_{k,i})$. Compute a gate $g_{k,i}$ for the desired context and replace source masses by $w_{k,i}\leftarrow g_{k,i}+\delta$, followed by normalization. Maintain $m$ barycenter support vectors $b_r$ initialized from one source. For each source, calculate squared latent costs $C_{k,ir}=\|z_{k,i}-b_r\|_2^2$ and run $T=20$ Sinkhorn iterations to obtain transport plans $\pi_k$ between source weights and barycenter weights $q_r$. Update the barycenter by $b_r\leftarrow[\sum_k\theta_k\sum_i\pi_{k,ir}z_{k,i}]/[\sum_k\theta_k\sum_i\pi_{k,ir}+\delta]$, then recompute plans for five alternating barycenter iterations. Construct a soft label for each support point as $\widetilde{y}_r=[\sum_k\theta_k\sum_i\pi_{k,ir}y_{k,i}]/[\sum_k\theta_k\sum_i\pi_{k,ir}+\delta]$. Add $\eta$ times the prediction loss on $(b_r,\widetilde{y}_r)$ to the ordinary source loss. Use stop-gradient through $b_r$ and $\pi_k$ initially to avoid unstable encoder-barycenter feedback; later test end-to-end gradients. The exact mathematical component is the weighted barycenter objective and convex combination of source features; the latent cost, number of support points, and Sinkhorn approximation are engineering choices. First test on PACS or Office-Home with three source domains and one held-out domain, comparing ERM, standard Mixup, domain-adversarial training, and barycentric augmentation. Measure held-out accuracy, rare-context accuracy, domain-classifier accuracy on latent features, and added compute. Success is improved held-out accuracy and reduced domain separability with less than 20 percent training overhead; failure is degraded source accuracy or no gain over Mixup.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: inconclusive
- Verdict: Built a readable latent conditional-OT barycenter augmenter using Sinkhorn transport, gated source masses, transported soft labels, and a detached barycenter loss. The three toy predictions were confirmed: convex-hull violation was 0, consensus variance matched sigma^2/K within 0.99%, and gate-weight movement had slope -2.0 as predicted. However, augmentation did not improve held-out accuracy in this toy task: ERM and Mixup reached 0.924 versus 0.918 for OT, so there is no evidence of a practical accuracy win here.

### Mechanism check

- Verdict: Built a readable latent conditional-OT barycenter augmenter using Sinkhorn transport, gated source masses, transported soft labels, and a detached barycenter loss. The three toy predictions were confirmed: convex-hull violation was 0, consensus variance matched sigma^2/K within 0.99%, and gate-weight movement had slope -2.0 as predicted. However, augmentation did not improve held-out accuracy in this toy task: ERM and Mixup reached 0.924 versus 0.918 for OT, so there is no evidence of a practical accuracy win here.
- Confidence: 7/10
- Limitations: Only a small synthetic domain-shift classification task was tested, not PACS or Office-Home. The variance and gate-linearity checks use idealized consensus constructions rather than estimating those properties from the full entropic OT solver; end-to-end gradients, domain separability, rare-context accuracy, runtime overhead, CUDA execution, and multi-seed significance were not tested.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.39075
- Paired wins: 5/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_report.json](https://synthcore.org/code/463/bench_report.json)
- [conditional_ot_track.py](https://synthcore.org/code/463/conditional_ot_track.py)
- [ot_barycenter_experiment.py](https://synthcore.org/code/463/ot_barycenter_experiment.py)
- [report.md](https://synthcore.org/code/463/report.md)
- [report_bench_2026-08-31T125210.md](https://synthcore.org/code/463/report_bench_2026-08-31T125210.md)
- [results.json](https://synthcore.org/code/463/results.json)
- [stage2_ot_bench.py](https://synthcore.org/code/463/stage2_ot_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/463)

## Disclaimer

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