Transductive Generalization for GNNs via Optimal Transport

MoonJeong Park, Seungbeom Lee, Kyungmin Kim, Jaeseung Heo, Seunghyuk Cho, Shouheng Li, Sangdon Park, Dongwoo KimNeurIPS 2026

TL;DR

Why do Graph Neural Networks (GNNs) generalize well on interconnected data when standard learning theory assumes data points are completely independent? By viewing feature spaces through the geometric lens of Optimal Transport, the authors derive a tractable generalization bound that accurately tracks real-world test error, explains the mysterious quirks of "oversmoothing" in deep GNNs, and doubles as a training regularizer that boosts model accuracy—especially on messy, heterophilic graphs.

What Problem Does This Paper Address?

Most classical machine learning theory relies on a foundational rule: data points must be independent and identically distributed (i.i.d.). Graph Neural Networks (GNNs) shatter this assumption by design. In node classification, GNNs pass messages along edges, blending a node's features with its neighbors'. Because nodes are tangled together, standard inductive generalization bounds don't apply.

To bypass this, theorists turn to transductive learning—where the model sees the entire graph structure and all node features (both train and test) upfront, and only has to guess the missing test labels. While transductive bounds don't require the i.i.d. assumption, existing ones (like transductive Rademacher complexity or PAC-Bayes) suffer from a fatal flaw: they are either computationally impossible to calculate for modern networks, or they correlate terribly—sometimes even negatively!—with actual test performance. Meanwhile, modern representation-based bounds that look at the geometry of learned features work great, but they've been stuck in the i.i.d. inductive world. This paper bridges that divide.

Methods

The authors introduce a distribution-free, transductive generalization bound built on Optimal Transport (OT)—specifically, the 1-Wasserstein distance, which measures the minimum "work" required to morph one probability distribution into another.

Instead of treating the network as a monolithic black box, they split it into a feature encoder (like a GNN) and a classifier. Using a random-permutation analysis over train/test splits, their bound boils generalization down to two intuitive geometric properties in the embedding space:

  1. Intra-class concentration: Measured by the expected Wasserstein distance between training and test features of the same class. Tighter clusters mean lower transport cost.
  2. Classifier smoothness ($M_c$): The maximum rate at which the classifier's margin changes between pairs of encoded points—essentially a discrete Lipschitz constant. (If different classes are well-separated, the classifier doesn't need sharp, jagged boundaries to tell them apart.)

To make this theoretical bound useful during gradient-based training, the authors also craft a differentiable surrogate regularizer. They swap the exact Wasserstein distance for the fast, entropy-regularized Sinkhorn algorithm, and smooth out the discrete maximum in $M_c$ using a temperature-scaled log-sum-exp.

Datasets

No new benchmarks are introduced; instead, the authors put their framework through its paces across standard benchmarks:

  • Homophilic Graphs (where connected nodes tend to share labels): Cora, CiteSeer, PubMed, Computers, and Photo.
  • Heterophilic Graphs (where connected nodes often have different labels): Squirrel, Chameleon, Roman-empire, and Amazon-ratings.
  • Image Classification (to test transductive generality beyond graphs, using limited-label and semi-supervised setups): CIFAR-10 and SVHN.

Key Insights and Ideas

  • Oversmoothing is a double-edged sword, not a pure villain: As you stack GNN layers, repeated message passing forces node representations to contract toward one another. Standard metrics like Dirichlet energy treat all contraction as bad. By specializing their OT bound to GNN depth, the authors prove that depth creates a fundamental geometric tug-of-war: contraction helps generalization by pulling same-class nodes together (increasing concentration), while simultaneously hurting it by mashing different classes into each other (destroying separation).
Figure 1: Depth analysis on Cora (top row) and CiteSeer (bottom row) for SGC and GCN, showing Wasserstein distances WC, WS and the empirical generalization error denoted Gen. error in the figure at varying depths. Shaded regions indicate ±1 standard deviation across runs.
  • Explaining the non-monotonic depth curve: Prior stability-based GNN bounds predicted that generalization error explodes exponentially with depth. In reality, error often rises, dips, and shifts non-monotonically. The tug-of-war between concentration and separation finally explains why empirical error curves behave this way as GNNs get deeper.
  • Fixing "bad neighborhoods" in heterophilic graphs: In heterophilic graphs, message passing averages together neighbors from different classes, muddying the feature space and forcing the final classifier to draw razor-sharp, brittle boundaries. Using the OT bound as a regularizer directly counteracts this mixing by pulling same-class embeddings back together and penalizing sharp classifier transitions.

Key Results

  • Tracking Real Generalization: Across 9 graph datasets and 5 GNN architectures (SGC, GCN, GCNII, GAT, GraphSAGE), the OT bound (even when estimated purely from training labels without peeking at test labels) achieves strong positive rank correlation with the empirical generalization gap. Classical PAC-Bayes and Rademacher bounds frequently post negative correlations.
Table 1: Rank correlation between generalization bounds and the empirical error gap across nine datasets and five GNN architectures. OT-oracle and OT bound correspond to Theorem 1 with and without access to test labels, respectively. Cells are shaded green only for positive correlations, with deeper green indicating stronger alignment. Negative correlations are left unshaded. The RC bound is shown only for the applicable models.
  • Boosting Accuracy via Regularization: Adding the OT regularizer to standard cross-entropy loss improved test accuracy in 32 out of 36 GNN setups. While gains on homophilic graphs were modest, heterophilic graphs saw major leaps—up to +8.62% on Roman-empire with GCN and +5.42% with GCNII.
  • Beyond Graphs: On transductive supervised and semi-supervised image tasks (CIFAR-10 and SVHN with algorithms like FixMatch and SimMatch), the OT bound achieved strong correlations ($\ge 0.7$) in 75% of cases, and consistently nudged accuracy upward when used as a regularizer (e.g., +2.85% on supervised SVHN).

Limitations and Future Work

The authors candidly note that their bound is a posteriori: you have to train the encoder and classifier first to inspect the geometry of the features they learned. While this gives the bound access to much richer geometric signal than classical complexity measures, it means the theory tells you whether a learned representation will generalize well, not whether a specific architecture or optimizer is guaranteed to find that sweet spot before you hit "train." Furthermore, in regimes where a base model severely underfits the training data (as seen on the Amazon-ratings dataset), adding geometric regularization naturally doesn't help. Future directions were not explicitly discussed in the main text.

Summary updated

Abstract

Analyzing the generalization of graph neural networks (GNNs) on node classification is challenging: message passing induces dependencies that break the i.i.d. assumption underlying standard inductive generalization theory. While distribution-free transductive theory resolves this dependency issue, existing classical bounds are either intractable or correlate poorly with empirical generalization. To fill this gap, we propose a transductive generalization bound based on optimal transport, connecting generalization to intra-class concentration and inter-class separation in the feature space. Empirically, our bound aligns strongly with the generalization gap. Building on this representation-based approach, we analyze how feature geometry evolves under repeated message passing. This explains the non-monotonic relationship between GNN depth and generalization, providing new insights into oversmoothing research. Practically, our bound serves as a geometry-aware regularizer that corrects the harmful behavior of message passing, yielding consistent performance improvements.
BibTeX
@inproceedings{park2026transductive,
  author = {MoonJeong Park and Seungbeom Lee and Kyungmin Kim and Jaeseung Heo and Seunghyuk Cho and Shouheng Li and Sangdon Park and Dongwoo Kim},
  title = {{Transductive Generalization for GNNs via Optimal Transport}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=nPn4mFZwlJ},
}
Figure