Classifying Nodes in Graphs without GNNs

Daniel Winter, Niv Cohen, Yedid HoshenarXiv 2024 · DOI

Introduction

Graph Neural Networks (GNNs) have become the standard for node classification tasks, such as predicting the category of a paper in a citation network. However, their reliance on recursive "message passing" architectures makes them computationally expensive during both training and inference. While distillation methods have attempted to transfer GNN knowledge into simpler Multi-Layer Perceptrons (MLPs), they still require training a heavy GNN "teacher" model first.

This paper introduces CoHOp (Consistency and Histogram Optimization), a framework that achieves state-of-the-art performance without ever training or running a GNN. The authors argue that the perceived advantage of GNNs often stems from their inductive bias and sample efficiency rather than the necessity of complex feature aggregation.

The CoHOp Framework

CoHOp is a fully GNN-free framework that utilizes simple linear models or shallow MLPs as a backbone. It simulates the benefits of graph-based learning through three primary components:

  1. Neighborhood-Label Histograms: Instead of passing hidden features, CoHOp pre-calculates weighted histograms of known labels in a node's local neighborhood. This incorporates graph context directly into the input features at a low computational cost.
  2. Consistency Loss: The model is trained to ensure that neighboring nodes have similar predicted label distributions, enforcing a "homophily prior"—the assumption that connected nodes likely share the same class.
  3. Iterative Pseudo-Labeling: To address small training sets, the model iteratively adds confident predictions for unlabeled nodes back into the training set. These labels are "smoothed" by averaging them with neighbor predictions to further embed the graph structure.
The CoHOp framework: (1) Preprocessing with histograms, (2) Training with consistency loss, and (3) Iterative pseudo-labeling.

Key Insights: Inductive Bias and Efficiency

A central finding of this research is that the performance gap between GNNs and simple MLPs diminishes as the training set size increases. This suggests that GNNs are not inherently more capable of processing graph data but are simply better at learning from very few examples due to their built-in biases.

Furthermore, CoHOp demonstrates that counting neighbor labels (histograms) is often as effective as the complex message passing of hidden features used in GNNs. For massive graphs, the authors employ graph convolutions to approximate these histograms in $O(|E|)$ time, maintaining high accuracy with significantly reduced latency.

Experimental Results

CoHOp was evaluated across seven benchmarks, including citation networks (Cora, CiteSeer, PubMed, ogbn-arxiv) and co-purchase networks (Amazon Computers, Amazon Photo, ogbn-products).

Comparison of CoHOp against GraphSAGE and distillation methods across seven benchmarks.

As shown in the results, CoHOp matches or outperforms both standard GNNs (like GraphSAGE) and state-of-the-art distillation methods (like GLNN and NOSMOG). Across all datasets, CoHOp achieved a mean accuracy of 80.42%, compared to 78.52% for GraphSAGE. The gains were particularly pronounced on citation networks like CiteSeer, where CoHOp reached 75.64% accuracy. Beyond accuracy, the simple node-level model used at test time provides a significant advantage in inference speed by avoiding recursive neighborhood fetching.

Limitations and Future Work

CoHOp relies heavily on the homophily assumption (neighbors are similar). While this holds for the tested citation and product networks, the method may require adaptation for heterophilic graphs, where connected nodes often belong to different classes. Future work may also explore incorporating additional feature augmentations, such as positional embeddings, to further close the gap on specific datasets where distillation methods currently maintain a slight edge.

Summary updated

BibTeX
@misc{winter2024classifying,
  author = {Daniel Winter and Niv Cohen and Yedid Hoshen},
  title = {{Classifying Nodes in Graphs without GNNs}},
  year = {2024},
  eprint = {2402.05934},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.05934},
}
Figure