Barycentric One-to-Many Alignment
Implementation & benchmark of arXiv:2608.25145 — Barycentric Weak Inner-Product Gromov-Wasserstein
Source paper: Barycentric Weak Inner-Product Gromov-Wasserstein arXiv:2608.25145 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace pointwise cross-modal or prototype-to-instance matching with a loss that compares source pairwise inner products to inner products between target conditional means. A source prototype can align to a cloud of target instances while preserving its semantic barycenter, instead of being forced to match every target instance individually.
Formulas
Mathematical statement
For source samples x in R^{d_x} with distribution mu and target samples y in R^{d_y} with distribution nu, a coupling pi in Pi(mu,nu) has conditional target law pi_x and barycenter m_pi(x)=E_pi[Y|X=x]. The paper defines the barycentric weak inner-product GW objective as wIGW_bar^2(mu,nu)=inf_{pi in Pi(mu,nu)} int int (<x,x'>-<m_pi(x),m_pi(x')>)^2 dmu(x)dmu(x'). Here <.,.> is the Euclidean inner product and the double integral compares all source pairs. The projection identity states wIGW_bar^2(mu,nu)=inf_{eta <=_cx nu} IGW^2(mu,eta), where eta <=_cx nu means that nu is a mean-preserving spread of eta: there exists a martingale kernel K with E[Y|Z=z]=z, Z~eta, and Y~nu. For a finite coupling P in R^{n x m}, with row marginals a and column marginals b, define z_i=(1/a_i) sum_j P_ij y_j. The empirical loss is sum_{i,i'} a_i a_i'(<x_i,x_i'>-<z_i,z_i'>)^2. The paper also reduces this objective to ||S_mu||_F^2+||S_m||_F^2-2||M_m||_F^2, where S_mu=E[XX^T], S_m=E[m(X)m(X)^T], and M_m=E[Xm(X)^T].
Implementation notes
1. Integration point: add this as a cross-modal alignment loss between source embeddings X={x_i} and target embeddings Y={y_j}, or between graph-node prototypes and instance embeddings. Compute embeddings with the existing encoders; do not alter the main task head initially. 2. Pseudocode: inputs are X, Y, source weights a, and target weights b. Initialize a nonnegative coupling P with row sums a and column sums b, for example by Sinkhorn on a cheap squared-distance cost. Repeat K times: compute z_i=(sum_j P_ij*y_j)/(a_i+1e-8); compute L=sum_{i,i'} a_i*a_i'*(dot(x_i,x_i')-dot(z_i,z_i'))^2; differentiate L through z and P; update encoder parameters and optionally update P by projected gradient or entropic Sinkhorn using the current barycentric objective. To avoid O(n^2) memory, estimate the pair sum with random source pairs or use the moment form ||S_mu||_F^2+||S_z||_F^2-2||M||_F^2, where S_mu=X^T diag(a) X, S_z=Z^T diag(a) Z, and M=X^T diag(a) Z. 3. The paper supplies the barycentric objective and its moment reduction; the coupling is estimated numerically, while Sinkhorn temperature, iteration count, and pair subsampling are empirical choices. Add a ridge term epsilon*sum_i a_i||z_i||^2 if barycenters become unstable. 4. First experiment: use CIFAR-100 or a small single-cell prototype-to-cell split, with one source prototype paired to 5-20 target instances. Compare pointwise cosine or OT alignment, ordinary GW, and this loss at equal encoder FLOPs. Measure retrieval accuracy, prototype-to-instance top-k recall, and sensitivity to duplicated or dispersed target instances. Success is improved retrieval under one-to-many spread without degrading one-to-one accuracy, plus lower variance across random target refinements.
Verification
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 CPU synthetic one-to-many alignment experiment with the barycentric Gram loss, its moment-form implementation, and dispersion/retrieval checks. The pairwise and moment formulas matched to 1.8e-15 relative error, and zero-mean target dispersion left barycentric loss unchanged while increasing pointwise MSE. However, optimizing the proposed loss alone produced lower Gram loss but failed semantic retrieval due to orthogonal-factor ambiguity: at noise 0.5, barycentric loss was 0.0308 vs 0.0964 for baseline, but barycenter retrieval@1 was 0.036 vs 0.964 and instance retrieval@1 was 0.031 vs 0.424.
- Agent confidence
- 9/10
- Baseline
- At target noise 0.1/0.5/1.0: Gram loss 0.0036/0.0964/0.1413; instance retrieval@1 1.000/0.424/0.165; barycenter retrieval@1 1.000/0.964/0.750.
- Idea
- At target noise 0.1/0.5/1.0: Gram loss 0.0018/0.0308/0.0650; instance retrieval@1 0.000/0.031/0.013; barycenter retrieval@1 0.000/0.036/0.000. Math relative error was 1.7e-16.
Limitations: Only a synthetic linear-encoder experiment was tested, with no Sinkhorn coupling optimization, real multimodal data, learned nonlinear encoders, FLOP accounting, or regularized orientation-preserving auxiliary loss. The negative retrieval result exposes an identifiability issue of using inner products alone when embeddings must remain in a shared coordinate frame.
How to run: python3 experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- experiment.py 4.6 KB View Raw
- report.md 1.6 KB View
- results.json 2.4 KB View Raw