Abstract
Representation learning on text-attributed graphs (TAGs) has become a critical research problem in recent years. A typical example of a TAG is a paper citation graph, where the text of each paper serves as node attributes. Initial graph neural network (GNN) pipelines handled these text attributes by transforming them into shallow or hand-crafted features, such as skip-gram or bag-of-words features. Recent efforts have focused on enhancing these pipelines with language models (LMs), which typically demand intricate designs and substantial computational resources. With the advent of powerful large language models (LLMs) such as GPT or Llama2, which demonstrate an ability to reason and to utilize general knowledge, there is a growing need for techniques which combine the textual modelling abilities of LLMs with the structural learning capabilities of GNNs. Hence, in this work, we focus on leveraging LLMs to capture textual information as features, which can be used to boost GNN performance on downstream tasks. A key innovation is our use of explanations as features: we prompt an LLM to perform zero-shot classification, request textual explanations for its decision-making process, and design an LLM-to-LM interpreter to translate these explanations into informative features for downstream GNNs. Our experiments demonstrate that our method achieves state-of-the-art results on well-established TAG datasets, including Cora, PubMed, ogbn-arxiv, as well as our newly introduced dataset, tape-arxiv23. Furthermore, our method significantly speeds up training, achieving a 2.88 times improvement over the closest baseline on ogbn-arxiv.
Introduction
Text-Attributed Graphs (TAGs) are ubiquitous in real-world applications, ranging from citation networks to social media platforms. Effectively classifying nodes in these graphs requires a dual understanding of local textual semantics and global graph structure. Traditional approaches often relied on shallow embeddings like Bag-of-Words, which fail to capture deep semantic nuances. While modern pipelines integrate smaller Language Models (LMs) with Graph Neural Networks (GNNs), they are often computationally prohibitive and lack the broad "common sense" reasoning capabilities of Large Language Models (LLMs).
The central challenge lies in bridging the gap between the reasoning power of giant LLMs and the structural learning of GNNs without the unsustainable cost of fine-tuning massive models on graph data.
The TAPE Framework
To address this, we propose TAPE (Title, Abstract, Prediction, Explanation), a three-stage framework designed to harness LLM reasoning for graph tasks.
The pipeline consists of three distinct phases:
- LLM Reasoning (The Teacher): An LLM (e.g., GPT-3.5) is prompted to perform zero-shot classification on node text. Crucially, it is also asked to provide a detailed textual explanation for its reasoning. This step extracts latent knowledge and context that may not be explicitly present in the raw text.
- LM Interpreter (The Translator): Since GNNs require numerical input, a smaller, fine-tunable LM (e.g., DeBERTa) acts as an interpreter. It encodes the long-form textual explanations into compact vector embeddings ($h_{expl}$).
- GNN Training (The Student): A standard GNN (such as RevGAT) is then trained using a concatenated feature set comprising the original text embeddings, the LLM’s ranked predictions, and the newly generated explanation-based embeddings.
This decoupled approach is LMaaS-compatible (Language Model as a Service), requiring only text outputs from LLM APIs, thus democratizing access to high-performance graph learning.
Experimental Evaluation
We evaluated TAPE across several benchmarks, including classic citation networks (Cora, PubMed) and large-scale datasets (ogbn-arxiv, ogbn-products). To ensure robustness against potential data leakage in LLM training sets, we introduced tape-arxiv23, a dataset of papers published in 2023. This ensures the model generalizes to information it has not previously encountered.
Our results indicate that TAPE sets a new standard for performance and efficiency. On the ogbn-arxiv leaderboard, TAPE achieved a state-of-the-art accuracy of 77.50%. Beyond raw performance, TAPE demonstrated a 2.88x speedup in training time compared to GLEM, the previous leading baseline, while maintaining a significantly lower memory footprint.
Key Insights: Explanations as Features
The core innovation of TAPE is the realization that textual explanations are superior features compared to raw text. Explanations are focused, bring in external context, and resolve ambiguities. For instance, an LLM might identify a specific methodology in an abstract as belonging to a particular sub-field of AI, even if the sub-field isn't explicitly named. We provide theoretical grounding for this, showing that LLM explanations are valuable as long as they provide "fidelity" to the model's logic and "non-redundancy" relative to the smaller LM's existing knowledge.
Conclusion
TAPE demonstrates that treating LLMs as "reasoning engines" rather than simple labelers provides a scalable and efficient path forward for graph machine learning. By distilling complex reasoning into interpretable features, TAPE achieves SOTA results while remaining computationally accessible. Future work will explore the application of this framework to dynamic graphs and the optimization of prompt engineering for diverse datasets.
Summary updated