Skip to main content
QUICK REVIEW

[Paper Review] Understanding Attention and Generalization in Graph Neural Networks

B. A. Knyazev, Graham W. Taylor|arXiv (Cornell University)|May 8, 2019
Advanced Graph Neural NetworksComputer Science30 references55 citations
TL;DR

The paper studies node attention in GNNs, showing attention can greatly improve generalization to larger/noisy graphs when well-initialized or weakly supervised, but is often unstable without proper training or initialization.

ABSTRACT

We aim to better understand attention over nodes in graph neural networks (GNNs) and identify factors influencing its effectiveness. We particularly focus on the ability of attention GNNs to generalize to larger, more complex or noisy graphs. Motivated by insights from the work on Graph Isomorphism Networks, we design simple graph reasoning tasks that allow us to study attention in a controlled environment. We find that under typical conditions the effect of attention is negligible or even harmful, but under certain conditions it provides an exceptional gain in performance of more than 60% in some of our classification tasks. Satisfying these conditions in practice is challenging and often requires optimal initialization or supervised training of attention. We propose an alternative recipe and train attention in a weakly-supervised fashion that approaches the performance of supervised models, and, compared to unsupervised models, improves results on several synthetic as well as real datasets. Source code and datasets are available at https://github.com/bknyaz/graph_attention_pool.

Motivation & Objective

  • Investigate when attention over nodes helps GNN performance.
  • Understand factors affecting the effectiveness of attention in GNNs.
  • Assess generalization of attention-equipped GNNs to larger, more complex, or noisier graphs.

Proposed method

  • Integrate attention with pooling to form a unified GNN block.
  • Compare two attention mechanisms: a linear projection and a DiffPool-based subnetwork.
  • Introduce a threshold-based pooling variant that drops nodes by attention, akin to top-k pooling.
  • Use supervised, unsupervised, and weakly-supervised training of attention with KL-divergence loss.
  • Propose ChebyGIN, a multiscale Chebyshev/GNN hybrid to improve training dynamics.

Experimental results

Research questions

  • RQ1Under what conditions does attention provide gains versus being negligible or harmful in GNNs?
  • RQ2How does attention affect generalization to larger or noisier graphs across tasks?
  • RQ3Can a weakly-supervised training scheme for attention approach the performance of fully supervised attention?
  • RQ4What are the key factors (initialization, base GNN strength, hyperparameters) that influence attention performance in GNNs?
  • RQ5How does the proposed attention-based pooling compare to existing pooling methods like DiffPool and top-k pooling?

Key findings

  • Attention can yield >60% performance gains on some classification tasks when conditions are met.
  • In typical settings, attention effects are negligible or harmful unless initialization/training is carefully managed.
  • Supervised or weakly-supervised attention significantly improves robustness and generalization to larger/noisy graphs across synthetic and real datasets.
  • Poor initialization of the attention model can lock models into suboptimal pooling choices; good initialization is crucial for strong performance.
  • Weakly-supervised attention training dramatically closes the gap to supervised attention, performing better than unsupervised approaches on several datasets.
  • ChebyGIN (a Chebyshev/GNN hybrid) enhances training dynamics and performance in conjunction with attention.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.