Generalizing GNNs with Tokenized Mixture of Experts
Xiaoguang Guo, Zehong Wang, Jiazheng Li, Shawn Spitzel, Qi Yang, Kaize Ding, Jundong Li, Chuxu Zhang
TL;DR
The paper tackles the impossible-triangle challenge of deploying frozen GNNs that must fit clean data, generalize under distribution shifts, and resist perturbations. It analyzes static inference vs instance-conditional computation (ICC) under a tri-objective framework, revealing a stability floor for static methods and actionable levers for ICC via coverage, selection, and stability decompositions. STEM-GNN implements robust ICC through a three-component design: (1) a MoE encoder to expand the deployed set of mechanisms, (2) vector-quantized tokens to stabilize the encoder-to-head interface, and (3) Lipschitz-regularized heads to bound output amplification. Across nine benchmarks, STEM-GNN achieves the best tri-objective balance, showing strong robustness to degree/homophily shifts and perturbations while remaining competitive on clean data, and demonstrates favorable transferability under diverse pretraining sources. This approach offers a practical path to robust graph generalization in fixed, production-like deployment settings.
Abstract
Deployed graph neural networks (GNNs) are frozen at deployment yet must fit clean data, generalize under distribution shifts, and remain stable to perturbations. We show that static inference induces a fundamental tradeoff: improving stability requires reducing reliance on shift-sensitive features, leaving an irreducible worst-case generalization floor. Instance-conditional routing can break this ceiling, but is fragile because shifts can mislead routing and perturbations can make routing fluctuate. We capture these effects via two decompositions separating coverage vs selection, and base sensitivity vs fluctuation amplification. Based on these insights, we propose STEM-GNN, a pretrain-then-finetune framework with a mixture-of-experts encoder for diverse computation paths, a vector-quantized token interface to stabilize encoder-to-head signals, and a Lipschitz-regularized head to bound output amplification. Across nine node, link, and graph benchmarks, STEM-GNN achieves a stronger three-way balance, improving robustness to degree/homophily shifts and to feature/edge corruptions while remaining competitive on clean graphs.
