On Positional and Structural Node Features for Graph Neural Networks on Non-attributed Graphs

Hejie Cui, Zijie Lu, Pan Li, Carl Yang

TL;DR

Graph Neural Networks (GNNs) often struggle without explicit node features. This paper categorizes artificial node features into "positional" and "structural" types, providing a practical guide on which to use for different graph tasks (node classification, graph classification). Their findings show that positional features excel at positional node classification, while structural features are better for structural node classification and graph classification, even sometimes outperforming real node features.

What Problem Does This Paper Address?

Many real-world graphs, like social networks or molecular structures, lack inherent "natural" node features (attributes). This absence significantly hinders the performance of Graph Neural Networks (GNNs), which typically rely on these features for effective learning. While various methods exist to create artificial node features for these "non-attributed" graphs, there's a lack of clear understanding or guidelines on which type of artificial feature is best suited for different downstream tasks. This paper aims to fill that gap by systematically analyzing and categorizing these artificial features and their impact on GNN performance across various graph mining tasks.

Methods

The authors propose a categorization of artificial node features into two main families:

  • Positional Node Features: These aim to capture a node's relative position or distance within the global graph structure. Examples include:
  • Random: Randomly initialized feature vectors.
  • One-hot: Unique one-hot vectors for each node.
  • Eigen: Features derived from the eigenvectors of the graph's adjacency matrix.
  • DeepWalk: Features learned from random walks on the graph.
  • Structural Node Features: These focus on a node's local neighborhood and its structural role within the graph. Examples include:
  • Shared: A single feature vector shared across all nodes.
  • Degree: Features based on a node's degree (number of connections).
  • PageRank: Features derived from the PageRank centrality scores.
  • Degree+ (novel): A proposed method that buckets node degrees and creates one-hot vectors for these buckets, aiming to better handle sparse and skewed degree distributions.

The paper evaluates these features using the GraphSAGE GNN architecture with both mean and sum aggregators across three types of graph mining tasks: positional node classification, structural node classification, and graph classification.

Datasets

The paper evaluates their methods on a variety of datasets:

  • Positional Node Classification:
    • Cora
    • Citeseer
    • Pubmed (These are citation networks where node labels represent content categories, and the authors argue that positional information is key for classification.)
  • Structural Node Classification:
    • USA-air traffic network
    • Brazil-air traffic network
    • Europe-air traffic network (These are air traffic networks where node labels represent passenger flow levels, indicating structural roles.)
  • Graph Classification:
    • MUTAG (chemical domain, with real node features)
    • PROTEINS (chemical domain, with real node features)
    • IMDB-BINARY (social domain, without features)
    • IMDB-MULTI (social domain, without features)

Key Insights and Ideas

  • Clear Distinction: The core insight is that positional and structural node features serve distinct purposes and are more effective for specific types of tasks.
  • Positional for Position: Positional node features (like Eigen and DeepWalk) are significantly better for positional node classification, as they directly encode information about a node's global location.
  • Structural for Roles and Graphs: Structural node features (especially the novel "degree+" and PageRank) are superior for structural node classification and graph classification, as they capture local connectivity patterns and overall graph topology.
  • Aggregation Matters: For positional node classification, the "mean" aggregation strategy generally performs better, likely by filtering out noise from neighborhood size. For structural and graph classification, "sum" aggregation is often preferred, as it better captures the importance of neighbor counts.
  • Artificial Can Outperform Real: In some graph classification scenarios, well-chosen artificial structural node features (like degree or PageRank with sum aggregation) can even achieve better performance than using real node features. This highlights the critical importance of feature selection.
  • Degree+ Improvement: The proposed "degree+" feature initialization method shows state-of-the-art performance on structural node classification, demonstrating its effectiveness in handling degree distributions.

Key Results

  • Positional Node Classification: Positional features (DeepWalk, Eigen) achieved significantly higher accuracy than structural features across Cora, Citeseer, and Pubmed datasets, especially when using mean aggregation. For example, DeepWalk with mean aggregation reached up to 75.3% accuracy on Cora, while structural features like degree struggled to surpass 37.4%.
  • Structural Node Classification: Structural features consistently outperformed positional features. The proposed "degree+" method achieved state-of-the-art results, reaching up to 84.4% accuracy on the USA-air traffic network with sum aggregation.
  • Graph Classification: Structural features generally performed better or comparably to positional features. Notably, on MUTAG and PROTEINS, GNNs with degree or PageRank features (using sum aggregation) surpassed the performance of models using real node features.

Limitations and Future Work

  • Limited GNN Architecture: The study primarily uses GraphSAGE. While representative, exploring other GNN architectures could reveal further nuances.
  • Feature Initialization Focus: The paper focuses on initial feature construction. Future work could explore how these features interact with GNN layers and how to dynamically learn or adapt them.
  • Guideline for Selection: The authors hope their empirical study provides a practical guideline for choosing artificial node features. They also suggest this work can inspire the design of more useful artificial features tailored to specific downstream tasks.

Summary updated

BibTeX
@inproceedings{cui2022positional,
  author = {Hejie Cui and Zijie Lu and Pan Li and Carl Yang},
  title = {{On Positional and Structural Node Features for Graph Neural Networks on Non-attributed Graphs}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2022},
  doi = {10.1145/3511808.3557661},
}
Figure