NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Wasserstein Embedding for Graph Learning

Soheil Kolouri, Navid Naderializadeh, Gustavo K. Rohde, Heiko Hoffmann

TL;DR

WEGL is a novel framework that transforms entire graphs into fixed-length vectors by treating node embeddings as probability distributions. By leveraging Linear Optimal Transport, it approximates the Wasserstein distance between graphs in linear time. This avoids the quadratic bottleneck of traditional graph kernels while achieving state-of-the-art performance with massive computational speedups.

The Bottleneck in Graph Machine Learning

Machine learning on graphs generally falls into two camps: Graph Neural Networks (GNNs) and Graph Kernels.

  1. GNNs are powerful but can be computationally expensive to train and difficult to scale as graph sizes and dataset volumes grow.
  2. Graph Kernels measure similarity between pairs of graphs. However, to train a model on $M$ graphs, you often need to calculate a similarity matrix of size $M \times M$. This $O(M^2)$ complexity is a "death sentence" for large-scale datasets containing tens of thousands of graphs.

Furthermore, many existing methods struggle to capture the global structure of a graph without losing the local nuances of its nodes. The authors of WEGL seek a way to embed graphs into a vector space where standard, fast machine learning tools (like Random Forests or SVMs) can be used effectively and efficiently.

The WEGL Methodology

The WEGL framework consists of an elegant two-step pipeline that bypasses pairwise graph comparisons:

The WEGL pipeline: from node embeddings to Monge couplings with a reference distribution, yielding a fixed-size linear Wasserstein embedding.
  1. Node Embedding ($h$): First, the nodes of a graph are embedded into a $d$-dimensional space. The authors use a non-parametric diffusion process (inspired by the Weisfeiler-Lehman kernel) that aggregates features from neighboring nodes. Notably, this step requires no training.
  2. Linear Wasserstein Embedding ($\phi$): This is the core innovation. Instead of comparing every graph to every other graph using the Wasserstein (Earth Mover's) distance, WEGL defines a single reference distribution. For every graph, it calculates the Monge map—a transformation that "pushes" the reference distribution to match the graph's node embedding distribution.

By calculating these maps relative to a common reference, each graph is projected into a tangent space (a Hilbert space). In this space, the simple Euclidean distance between two graph vectors approximates the complex 2-Wasserstein distance between the original graphs. This brilliant shift reduces the computational complexity from $O(M^2)$ to $O(M)$.

Key Insights

  • The "Common Yardstick" Approach: By comparing every graph to one reference distribution rather than to each other, the authors turn a global comparison problem into a local projection problem. This enables linear scaling.
  • Non-Parametric Power: Surprisingly, WEGL achieves state-of-the-art results using a non-parametric node embedding. The actual "learning" happens in the downstream classifier (like a Random Forest), while the graph representation itself is computed via deterministic mathematical principles.
  • Robustness to Reference Choice: One might worry that the choice of the reference distribution (e.g., using k-means on the data vs. a random normal distribution) would drastically change results. The authors show that performance is remarkably stable regardless of the reference used.
  • Barycentric Projection: To handle discrete sets of nodes, WEGL uses barycentric projection to approximate the Monge maps, ensuring the resulting vector is fixed-size regardless of how many nodes the original graph had.

Datasets and Key Results

The authors evaluated WEGL on a wide range of benchmarks, including the large-scale Open Graph Benchmark (OGB) (ogbg-molhiv, 41,127 graphs) and various TUD Benchmark Datasets (bioinformatics, molecules, and social networks).

  • Efficiency: Training WEGL is several orders of magnitude faster than competing methods like GIN (a popular GNN) and WWL (Wasserstein Weisfeiler-Lehman kernel). For large datasets, WEGL can be trained in seconds or minutes where other methods take hours.
  • Accuracy on OGB: On the ogbg-molhiv dataset, WEGL combined with AutoML achieved a Test ROC-AUC of 79.1%, outperforming several deep GNN architectures like GCN and GIN.
Performance comparison on the ogbg-molhiv dataset, showing WEGL achieving state-of-the-art 79.1% Test ROC-AUC.
  • Competitive Performance: On TUD benchmarks, WEGL consistently ranked among the top three performers across almost all datasets, proving its versatility across different domains.

Limitations and Future Work

While highly effective, the authors note a few areas for future exploration:

  • Node Embedding Choice: While the non-parametric diffusion worked well, the framework could potentially be improved by using task-specific, learned node embeddings from a pre-trained GNN.
  • Large Graph Scalability: Although the complexity is linear in the number of graphs, the Optimal Transport calculation still scales with the number of nodes per graph. For graphs with millions of nodes, using entropy-regularized OT (Sinkhorn) is suggested to maintain speed.
  • Theoretical Bounds: Further theoretical work could more tightly bound the gap between the linear approximation and the true Wasserstein distance for specific graph topologies.

Summary updated

BibTeX
@inproceedings{kolouri2021wasserstein,
  author = {Soheil Kolouri and Navid Naderializadeh and Gustavo K. Rohde and Heiko Hoffmann},
  title = {{Wasserstein Embedding for Graph Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=rHSVbi84G79},
}
Figure