Conformer Aggregation by Fused Gromov-Wasserstein Barycenter
A molecule is not a single shape: it flexes into many 3D conformers, and a property predictor must fuse them into one representation. Averaging the raw atom coordinates fails, because two conformers can be the same shape in different orientations, and the mean collapses the atoms into an unphysical blob. This method aggregates instead with a Fused Gromov-Wasserstein (FGW) barycenter of the conformer graphs. Each conformer enters only through its structure matrix and its atom features, both invariant to rotating, translating or reflecting the molecule, so the aggregate is provably E(3)-invariant. Rotate a conformer and watch the naive mean swing while the FGW barycenter holds still.
Each conformer is a small 2D point cloud standing in for a molecule (n = 6 atoms, each drawn in its type color). From conformer k the method reads the paper's exact ingredients: an E(3)-invariant structure matrix Ak, the atom features Hk, and a uniform mass 1/n. (The released code builds Ak as a binary radius-graph adjacency, Ak = 1[dist ≤ cutoff] with a SchNet cutoff of 10 Å / ViSNet 5 Å, and Hk as E(3)-invariant SchNet/ViSNet embeddings min-max normalized into [0.1, 2.0]; this toy uses the real-valued distance matrix and one scalar per-atom feature so the 2D geometry stays legible.) The FGW barycenter is the single consensus graph Ḡ = (Ā, H̄) minimizing the mean Fused Gromov-Wasserstein distance to the K conformers, FGW = α · (Gromov-Wasserstein structural cost on the structure matrices) + (1 − α) · (Wasserstein feature cost on the atom features). The released code hardcodes α = 0.1, so aggregation is feature-dominated (0.9) and structure-light (0.1); here α = 0.1 is used exactly. It is solved live by block-coordinate descent: an entropic Sinkhorn coupling πk per conformer (computed detached, so the barycenter stays differentiable through Ak and Hk only), then two closed-form updates, the structure update (Eq. 14) Ā = (∑k λk πk Ak πk⊤) / (ω ⊗ ω) and the feature update (Eq. 15) H̄ = diag(1/ω) ∑k λk πk Hk, with uniform masses ω = 1/n and λk = 1/K; the barycenter is finally read out by a sum over the n nodes (ViSNet L2-normalizes first). The middle panel shows a naive per-atom coordinate mean: because the conformers sit at different orientations the atoms pile toward the centroid and get red halos where they overlap, the paper's stated failure mode. (The code's actual ConAN ablation is mean-pooling of the per-conformer invariant embeddings, not coordinate averaging; the coordinate mean is shown here because it makes the E(3) failure vivid.) The right panel shows the FGW barycenter, which preserves the pairwise geometry (its structure-matrix error is many times smaller). Now drag Rotate: the highlighted conformer spins, its structure-matrix heatmap on the right stays pixel-identical, the naive mean swings (the readout tracks its drift and its wobbling radius of gyration) and the FGW barycenter does not move at all (drift 0.00), because it depends on the conformer only through invariant quantities. That is the E(3)-invariance the paper proves. (The released code hardcodes α = 0.1 and ε = 0.1 inside _compute_barycenter, so the YAML/CLI values are dead code; here α = 0.1 is used exactly, but a sharper Sinkhorn ε is the toy default so the 2D geometry preservation is visible: drag ε up to the code's 0.1 to watch the coupling blur, and the E(3)-invariance holds at every ε. Because the toy feature is a single scalar shared across conformers, the barycenter features are warm-started rather than initialized to 0 as in the code; with the real distinct 64-d features that difference vanishes.) (No neural network runs here: there is no SchNet/ViSNet message passing and no trained property head, and the molecules are 2D toys. What is genuinely computed live is the aggregation math, the invariant structure matrices, the entropic-Sinkhorn FGW couplings, and the exact Eq. 14/15 barycenter, so the invariance you watch is a real consequence of that computation. In the full model the barycenter is one of three summed branches, x = x3d (SchNet invariant backbone) + xcovalent (a 2D covalent-graph GAT) + 0.2 · xbary, mean-pooled across the K conformers and passed to a linear property head, trained in two stages. On MoleculeNet it reports RMSE (lower is better) for ConAN-FGW of 0.454 (Lipo, K=3), 0.514 (ESOL, K=3), 1.423 (FreeSolv, K=10) and 0.654 (BACE, K=5), against 0.531 / 0.591 / 1.548 / 0.816 for ConAN without the FGW branch, and ROC-AUC / PRC-AUC on the CoV-2 and CoV-2-3CL classification tasks.)
Run the experiments
Every animation runs live in your browser. Click a button to play that experiment on the demo (it scrolls up and starts); drag any control to take over. Nothing is downloaded.
Rotate the conformer (E(3)-invariance)
Spin one conformer: the naive coordinate mean swings wildly while the Fused Gromov-Wasserstein barycenter stays perfectly still.
Number of conformers K
Aggregate more conformers into the barycenter.
Conformational spread
Sweep how much the conformers differ.
FGW structure/feature α
Trade off the structure and feature terms of the FGW cost.
Sinkhorn ε
Sweep the entropic regularisation of the optimal-transport coupling.
The idea in three steps
To predict a property from many conformers you need one representation, and it must not depend on how each conformer happens to be posed in space. Averaging coordinates violates that; averaging in distance-geometry space does not.
Each conformer as a graph
Turn every conformer into its structure matrix (a radius-graph adjacency in the code, pairwise distances here) and its invariant atom features. These are unchanged by rotation, translation and reflection, so the representation is already E(3)-invariant.
A Fused Gromov-Wasserstein barycenter
Find the consensus graph closest, on average, to all the conformer graphs under a transport distance that matches both their geometry and their features (weighted α = 0.1 structure, 0.9 feature in the code). Optimal transport does the atom-to-atom alignment.
Where coordinate averaging fails
Because the aggregate uses only invariant quantities, rotating a conformer leaves it untouched. Averaging raw coordinates instead collapses the atoms, an artifact of an arbitrary choice of orientation.
For the E(3)-invariance theorem, the differentiable entropic-FGW barycenter solver, the O(1/K) convergence of the empirical barycenter, and the SchNet/ViSNet property-prediction experiments, see Structure-Aware E(3)-Invariant Molecular Conformer Aggregation Networks (Nguyen, Lukashina, Nguyen, Le, TrungTin Nguyen, Ho, Peters, Sonntag, Zaverkin & Niepert, ICML 2024).