Graph as a feature: improving node classification with non-neural graph-aware logistic regression

Simon Delarue, Thomas Bonald, Tiphaine ViardarXiv 2024 · DOI

Abstract

Graph Neural Networks (GNNs) have become the standard for relational data, yet they often struggle with heterophily and high computational costs. This paper introduces Graph-aware Logistic Regression (GLR), a simple non-neural model that treats a node's neighborhood as a feature vector. By concatenating intrinsic node attributes with adjacency matrix rows and applying standard logistic regression, GLR matches or exceeds GNN performance across diverse datasets while offering up to 100x speedups.

Introduction: The Challenge of Graph Neural Networks

Graph Neural Networks (GNNs) have become the default choice for relational data. Most GNN architectures rely on a message-passing framework that assumes homophily—the principle that connected nodes likely share the same label. While effective for citation networks like Cora, this "smoothing" effect can be detrimental in heterophilous networks where connected nodes are dissimilar. In such cases, GNNs may wash away critical structural information. Additionally, the increasing complexity of GNNs makes them difficult to tune and scale to large-scale industrial graphs.

Methodology: Graph-aware Logistic Regression (GLR)

The proposed Graph-aware Logistic Regression (GLR) model offers a surprisingly simple alternative to deep architectures. Instead of iterative aggregations, GLR employs a two-step feature augmentation process:

  1. Feature Augmentation: For each node $u$, the model takes its intrinsic attributes $X_u$ and concatenates them with its corresponding row from the graph's adjacency matrix $A_u$. This effectively combines "who the node is" with "who the node knows."
  2. Linear Classification: This augmented feature vector is then fed into a standard, non-neural Logistic Regression model.
Overview of the Graph-aware Logistic Regression (GLR) architecture, showing the concatenation of node features and adjacency information.

Unlike GNNs that perform signal aggregation (averaging neighbor features), GLR preserves the raw signal of the neighborhood structure. This allows the model to learn whether to prioritize a node's own features or its structural position based on the specific characteristics of the dataset.

Experimental Setup

The authors evaluated GLR against a suite of 13 datasets representing diverse graph characteristics:

  • Classic Citation Networks: Cora, PubMed, Citeseer.
  • Web & Co-purchase: Actor, Amazon Photo, Cornell, Wisconsin.
  • Wikipedia-based Networks: Wikivitals, Wikivitals-fr, Wikischools, Wikivitals+.
  • Large Scale: Ogbn-arxiv (over 160k nodes).

Key Results and Discussion

GLR demonstrated remarkable performance across the board, ranking 1st or 2nd in 9 out of the 13 evaluated datasets. It frequently outperformed sophisticated neural models like H2GCN and GCNII.

Accuracy comparison between GNNs and non-neural GLR across various datasets, highlighting GLR's competitive performance.

Key insights from the results include:

  • Efficiency: GLR reached optimal performance significantly faster than GNNs. On the wikivitals-fr dataset, GLR showed speed gains of two orders of magnitude compared to its neural competitors.
  • Robustness: GLR maintained consistent performance across both homophilous and heterophilous graphs. GNNs often saw drastic performance drops when the "neighbors are similar" assumption failed, whereas GLR's preservation of raw features allowed it to adapt.
  • The Complexity Trap: The results suggest that the perceived superiority of many GNNs may be an artifact of overfitting to specific benchmark quirks. A simple linear model often provides a more robust baseline.

Conclusion and Future Work

Graph-aware Logistic Regression (GLR) challenges the necessity of deep neural architectures for many node classification tasks. By treating the graph as a feature, GLR provides a scalable, fast, and accurate alternative.

While powerful, GLR's linear nature may face challenges with extremely sparse adjacency matrices or tasks requiring deep non-linear interactions. Future work could explore extending this "Graph as a Feature" approach to link prediction and graph-level classification, or investigating more sophisticated encoding methods for structural information without sacrificing the efficiency of linear models.

Summary updated

BibTeX
@misc{delarue2024graph,
  author = {Simon Delarue and Thomas Bonald and Tiphaine Viard},
  title = {{Graph as a feature: improving node classification with non-neural graph-aware logistic regression}},
  year = {2024},
  eprint = {2411.12330},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.12330},
}
Figure