1.重庆邮电大学网络空间安全与信息法学院,重庆 400065
2.成都信息工程大学软件工程学院,四川成都 610225
3.电子科技大学网络空间安全学院,四川成都 611731
吴涛 男,1987年出生于甘肃省庆阳市。现为重庆邮电大学网络空间安全与信息法学院教授、博士生导师。主要研究方向为人工智能安全、图数据挖掘、图机器学习、图模型安全等。E-mail: wutao@cqupt.edu.cn
周圆庆 男,1998年出生于河南省商丘市。现为重庆邮电大学网络空间安全与信息法学院硕士研究生。主要研究方向为图神经网络、模型分布外泛化性等。E-mail: 18837018370@163.com
先兴平 女,1984年出生于四川省泸州市。现为重庆邮电大学网络空间安全与信息法学院副教授、硕士生导师。主要研究方向为图数据挖掘、数据隐私保护、智能算法安全等。E-mail: xianxp@cqupt.edu.cn
崔灿一星 女,1999年出生于山东省淄博市。现为重庆邮电大学计算机科学与技术学院博士研究生。主要研究方向为图神经网络、人工智能安全等。E-mail: 1137051533@qq.com
刘逸琛 男,1995年出生于甘肃省兰州市。现为重庆邮电大学网络空间安全与信息法学院博士研究生。主要研究方向为图神经网络、人工智能安全等。E-mail: 1013218192@qq.com
乔少杰 男,1981年出生于黑龙江省牡丹江市。现为成都信息工程大学软件工程学院教授、博士生导师。主要研究方向为大数据技术与应用、领域大数据分析、智能算法安全等。中国电子学会会员编号:E190157673M。E-mail: sjqiao@cuit.edu.cn
牛伟纳 女,1990年出生于河南省驻马店市。现为电子科技大学网络空间安全学院研究员。主要研究方向为恶意软件分析、网络攻击检测、数据安全等。中国电子学会会员编号:E190029983S。E-mail: vinusniu@uestc.edu.cn
收稿:2026-02-26,
录用:2026-04-08,
网络首发:2026-05-25,
纸质出版:2026-04-25
移动端阅览
吴涛, 周圆庆, 先兴平, 等. 分布偏移场景下图神经网络测试时自适应方法[J]. 电子学报, 2026, 54(04): 1732-1747.
WU Tao, ZHOU Yuanqing, XIAN Xingping, et al. Test-Time Adaptation of Graph Neural Networks under Distribution Shifts[J]. Acta Electronica Sinica, 2026, 54(04): 1732-1747.
吴涛, 周圆庆, 先兴平, 等. 分布偏移场景下图神经网络测试时自适应方法[J]. 电子学报, 2026, 54(04): 1732-1747. DOI:10.12263/DZXB.20251206
WU Tao, ZHOU Yuanqing, XIAN Xingping, et al. Test-Time Adaptation of Graph Neural Networks under Distribution Shifts[J]. Acta Electronica Sinica, 2026, 54(04): 1732-1747. DOI:10.12263/DZXB.20251206
图神经网络(Graph Neural Networks,GNNs)凭借其强大的表征能力,在多种图学习任务中表现出色。然而,当训练集与测试集之间的数据分布发生偏移时,GNNs的预测性能会显著下降。现有研究普遍将分布偏移视为单一的整体扰动,缺乏对协变量偏移与概念偏移的区分建模,这种粗粒度的处理难以刻画两类偏移对模型性能的差异化影响,进而制约了传统的图神经网络泛化方法在分布偏移场景下的针对性与有效性。针对此问题,本工作从协变量偏移和概念偏移的特性出发,提出一种基于原型引导的测试时自适应方法ProGTA(Prototype-Guided Test-time Adaptation)。该方法突破了传统静态域适应的局限,主要由原型图对比学习模块和多层次对齐模块构成,能够在模型推理之前进行自适应更新。具体而言,原型图对比学习模块在编码器后引入可学习的类别原型层,利用源域先验指导目标域节点的软分配,以建模图数据的类别语义结构,进而构造出具备更高语义可靠性的同质性增强视图。同时,该模块结合原型对比损失和原型聚类损失联合优化节点表征与类别原型,将局部视图一致性提升为类别语义一致性,为后续类别原型对齐提供可靠的语义锚点。多层次对齐模块则在测试时训练阶段通过对齐源域与目标域嵌入表征的一阶和二阶统计量来缓解协变量偏移造成的特征分布变化,同时通过对齐源域与目标域的类别原型分布来缓解概念偏移造成的类别语义变化。为验证所提方法的有效性,本工作在涵盖人工偏移、时间演化及跨域偏移的多个图分布偏移基准数据集上进行了详尽的实验评估。实验结果表明,ProGTA在分布外泛化性能上显著优于Tent、EERM和GTrans等代表性方法。进一步地,本研究从域适应视角分析了对抗攻击和概念偏移在破坏模型决策边界方面的一致性,将对抗攻击问题转化为分布偏移的一种特例,证实了该方法可同时提升模型的分布外泛化性与对抗鲁棒性。
Graph neural networks (GNNs) have achieved outstanding performance in various graph learning tasks owing to their powerful representation capabilities. However
the predictive performance of GNNs degrades significantly when data distribution shifts occur between the training and test sets. Existing studies generally treat distribution shift as a single holistic perturbation and lack differentiated modeling of covariate shift and concept shift. Such coarse-grained processing fails to characterize the distinct impacts of these two types of shifts on model performance
thereby restricting the pertinence and effectiveness of traditional GNN generalization methods in distribution shift scenarios. To address this issue
starting from the characteristics of covariate shift and concept shift
this work proposes a prototype-guided test-time adaptation method named ProGTA (Prototype-Guided Test-time Adaptation). This method breaks through the limitations of traditional static domain adaptation
mainly consisting of a prototype graph contrastive learning module and a multi-level alignment module
which enables adaptive updating prior to model inference. Specifically
the prototype graph contrastive learning module introduces a learnable class prototype layer after the encoder
leverages source domain priors to guide the soft assignment of target domain nodes
models the class semantic structure of graph data
and further constructs homogeneity-enhanced views with higher semantic reliability. Meanwhile
this module jointly optimizes node representations and class prototypes by combining prototype contrastive loss and prototype clustering loss
elevating local view consistency to class semantic consistency and providing reliable semantic anchors for subsequent class prototype alignment. The multi-level alignment module mitigates feature distribution variations caused by covariate shift by aligning the first-order and second-order statistics of embedding representations between the source and target domains during the test-time training phase
and addresses class semantic variations induced by concept shift by aligning the class prototype distributions of the source and target domains. To verify the effectiveness of the proposed method
this work conducts comprehensive experimental evaluations on multiple benchmark datasets for graph distribution shift
covering synthetic shift
temporal evolution
and cross-domain shift scenarios. Experimental results demonstrate that ProGTA significantly outperforms representative methods such as Tent
EERM
and GTrans in terms of out-of-distribution generalization performance. Furthermore
this study analyzes the consistency of adversarial attacks and concept shift in disrupting the model’s decision boundaries from the domain adaptation perspective
formulates the adversarial attack problem as a special case of out-of-distribution shift
and confirms that the proposed method can simultaneously improve the model’s out-of-distribution generalization and adversarial robustness.
Fakhraei S , Foulds J , Shashanka M , et al . Collective spammer detection in evolving multi-relational social networks [C ] // Proceedings of the 21st ACM SIGKDD International Conference on Knowledge Discovery and Data Mining . New York : ACM , 2015 : 1769 - 1778 . DOI: 10.1145/2783258.2788606 http://dx.doi.org/10.1145/2783258.2788606
徐敏 , 胡春玲 , 胡婷 , 等 . 基于序列与跨模态对齐的蛋白质功能预测模型 [J ] . 电子学报 , 2025 , 53 ( 11 ): 4022 - 4034 .
Xu Min , Hu Chunling , Hu Ting , et al . Sequence-based and cross-modal alignment model for protein function prediction [J ] . Acta Electronica Sinica , 2025 , 53 ( 11 ): 4022 - 4034 . (in Chinese)
Zhang Zaixi , Liu Qi . Learning subpocket prototypes for generalizable structure-based drug design [C ] // Proceedings of the 40th International Conference on Machine Learning . Cambridge, MA : JMLR.org , 2023 : 1735 .
Wang Quan , Mao Zhendong , Wang Bin , et al . Knowledge graph embedding: A survey of approaches and applications [J ] . IEEE Transactions on Knowledge and Data Engineering , 2017 , 29 ( 12 ): 2724 - 2743 . DOI: 10.1109/TKDE.2017.2754499 http://dx.doi.org/10.1109/TKDE.2017.2754499
Zhao Tianxiang , Zhang Xiang , Wang Suhang . GraphSMOTE: Imbalanced node classification on graphs with graph neural networks [C ] // Proceedings of the 14th ACM International Conference on Web Search and Data Mining . New York : ACM , 2021 : 833 - 841 . DOI: 10.48550/arXiv.2103.08826 http://dx.doi.org/10.48550/arXiv.2103.08826
Zhang Muhan , Chen Yixin . Link prediction based on graph neural networks [C ] // Proceedings of the 32nd International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2018 : 5171 - 5181 . DOI: 10.48550/arXiv.1802.09691 http://dx.doi.org/10.48550/arXiv.1802.09691
Wu Man , Zheng Xin , Zhang Qin , et al . Graph learning under distribution shifts: A comprehensive survey on domain adaptation, out-of-distribution, and continual learning [PP/OL ] . V2.arXiv ( 2024-03-07 )[ 2025-11-12 ] . https://arxiv.org/abs/2402.16374 https://arxiv.org/abs/2402.16374 .
Yu Junchi , Liang Jian , He Ran . Mind the label shift of augmentation-based graph OOD generalization [C ] // Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . Piscataway : IEEE , 2023 : 11620 - 11630 . DOI: 10.48550/arXiv.2303.14859 http://dx.doi.org/10.48550/arXiv.2303.14859
Sugiyama M , Nakajima S , Kashima H , et al . Direct importance estimation with model selection and its application to covariate shift adaptation [C ] // Proceedings of the 21st International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2007 : 1433 - 1440 . DOI: 10.1007/s10463-008-0197-x http://dx.doi.org/10.1007/s10463-008-0197-x
Long Mingsheng , Cao Zhangjie , Wang Jianmin , et al . Conditional adversarial domain adaptation [C ] // Proceedings of the 32nd International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2018 : 1647 - 1657 . DOI: 10.1007/978-3-030-01237-3_9 http://dx.doi.org/10.1007/978-3-030-01237-3_9
Yang Zhilin , Cohen W W , Salakhutdinov R . Revisiting semi-supervised learning with graph embeddings [C ] // Proceedings of the 33rd International Conference on Machine Learning . Cambridge, MA : JMLR.org , 2016 : 40 - 48 . DOI: 10.48550/arXiv.1603.08861 http://dx.doi.org/10.48550/arXiv.1603.08861
Yoshikai Y , Mizuno T , Nemoto S , et al . A novel molecule generative model of VAE combined with Transformer for unseen structure generation [PP/OL ] . V2. arXiv ( 2024-04-05 )[ 2025-12-18 ] . https://arxiv.org/abs/2402.11950 https://arxiv.org/abs/2402.11950 .
Kong Kezhi , Li Guohao , Ding Mucong , et al . Robust optimization as data augmentation for large-scale graphs [C ] // Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . Piscataway : IEEE , 2022 : 60 - 69 . DOI: 10.1109/cvpr52688.2022.00016 http://dx.doi.org/10.1109/cvpr52688.2022.00016
Huang Yufei , Li S Z , LIN Haitao , et al . Knowledge distillation improves graph structure augmentation for graph neural networks [C ] // Proceedings of the 36th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2022 : 068431 - 0858 . DOI: 10.52202/068431-0858 http://dx.doi.org/10.52202/068431-0858
You Yuning , Chen Tianlong , Sui Yongduo , et al . Graph contrastive learning with augmentations [C ] // Proceedings of the 34th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2020 : 488 . DOI: 10.48550/arXiv.2010.13902 http://dx.doi.org/10.48550/arXiv.2010.13902
Ma Jianxin , Cui Peng , Kuang Kun , et al . Disentangled graph convolutional networks [C ] // Proceedings of the 36th International Conference on Machine Learning . Cambridge, MA : JMLR.org , 2019 : 4212 - 4221 .
Li Haoyang , Wang Xin , Zhang Ziwei , et al . OOD-GNN: Out-of-distribution generalized graph neural network [J ] . IEEE Transactions on Knowledge and Data Engineering , 2023 , 35 ( 7 ): 7328 - 7340 . DOI: 10.1109/TKDE.2022.3193725 http://dx.doi.org/10.1109/TKDE.2022.3193725
Wu Man , Pan Shirui , Zhou Chuan , et al . Unsupervised domain adaptive graph convolutional networks [C ] // Proceedings of the Web Conference . New York : ACM , 2020 : 1457 - 1467 . DOI: 10.1145/3366423.3380219 http://dx.doi.org/10.1145/3366423.3380219
Li Tianfu , Zhao Zhibin , Sun Chuang , et al . Domain adversarial graph convolutional network for fault diagnosis under variable working conditions [J ] . IEEE Transactions on Instrumentation and Measurement , 2021 , 70 : 3515010 . DOI: 10.1109/TIM.2021.3075016 http://dx.doi.org/10.1109/TIM.2021.3075016
Chen Guanzi , Zhang Jiying , Xiao Xi , et al . GraphTTA: Test time adaptation on graph neural networks [PP/OL ] . V1. arXiv ( 2022-08-19 )[ 2025-11-12 ] . https://arxiv.org/abs/2208.09126 https://arxiv.org/abs/2208.09126 .
Feng Wenzheng , Zhang Jie , Dong Yuxiao , et al . Graph random neural networks for semi-supervised learning on graphs [C ] // Proceedings of the 34th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2020 : 1853 .
Liu Songtao , Ying R , Dong Hanze , et al . Local augmentation for graph neural networks [C ] // Proceedings of the 39th International Conference on Machine Learning . Baltimore, Cambridge, MA : JMLR.org , 2022 : 14054 - 14072 .
Zhao Tong , Liu Yozen , Neves L , et al . Data augmentation for graph neural networks [J ] . Proceedings of the AAAI Conference on Artificial Intelligence , 2021 , 35 ( 12 ): 11015 - 11023 . DOI: 10.1609/aaai.v35i12.17315 http://dx.doi.org/10.1609/aaai.v35i12.17315
Park H , Lee S , Kim S , et al . Metropolis-hastings data augmentation for graph neural networks [C ] // Proceedings of the 35th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2021 : 1453 .
Liu Gang , Zhao Tong , Xu Jiaxin , et al . Graph rationalization with environment-based augmentations [C ] // Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining . New York : ACM , 2022 : 1069 - 1078 . DOI: 10.1145/3534678.3539347 http://dx.doi.org/10.1145/3534678.3539347
Zhu Yun , Shi Haizhou , Zhang Zhenshuo , et al . MARIO: Model agnostic recipe for improving OOD generalization of graph contrastive learning [C ] // Proceedings of the ACM Web Conference 2024 . New York : ACM , 2024 : 300 - 311 . DOI: 10.1145/3589334.3645322 http://dx.doi.org/10.1145/3589334.3645322
Guo Xiaojie , Zhao Liang , Qin Zhao , et al . Interpretable deep graph generation with node-edge co-disentanglement [C ] // Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining . New York : ACM , 2020 : 1697 - 1707 . DOI: 10.1145/3394486.3403221 http://dx.doi.org/10.1145/3394486.3403221
Li Haoyang , Wang Xin , Zhang Ziwei , et al . Disentangled contrastive learning on graphs [C ] // Proceedings of the 35th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2021 : 1674 .
Fan Shaohua , Wang Xiao , Shi Chuan , et al . Generalizing graph neural networks on out-of-distribution graphs [J ] . IEEE Transactions on Pattern Analysis and Machine Intelligence , 2024 , 46 ( 1 ): 322 - 337 . DOI: 10.1109/TPAMI.2023.3321097 http://dx.doi.org/10.1109/TPAMI.2023.3321097
Fan Shaohua , Wang Xiao , Shi Chuan , et al . Debiased graph neural networks with agnostic label selection bias [J ] . IEEE Transactions on Neural Networks and Learning Systems , 2024 , 35 ( 4 ): 4411 - 4422 . DOI: 10.1109/TNNLS.2022.3141260 http://dx.doi.org/10.1109/TNNLS.2022.3141260
Wu Qitian , Zhang Hengrui , Yan Junchi , et al . Handling distribution shifts on graphs: An invariance perspective [C/OL ] // Proceedings of the 10th International Conference on Learning Representations , 2022 . https://openreview.net/forum id=FQOC5u-1egI https://openreview.net/forumid=FQOC5u-1egI . DOI: 10.48550/arXiv.2202.02466 http://dx.doi.org/10.48550/arXiv.2202.02466
Bian Yatao , Chen Yongqiang , Cheng J , et al . Does invariant graph learning via environment augmentation learn invariance [C ] // Proceedings of the 37th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2023 : 075280 - 3130 . DOI: 10.52202/075280-3130 http://dx.doi.org/10.52202/075280-3130
Li Haoyang , Zhang Ziwei , Wang Xin , et al . Learning invariant graph representations for out-of-distribution generalization [C ] // Proceedings of the 36th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2022 : 068431 - 0859 . DOI: 10.52202/068431-0859 http://dx.doi.org/10.52202/068431-0859
Sun Baochen , Saenko K . Deep CORAL: Correlation alignment for deep domain adaptation [C ] // Proceedings of the European Conference on Computer Vision . Heidelberg : Springer , 2016 : 443 - 450 . DOI: 10.1007/978-3-319-49409-8_35 http://dx.doi.org/10.1007/978-3-319-49409-8_35
Wang Dequan , Shelhamer E , Liu Shaoteng , et al . Tent: Fully test-time adaptation by entropy minimization [C/OL ] // Proceedings of the 9th International Conference on Learning Representations , 2021 : 2928 - 2943 . https://openreview.net/forum id=uXl3bZLkr3c https://openreview.net/forumid=uXl3bZLkr3c .
Jin Wei , Zhao Tong , Ding Jiayuan , et al . Empowering graph representation learning with test-time graph transformation [C/OL ] // Proceedings of the 11th International Conference on Learning Representations , 2023 : 32327 - 32354 . https://openreview.net/forum id=Lnxl5pr018 https://openreview.net/forumid=Lnxl5pr018 .
Wang Yiqi , Li Chaozhuo , Zhao Jianan , et al . Test-time training for graph neural networks [M ] // Database systems for advanced applications . Singapore : Springer Nature Singapore , 2026 : 349 - 364 . DOI: 10.1007/978-981-95-3906-2_25 http://dx.doi.org/10.1007/978-981-95-3906-2_25
Zhang Jiaxin , Wang Yiqi , Yang Xihong , et al . A fully test-time training framework for semi-supervised node classification on out-of-distribution graphs [J ] . ACM Transactions on Knowledge Discovery from Data , 2024 , 18 ( 7 ): 1 - 19 . DOI: 10.1145/3649507 http://dx.doi.org/10.1145/3649507
Liu Yuejiang , Kothari P , Van Delft B , et al . TTT++: When does self-supervised test-time training fail or thrive [C ] // Proceedings of the 35th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2021 : 1669 .
Gui Shurui , Ji Shuiwang , Li X , et al . GOOD: A graph out-of-distribution benchmark [C ] // Proceedings of the 36th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2022 : 068431 - 0150 . DOI: 10.52202/068431-0150 http://dx.doi.org/10.52202/068431-0150
Shchur O , Mumme M , Bojchevski A , et al . Pitfalls of graph neural network evaluation [PP/OL ] . V2.arXiv ( 2019-06-18 )[ 2025-11-22 ] . https://arxiv.org/abs/1811.05868 https://arxiv.org/abs/1811.05868 .
Hu Weihua , Fey M , Zitnik M , et al . Open graph benchmark: Datasets for machine learning on graphs [C ] // Proceedings of the 34th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2020 : 1855 . DOI: 10.48550/arXiv.2005.00687 http://dx.doi.org/10.48550/arXiv.2005.00687
Pareja A , Domeniconi G , Chen Jie , et al . EvolveGCN: Evolving graph convolutional networks for dynamic graphs [J ] . Proceedings of the AAAI Conference on Artificial Intelligence , 2020 , 34 ( 4 ): 5363 - 5370 . DOI: 10.1609/aaai.v34i04.5984 http://dx.doi.org/10.1609/aaai.v34i04.5984
Rozemberczki B , Allen C , Sarkar R . Multi-scale attributed node embedding [J ] . Journal of Complex Networks , 2021 , 9 ( 2 ): cnab014 . DOI: 10.1093/comnet/cnab014 http://dx.doi.org/10.1093/comnet/cnab014
Rong Yu , Huang Wenbing , Xu Tingyang , et al . DropEdge: Towards deep graph convolutional networks on node classification [C/OL ] // Proceedings of the 8th International Conference on Learning Representations , 2020 : 2502 - 2519 . https://openreview.net/forum id=Hkx1qkrKPr https://openreview.net/forumid=Hkx1qkrKPr .
Kipf T N , Welling M . Semi-supervised classification with graph convolutional networks [C/OL ] // Proceedings of the 5th International Conference on Learning Representations , 2017 : 2713 - 2727 . https://openreview.net/forum id=SJU4ayYgl https://openreview.net/forumid=SJU4ayYgl .
Veličković P , Cucurull G , Casanova A , et al . Graph attention networks [C/OL ] // Proceedings of the 6th International Conference on Learning Representations , 2018 : 2920 - 2932 . https://openreview.net/forum id=rJXMpikCZ https://openreview.net/forumid=rJXMpikCZ .
Geisler S , Schmidt T , Şirin H , et al . Robustness of graph neural networks at scale [C ] // Proceedings of the 35th International Conference on Neural Information Processing Systems . New York : Curran Associates Inc. , 2021 : 585 . DOI: 10.48550/arXiv.2110.14038 http://dx.doi.org/10.48550/arXiv.2110.14038
Zhu Dingyuan , Zhang Ziwei , Cui Peng , et al . Robust graph convolutional networks against adversarial attacks [C ] // Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining . New York : ACM , 2019 : 1399 - 1407 . DOI: 10.1145/3292500.3330851 http://dx.doi.org/10.1145/3292500.3330851
Jin Wei , Derr T , Wang Yiqi , et al . Node similarity preserving graph convolutional networks [C ] // Proceedings of the 14th ACM International Conference on Web Search and Data Mining . New York : ACM , 2021 : 148 - 156 . DOI: 10.1145/3437963.3441735 http://dx.doi.org/10.1145/3437963.3441735
Xu Kaidi , Chen Hongge , Liu Sijia , et al . Topology attack and defense for graph neural networks: An optimization perspective [C ] // Proceedings of the 28th International Joint Conference on Artificial Intelligence . ijcai . org , 2019 : 3961 - 3967 . DOI: 10.24963/ijcai.2019/550 http://dx.doi.org/10.24963/ijcai.2019/550
0
浏览量
9
下载量
0
CSCD
关联资源
相关文章
相关作者
相关机构
京公网安备11010802024621