Non-Local Graph Neural Networks

Meng Liu, Zhengyang Wang, Shuiwang Ji · DOI

Abstract

Modern graph neural networks (GNNs) learn node embeddings through multilayer local aggregation and achieve great success in applications on assortative graphs. However, tasks on disassortative graphs usually require non-local aggregation. In addition, we find that local aggregation is even harmful for some disassortative graphs. In this work, we propose a simple yet effective non-local aggregation framework with an efficient attention-guided sorting for GNNs. Based on it, we develop various non-local GNNs. We perform thorough experiments to analyze disassortative graph datasets and evaluate our non-local GNNs. Experimental results demonstrate that our non-local GNNs significantly outperform previous state-of-the-art methods on seven benchmark datasets of disassortative graphs, in terms of both model performance and efficiency.

Introduction

Standard Graph Neural Networks (GNNs), such as Graph Convolutional Networks (GCNs), are built on the assumption of homophily—the idea that connected nodes are likely to share similar labels. While effective for assortative graphs like citation networks, this local aggregation paradigm often fails on disassortative graphs, where edges frequently connect nodes with different labels (e.g., actor networks or webpage links). In such cases, local neighbors can introduce significant noise.

Capturing non-local information is a common solution, but traditional global attention mechanisms suffer from $O(n^2)$ complexity, making them unscalable for large graphs. This paper introduces a novel framework that achieves non-local aggregation with $O(n \log n)$ efficiency through a unique attention-guided sorting mechanism.

Methodology

The proposed framework augments existing GNN architectures with a three-step process:

  1. Local Embedding: Nodes are initially processed using an MLP or a standard GNN layer to generate base embeddings.
  2. Attention-Guided Sorting: The model learns a global calibration vector. By computing the dot product between this vector and each node's embedding, the model assigns a scalar score to every node. Nodes are then sorted into a 1D sequence based on these scores. This effectively re-orders the graph such that nodes with similar "informative" characteristics are placed in close proximity, regardless of their original topological distance.
  3. Non-Local Aggregation: A standard 1D Convolution is applied over the sorted sequence. This operation acts as a non-local aggregator, capturing dependencies across the newly formed neighborhoods in the 1D space.
The proposed non-local aggregation framework featuring attention-guided sorting.

The final node representation is a concatenation of local and non-local features, which is then passed to a classifier. The authors implement this as NLMLP, NLGCN, and NLGAT.

Experiments and Results

The models were evaluated across seven disassortative datasets (including snap-patents, Chameleon, and Actor) and four assortative benchmarks.

Performance and Efficiency

The non-local GNNs achieved state-of-the-art results on all disassortative datasets. For example, on the Texas dataset, NLMLP reached 85.4% accuracy, a substantial improvement over GCN's 61.1%. Beyond accuracy, the framework is highly efficient. On the Squirrel dataset, NLGCN was 263x faster than Geom-GCN, reducing training time from ~10,430ms to just 39.6ms per epoch.

Insights into Disassortativity

The authors identify two types of disassortative graphs:

  • Harmful Local Info: In datasets like Actor, local neighbors are noisy enough that an MLP (ignoring edges) outperforms a GCN.
  • Complementary Local Info: In datasets like Chameleon, local information is useful, but non-local context is required to maximize performance.
Analysis of homophily boost (a, b) and node sorting visualization (c) in disassortative graphs.

The success of the sorting mechanism is attributed to its ability to "re-connect" the graph. As shown in Figure 2, the homophily of the sorted 1D sequence is significantly higher than that of the original graph structure, confirming that the model successfully groups similar nodes together.

Conclusion

This work demonstrates that efficient non-local aggregation is crucial for handling disassortative graphs. By replacing expensive pairwise attention with an $O(n \log n)$ sorting operation, the proposed framework remains scalable to graphs with millions of nodes. While projecting graph topology into a 1D sequence is a simplification, the empirical gains suggest it is a powerful inductive bias for many tasks. Future research may explore more sophisticated 1D operators or the application of this sorting mechanism to graph-level pooling.

Summary updated

BibTeX
@article{liu2020non,
  author = {Meng Liu and Zhengyang Wang and Shuiwang Ji},
  title = {{Non-Local Graph Neural Networks}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2020},
  doi = {10.1109/tpami.2021.3134200},
}
Figure