Graph Structure Refinement with Energy-based Contrastive Learning

Xianlin Zeng, Yufeng Wang, Yuqi Sun, Guodong Guo, Wenrui Ding, Baochang Zhang

Introduction

Graph Neural Networks (GNNs) have become the standard for modeling relational data, yet they remain highly sensitive to the quality of the input graph structure. Real-world graphs are frequently noisy, containing missing links or spurious connections that can lead to suboptimal node representations. Traditional Graph Structure Refinement (GSR) methods typically fall into two categories: generative models, which are robust but often lack task-specific precision, and discriminative models, which excel at downstream tasks but are prone to overfitting on noisy data.

Presented at AAAI-2025, ECL-GSR (Energy-based Contrastive Learning for Graph Structure Refinement) bridges this gap. It introduces a unified framework that combines the strengths of generative energy-based models (EBMs) with discriminative contrastive learning (CL) to effectively "clean" noisy graph structures while maintaining high performance on downstream tasks.

Methodology

The core innovation of ECL-GSR lies in its joint training objective, which treats the similarity between node pairs as an energy function. The framework operates through a multi-stage pipeline designed for both structural and feature-based refinement.

Overview of the ECL-GSR framework, showing the dual-attribute preprocessing, the energy-based contrastive learning objective, and the final structure refinement for node classification.

1. Dual-Attribute Preprocessing

To capture both local context and global topology, the model constructs a dual-attribute graph. It concatenates raw node features with structural embeddings generated via DeepWalk, ensuring the encoder understands both the node's properties and its position within the network.

2. The ECL Objective

Using Bayes' rule, the authors decompose the joint distribution of augmented graph views into two complementary terms:

  • Discriminative Term: A contrastive loss (similar to SimCLR) that pulls similar node pairs together and pushes dissimilar pairs apart in the embedding space.
  • Generative Term: An Energy-Based Model (EBM) that models the marginal distribution of the data. This term acts as a regularizer, preventing the model from simply memorizing noisy edges and ensuring the learned representations remain grounded in the true data distribution.

3. Optimization and Refinement

To handle the intractable partition function inherent in EBMs, the framework employs Stochastic Gradient Langevin Dynamics (SGLD). This allows for iterative refinement of node representations. Once refined, a new, "clean" adjacency matrix is predicted based on the cosine similarity of these embeddings, which is then used for the final node classification task.

Experimental Results

ECL-GSR was evaluated against 13 leading baselines across eight benchmark datasets, including citation networks (Cora, Citeseer, Pubmed), webpage graphs (Cornell, Texas), and co-occurrence networks (Actor).

Performance comparison of ECL-GSR against baselines in terms of accuracy, training time, and memory usage across four major datasets.

Performance and Efficiency

As shown in the comparative analysis, ECL-GSR consistently achieves state-of-the-art (SOTA) accuracy while maintaining superior efficiency. Notably:

  • Scalability: Unlike many existing GSR methods (such as LDS and IDGL) that suffer from $O(V^2)$ complexity and fail on large datasets like Pubmed or OGB-Arxiv due to memory constraints, ECL-GSR utilizes edge sampling and mini-batch training to remain scalable.
  • Speed: The model achieves faster convergence, often requiring only a few SGLD iterations to reach peak performance.
  • Robustness: In noise-injection experiments, ECL-GSR demonstrated significantly higher stability than standard GCNs, even when up to 80% of the graph's edges were perturbed.
  • Label Efficiency: The model is particularly effective in low-label regimes, outperforming standard GCNs by over 10% in accuracy on the Cora dataset when only 1% of labels are available.

Conclusion

ECL-GSR represents a significant step forward in graph structure learning by unifying generative and discriminative paradigms through energy-based contrastive learning. By treating graph refinement as a joint distribution problem, it provides a robust, efficient, and scalable solution for cleaning noisy real-world data. Future work may explore extending this energy-based approach to dynamic graphs and incorporating more sophisticated discrete optimization techniques for adjacency matrix binarization.

Summary updated

BibTeX
@inproceedings{zeng2025graph,
  author = {Xianlin Zeng and Yufeng Wang and Yuqi Sun and Guodong Guo and Wenrui Ding and Baochang Zhang},
  title = {{Graph Structure Refinement with Energy-based Contrastive Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i21.34388},
}
Figure