Abstract
Graph Prompt Learning (GPL) effectively bridges the gap between graph pre-training and downstream tasks, addressing the bottleneck in knowledge transfer. However, its susceptibility to backdoor attacks during pre-training remains largely unexplored. This work systematically investigates the backdoor risks in GPL and introduces TrojanGPL-a cross-context backdoor attack that embeds triggers solely through manipulations of the pre-trained encoder, independent of downstream knowledge. Our analysis reveals that jointly optimizing trigger graphs with the prompt mechanism not only narrows the gap between upstream and downstream main tasks but also aligns main and backdoor learning objectives, facilitating seamless backdoor transfer from pre-trained models to diverse downstream applications. To counter this threat, we propose ES-Detector, a defense mechanism that identifies backdoored graph samples by detecting discriminative embedding shifts upon the removal of important nodes. Specifically, when clean and backdoored graphs are predicted as the same class, clean graphs exhibit stable embedding changes, whereas backdoored graphs show significant deviations from clean ones. Extensive experiments on 5 benchmark datasets and 3 GPL frameworks demonstrate that TrojanGPL achieves an attack success rate exceeding 90% in different cross-context scenarios while minimally impacting the performance of the main task. Meanwhile, ES-Detector reduces the attack success rate by at least 60% across all the test settings, validating its practical robustness without prior knowledge of attack patterns.
Funding Information
  • Open Funding Programs of the State Key Laboratory of AI Safety (2025-03)
  • China Postdoctoral Science Foundation (2025M781515)
  • Shaanxi Provincial Postdoctoral Research Funding Project
  • National Natural Science Foundation of China (62441227)
  • Hangzhou Qianjiang Distinguished Experts programme