Lune

KDD2026Top-tier venue

When Compilation Breaks Your GNN: A Numerical Stability Perspective

Jiawei Gu, Zechao Li

Abstract

Deep learning compilers like torch.compile accelerate GNNs through operator fusion and computation reordering, yet often introduce numerical instability that causes models to diverge under hyperparameters that work in eager mode. We trace this fragility to the interaction between compiler optimizations and GNN structure. Compilers reorder floating-point additions assuming associativity, but rounding errors from different summation orders, though typically negligible, can be catastrophically amplified by ill-conditioned computations. We show that GNN neighbor aggregation is structurally prone to such ill-conditioning: power-law degree distributions create highly variable aggregation lengths, while normalized features induce message cancellation during summation. This yields a long-tailed distribution of condition numbers across nodes, where a critical minority of aggregations amplify rounding differences into macroscopic output deviations. Based on this analysis, we propose Numerics-Aware Graph Compilation (NAGC), which estimates per-aggregation numerical risk through lightweight profiling and selectively applies aggressive optimizations only to well-conditioned operations. Experiments on Open Graph Benchmark datasets show that NAGC preserves over 95% of compilation speedups while reducing numerical deviation by 10 to 100 times and eliminating compilation-induced training failures.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

its abstract · related work

Get the answer

Free to start. No credit card required.

Related papers

  1. The Hidden Fragility of GNNs: How Graph Structure Amplifies Numerical ErrorsJiawei Gu, Ziyue QiaoKDD 2026
  2. AGO: Boosting Mobile AI Inference Performance by Removing Constraints on Graph OptimizationZhiying Xu, Hongding Peng, Wei WangINFOCOM 2023 · 1 citation
  3. PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph CompilationJason Ansel, Edward Z. Yang, Horace He, Natalia Gimelshein et al.ASPLOS 2024 · 693 citations
  4. A2Q\rm A^2Q: Aggregation-Aware Quantization for Graph Neural NetworksZeyu Zhu, Fanrong Li, Zitao Mo, Qinghao Hu et al.ICLR 2023
  5. Implementation Bugs as Attacks: Adversarial Neuron Fuzzing and Supply-Chain BackdoorsZizhuang Deng, Yiying Shan, Sanchuan Chen, Guozhu Meng et al.CCS 2026
Dusk over the sea between two cliffs drawn in fine vertical lines