Organizations: School of Cyberspace, Hangzhou Dianzi University, Hangzhou, China · Hangzhou Dianzi University, Hangzhou, China · Beihang University, Beijing, China · Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China
Text-attributed graphs (TAGs) enhance graph learning by integrating rich textual semantics and topological context for each node. While boosting expressiveness, they also expose new vulnerabilities in graph learning through text-based adversarial surfaces. Recent advances leverage diverse backbones, such as graph neural networks (GNNs) and pre-trained language models (PLMs), to capture both structural and textual information in TAGs. This diversity raises a key question: How can we design universal adversarial attacks that generalize across architectures to assess the security of TAG models? The challenge arises from the stark contrast in how different backbones-GNNs and PLMs-perceive and encode graph patterns, coupled with the fact that many PLMs are only accessible via APIs, limiting attacks to black-box settings. To address this, we propose BadGraph, a novel attack framework that deeply elicits large language models (LLMs) understanding of general graph knowledge to jointly perturb both node topology and textual semantics. Specifically, we design a target influencer retrieval module that leverages graph priors to construct cross-modally aligned attack shortcuts, thereby enabling efficient LLM-based perturbation reasoning. Experiments show that BadGraph achieves universal and effective attacks across GNN- and LLM-based reasoners, with up to a 76.3% performance drop, while theoretical and empirical analyses confirm its stealthy yet interpretable nature.
Figures & tables
Figure 1. An overview of the proposed BadGraph framework.
Dataset
Emb.
Models
Clean
STACK
PGD
RND
FLIP
SGAttack
WTGIA
Our-text
Our-struct
BadGraph
Cora
TF-IDF
R-GCN
86.67
82.37
78.07
73.93
73.11
85.41
86.22
84.44
79.11
70.89
GIN
85.93
72.37
78.30
72.59
72.89
81.04
85.70
84.44
76.96
63.04
GraphSAGE
84.96
72.30
77.41
74.81
74.74
73.70
83.19
73.93
76.37
54.67
TAGCN
87.33
75.33
80.22
75.04
75.85
87.33
87.56
85.48
83.41
73.93
GCN
85.48
73.78
77.70
74.89
74.44
83.63
83.85
84.15
78.67
71.33
SBERT
R-GCN
87.33
76.37
80.30
76.00
75.93
86.30
85.93
80.30
79.11
56.67
Table 1. GNN-as-Reasoner Scenarios. Attack performance on three datasets across various target GNNs. Lower scores indicate stronger attacks. "Clean" denotes unperturbed graphs; Our-text and Our-struct correspond to text-only and structure-only variants. Best results are in bold.
Dataset
Models
Clean
STACK
PGD
RND
FLIP
SGAttack
WTGIA
Our-text
Our-struct
BadGraph
Cora
DeepSeek-V3
71.85
68.14
72.96
65.92
64.07
67.03
63.70
25.55
67.03
17.03
Mistral-7B
43.70
42.96
53.33
42.59
47.03
37.40
21.48
21.11
38.51
16.29
Arxiv
DeepSeek-V3
64.60
60.80
60.60
61.20
58.70
-
60.10
44.30
55.55
22.90
Mistral-7B
9.30
7.70
8.90
9.20
9.00
-
7.60
4.90
4.70
2.90
Products
DeepSeek-V3
77.10
75.90
75.00
76.50
75.60
75.80
74.10
60.20
75.20
55.80
Mistral-7B
12.20
9.50
10.00
9.70
8.30
12.20
9.10
8.60
12.80
7.80
Table 2. LLM-as-Reasoner Scenarios. Attack performance across two LLM backbones on three TAG datasets.
Figure 2. Edge-level homophily shift on the Cora dataset.
# Nodes
Perturb. Ratio
Acc
Avg. Homo. (edge)
Avg. Homo. (node)
0
0
64.6%
0.8184
0.4257
500
0.09%
23.4%
0.8183
0.4292
1000
0.17%
22.9%
0.8182
0.4317
1500
0.26%
22.6%
0.8181
0.4316
Table 3. Accuracy and homophily changes of deepSeek-as-Reasoner on Arxiv under varying perturbation ratios.
Figure 3. T-SNE visualization illustrating embedding shifts caused by the attack on the Cora dataset.
Method
R-GCN
GCN
GIN
GraphSAGE
TAGCN
Clean
87.33
87.11
85.70
86.00
88.22
Anchor Mis.
71.63
63.93
71.04
62.59
77.11
Rephrasing
58.15
58.74
50.74
39.04
54.59
BadGraph
56.67
56.00
47.04
39.93
51.19
Table 4. Robustness of BadGraph under prompt variations on Cora. “Rephrasing” rewrites the prompt, and “Anchor Mis.” uses inconsistent influencers across modalities.
Method
GIN
GraphSAGE
SGCN
TAGCN
Qwen
DeepSeek
Clean
85.70
86.00
86.07
88.22
68.88
71.85
Ours-LLaMA
48.81
39.85
58.52
52.44
15.92
17.03
Ours-Qwen
48.70
39.56
55.78
55.19
17.03
19.25
Ours-DeepSeek
47.04
39.93
55.63
51.19
16.29
16.29
Table 5. Robustness of BadGraph under Different Attacker LLMs on the Cora Dataset. Attacker models: LLaMA-4-17B, Qwen-Plus, and DeepSeek-V3.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
#Nodes
#Edges
#Classes
Cora
2,708
5,429
7
Arxiv
169,343
1,166,243
40
Products (subset)
54,025
74,420
47
Appendix
Table 6. Overview of dataset statistics.
Clean
STACK
PGD
RND
FLIP
NETTACK
SGAttack
WTGIA
BadGraph
TF-IDF
86.81
79.56
82.00
80.89
78.00
86.07
87.56
87.26
62.44
SBERT
85.45
78.22
81.11
78.07
78.15
83.56
86.00
85.11
35.11
Appendix
Table 7. Attack Results Under RUNG Defense on the Cora Dataset.
Method
R-GCN
GCN
SGCN
TAGCN
Clean
86.30
85.19
87.78
87.04
BadGraph
72.59
75.19
75.19
75.56
Δ Acc
+1.70
+3.86
+3.93
+1.63
Appendix
Table 8. Effectiveness of BadGraph under adversarial training on the Cora. Δ Acc = Accuracyadv-trained−Accuracyvanilla .
Encoder
GIN
GraphSAGE
SGCN
TAGCN
DeepSeek
Clean
85.70
86.00
86.07
88.22
71.85
GCN
55.44
54.07
58.63
55.59
21.11
R-GCN
46.96
38.52
57.04
54.37
19.59
GAT
47.04
39.93
55.63
51.19
17.03
Appendix
Table 9. Attack performance with different encoders on the Cora dataset across various GNN encoder backbones.
Figure 4. Attack Success Rate on OGBN-Products for different target GNNs, evaluated on two settings: Medium (medium-degree nodes) and Hard (high-degree nodes).
Dataset
Emb.
Metrics
Clean
STACK
PGD
RND
FLIP
SGAttack
WTGIA
Our-text
Our-struct
BadGraph
Cora
TF-IDF
Average
86.19
73.14
78.51
74.07
74.19
82.38
84.95
82.60
78.90
67.52
3-MAX
86.91
73.93
79.28
74.91
75.01
85.46
86.49
84.79
80.47
72.17
Weighted
87.03
74.61
79.72
74.85
75.36
86.14
86.84
84.90
81.85
72.51
SBERT
Average
86.74
76.57
80.32
76.93
76.58
83.53
85.28
77.01
77.02
51.07
3-MAX
87.56
77.75
80.67
78.07
77.26
87.14
86.72
80.35
80.15
56.10
Weighted
87.79
77.71
80.70
78.49
77.32
87.55
87.17
80.06
81.42
55.68
Appendix
Table 10. GNN-as-Reasoner Scenarios. Comprehensive evaluation results (Average, 3-MAX, and Weighted) across all target backbones. Lower values indicate stronger attack effectiveness. "Clean" denotes unperturbed graphs, while Our-text and Our-struct represent text-only and structure-only variants, respectively. Best results are highlighted in bold.
Text-Attributed Graphs (TAGs), where each node is associated with text descriptions, are ubiquitous in real-world scenarios. They typically exhibit distinctive structure and domain-specific knowledge, motivating the development of a Graph Foundation Model (GFM) that generalizes across diverse graphs and tasks. Despite large efforts to integrate Large Language Models (LLMs) and Graph Neural Networks (GNNs) for TAGs, existing approaches suffer from decoupled architectures with two-stage alignment, limiting their synergistic potential. Even worse, existing methods assign out-of-vocabulary (OOV) tokens to graph nodes, leading to graph-specific semantics, token explosion, and incompatibility with task-oriented prompt templates, which hinders cross-graph and cross-task transferability. To address these challenges, we propose PromptGFM, a versatile GFM for TAGs grounded in graph vocabulary learning. PromptGFM comprises two key components: (1) Graph Understanding Module, which explicitly prompts LLMs to replicate the finest GNN workflow within the text space, facilitating seamless GNN-LLM integration and elegant graph-text alignment; (2) Graph Inference Module, which establishes a language-based graph vocabulary ensuring expressiveness, transferability, and scalability, enabling readable instructions for LLM fine-tuning. Extensive experiments demonstrate our superiority and transferability across diverse graphs and tasks. The code is available at this: https://github.com/agiresearch/PromptGFM.
Xi Zhu, Haochen Xue, Ziwei Zhao +7
1Rutgers University · 2Mohamed bin Zayed University of Artificial Intelligence (MBZUAI) · University of Science and Technology of China +2
Modern graph learning systems often combine links with text, as in citation networks with abstracts or social graphs with user posts. In such systems, text is usually easier to edit than graph structure, which creates a practical security risk: an attacker may hide a small malicious cue in training text and later use it to trigger incorrect predictions. This paper studies that risk in a realistic setting where the attacker edits only node text and leaves the graph unchanged. We propose TAGBD, a graph-aware backdoor attack that first selects training nodes that are easier to manipulate, then generates stealthy poison text with a shadow graph model, and finally injects the text by replacing the original content or appending a short phrase. Experiments on three benchmark datasets show that TAGBD achieves very high attack success rates, transfers across different graph models, and remains effective under common defenses. These results show that inconspicuous poison text alone can serve as a reliable attack channel in text-attributed graphs, highlighting the need for defenses that inspect both node content and graph structure.
Qi Luo, Minghui Xu, Dongxiao Yu +1
School of Computer Science and Technology, Shandong University, Qingdao, China
Graph Foundation Models (GFMs) on text-attributed graphs (TAGs) align graph representations with language semantics to support transferable graph learning. Despite these advantages, the backdoor vulnerability of GFMs on TAGs remains insufficiently understood, especially under graph-language alignment, where graph and text representations are trained to constrain each other in a shared semantic space. Existing backdoor attacks mainly target either the graph side or the text side, treating the two modalities independently. This makes direct adaptation ineffective: graph-only triggers can be constrained by clean text semantics, while text-only triggers alter the language view but do not directly shift the graph representation being aligned and scored. TAGs also impose a stealth challenge because triggers are exposed as both node text and local graph structure, making incoherent trigger attributes or anomalous subgraphs easy to inspect or filter. In this paper, we propose STAG, a stealthy trojan attack framework designed for the graph-language alignment interface of GFMs on TAGs. STAG coordinates a graph-trigger generator with a text-side soft prompt so that trigger-attached graph representations and triggered text representations move toward the same target-class text region. To address TAG-specific stealthiness, STAG realizes trigger nodes as readable text through candidate retrieval and regularizes the trigger-attached subgraph so that its local structure remains close to the original subgraph. Extensive experiments on multiple TAG datasets and representative GFMs demonstrate the effectiveness and stealthiness of STAG. Our code is available at https://github.com/ventr1c/STAG.
Minhua Lin, Zhicheng Gao, Yilong Wang +3
The Pennsylvania State University, University Park, PA, USA · Amazon, Palo Alto, CA, USA