TL;DR
GuARD (Text-Rich and Graph-Informed Language Model) is a novel framework that bridges the gap between Large Language Models (LLMs) and Graph Neural Networks (GNNs) for anomaly detection. By integrating structural topology and rich semantic attributes through a progressive multi-modal instruction tuning approach, it achieves state-of-the-art accuracy while being up to 10x faster during inference than vanilla LLM baselines.
What Problem Does This Paper Address?
Real-world data often exists as "text-rich graphs"—networks where nodes are associated with significant amounts of text. Examples include academic citation networks (where nodes are papers with titles, abstracts, and author lists) and social media (where nodes are users with profiles and tweets). Detecting anomalies in these graphs—such as a paper incorrectly assigned to an author or a social bot spreading misinformation—is a complex challenge.
Traditional Graph Neural Networks (GNNs) excel at capturing structural patterns but often fail to grasp deep, fine-grained semantics. Conversely, Large Language Models (LLMs) are semantic powerhouses but face three major hurdles:
- High Cost: Processing massive amounts of text for every node in a graph is computationally expensive.
- "Lost in the Middle": LLMs often struggle to identify critical signals when buried in long-context inputs.
- Structural Blindness: LLMs do not inherently understand the topological biases (like co-author links) that are vital for distinguishing normal patterns from abnormal ones.
Methods
The authors propose a three-pronged architecture designed to make LLMs "graph-aware" and "text-efficient":
- Task-Guided Multi-Turn Instruction Tuning: Instead of predicting one node at a time, GuARD stacks multiple node queries into a single multi-turn prompt. This allows the model to reuse global context across turns, significantly boosting speed. Furthermore, earlier queries act as "soft" few-shot examples that help the model decode subsequent labels more accurately.
- Semantic Embedding Module: To handle long textual attributes without blowing up the context window, GuARD uses a Small Language Model (SLM) like RoBERTa to summarize rich text into a single "semantic token." This token is then projected into the LLM's embedding space.
- Structural Embedding Module: GuARD leverages state-of-the-art GNNs (like GCCAD) to encode the graph's topology. These structural features are similarly projected into "graph tokens" that the LLM can ingest alongside text.
Progressive Training: To ensure these diverse inputs don't clash, the authors use a three-phase training recipe: first tuning the base LLM on key text, then freezing it to train the semantic projector, and finally training the graph projector.
Datasets
The framework was evaluated across four diverse domains:
- WhoIsWho & MAG: Academic networks focused on author name disambiguation (detecting incorrectly assigned papers).
- TwiBot-20: A large-scale social graph for Twitter bot detection.
- SemEval-23F: A dataset for identifying propaganda tactics in news comment networks.
Key Insights and Ideas
- Efficiency through Multi-turn: Stacking queries isn't just a performance hack; it actually improves detection accuracy. The causal masking in LLMs allows later queries to benefit from the context of earlier ones, effectively creating an automated few-shot learning environment.
- Summarization vs. Raw Text: By using SLMs to "compress" long attributes into tokens, GuARD avoids the "lost in the middle" problem where LLMs ignore the center of a long text block.
- Synergy of Modalities: The experiments show that graph features are most helpful when text is ambiguous (e.g., authors with similar names), while semantic features shine when the graph structure is sparse.
- Training Order Matters: The authors found that training the modalities progressively is superior to joint training from scratch, which often causes the model to over-rely on a single feature source (usually the graph).
Key Results
GuARD consistently outperformed both pure GNN-based and fine-tuned LLM-based methods across all datasets.
- Accuracy: On the WhoIsWho dataset, GuARD achieved an AUC of 0.789, significantly higher than the fine-tuned Llama3-8B baseline (0.741) and SOTA GNNs (0.741).
- Efficiency: Compared to vanilla long-context LLMs, GuARD offered a 5x speedup in training and a 10x speedup in inference on the large-scale WhoIsWho dataset.
- Leaderboard Performance: GuARD surpassed the top-3 winning solutions from the KDD Cup 2024 leaderboard, demonstrating its real-world competitiveness.
Limitations and Future Work
While GuARD is highly efficient, it still requires pre-trained GNNs and SLMs to act as encoders, which introduces a dependency on external models and some initial feature engineering. The authors suggest that future research could explore more seamless, end-to-end integration of these modalities or apply the "graph-informed LLM" concept to other downstream tasks like node classification or link prediction in text-rich environments.
Summary updated