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. Most graph neural network (GNN) pipelines handle 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. With the advent of powerful large language models (LLMs) such as GPT, 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 and to provide textual explanations for its decisions, and find that the resulting explanations can be transformed into useful and informative features to augment downstream GNNs. Through experiments we show that our enriched features improve the performance of a variety of GNN models across different datasets. Notably, we achieve top-1 performance on ogbn-arxiv by a significant margin over the closest baseline even with $2.88\times$ lower computation time, as well as top-1 performance on TAG versions of the widely used PubMed and Cora benchmarks.
Introduction
Many real-world datasets are structured as Text-Attributed Graphs (TAGs), where nodes represent entities with associated text (e.g., research papers in a citation network) and edges represent relationships (e.g., citations). Traditional approaches for node classification on TAGs often rely on shallow features like Bag-of-Words or skip-gram embeddings, which fail to capture deep semantic nuances. While integrating Graph Neural Networks (GNNs) with smaller Language Models (LMs) like BERT has shown promise, these models often lack the extensive world knowledge and reasoning capabilities of modern Large Language Models (LLMs).
However, utilizing LLMs in graph pipelines presents two major challenges: the "Reasoning Gap," where smaller LMs cannot match LLM reasoning, and the "Efficiency Wall," where iterative co-training of GNNs and LMs is computationally prohibitive. This paper introduces the TAPE (Title, Abstract, Prediction & Explanation) framework to bridge these gaps by using LLMs as high-quality feature generators.
The TAPE Framework
The TAPE framework decouples the reasoning power of LLMs from the structural learning of GNNs through a three-stage pipeline:
- LLM Prompting (Reasoning Phase): A "black-box" LLM (e.g., GPT-3.5) is prompted to perform zero-shot classification on a node based on its text (Title and Abstract). Crucially, the LLM is asked to provide a textual explanation for its prediction.
- LM Interpreter (Translation Phase): Since LLM outputs are unstructured text, a smaller, trainable LM (e.g., DeBERTa) is fine-tuned to act as an interpreter. This model encodes the original text, the LLM's prediction, and the generated explanation into dense vector features ($h_{orig}$, $h_{pred}$, and $h_{expl}$).
- GNN Training (Structural Phase): These enriched features are fed into a GNN (e.g., RevGAT), which learns to combine this distilled reasoning with the graph's topology to make final predictions.
This approach is "Language Model as a Service" (LMaaS) compatible, requiring only API access to the LLM, making it highly practical for proprietary models.
Key Insights: Explanations as Features
The core innovation of TAPE is treating LLM-generated explanations as features. These explanations often contain "distilled knowledge"—implicit information made explicit. For instance, an LLM might explain that a paper mentioning specific biological markers is related to a particular disease, even if the abstract is technical and lacks direct keywords. By fine-tuning a smaller LM to interpret these explanations, TAPE effectively transfers the LLM's reasoning capabilities into the graph learning process.
Experimental Results
The authors evaluated TAPE on standard benchmarks including Cora, PubMed, ogbn-arxiv, and ogbn-products. To ensure results weren't skewed by LLM data leakage, they also introduced tape-arxiv23, a dataset of papers published after the LLM's training cutoff.
TAPE achieved state-of-the-art results across the board. On the ogbn-arxiv leaderboard, it reached 77.50% accuracy, outperforming previous methods. Beyond accuracy, TAPE offers a significant efficiency advantage. By avoiding the expensive iterative loops required by hybrid models like GLEM, TAPE achieved its results 2.88x faster.
Conclusion
TAPE demonstrates a powerful and efficient way to integrate LLM reasoning into graph representation learning. By using explanations as features and a decoupled training pipeline, it achieves state-of-the-art performance on TAG benchmarks while overcoming the computational hurdles of previous hybrid LM-GNN approaches. Future work includes automating prompt engineering and extending the framework to dynamic graphs.
Summary updated