Semi-Supervised Node Classification on Graphs: Markov Random Fields vs. Graph Neural Networks

Binghui Wang, Jinyuan Jia, Neil Zhenqiang Gong

Abstract

Semi-supervised node classification (SSNC) is a foundational task in graph data analysis, currently dominated by Graph Neural Networks (GNNs). However, GNNs often face scalability challenges and high computational costs. This paper revisits Pairwise Markov Random Fields (pMRFs) and introduces Learning the Coupling Matrix (LCM), a framework that enables pMRFs to learn edge relationships from data rather than relying on fixed heuristics. Experimental results across six diverse datasets demonstrate that LCM not only outperforms state-of-the-art GNNs in accuracy but also offers significant improvements in speed and memory efficiency, particularly in low-data scenarios.

Introduction

Semi-supervised node classification (SSNC) involves predicting labels for all nodes in a graph based on a limited set of labeled examples. While Graph Neural Networks (GNNs) like GCN and GAT have become the standard approach, they are often computationally intensive and difficult to scale to massive graphs.

Historically, Pairwise Markov Random Fields (pMRFs) provided a faster alternative using algorithms like Linearized Belief Propagation (LinBP). However, their accuracy lagged behind GNNs because they typically employed fixed, heuristic-based edge potentials (e.g., assuming neighbors always share the same label). This work introduces the Learning the Coupling Matrix (LCM) framework to bridge this accuracy gap by making edge relationships learnable.

The LCM Framework

The core innovation of LCM is the parameterization of edge potentials within the pMRF. Instead of a static coupling matrix, LCM models the potential of an edge $(u, v)$ using a shared coupling matrix $H$ and a learnable weight $W_{uv}$ specific to that edge.

Optimization and Inference

The model is trained using a loss function that combines standard cross-entropy for labeled nodes with a novel consistency regularization term. This term ensures that the predicted labels of neighboring nodes align with the learned coupling matrix. To handle the computational complexity of updating weights across large graphs, the authors developed an iterative solver that alternates between label prediction via LinBP and parameter updates via gradient descent.

Experimental Evaluation

The researchers evaluated LCM on six datasets, including citation networks (Cora, Citeseer, Pubmed), a knowledge graph (NELL), and large-scale social networks (Google+, Twitter).

Classification Accuracy

LCM consistently outperformed established GNN models such as GCN, GAT, and GraphSAGE across all benchmarks. For instance, on the NELL dataset, LCM achieved an accuracy of 0.647, notably higher than GCN's 0.596. On larger social network datasets like Google+ and Twitter, many GNN baselines failed to run due to memory limitations, while LCM scaled effectively.

Comparison of classification accuracy across different methods and datasets.

Performance in Low-Data Scenarios

A significant advantage of the LCM approach is its robustness when training labels are extremely scarce. In "cold-start" scenarios with as few as one label per class, LCM maintains a substantial performance lead over GNNs, which often struggle to generalize from such limited supervision.

Accuracy vs. the number of training nodes per class, demonstrating LCM's superior performance in low-data regimes.

Efficiency and Scalability

LCM demonstrates massive efficiency gains over GNNs. On the NELL dataset, LCM completed execution in 50 seconds, a 42x speedup compared to GAT's 2,115 seconds. This efficiency stems from LCM's reliance on linear system solvers rather than deep backpropagation through multiple non-linear layers.

Discussion

Analysis of the learned coupling matrices ($H$) revealed they are "diagonal dominant," confirming that while homophily (neighbors sharing labels) is a strong signal, learning the specific off-diagonal probabilities for inter-class connections is key to superior performance.

One current limitation is that LCM handles node features through a separate pre-trained classifier, whereas GNNs learn features and structure jointly. Future work aims to integrate deep feature learning directly into the LCM framework.

Conclusion

By making the parameters of classical Markov Random Fields learnable, the LCM framework provides a highly efficient and accurate alternative to Graph Neural Networks for semi-supervised node classification. Its scalability and performance in low-data settings make it particularly suitable for real-world, large-scale graph applications.

Summary updated

BibTeX
@inproceedings{wang2021semi,
  author = {Binghui Wang and Jinyuan Jia and Neil Zhenqiang Gong},
  title = {{Semi-Supervised Node Classification on Graphs: Markov Random Fields vs. Graph Neural Networks}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i11.17211},
}
Figure