Graph Attention Networks with Positional Embeddings

Liheng Ma, Reihaneh Rabbany, Adriana Romero-Soriano

Introduction

Standard Graph Neural Networks (GNNs), such as Graph Attention Networks (GATs), typically rely on the assumption of homophily—the principle that connected nodes share similar features and labels. However, many real-world graphs are non-homophilic, where edges represent interactions between dissimilar nodes. In these scenarios, GATs often struggle because their attention mechanism is "content-blind," focusing solely on node features while ignoring the broader structural context.

The GAT-POS Framework

To address this limitation, the authors introduce GAT-POS, a framework that integrates learned positional embeddings into the GAT architecture. This allows the model to weigh neighbors based on both their features ("what" they are) and their structural roles ("where" they are).

Methods and Architecture

The GAT-POS framework consists of two primary components operating in a main-auxiliary architecture:

  1. Positional Embedding Model: A multi-layer network that learns unique vectors for each node using an unsupervised skip-gram objective. This captures first- and second-order proximities within the graph.
  2. Enhanced Attention Layer: The core innovation is a modified attention coefficient. By concatenating node features with the learned positional embeddings, the model can distinguish between neighbors based on their topological location, effectively breaking the symmetry of unordered neighbor sets.
Architecture of the GAT-POS framework showing the joint training of supervised and unsupervised losses across GAT and POS layers.

A key feature of GAT-POS is its joint training strategy. Unlike methods that use pre-calculated positions, GAT-POS optimizes the supervised classification loss and the unsupervised graph context loss simultaneously. This ensures that the positional embeddings are specifically tuned to be useful for the classification task at hand.

Experimental Evaluation

The model was evaluated across a variety of datasets, categorized by their degree of homophily (denoted by $\beta$).

Statistics for the homophilic and non-homophilic datasets used in the evaluation, highlighting the low homophily scores for Chameleon, Squirrel, and Actor.

The researchers focused on non-homophilic graphs like Chameleon, Squirrel, and Actor, where structural information is critical. They also included standard homophilic citation networks (Cora, Citeseer, Pubmed) as a sanity check to ensure that the added structural awareness does not degrade performance on graphs where feature similarity is already a strong signal.

Key Results and Insights

GAT-POS demonstrated significant performance gains on non-homophilic datasets compared to standard GAT and other structural GNNs:

  • Squirrel: Accuracy improved from GAT's 41.19% to 52.90%.
  • Chameleon: Accuracy reached 67.76%, outperforming both GAT (63.88%) and GCN (65.22%).
  • Actor: Accuracy reached 34.89%, surpassing the best Geom-GCN variant.

On homophilic datasets, GAT-POS maintained performance comparable to standard GAT, proving its robustness. Ablation studies highlighted that joint training generally outperforms pre-training, suggesting that the optimal structural representation is task-dependent. By treating structure as a first-class citizen alongside content, GAT-POS effectively gives GAT "eyes" for graph topology.

Conclusion and Future Work

While GAT-POS effectively bridges the gap for non-homophilic graphs, it currently faces a transductive bottleneck, requiring retraining for entirely new graph structures. Future work may explore inductive embedding methods to allow generalization to unseen graphs and investigate asynchronous training techniques to improve scalability on extremely large networks.

Summary updated

BibTeX
@inproceedings{ma2021graph,
  author = {Liheng Ma and Reihaneh Rabbany and Adriana Romero-Soriano},
  title = {{Graph Attention Networks with Positional Embeddings}},
  booktitle = {PAKDD},
  year = {2021},
  url = {https://openreview.net/forum?id=kvg3VcWSkL},
}
Figure