Abstract
Graph Neural Networks (GNNs) have traditionally operated as purely discriminative models, often leading to issues with overconfidence and sensitivity to noise. This paper introduces a novel framework that bridges GNNs and Energy-Based Models (EBMs) by treating a GNN classifier as a joint energy-based model (JEM). This approach allows for simultaneous node classification, feature generation, and graph structure refinement. By incorporating a generative adjacency matrix and orthogonality constraints, the resulting models demonstrate improved calibration and robustness compared to standard Graph Convolutional Networks (GCNs).
Introduction
While GNNs are the state-of-the-art for graph-structured data, their discriminative nature limits their understanding of the underlying data distribution. This typically manifests as overconfidence—where models are "too sure" of incorrect predictions—and brittleness toward noise in node features or edges. To address these limitations, we adapt the Joint Energy-based Model (JEM) framework to graphs, creating a model that understands the "energy" of a graph configuration to perform classification while modeling the data distribution.
Methodology
The proposed framework builds upon the standard Graph Convolutional Network (GCN) architecture with several key technical innovations:
- Energy Function Definition: The energy of a node feature $x$ is defined as the negative log-sum-exp of the GCN's output logits. In this paradigm, low energy states correspond to high-probability configurations under the learned data distribution.
- Stochastic Langevin Gradient Descent (SLGD): Data generation is achieved via an inner loop of SLGD, which iteratively adjusts initial random noise toward lower energy states to produce synthetic node features.
- Generative Adjacency Matrix: A significant novelty is the model's ability to generate new links. Edges are proposed between nodes with similar energy levels (within a threshold $\tau$), inspired by the Fermi-Dirac distribution. This process effectively denoises or augments the graph structure during training.
- Orthogonality Constraints (GCN-JEMO): Forcing the GCN weight matrices to be approximately orthogonal ($W^T W \approx I$) was found to significantly enhance training stability and overall performance.
Structural Changes and Graph Topology
A key insight of this energy-based approach is its impact on graph structure. By analyzing the eigenvalues of the generated adjacency matrix, we observe how the model modifies the topology to match its learned energy landscape.
The generative process specifically increases the number of short cycles (triangles) in the graph. For instance, on the Cora dataset, the model generated 10,674 cycles of length 3 compared to 9,780 in the original graph, suggesting that the model learns to strengthen local community structures.
Model Calibration and Performance
The researchers evaluated the framework on three citation network benchmarks: Cora, Pubmed, and Citeseer. While raw accuracy gains were inconsistent across datasets (e.g., 83.66% vs 81.5% on Cora), the generative models showed a marked improvement in calibration.
The Expected Calibration Error (ECE) on Cora dropped from 0.67 for the discriminative baseline to 0.52 for the generative model. As shown in the confidence histograms, the generative model exhibits a more balanced distribution of prediction confidences, reducing the "overconfidence" peak at 1.0 seen in standard GCNs. Furthermore, generated features exhibit higher covariance eigenvalues, potentially increasing robustness by preventing the model from over-tuning to narrow patterns.
Conclusion and Future Work
This work demonstrates that an energy-based view of GNNs provides a powerful mechanism for creating more robust and better-calibrated models. While the trade-off between classification and generation is delicate, the ability to refine graph structures opens new avenues for research. Future work may explore perturbing the adjacency matrix at every layer to combat oversmoothing or applying this framework to inverse problems in computational chemistry, such as property-driven molecular graph generation.
Summary updated