Node2Seq: Towards Trainable Convolutions in Graph Neural Networks

Hao Yuan, Shuiwang JiarXiv 2021

Introduction

Convolutional Neural Networks (CNNs) have revolutionized deep learning for grid-like data, such as images and text, by utilizing trainable filters that learn to recognize specific spatial patterns. However, extending this success to graph-structured data remains a significant challenge. Unlike grids, graphs lack a natural ordering of neighbors, and nodes often have varying degrees.

Standard Graph Neural Networks (GNNs), such as Graph Convolutional Networks (GCNs) and Graph Attention Networks (GATs), typically rely on permutation-invariant aggregation functions like averaging or similarity-weighted sums. While effective, these methods lack the explicit, position-dependent trainable weights that characterize CNN filters. Node2Seq addresses this gap by bridging the structural divide between graphs and sequences.

Methodology: From Graphs to Sequences

The core innovation of Node2Seq is a framework that transforms a node’s neighborhood into a sequence, enabling the application of standard 1D CNNs. This transformation is achieved through a four-step pipeline:

  1. Attention-Based Ranking: For a given target node, the model computes attention scores for its neighbors. Unlike GAT, which uses these scores for weighted aggregation, Node2Seq uses them to rank neighbors in descending order of similarity.
  2. 1D Convolution: Once the neighbors are ordered, a traditional 1D CNN is applied. This allows the network to learn explicit weights for specific positions in the sequence (e.g., the "most similar" vs. "second most similar" neighbor).
  3. Global Readout: To handle variable neighborhood sizes, the CNN output is compressed into a fixed-size vector using a readout function such as max or mean pooling.
  4. Adaptive Non-Local Learning: To ensure high-quality information aggregation, the model can adaptively "reach out" to non-local nodes (e.g., 2-hop neighbors) if immediate neighbors do not meet a similarity threshold.
The Node2Seq architecture: transforming graph neighborhoods into sequences for 1D convolution.

By using sorting as a bridge, Node2Seq converts graph structures into sequences without sacrificing end-to-end trainability. This approach allows the model to learn more expressive filters than traditional GNNs, where weights are often constrained by graph topology or simple feature similarity.

Experimental Setup

The researchers evaluated Node2Seq on nine benchmark datasets for node classification, covering both homophilous and heterophilous graph structures:

  • Citation Networks: Cora and Citeseer.
  • Co-purchase/Co-occurrence: Amazon Photo and Actor.
  • Wikipedia/Webpages: Chameleon, Squirrel, Cornell, Texas, and Wisconsin.

These datasets provide a robust testbed for assessing the model's ability to handle diverse connectivity patterns and noisy graph structures.

Results and Discussion

Node2Seq consistently outperformed state-of-the-art baselines, including GCN, GAT, SGC, and LGCN, across nearly all tested datasets.

Performance comparison of Node2Seq against standard GNN baselines on citation and co-purchase datasets.

Key findings include:

  • Accuracy Improvements: On the Cora dataset, Node2Seq achieved 84.0% accuracy, surpassing GAT (82.9%) and GCN (81.6%).
  • Robustness in Heterophilous Graphs: The model showed significant gains on challenging datasets like Squirrel (58.8% vs. GCN's 54.1%) and Chameleon (69.4% vs. GCN's 68.1%), where the adaptive non-local feature proved crucial for capturing relevant information beyond immediate neighbors.
  • Ablation Insights: Analysis confirmed that both the 1D CNN component and the adaptive non-local learning mechanism are essential for the observed performance boosts.

Conclusion and Future Work

Node2Seq successfully introduces trainable convolutional filters to the graph domain by leveraging attention-based sorting. While the approach demonstrates superior performance, future research could address the computational overhead associated with neighbor sorting to improve scalability for massive graphs. Additionally, automating the selection of CNN kernel sizes and extending the framework to tasks like link prediction or graph-level classification represent promising directions for further development.

Summary updated

BibTeX
@misc{yuan2021node,
  author = {Hao Yuan and Shuiwang Ji},
  title = {{Node2Seq: Towards Trainable Convolutions in Graph Neural Networks}},
  year = {2021},
  eprint = {2101.01849},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.01849},
}
Figure