Manuscript Offprint

arXiv:2610.10520

Distilling Graph Geometry: Knowledge Gap from GNNs to MLPs

Zhewei Chen, Hao Zhu, Jiaojiao Jiang, Ahad N. Zehmakan

Abstract

GNN-to-MLP distillation aims to retain the predictive accuracy of a message-passing teacher while deploying a graph-free MLP at inference. Existing methods mainly transfer node-wise predictions or use confidence-based reweighting, but they do not specify where the student should preserve the teacher's graph-induced geometry. We show that this omission leads to two spectral failure modes in the student's representation space. On sparse graphs, the student suffers from spectral underfit, missing high-energy teacher directions concentrated near boundary regions. On dense graphs, it suffers from spectral overfit, retaining spurious directions that the teacher has collapsed through aggregation. Motivated by an energy-weighted teacher–student alignment objective, we propose Graph Geometry-aware MLP (G²MLP), a training-time distillation framework guided by Ollivier–Ricci curvature. Curvature identifies where the two spectral errors concentrate and is used to allocate supervision between prediction-level and representation-level alignment. The deployed model remains a standard MLP and requires no graph access at inference. Across node-classification benchmarks, G²MLP consistently improves over graph-free distillation baselines, reduces the teacher–student rank gap in both regimes, and transfers without architectural changes to Graph Transformer teachers and link prediction.

1 Introduction

Graph Neural Networks (GNNs) [Gilmer et al., 2017] are the standard tool for learning on graphs, but their reliance on message passing makes inference slow in latency-sensitive applications such as fraud detection [Wang et al., 2021]. A growing line of work distils GNN knowledge into a structure-free Multi-Layer Perceptron (MLP), enabling fast graph-free inference [Zhang et al., 2022, Guo et al., 2023, Tian et al., 2023]. Most methods follow GLNN [Zhang et al., 2022] and match teacher logits with a KL loss, sometimes injecting structural priors through positional encodings [Tian et al., 2023, Wang et al., 2023], codebooks [Yang et al., 2024], or neighborhood alignment cues [Hu et al., 2021, Wu et al., 2023a]. These methods improve the student's information source, but they usually treat graph structure as uniformly useful: every node receives the same type of distillation pressure regardless of its topological role.

We argue that this uniform view misses an important source of teacher–student mismatch. Message passing changes representations differently across graph regions. Boundary nodes often contain graph-induced directions that are hard to infer from features alone, while dense interior nodes are often smoothed toward class-level prototypes. As shown in Figure 1, this produces two spectral failure modes in GNN-to-MLP distillation. On sparse graphs, the student has lower effective rank than the teacher, which we call spectral underfit. On dense graphs, the teacher may collapse to a low-rank geometry, while the feature-only student retains unsupported variation, which we call spectral overfit.

Preprint.

(a) Conceptual spectra

(b) Rank-direction view

Mode 1: spectral underfit (sparse graphs)

Figure

Figure

Mode 2: spectral overfit (dense graphs)

Figure

(c) Signed embedding rank gap (10 seeds, mean ± SE)

Figure

Figure 1: Two spectral failure modes of GNN-to-MLP distillation. (a) Singular-value spectra: GLNN exhibits spectral underfit on sparse graphs and spectral overfit on dense graphs. (b) Rank-direction sketch. (c) Per-dataset rank gap.

Our analysis in Section 3 formalizes this phenomenon through the mismatch between the GNN kernel and the MLP kernel. The resulting energy-weighted alignment objective L∗L^{*} explains why pointwise KL distillation is insufficient: two students can match the same logits while inducing different representation geometries. It also suggests that a practical surrogate should allocate supervision according to where the spectral error concentrates. Ollivier–Ricci curvature (ORC) provides such a local signal: low-curvature edges mark boundary regions where random-walk neighborhoods disagree, while high-curvature edges mark dense regions where aggregation strongly smooths representations.

We instantiate this principle in Graph Geometry-aware MLP (G²MLP). G²MLP uses ORC to approximate this principled alignment: low-curvature nodes receive stronger prediction-level supervision to correct spectral underfit, while high-curvature nodes receive stronger representation-level neighborhood alignment to reduce spectral overfit. The representation term uses a closed-form diagonal Gaussian W2W_2 surrogate. All graph-dependent quantities are used only during training, so the deployed model remains a vanilla MLP. Our contributions are:

• We identify spectral underfit and spectral overfit as two failure modes of GNN-to-MLP distillation, and connect them to boundary and interior graph regions.

• We derive an energy-weighted alignment objective L∗L^{*} that characterizes teacher–student geometric mismatch and motivates curvature-dependent allocation of distillation supervision.

• We propose G 2^{2}MLP, a curvature-guided distillation framework that combines prediction- and representation-level alignment while preserving graph-free MLP inference.

References (59)

  • NAGphormer: A tokenized graph transformer for node classification in large graphs
  • Wasserstein contrastive representation distillation
  • Kernel methods for deep learning
  • Suit the node pair to the case: A multi-scale node pair grouping strategy for graph-mlp distillation
  • Graph neural tangent kernel: Fusing graph neural networks with graph kernels
  • A Generalization of Transformer Networks to Graphs
  • Born again neural networks
  • Neural message passing for quantum chemistry
  • Linkless link prediction via relational distillation
  • Inductive representation learning on large graphs
  • Depth-adaptive graph neural networks via learnable Bakry–Émery curvature
  • Distilling the knowledge in a neural network
  • Open graph benchmark: Datasets for machine learning on graphs
  • Graph-mlp: Node classification without message passing in graph
  • Neural tangent kernel: Convergence and generalization in neural networks
  • Adam: A method for stochastic optimization
  • CurvDrop: A Ricci curvature based approach to prevent graph neural networks from over-smoothing and over-squashing
  • Model compression using optimal transport
  • AdaGMLP: AdaBoosting GNN-to-MLP knowledge distillation (opens the publisher in a new tab)
  • Wasserstein distance rivals Kullback-Leibler divergence for knowledge distillation
  • Revisiting over-smoothing and over-squashing using Ollivier–Ricci curvature
  • Community detection on networks with Ricci flow
  • Computational optimal transport with applications to data sciences
  • Recipe for a general, powerful, scalable graph transformer
  • Pitfalls of graph neural network evaluation
  • Ollivier–Ricci curvature-based method to community detection in complex networks
  • Forman curvature for complex networks
  • Learning MLPs on graphs: A unified view of effectiveness, robustness, and efficiency
  • Understanding over-squashing and bottlenecks on graphs via curvature
  • APAN: Asynchronous propagation attention network for real-time temporal graph embedding
  • Graph explicit neural networks: Explicitly encoding graphs for efficient and accurate inference
  • Training mlps on graphs without supervision
  • Extracting low-/high-frequency knowledge from graph neural networks and injecting it into mlps: An effective gnn-to-mlp distillation framework
  • Quantifying the knowledge in GNNs for reliable distillation into MLPs
  • Teach harder, learn poorer: Rethinking hard sample distillation for GNN-to-MLP knowledge distillation
  • Extract the knowledge of graph neural networks and go beyond it: An effective knowledge distillation framework
  • VQGraph: Rethinking graph representation space for bridging GNNs and MLPs
  • Revisiting semi-supervised learning with graph embeddings
  • Graph-less neural networks: Teaching old MLPs new tricks via distillation
  • Tined: Gnns-to-mlps by teacher injection and dirichlet energy distillation
  • We use throughout:
  • Initialize $\Sigma^{(0)}(v,u) = \mathbf{x}_v^\top \mathbf{x}_u / F$ and $\Theta^{(0)}(v,u) = \Sigma^{(0)}(v,u)$
  • The MLP NTK $\mathbf{K}^{\mathrm{MLP}}$ is the special case in which the double sum in Eq
  • Their difference $\Delta^{(K)}(v,u):=\Theta^{(K)}(v,u)-\mathbf{K}^{\mathrm{MLP}}(v,u)$ is therefore the graph-induced contribution generated by paths in the $K$-hop receptive fields of $v$ and $u$
  • By the inductive hypothesis, each of these depends on features only through $\mathcal{N}_{k-1}^{+}(v') \cup \mathcal{N}_{k-1}^{+}(u')$
  • (15) combines $\Sigma^{(k)}(v,u)$, $\dot{\Sigma}^{(k)}(v,u)$, and $\Theta^{(k-1)}(v,u)$
  • Taking the infimum over couplings $\pi \in \Pi(\mu_i, \mu_j)$:
  • The constant $\epsilon_{\text{sg}} = 10^{-8}$ is fixed across all experiments
  • For Cora, Citeseer, Pubmed, A-computer, and A-photo, we use the CPF split protocol of Yang et al. [2021]: 10 random splits per dataset with the standard CPF train/validation/test ratios; we report mean±std over the 10 splits
  • The GraphSAGE teacher uses the GCN aggregator
  • All variants share the same MLP architecture, optimizer, and 10-seed protocol as the main results
  • All experiments use the hardware and software stack described in Appendix E.5
  • Across all GT teachers, the student is a 2-layer MLP with hidden dimension matched to the teacher
  • born-again
  • Conventions as in Table 3: $T$ teacher, $S$ GLNN student, $S^{\dagger} \mathrm{G}^2\mathrm{MLP}$ student
  • >Dataset</td><td colspan=
  • Here we ablate the edge-BCE term to isolate the contribution of embedding distillation alone, and analyze the resulting cross-regime gap
  • Conventions as in Table 4
  • >Method</td><td colspan=