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.
翻译:部署后的图神经网络(GNN)处于冻结状态,却需同时适配干净数据、应对分布偏移下的泛化问题,并保持对扰动的稳定性。研究表明,静态推理存在根本性权衡:提升稳定性需降低对偏移敏感特征的依赖,这会导致一个不可约的最坏泛化下限。实例条件路由可突破该上限,但存在脆弱性——偏移可能误导路由决策,扰动可能引发路由波动。我们通过两个解耦分析(覆盖度与选择性的分离、基础敏感性与波动放大的分离)来刻画这些效应。基于上述发现,我们提出STEM-GNN框架:采用预训练-微调范式,集成混合专家编码器以产生多样化计算路径,设计向量量化令牌接口稳定编码器至输出头的信号传递,并引入Lipschitz正则化输出头以约束输出放大。在节点、连边、图三类共九个基准测试中,STEM-GNN展现出更优的三维平衡性:在保持干净图上竞争力同时,显著提升了对度/同质性偏移及特征/边扰动的鲁棒性。