TL;DR
GraphReAct bridges the gap between Large Language Models (LLMs) and graph learning by introducing a structured "reasoning-acting" framework tailored specifically for graph data. By interleaving graph-aware retrieval (capturing both local topology and global semantics) with iterative context refinement, it allows LLMs to perform step-by-step inference on graphs, significantly boosting zero-shot node classification performance.
What Problem Does This Paper Address?
Large Language Models excel at text-based reasoning, especially when paired with "Reasoning-Acting" (ReAct) frameworks that allow them to dynamically query external tools or text databases (like Wikipedia). However, extending this paradigm to graph-structured data remains a major challenge.
Graphs encode information in a highly structured way: meaningful signals are distributed across nodes and edges, hidden within both local topology and latent representations. Existing Graph-LLM methods typically rely on static interfaces and single-pass inference over a fixed receptive field, which limits their ability to handle sparse or incomplete information. Simply porting text-based search actions to graphs doesn't work well because it introduces noise and fails to exploit the graph's inherent structural biases. GraphReAct addresses this by designing a graph-specific action space that balances context expansion (retrieval) with context compression (refinement) for multi-step graph inference.
Methods
GraphReAct introduces a two-phase framework: a pre-training alignment phase followed by a graph-aware reasoning and acting phase.
The core innovation lies in its specialized Graph-Based Action Space, which consists of two main types of actions:
- Graph-Aware Retrieval: Instead of unstructured web searches, the model uses two complementary retrieval primitives to expand its context:
- Topological Retrieval: Uses a breadth-first search (BFS) traversal to gather textual information from immediate structural neighbors, capturing local dependencies.
- Semantic Retrieval: Identifies non-local but semantically similar nodes based on cosine similarity in the latent embedding space, capturing global context.
- Context Refinement: To prevent the LLM's context window from exploding with redundant or noisy graph data during multi-step reasoning, GraphReAct introduces a refinement action. The LLM distills, summarizes, and reorganizes the accumulated information into a compact, high-quality representation before making a final prediction.
Unlike fully autonomous agents that select actions arbitrarily, GraphReAct executes these actions in a structured, predefined sequence (Retrieval $\rightarrow$ Refinement $\rightarrow$ Prediction) to ensure stable and efficient reasoning.
Datasets
The authors evaluated GraphReAct on eight text-attributed graph datasets across two distinct domains:
- Citation Networks: Arxiv (used as the source dataset for pre-training), PubMed, and Cora (target datasets).
- E-commerce Networks: Ele-Computer (source dataset), Ele-Photo, Book-Children, Book-History, and Sports-Fitness (target datasets).
The framework was tested using a strict cross-dataset zero-shot evaluation protocol. The model was trained exclusively on the source datasets (Arxiv or Computer) and evaluated on entirely unseen target graphs without any further task-specific fine-tuning.
Key Insights and Ideas
- The Expansion-Compression Tension: Multi-step graph reasoning requires a careful transition from context expansion to context compression. While early stages benefit from gathering neighboring evidence, later stages require distillation to filter out noise and avoid overwhelming the LLM.
- Locality vs. Globality: Combining topological (local) and semantic (global) retrieval provides a much stronger inductive bias than relying on either alone. This is particularly useful for heterophilic graphs, where connected nodes might belong to different classes but share latent semantic similarities.
- Graph Evidence Trumps External Search: The authors experimented with augmenting the model with standard Wikipedia text searches (similar to standard NLP ReAct). Surprisingly, adding external text search actually degraded performance, proving that the most relevant evidence for graph tasks is already natively encoded within the graph's structure and latent space.
Key Results
GraphReAct consistently outperformed state-of-the-art Graph-LLM baselines (such as TEA-GLM and LLAGA) across 5 out of 6 target datasets in zero-shot node classification.
- On the History dataset, GraphReAct achieved a classification accuracy of 0.645, a substantial improvement over the runner-up baseline, TEA-GLM, which scored 0.528.
- On the Sports dataset, it improved accuracy to 0.483 compared to TEA-GLM's 0.404.
- Extensive ablation studies confirmed that the combination of both retrieval types (topological and semantic) alongside the context refinement step was critical to achieving peak performance across all benchmarks.
Limitations and Future Work
The authors acknowledge a few key limitations:
- Computational Overhead: Multi-step LLM inference inherently introduces higher latency and computational costs compared to single-pass graph encoders.
- Text Dependency: The framework's performance is tightly coupled with the availability and quality of node-associated textual descriptions.
- Context Window Constraints: The number of reasoning steps and the volume of retrieved evidence are strictly bounded by the LLM's maximum input length.
Future work will focus on optimizing the efficiency and scalability of the framework to handle larger graphs and longer reasoning chains.
Summary updated