Template-Based Wasserstein Embeddings
- Template-Based Wasserstein Embeddings are methods that employ reference distributions to derive feature representations using optimal transport geometry.
- They integrate iterative barycenter construction and linearized OT techniques to achieve scalable, computationally efficient dimensionality reduction and metric learning.
- They extend to structured data via Fused Gromov–Wasserstein embeddings, boosting performance in graph classification and archetype extraction tasks.
Template-based Wasserstein embeddings formalize the use of Wasserstein (optimal transport) geometry for statistical inference, dimensionality reduction, and representation learning by defining feature representations with respect to one or more reference distributions, or "templates". This methodology subsumes frameworks based on Wasserstein barycenters for distribution alignment and archetype extraction, linearized optimal transport (OT) embeddings for computationally efficient representation, and template-driven metric learning for graph structures. Template-based embeddings enable both theoretical tractability and scalable implementation by rooting inference in the geometry of the Wasserstein space, and are leveraged in a range of machine learning and data analysis applications.
1. Foundational Principles
Wasserstein metrics, particularly , provide a notion of distance between probability measures by quantifying the minimum transportation cost required to morph one distribution into another. Let be a finite family of probability measures with weights , . The Wasserstein barycenter is defined as the Fréchet minimizer:
where is given by
and denotes the set of all couplings with prescribed marginals. Existence and uniqueness are guaranteed under mild regularity: no regularization is needed and uniqueness holds if at least one measure admits a density (Boissard et al., 2011).
Under a deformation model, observed measures can be written as pushforwards 0 of an unknown template 1 by random maps 2 in an admissible family (e.g., gradients of convex functions), centered such that 3. In this setting, the barycenter estimate converges to the template as the sample size grows.
2. Iterative and Linearized Template-Based Embeddings
Iterated Barycenter Construction
Computing the barycenter over many measures is generally intractable directly. The iterated barycenter scheme simplifies computation by induction: starting from 4, each step computes a two-measure barycenter,
5
Convergence is established both for the true barycenter and the iterated approximation; as the number of input measures increases, concentration inequalities guarantee that the barycenter recovers the underlying template (Boissard et al., 2011).
Linearized Optimal Transport Embeddings
Cloninger–Hamm–Khurana–Moosmüller introduce a linearized OT approach ("LOT Wassmap") to template-based embedding (Cloninger et al., 2023). For a fixed reference (template) measure 6, the optimal Monge map 7 pushing 8 to 9 is computed, and the linearized embedding vector is
0
with 1 the Kantorovich dual potential. The embedding map is
2
The linearized Wasserstein (LOT) distance is
3
which is isometric to 4 for compatible deformations and provides controlled approximation error otherwise. This embedding avoids 5 complexity by computing only 6 template-to-data maps.
3. Template-Based Embeddings for Structured Data
Template-driven Wasserstein frameworks have been extended to attributed graphs via Fused Gromov–Wasserstein (FGW) distances (Vincent-Cuaz et al., 2022). Let 7 denote an attributed graph with adjacency matrix 8, node features 9, and weights 0, and 1 be a template graph. The FGW distance is defined as
2
Here, 3 encodes feature distances, 4 encodes adjacency differences, and 5 trades off feature vs. structure matching. Embedding a graph 6 as a vector of FGW distances to 7 templates,
8
yields a discriminative representation for classification tasks. All template parameters and 9 can be learned end-to-end via backpropagation and Frank–Wolfe optimization.
4. Theoretical Guarantees and Error Bounds
Barycentric Convergence
Under a centered random deformation model, the Wasserstein barycenter 0 of 1 observed measures has
2
As 3, 4 almost surely.
A nonasymptotic concentration bound guarantees for any 5,
6
if the deformations 7 are bounded (Boissard et al., 2011).
LOT Embedding Approximation
For linearized OT embeddings, the discrepancy between true (8) and linearized (9) distances satisfies
0
where 1 quantifies departure from template compatibility.
Sampling and regularization contribute additional 2 error terms, where 3 is the number of samples per measure and 4 from 5. In manifold settings, the overall embedding error in 6 dimensions is 7, with 8 controlling manifold deviation and 9 the embedding/sampling error (Cloninger et al., 2023).
5. Computational Aspects and Implementation
Computational tractability is achieved via several algorithmic innovations:
- Iterative barycenters reduce multilateral OT barycenter computation to 0 two-measure problems, each solvable with algorithms such as Benamou–Brenier (1) or Sinkhorn regularized OT (2).
- Template-based LOT embeddings avoid 3 pairwise OT solves by mapping all measures to a fixed template and employing principal component analysis or SVD for dimensionality reduction (Cloninger et al., 2023).
- FGW embedding layers exploit conditional gradient Frank–Wolfe optimization, with cost per graph–template pair 4, and computational parallelism across templates (Vincent-Cuaz et al., 2022).
Common OT libraries (e.g., POT, GeomLoss, Sinkhorn) are suitable for prototypical implementation. Regularization (e.g., Gaussian smoothing) can be used to ensure uniqueness and numerical stability.
6. Applications and Empirical Findings
Template-based Wasserstein embeddings find application in template estimation, unsupervised and supervised learning on distributional or structured inputs, and dimensionality reduction in Wasserstein space:
- Template estimation: Wasserstein barycenters provably recover unknown template measures from deformed samples under structural assumptions (Boissard et al., 2011).
- Dimensionality reduction: LOT Wassmap reveals low-dimensional manifold structure in Wasserstein space, with substantial computational savings and provable guarantees even in the presence of sampling noise (Cloninger et al., 2023).
- Graph classification: FGW-based template embeddings achieve state-of-the-art accuracy on benchmarks (e.g., MUTAG, PTC, ENZYMES) as single layers or composed with GNNs. They outperform classic GNNs and kernel methods in tasks requiring sensitivity to higher-order structure. The number of templates required is typically small (4–6), and joint learning of template weights and trade-off parameters further improves performance (Vincent-Cuaz et al., 2022).
Experimental findings in the referenced works emphasize theoretical validation and controlled studies (toy datasets, structured synthetic data). Large-scale real-world or image-based scenarios are identified as open for further empirical exploration.
7. Extensions and Limitations
Extensions include alternative OT metrics (5 for 6), parametric deformation models, and geodesic PCA in Wasserstein space. For graph data, additional regularizations (e.g., entropy) can be incorporated. A common limitation is the curse of dimensionality in high-dimensional ambient spaces; while linearization and entropic regularization ameliorate some costs, practical performance at scale is yet to be established. Barycentric associativity fails in 7 unless further structure is imposed; thus, care is required in application beyond compatible deformation regimes.
Template-based Wasserstein embeddings thus synthesize archetypal modeling, geometry, and scalable computation, enabling principled statistical learning in settings where distributional structure is fundamental (Boissard et al., 2011, Vincent-Cuaz et al., 2022, Cloninger et al., 2023).