Proceedings

DNFormer: Differential Attention for Graph Transformers

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 3097-3105.

https://doi.org/10.24963/ijcai.2026/344

Abstract

Graph Transformers (GTs) have emerged as a powerful paradigm for graph representation learning, leveraging attention mechanisms to enable flexible information exchange. Recent GTs often adopt local attention to restrict computation to neighborhoods, thereby reducing costs and enhancing scalability. However, local attention computation poses a serious issue that significantly reduces the efficacy of the overall approaches – because computation is restricted to local neighborhoods, node pairs that share topological patterns receive similar attention scores, thereby reducing attention’s discriminative power. Consequently, GT-based models typically overemphasize common structural motifs but fail to capture node-specific properties. To address this problem, we propose DNFormer, a novel GT grounded in differential modeling. We introduce a differential local attention mechanism in DNFormer that computes attention scores as differences across multiple topology-aware similarity measures, rather than relying on a single score. This mechanism suppresses shared topological patterns among neighbors and emphasizes relative node-to-node distinctions. As a result, DNFormer mitigates structural dominance in attention aggregation, better capturing node-specific relational patterns while preserving local structural properties. Extensive experiments confirm DNFormer's superior performance over representative GT baselines.

  1. [Alon and Yahav, 2021] Uri Alon and Eran Yahav. On the bottleneck of graph neural networks and its practical im- plications. In Proceedings of the 9th International Confer- ence on Learning Representations, 2021.
  2. [Chen et al., 2023] Jinsong Chen, Kaiyuan Gao, Gaichao Li, and Kun He. Nagphormer: A tokenized graph transformer for node classification in large graphs. In Proceedings of the The 11th International Conference on Learning Repre- sentations, 2023.
  3. [Deng et al., 2024] Chenhui Deng, Zichao Yue, and Zhiru Zhang. Polynormer: Polynomial-expressive graph trans- former in linear time. In Proceedings of the International Conference on Learning Representations, 2024.
  4. [Ding et al., 2023] Ling Ding, Peng Du, Haiwei Hou, Jian Zhang, Di Jin, and Shifei Ding. Botnet DGA domain name classification using transformer network with hybrid em- bedding. Big Data Res., 33:100395, 2023.
  5. [Dwivedi and Bresson, 2020] Vijay Prakash Dwivedi and Xavier Bresson. A generalization of transformer networks to graphs. arXiv preprint arXiv:2012.09699, 2020.
  6. [Dwivedi et al., 2023] Vijay Prakash Dwivedi, Yozen Liu, Anh Tuan Luu, Xavier Bresson, Neil Shah, and Tong Zhao. Graph transformers for large graphs. arXiv preprint arXiv:2312.11109, 2023.
  7. [Gilmer et al., 2017] Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning, volume 70, pages 1263-1272, 2017.
  8. [Hamilton et al., 2017] William L. Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Proceedings of the Advances in Neural Information Processing Systems, pages 1024-1034, 2017.
  9. [Kipf and Welling, 2017] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In Proceedings of the 5th International Con- ference on Learning Representations, 2017.
  10. [Klicpera et al., 2019] Johannes Klicpera, Aleksandar Bo- jchevski, and Stephan Günnemann. Predict then prop- agate: Graph neural networks meet personalized pager- ank. In Proceedings of the 7th International Conference on Learning Representations, 2019.
  11. [Kreuzer et al., 2021] Devin Kreuzer, Dominique Beaini, William L. Hamilton, Vincent Létourneau, and Pruden- cio Tossou. Rethinking graph transformers with spectral attention. In Proceedings of the Advances in Neural Infor- mation Processing Systems, pages 21618-21629, 2021.
  12. [Li et al., 2018] Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In Sheila A. McIlraith and Kil- ian Q. Weinberger, editors, Proceedings of the 32nd AAAI Conference on Artificial Intelligence, 2018.
  13. [McAuley et al., 2015] Julian McAuley, Christopher Targett, Qinfeng Shi, and Anton Van Den Hengel. Image-based recommendations on styles and substitutes. In Proceed- ings of the 38th international ACM SIGIR Conference on Research and Development in Information Retrieval, pages 43-52, 2015.
  14. [Oono and Suzuki, 2020] Kenta Oono and Taiji Suzuki. Graph neural networks exponentially lose expressive power for node classification. In Proceedings of the 8th International Conference on Learning Representations, 2020.
  15. [Sen et al., 2008] Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Gallagher, and Tina Eliassi- Rad. Collective classification in network data. AI Mag., 29(3):93-106, 2008.
  16. [Shirzad et al., 2023] Hamed Shirzad, Ameya Velingker, Balaji Venkatachalam, Danica J Sutherland, and Ali Ke- mal Sinop. Exphormer: Sparse transformers for graphs. In Proceedings of the International Conference on Machine Learning, pages 31613-31632, 2023.
  17. [Sinha et al., 2015] Arnab Sinha, Zhihong Shen, Yang Song, Hao Ma, Darrin Eide, Bo-June Hsu, and Kuansan Wang. An overview of microsoft academic service (mas) and ap- plications. In Proceedings of the 24th International Con- ference on World Wide Web, pages 243-246, 2015.
  18. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of the Advances in Neural Informa- tion Processing Systems, pages 5998-6008, 2017.
  19. [Velickovic et al., 2018] Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. Graph attention networks. In Proceed- ings of the 6th International Conference on Learning Rep- resentations, 2018.
  20. [Wu et al., 2019] Felix Wu, Amauri H. Souza Jr., Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Q. Wein- berger. Simplifying graph convolutional networks. In Pro- ceedings of the 36th International Conference on Machine Learning, volume 97, pages 6861-6871, 2019.
  21. [Wu et al., 2022] Qitian Wu, Wentao Zhao, Zenan Li, David P. Wipf, and Junchi Yan. Nodeformer: A scalable graph structure learning transformer for node classifica- tion. In Proceedings of the Advances in Neural Informa- tion Processing Systems, 2022.
  22. [Wu et al., 2023] Qitian Wu, Wentao Zhao, Chenxiao Yang, Hengrui Zhang, Fan Nie, Haitian Jiang, Yatao Bian, and Junchi Yan. Sgformer: Simplifying and empowering transformers for large-graph representations. In Proceed- ings of the Advances in Neural Information Processing Systems, 2023.
  23. [Xing et al., 2024] Yujie Xing, Xiao Wang, Yibo Li, Hai Huang, and Chuan Shi. Less is more: on the over- globalizing problem in graph transformers. In Proceedings of the 41st International Conference on Machine Learn- ing, pages 54656-54672, 2024.
  24. [Xu et al., 2019] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural net- works? In Proceedings of the 7th International Confer- ence on Learning Representations, 2019.
  25. [Ying et al., 2021] Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, and Tie-Yan Liu. Do transformers really perform badly for graph representation? In Proceedings of the Advances in Neural Information Processing Systems, pages 28877- 28888, 2021.
  26. [You et al., 2020] Jiaxuan You, Zhitao Ying, and Jure Leskovec. Design space for graph neural networks. In Proceedings of the Advances in Neural Information Pro- cessing Systems, 2020.
  27. [Zhang and Chen, 2018] Muhan Zhang and Yixin Chen. Link prediction based on graph neural networks. Proceed- ings of the Advances in Neural Information Processing Systems, 31, 2018.
  28. [Zhang et al., 2018] Muhan Zhang, Zhicheng Cui, Marion Neumann, and Yixin Chen. An end-to-end deep learning architecture for graph classification. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018.
  29. [Zhuo et al., 2025] Jiaming Zhuo, Yuwei Liu, Yintong Lu, Ziyi Ma, Kun Fu, Chuan Wang, Yuanfang Guo, Zhen Wang, Xiaochun Cao, and Liang Yang. Dualformer: Dual graph transformer. In Proceedings of the 13th Interna- tional Conference on Learning Representations, 2025.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards