← Back to Deep Learning Mind Map
⚡Flashcard Drill➔
🧠 Deep LearningID: gat

Graph Attention Network

GAT 注意力
🎯Core Definition
GAT (Graph Attention Network, Veličković et al. 2018) assigns learnable importance weights to neighbors via attention. After a linear transform WhiWh_i, it scores the concatenated pair with a shared attention vector: eij=LeakyReLU(aT[Whi∥Whj])e_{ij} = \mathrm{LeakyReLU}(a^T[Wh_i \Vert Wh_j]) (∥\Vert denotes concatenation, aa is learnable), normalizes over neighbors with softmax to get αij=exp⁡(eij)∑k∈N(i)exp⁡(eik)\alpha_{ij} = \frac{\exp(e_{ij})}{\sum_{k \in \mathcal{N}(i)} \exp(e_{ik})}, and aggregates hi′=σ(∑j∈N(i)αijWhj)h_i' = \sigma(\sum_{j \in \mathcal{N}(i)} \alpha_{ij} Wh_j). Multi-head attention runs KK independent copies of (Wk,ak)(W^k, a^k): hidden layers concatenate hi′=∥k=1Kσ(∑j∈N(i)αijkWkhj)h_i' = \Vert_{k=1}^{K} \sigma(\sum_{j \in \mathcal{N}(i)} \alpha_{ij}^k W^k h_j) (output dimension ×KK), while the final layer averages hi′=σ(1K∑k=1K∑j∈N(i)αijkWkhj)h_i' = \sigma(\frac{1}{K}\sum_{k=1}^{K} \sum_{j \in \mathcal{N}(i)} \alpha_{ij}^k W^k h_j) 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.
💡Use Cases
graphs with heterogeneous neighborhoods (social influence, citation importance), dynamic graphs and settings with varying node counts; interview comparisons: GAT vs GCN, GAT vs Transformer self-attention, and multi-head handling.
⚡Key Problems Solved
GCN's aggregation weights D~−1/2A~D~−1/2\tilde{D}^{-1/2}\tilde{A}\tilde{D}^{-1/2} are constants fixed by topology, limiting expressivity and making it sensitive to degree distribution. GAT makes weights dynamic w.r.t. features via LeakyReLU attention + neighborhood softmax — same-degree neighbors can still be differentiated (structurally indistinguishable node pairs become distinguishable), effectively restricting Transformer self-attention to the neighborhood subgraph (N(i)\mathcal{N}(i) instead of all LL positions), giving both inductive capacity and stronger fitting power; the multi-head mechanism provides the same viewpoint-stabilization as Transformer multi-head attention.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Graph Attention Network.
Use Cases
In production engineering, what are the primary use cases for Graph Attention Network and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Write the GAT attention formula αij=exp⁡(LeakyReLU(aT[Whi∥Whj]))∑k∈N(i)exp⁡(LeakyReLU(aT[Whi∥Whk]))\alpha_{ij} = \frac{\exp(\mathrm{LeakyReLU}(a^T[Wh_i \Vert Wh_j]))}{\sum_{k \in \mathcal{N}(i)} \exp(\mathrm{LeakyReLU}(a^T[Wh_i \Vert Wh_k]))} and explain the roles of ∥\Vert concatenation, LeakyReLU, and softmax.
2
Core difference GAT vs GCN: GCN's coefficients are fixed by topology (degree-based); how does GAT distinguish same-degree neighbors (structurally symmetric but semantically different pairs)?
3
Multi-head handling: why do hidden layers concatenate heads while the last layer averages them? How does multi-head differ from single-head in training stability and capacity?
4
Why is softmax applied only over neighbors N(i)\mathcal{N}(i) instead of the whole graph? Compare with Transformer's global softmax in terms of complexity and locality.
5
Similarities and differences between GAT and Transformer self-attention: where are query/key/value, how is graph structure injected via masking, and when can one be converted into the other?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Graph Attention Network"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
← Previous CardGraph Conv NetworkNext Card →GAN Adversarial Training

🔗 More Deep Learning Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/DL/card/gat