Introduction
Text-Attributed Graphs (TAGs) are prevalent in various domains, from citation networks to social media platforms. Traditionally, node classification in TAGs has relied on Graph Neural Networks (GNNs) combined with shallow text features like TF-IDF or simple word embeddings. However, these shallow methods are context-blind and fail to capture the deep semantic nuances inherent in natural language. This paper proposes a framework that utilizes Large Language Models (LLMs) as feature enhancers, providing GNNs with high-quality semantic representations to bridge the "semantic gap" in graph learning.
Methodology
The authors introduce a two-stage framework for feature-level enhancement:
- Node Enhancement via LLMs: Instead of raw text or basic vectors, various LLMs are employed to generate high-dimensional semantic embeddings for each node. The study evaluates a range of models, including open-source options like DeBERTa, LLaMA, and Sentence-BERT (SBERT), as well as proprietary services such as OpenAI’s
text-ada-embedding-002and Google’sPaLM-Cortex-001. - Graph Processing: These rich embeddings are integrated into different graph architectures. The primary focus is the Graph Transformer, which employs a multi-head self-attention mechanism to dynamically aggregate neighborhood information. This is compared against standard Graph Convolutional Networks (GCNs) and Multi-Layer Perceptrons (MLPs).
The framework was tested on the Cora and PubMed citation networks under two conditions: a low-label ratio (20 nodes per class for training) and a high-label ratio (60-20-20 split).
Results and Discussion
The experimental results highlight several key findings regarding the synergy between LLM features and graph architectures.
The Impact of Semantic Enhancement
LLM-enhanced features consistently outperformed traditional word embeddings across all tested scenarios. On the PubMed dataset, the use of Google’s PaLM embeddings instead of traditional word embeddings resulted in a performance boost of over 12 percentage points.
Model Complexity vs. Data Availability
A significant observation is the interaction between model architecture and training data volume. In high-label scenarios, the Graph Transformer emerged as the superior architecture, effectively leveraging the rich semantic features. However, in low-label scenarios, the simpler GCN often proved more robust. For example, in the low-label PubMed setting, SBERT paired with a GCN achieved 65.90% accuracy, slightly outperforming the Graph Transformer's 64.32%.
Practical Considerations
- SBERT as a Robust Baseline: Sentence-BERT (SBERT) demonstrated remarkably consistent and competitive performance, making it a practical, cost-effective choice for researchers.
- Structural Importance: The fact that GNN-based models (GCN, Graph Transformer) consistently outperformed MLPs underscores that while LLM features are powerful, the structural context of the graph remains essential for accurate node classification.
Conclusion
This study demonstrates that replacing shallow text features with deep semantic embeddings from LLMs significantly enhances the performance of graph learning models on TAGs. While Graph Transformers offer the highest potential in data-rich environments, GCNs remain a strong choice for low-label settings. Future research will focus on reducing the computational overhead of embedding generation and exploring end-to-end training paradigms.
Summary updated