Proceedings

Sharpness-aware Zeroth-order Optimization for Graph Transformers

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 3126-3134.

https://doi.org/10.24963/ijcai.2025/348

Abstract

Graph Transformers (GTs) have emerged as powerful tools for handling graph-structured data through global attention mechanisms. While GTs can effectively capture long-range dependencies, they introduce difficulties in optimization due to their complex, non-differentiable operators, which cannot be directly handled by standard gradient-based optimizers (such as Adam or AdamW). To investigate the above issues, this work adopts the line of Zeroth-Order Optimization (ZOO) technique. However, direct integration of ZOO incurs considerable challenges due to the sharp loss landscape and steep gradients within the GT parameter space. Under the above observations, we propose a Sharpness-aware Zeroth-order Optimizer (SZO) that combines Sharpness-Aware Minimization (SAM) technique facilitating convergence within a flatter neighborhood, and leverages parallel computing for efficient gradient estimation. Theoretically, we provide a comprehensive analysis of the optimizer from both convergence and generalization perspectives. Empirically, we conduct extensive experiments on various classical GTs across a wide range of benchmark datasets, which underscore the superior performance of SZO over the state-of-the-art optimizers.

  1. [Bahri et al., 2021] Dara Bahri, Hossein Mobahi, and Yi Tay. Sharpness-aware minimization improves language model generalization. arXiv preprint arXiv:2110.08529, 2021.
  2. [Bai et al., 2023] Peizhen Bai, Xianyuan Liu, and Haip- ing Lu. Geometry-aware line graph transformer pre- training for molecular property prediction. arXiv preprint arXiv:2309.00483, 2023.
  3. [Chang and Ye, 2024] Jinho Chang and Jong Chul Ye. Bidi- rectional generation of structure and properties through a single molecular foundation model. Nature Communica- tions, 15(1):2323, 2024.
  4. [Chang et al., 2025] Zongyu Chang, Feihong Lu, Ziqin Zhu, Qian Li, Cheng Ji, Zhuo Chen, Yang Liu, Ruifeng Xu, Yangqiu Song, Shangguang Wang, et al. Bridging the gap between llms and human intentions: Progresses and chal- lenges in instruction understanding, intention reasoning, and reliable generation. arXiv preprint arXiv:2502.09101, 2025.
  5. [Chen et al., 2017] Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order opti- mization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM workshop on artificial intelligence and security, pages 15-26, 2017.
  6. [Chen et al., 2021] Jianwen Chen, Shuangjia Zheng, Ying Song, Jiahua Rao, and Yuedong Yang. Learning attributed graph representations with communicative message pass- ing transformer. arXiv preprint arXiv:2107.08773, 2021.
  7. [Chen et al., 2023] Aochuan Chen, Yimeng Zhang, Jing- han Jia, James Diffenderfer, Jiancheng Liu, Konstantinos Parasyris, Yihua Zhang, Zheng Zhang, Bhavya Kailkhura, and Sijia Liu. Deepzero: Scaling up zeroth-order op- timization for deep model training. arXiv preprint arXiv:2310.02025, 2023.
  8. [Du et al., 2022] Jiawei Du, Daquan Zhou, Jiashi Feng, Vin- cent Tan, and Joey Tianyi Zhou. Sharpness-aware training for free. Advances in Neural Information Processing Sys- tems, 35:23439-23451, 2022.
  9. [Dwivedi and Bresson, 2020] Vijay Prakash Dwivedi and Xavier Bresson. A generalization of transformer networks to graphs. arXiv preprint arXiv:2012.09699, 2020.
  10. [Foret et al., 2020] Pierre Foret, Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur. Sharpness-aware mini- mization for efficiently improving generalization. In Inter- national Conference on Learning Representations, 2020.
  11. [Gilmer et al., 2017] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neu- ral message passing for quantum chemistry. In Interna- tional conference on machine learning, pages 1263-1272.
  12. PMLR, 2017.
  13. [Han et al., 2021] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. Advances in neural information processing systems, 34:15908-15919, 2021.
  14. [He et al., 2022] Xiaoyu He, Zibin Zheng, Zefeng Chen, and Yuren Zhou. Adaptive evolution strategies for stochastic zeroth-order optimization. IEEE Transactions on Emerg- ing Topics in Computational Intelligence, 6(5):1271- 1285, 2022.
  15. [Hu et al., 2020] Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. Strategies for pre-training graph neural net- works. In International Conference on Learning Repre- sentations, 2020.
  16. [Ilbert et al., 2024] Romain Ilbert, Ambroise Odonnat, Vasilii Feofanov, Aladin Virmaux, Giuseppe Paolo, Themis Palpanas, and Ievgen Redko. Unlocking the potential of transformers in time series forecasting with sharpness-aware minimization and channel-wise attention. arXiv preprint arXiv:2402.10198, 2024.
  17. [Jiang et al., 2023] Weisen Jiang, Hansi Yang, Yu Zhang, and James Kwok. An adaptive policy to employ sharpness- aware minimization. arXiv preprint arXiv:2304.14647, 2023.
  18. [Kipf and Welling, 2016] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
  19. [Kunstner et al., 2023] Frederik Kunstner, Jacques Chen, Jonathan Wilder Lavington, and Mark Schmidt. Noise is not the main factor behind the gap between sgd and adam on transformers, but sign descent might be. arXiv preprint arXiv:2304.13960, 2023.
  20. [Kwon et al., 2021] Jungmin Kwon, Jeongseop Kim, Hyun- seo Park, and In Kwon Choi. Asam: Adaptive sharpness- aware minimization for scale-invariant learning of deep neural networks. In International Conference on Machine Learning, pages 5905-5914. PMLR, 2021.
  21. [Liu et al., 2020] Sijia Liu, Pin-Yu Chen, Bhavya Kailkhura, Gaoyuan Zhang, Alfred O Hero III, and Pramod K Varsh- ney. A primer on zeroth-order optimization in signal processing and machine learning: Principals, recent ad- vances, and applications. IEEE Signal Processing Maga- zine, 37(5):43-54, 2020.
  22. [Liu et al., 2022a] Siyuan Liu, Yusong Wang, Yifan Deng, Liang He, Bin Shao, Jian Yin, Nanning Zheng, Tie-Yan Liu, and Tong Wang. Improved drug-target interaction prediction with intermolecular graph transformer. Brief- ings in Bioinformatics, 23(5):bbac162, 2022.
  23. [Liu et al., 2022b] Yong Liu, Siqi Mai, Xiangning Chen, Cho-Jui Hsieh, and Yang You. Towards efficient and scal- able sharpness-aware minimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12360-12370, 2022.
  24. [Liu et al., 2023a] Yang Liu, Chuan Zhou, Peng Zhang, Shuai Zhang, Xiaoou Zhang, Zhao Li, and Hongyang Chen. Decision-focused graph neural networks for graph learning and optimization. In 2023 IEEE International Conference on Data Mining (ICDM), pages 1151-1156. IEEE, 2023.
  25. [Liu et al., 2023b] Zequn Liu, Wei Zhang, Yingce Xia, Lijun Wu, Shufang Xie, Tao Qin, Ming Zhang, and Tie-Yan Liu. Molxpt: Wrapping molecules with text for generative pre- training. arXiv preprint arXiv:2305.10688, 2023.
  26. [Liu et al., 2024a] Yang Liu, Chuan Zhou, Huang Fang, Peng Zhang, Yiling Pang, Qingzhao Zhang, Zhao Li, and Hongyang Chen. Secure causal reasoning on coarsened graph for privacy-aware social web services. In 2024 IEEE International Conference on Web Services (ICWS), pages 557-567. IEEE, 2024.
  27. [Liu et al., 2024b] Yang Liu, Chuan Zhou, Peng Zhang, Zhao Li, Shuai Zhang, Xixun Lin, and Xindong Wu. Cl4co: A curriculum training framework for graph-based neural combinatorial optimization. In 2024 IEEE Inter- national Conference on Data Mining (ICDM), pages 779- 784. IEEE, 2024.
  28. [Niu et al., 2022] Peisong Niu, Tian Zhou, Qingsong Wen, Liang Sun, and Tao Yao. Chemistry guided molecu- lar graph transformer. In NeurIPS 2022 AI for Science: Progress and Promises, 2022.
  29. [Ranzato et al., 2021] Marc'Aurelio Ranzato, Alina Beygelzimer, Yann N. Dauphin, Percy Liang, and Jennifer Wortman Vaughan, editors. Advances in Neural Information Processing Systems 34, 2021.
  30. [Rong et al., 2020] Yu Rong, Yatao Bian, Tingyang Xu, Weiyang Xie, Ying Wei, Wenbing Huang, and Junzhou Huang. Self-supervised graph transformer on large-scale molecular data. Advances in neural information process- ing systems, 33:12559-12571, 2020.
  31. [Song et al., 2020] Ying Song, Shuangjia Zheng, Zhang- ming Niu, Zhang-Hua Fu, Yutong Lu, and Yuedong Yang. Communicative representation learning on at- tributed molecular graphs. In IJCAI, volume 2020, pages 2831-2838, 2020. IJCAI
  32. [Topping et al., 2021] Jake Topping, Francesco Di Gio- vanni, Benjamin Paul Chamberlain, Xiaowen Dong, and Michael M Bronstein. Understanding over-squashing and bottlenecks on graphs via curvature. arXiv preprint arXiv:2111.14522, 2021.
  33. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
  34. [Wang et al., 2020] Zhongruo Wang, Krishnakumar Bala- subramanian, Shiqian Ma, and Meisam Razaviyayn. Zeroth-order algorithms for nonconvex minimax problems with improved complexities. stat, 1050:22, 2020.
  35. [Wang et al., 2024] Yili Wang, Kaixiong Zhou, Ninghao Liu, Ying Wang, and Xin Wang. Efficient sharpness- aware minimization for molecular graph transformer mod- els. In International Conference on Learning Representa- tions, 2024.
  36. [Wu et al., 2018] Zhenqin Wu, Bharath Ramsundar, Evan N Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S Pappu, Karl Leswing, and Vijay Pande. Moleculenet: a benchmark for molecular machine learning. Chemical sci- ence, 9(2):513-530, 2018.
  37. [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. Advances in Neural Information Processing Systems, 35:27387-27401, 2022.
  38. [Yang et al., 2019] Kevin Yang, Kyle Swanson, Wengong Jin, Connor Coley, Hua Gao, Angel Guzman-Perez, Tim- othy Hopper, Brian P Kelley, Andrew Palmer, Volker Set- tels, et al. Are learned molecular representations ready for prime time? 2019.
  39. [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? Advances in neural information processing systems, 34:28877-28888, 2021.
  40. [Zhang et al., 2024] Yihua Zhang, Pingzhi Li, Junyuan Hong, Jiaxiang Li, Yimeng Zhang, Wenqing Zheng, Pin-Yu Chen, Jason D Lee, Wotao Yin, Mingyi Hong, et al. Revisiting zeroth-order optimization for memory- efficient llm fine-tuning: A benchmark. arXiv preprint arXiv:2402.11592, 2024.
  41. [Zhao et al., 2022] Yang Zhao, Hao Zhang, and Xiuyuan Hu. Randomized sharpness-aware training for boosting com- putational efficiency in deep learning. arXiv preprint arXiv:2203.09962, 2022.

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

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