Graph Attention Networks

Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, Yoshua Bengio

2018 · ICLR

velickovicGAT2018

Problem

Framing

Graph convolutions on irregular neighborhoods either hard-code uniform weights or require costly spectral machinery. GAT closes this gap with masked self-attention over each node's neighbors, learning edge-wise importance without eigendecompositions or fixed-degree assumptions. On Cora it reaches 84.4% accuracy.

Currently Used Methods

Foundational

Proposed Method

Architecture

A GAT layer linearly projects node features with WRF×F\mathbf{W} \in \mathbb{R}^{F' \times F}, scores each edge (i,j)(i,j) by a shared attention MLP, normalizes scores over Ni\mathcal{N}_i, then aggregates neighbors with the learned weights. Transductive models use two layers with 88 heads of 88 features, then one output head per class; inductive PPI models use three layers with 4,4,64,4,6 heads.

Architecture diagram: left, edge attention scores from concatenated transformed node features; right, multi-head neighborhood aggregation by a center node.

Loss / Objective

The model trains with supervised node classification over the final logits.

L=iYLc=1Cyiclogpic\mathcal{L} = - \sum_{i \in \mathcal{Y}_L} \sum_{c=1}^{C} y_{ic} \log p_{ic}

Sampling Rule / Algorithm

Each layer computes normalized neighbor weights, then a weighted neighborhood sum; multi-head outputs are concatenated in hidden layers and averaged at the output.

eij=LeakyReLU ⁣(a[Whi    Whj]),αij=exp(eij)kNiexp(eik)e_{ij} = \mathrm{LeakyReLU}\!\left( \mathbf{a}^{\top} [\mathbf{W}\mathbf{h}_i \;\|\; \mathbf{W}\mathbf{h}_j] \right), \qquad \alpha_{ij} = \frac{\exp(e_{ij})}{\sum_{k \in \mathcal{N}_i} \exp(e_{ik})} hi=σ ⁣(jNiαijWhj),hi=k=1Kσ ⁣(jNiαijkWkhj)\mathbf{h}'_i = \sigma\!\left( \sum_{j \in \mathcal{N}_i} \alpha_{ij} \, \mathbf{W}\mathbf{h}_j \right), \qquad \mathbf{h}'_i = \mathbin\Vert_{k=1}^{K} \sigma\!\left( \sum_{j \in \mathcal{N}_i} \alpha_{ij}^{k} \, \mathbf{W}^{k}\mathbf{h}_j \right)

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Results figure: t-SNE of first-layer Cora embeddings, with node colors for classes and edge thickness reflecting aggregated attention strength.

Ablations

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers

No vault papers identified as further work yet.