GAT (Graph Attention Network, Veličković et al. 2018) assigns learnable importance weights to neighbors via attention. After a linear transform
Whi, it scores the concatenated pair with a shared attention vector:
eij=LeakyReLU(aT[Whi∥Whj]) (
∥ denotes concatenation,
a is learnable), normalizes over neighbors with softmax to get
αij=∑k∈N(i)exp(eik)exp(eij), and aggregates
hi′=σ(∑j∈N(i)αijWhj).
Multi-head attention runs
K independent copies of
(Wk,ak): hidden layers concatenate
hi′=∥k=1Kσ(∑j∈N(i)αijkWkhj) (output dimension ×
K), while the final layer averages
hi′=σ(K1∑k=1K∑j∈N(i)αijkWkhj) for stable training. Unlike GCN's fixed coefficients (determined by degree alone), GAT's coefficients are data-driven and can allocate different importance to different neighbors.