Abstract
Graph Contrastive Learning (GCL) has emerged as a powerful self-supervised paradigm for training Graph Neural Networks (GNNs). However, traditional GCL methods often rely on semantically "blind" random augmentations, such as edge dropping or feature masking, which can disrupt the underlying meaning of Text-Attributed Graphs (TAGs). We present GAugLLM, a framework that leverages Large Language Models (LLMs) to perform semantically aware augmentations. By introducing a Mixture-of-Prompt-Experts (MoPE) for feature augmentation and a Collaborative Edge Modifier for structural refinement, GAugLLM significantly enhances the performance of various GCL baselines across multiple benchmarks.
Introduction
Real-world graphs, such as citation networks and e-commerce platforms, are typically Text-Attributed Graphs (TAGs), where nodes are associated with rich textual information. To learn representations without manual labels, Graph Contrastive Learning (GCL) creates multiple "views" of a graph and trains models to maximize agreement between them.
Standard GCL techniques typically employ random perturbations. However, this approach is often semantically blind; for instance, randomly deleting a keyword in a paper abstract or a critical link in a citation network can destroy essential semantic relationships. GAugLLM addresses this by using LLMs to generate "smart" augmentations that respect the textual semantics and align them with the graph structure.
Methodology
GAugLLM introduces two core components designed to improve feature and structural views:
Mixture-of-Prompt-Experts (MoPE)
Instead of adding stochastic noise to node features, GAugLLM utilizes LLMs to rewrite node text through three specialized "experts":
- Structure-Aware Summarization (SAS): Generates a summary considering both the node's text and its local neighborhood.
- Independent Reasoning (IDR): Prompts the LLM to categorize the node and provide a justification based solely on its attributes.
- Structure-Aware Reasoning (SAR): Extends IDR by incorporating neighbor information into the reasoning process.
A Context-Aware Selector then dynamically weights these expert views using an attention mechanism, allowing the model to adapt to different node characteristics, such as degree or local density.
Collaborative Edge Modifier
Modifying graph structure is computationally intensive. GAugLLM employs a two-stage strategy to refine edges:
- Structural Filtering: Uses fast topological algorithms (e.g., DeepWalk) to identify candidate edges for addition or deletion.
- Semantic Validation: An LLM evaluates these candidates, deciding whether to modify a link based on the semantic similarity of the connected nodes' text.
Experimental Results
The framework was evaluated on five TAG benchmarks, including citation networks (PubMed, Ogbn-Arxiv) and Amazon e-commerce datasets. GAugLLM was integrated into leading GCL methods such as BGRL, GraphCL, and GBT.
- Performance Gains: GAugLLM consistently outperformed traditional baselines, achieving improvements of up to 12.3% in node classification tasks compared to standard feature extraction.
- Ablation Insights: Studies confirmed that different nodes benefit from different experts; for example, high-degree "hub" nodes often favor SAS, while isolated nodes benefit more from IDR.
- Model Agnostic: The framework showed robust performance across different LLMs, including Mistral-7B and GPT-3.5.
Conclusion
GAugLLM demonstrates that replacing random noise with LLM-driven semantic perturbations significantly improves self-supervised graph learning. By bridging the gap between textual content and graph topology, GAugLLM provides a more principled approach to augmenting Text-Attributed Graphs. Future work will focus on reducing the computational overhead of LLM queries and exploring end-to-end real-time integration.
Summary updated