Many scientific prediction problems take a whole set of points as one input. A finite-element mesh is a cloud of nodes. A molecule is a bag of atoms. The goal is to predict a quantity, with honest uncertainty, from a few hundred to tens of thousands of such inputs. Gaussian processes (GPs, Bayesian regressors whose predictions come with error bars) are the natural tool, but they need a valid similarity measure between point clouds. Optimal transport (OT, the minimum cost of moving one point cloud onto another) is the natural geometry for that. The two do not combine cheaply.
Exact OT costs roughly cubic time in the number of nodes. Plugging an OT distance into a standard GP kernel is not even a valid covariance once points live in more than one dimension. A full GP over $M$ inputs then costs $O(M^3)$. Current fixes fall into two camps. One embeds every input against a single fixed reference cloud: a barycenter, a k-means template, or a reference mesh. The other projects onto random lines. In both, the embedding is chosen before the GP ever sees a label.
This note proposes a change to the embedding against a fixed reference. The reference cloud becomes a learned object, a small set of $r$ weighted atoms. Its locations are trained together with an inducing-point sparse GP by maximizing the GP's variational objective, with gradients passed through an entropic OT solver. The kernel stays valid for every value of the reference, because it is a standard kernel on Euclidean features. The cost per input is linear in its node count, and the GP cost is linear in $M$.
The question is narrow and falsifiable. When the embedding dimension and compute budget are held fixed, does a reference trained for prediction beat a reference chosen by clustering, and does it beat random or learned one-dimensional slices?
Core Claim
Two existing designs both get positive definiteness from a Hilbertian embedding, meaning an embedding into a space where ordinary Euclidean kernels apply. Gaussian processes with multidimensional distribution inputs via optimal transport and Hilbertian embedding proves that $\exp(-W_2^2/2\sigma^2)$ is not positive definite for $d>1$. It restores validity by comparing transport maps from a Wasserstein barycenter. However, it computes that barycenter at high cost and inverts a full $M\times M$ Gram matrix. Gaussian process regression with Sliced Wasserstein Weisfeiler-Lehman graph kernels (SWWL) gets validity from sorted quantiles along random lines. It scales to 170,000-node meshes, but its directions are passive and it still builds the full Gram matrix.
Our claim is that the reference itself is a cheap, learnable bottleneck. A small trained reference of $r$ atoms recovers more predictive signal per embedding coordinate than either a fixed template or random slices.
Concretely, each input $i$ is turned into an empirical measure $\mu_i$ over continuous Weisfeiler-Lehman node embeddings $x_{ik}$, as in Wasserstein Weisfeiler-Lehman Graph Kernels. Weisfeiler-Lehman embeddings are node features obtained by repeatedly averaging each node with its neighbours, so they encode local connectivity. A reference $\rho=\sum_{j=1}^r b_j\delta_{y_j}$ is a weighted set of $r$ atoms $y_j\in\mathbb{R}^d$. For each input we solve an entropic OT problem between $\rho$ and $\mu_i$, giving a plan $\pi^i$ whose entries $\pi^i_{jk}$ say how much mass atom $j$ sends to node $k$. We then form the barycentric map and the embedding:
$$ T_i(y_j)=\frac{1}{b_j}\sum_k \pi^i_{jk}\,x_{ik},\qquad \phi_\rho(\mu_i)=\big(\sqrt{b_j}\,T_i(y_j)\big)_{j=1}^r\in\mathbb{R}^{rd}. $$
Here $T_i(y_j)$ is the mass-weighted average of the nodes that atom $j$ is sent to. The GP covariance is a Matérn or squared-exponential kernel applied to $\|\phi_\rho(\mu_i)-\phi_\rho(\mu_l)\|$. This is the linearized OT construction of Wasserstein Embedding for Graph Learning (WEGL), which fixes $\rho$ by k-means and feeds a non-Bayesian classifier. Our version adds two things. First, a sparse variational GP whose inducing inputs are vectors in $\mathbb{R}^{rd}$, i.e. synthetic transport maps. Second, the reference atoms $y_j$ are trained jointly with the GP's evidence lower bound (ELBO, the variational objective that sparse GPs maximize).
The entropy term is required, not a convenience. With exact OT the plan is piecewise constant in $y_j$, so $\phi_\rho$ has zero gradient almost everywhere. Entropic regularization makes the map smooth in $\rho$. The smoothing artifact that Learning signals defined on graphs with optimal transport and Gaussian process regression (TOS-GP) reports concerns transporting output signals. Here transport only builds an input feature, where some blur is tolerable. The size of the entropy parameter is itself an ablation.
Research Program
The model has five parts. The first is a continuous Weisfeiler-Lehman encoder (fixed, as in SWWL). The second is a GPU entropic OT layer from $r$ reference atoms to $n$ nodes, costing $O(nrd)$ per Sinkhorn iteration with warm starts across epochs. The third is the embedding $\phi_\rho$. The fourth is a stochastic sparse variational GP with $m$ inducing vectors. The fifth is an optimizer over the reference locations $y_j$ (weights $b_j$ optionally), the inducing vectors, and the kernel hyperparameters.
Each minibatch recomputes transport only for the inputs it contains. One epoch therefore costs $O(\sum_i n_i r)$ for transport plus $O(Mm^2)$ for the GP. Nothing in this is cubic in $n$ or in $M$. Gradients through Sinkhorn use implicit differentiation at the fixed point rather than unrolling.
Three analyses accompany the method. We will show that the kernel is positive definite for every $\rho$, which is immediate because it is a Euclidean kernel on $\phi_\rho$. That property is what lets us learn $\rho$ without the kernel ever breaking. We will measure how well $\|\phi_\rho(\mu)-\phi_\rho(\nu)\|$ tracks exact $W_2$ on held-out pairs, for learned versus k-means references. This tests whether prediction-driven training degrades geometric fidelity, or whether the GP simply discards irrelevant geometry. Finally, we will guard against overfitting the reference on a few hundred labelled inputs. We will compare training the atoms on the ELBO against a validation-likelihood schedule, and against learning only a small displacement from the k-means initialization.
Baselines
The naive reference point is a sparse variational GP on mean-pooled node embeddings. It costs $O(n)$ per input and ignores distributional shape. Evidence that pooling loses information comes from the classification results of Wasserstein Weisfeiler-Lehman Graph Kernels. It also comes from the size-generalization failures documented in Wasserstein Barycenter Matching for Graph Size Generalization of Message Passing Neural Networks. If the learned reference does not clearly beat pooling, the whole OT apparatus is unjustified.
The strongest existing method on the scalable side is SWWL from Gaussian process regression with Sliced Wasserstein Weisfeiler-Lehman graph kernels. It is the only method in the file shown to run GP regression on Rotor37 and AirfRANS meshes. On those meshes, the Wasserstein Weisfeiler-Lehman and fused Gromov-Wasserstein kernels were intractable. On ENZYMES it computes distance matrices in about 1.3 seconds versus about 220 seconds for the Wasserstein Weisfeiler-Lehman kernel. The file reports no accuracy number for SWWL on Rotor37 or AirfRANS; no reported result found on Lacuna for SWWL regression error on those meshes.
We will run SWWL with its $P\times Q$ embedding dimension equal to $rd$ and with the same sparse GP head. Every method gets the same Weisfeiler-Lehman encoder, the same training, validation and test splits, the same wall-clock budget per method, and the same hyperparameter search budget.
On the small-data accuracy side, the strongest competitor is the barycenter-based Hilbertian GP of Gaussian processes with multidimensional distribution inputs via optimal transport and Hilbertian embedding. It reports a predictive $Q^2$ of 0.11 and 87-88% coverage of nominal 90% intervals on the CASTEM inclusion dataset. It reports an RMSE of 0.10 on synthetic 2D Gaussians. We run it with a full GP where it is tractable.
The two ablations that isolate the key ingredient are WEGL-style fixed k-means references with the identical sparse GP head, and SWWL with slice directions learned by the ELBO, using gradients through sorting. Beating SWWL and the barycenter GP means lower held-out RMSE or negative log-likelihood (NLL) at matched embedding dimension and compute, with coverage no worse. Beating the ablations is the claim that actually matters.
Why not just…?
Why not just run a sparse variational GP on SWWL features? This is the most serious threat. It already gives validity, $O(n\log n)$ embedding and $O(Mm^2)$ GP cost with off-the-shelf tools, and it is exactly our SWWL baseline with a sparse head. Our bet is that random one-dimensional slices spend coordinates uniformly over directions that carry little label signal. A learned reference instead places atoms where inputs differ in ways that matter.
The evidence that this pays off does not exist yet. The matched-dimension comparison decides it. If SWWL plus a sparse GP ties us at equal compute, we will report that the learned reference adds nothing and recommend the simpler pipeline.
Why not just learn the slice directions instead of the reference? This is cheaper than our method, since sorting is differentiable and needs no Sinkhorn solver. It is a genuine competitor that SWWL itself leaves open. We include it as an ablation with the same parameter count. If it matches the learned reference, the interesting finding becomes "learn the embedding with the GP objective," and the choice between slices and atoms is a detail.
Why not just use WEGL's fixed k-means reference? WEGL achieves 79.1% test ROC-AUC on ogbg-molhiv with an AutoML classifier on top of its fixed embedding (Wasserstein Embedding for Graph Learning). So a fixed reference can already be strong. The fixed-versus-learned ablation, under the same GP head and with the same initialization, isolates the gain. We expect the gap to be largest on mesh regression, where the label depends on localized geometric features that clustering does not target. On molecules we would not be surprised by a small gap.
Why not just use a graph neural network? On Tensile2d, graph convolutional networks reach a relative RMSE of $4.5\times10^{-2}$ against TOS-GP's $2.2\times10^{-3}$ (Learning signals defined on graphs with optimal transport and Gaussian process regression). Graph networks also lack calibrated uncertainty in the few-hundred-sample regime that dominates engineering simulation. We therefore treat them as a secondary baseline rather than the main threat.
Proposed Experiments
The first experiment checks correctness and calibration on small benchmarks where the barycenter GP is tractable. On the synthetic 2D Gaussian benchmark, the target is the reported RMSE of 0.10. On CASTEM (500 train, 400 test), the targets are $Q^2=0.11$ and 87-88% coverage of 90% intervals. Both numbers are reported in Gaussian processes with multidimensional distribution inputs via optimal transport and Hilbertian embedding. Matching these numbers at a fraction of the barycenter cost is the minimum bar. Exceeding $Q^2=0.11$ with a learned reference would be a substantive gain on a dataset where the explained variance is low.
The second experiment tests scalability in node count on Rotor37 (about 30,000 nodes) and AirfRANS (over 170,000 nodes), using scalar outputs. We compare against SWWL at matched $rd=PQ$, reporting test RMSE, NLL, interval coverage, and wall-clock time per epoch. Because the file reports no SWWL accuracy on these meshes, we will rerun SWWL ourselves under the shared protocol.
The third experiment tests scalability in the number of inputs. We use sparse GP classification on ogbg-molhiv (41,127 graphs), reporting test ROC-AUC against WEGL's reported 79.1% and against SWWL with a sparse head. The sparse head is what makes a GP feasible at this $M$ at all, since neither the barycenter GP nor full-Gram SWWL scales there. As small graph sanity checks we use BZR and COX2 classification, with Wasserstein Weisfeiler-Lehman accuracies of 84.42% and 78.29% reported in Wasserstein Weisfeiler-Lehman Graph Kernels. On ENZYMES we report runtime against the roughly 1.3-second SWWL distance-matrix figure.
The decisive check runs across all of these benchmarks. We sweep the embedding dimension and plot held-out NLL against coordinates for four embeddings: learned reference, k-means reference, random slices, and learned slices. The proposal succeeds if the learned-reference curve sits strictly below the other three on the mesh benchmarks at small dimension, and the gap closes as dimension grows, as expected when any embedding eventually captures the input. It fails if learned slices or the k-means reference match it at equal compute. We will also report the entropy parameter's effect on gradients and accuracy. We will report $W_2$-approximation fidelity, so readers can see whether prediction-driven references trade geometric faithfulness for accuracy.
References
- Gaussian processes with multidimensional distribution inputs via optimal\n transport and Hilbertian embedding
- Gaussian process regression with Sliced Wasserstein Weisfeiler-Lehman graph kernels
- Wasserstein Weisfeiler-Lehman Graph Kernels.
- Wasserstein Embedding for Graph Learning
- Learning signals defined on graphs with optimal transport and Gaussian process regression
- Wasserstein Barycenter Matching for Graph Size Generalization of Message Passing Neural Networks