Index
Abstract
Graph Attention Networks (GATs) are one of the most popular GNN architectures and are considered as the state-of-the-art architecture for representation learning with graphs.
In GAT, every node attends to its neighbors given its own representation as the query.
However, in this paper we show that GAT computes a very limited kind of attention: the ranking of the attention scores is unconditioned on the query node.
We formally define this restricted kind of attention as static attention and distinguish it from a strictly more expressive dynamic attention.
Because GATs use a static attention mechanism, there are simple graph problems that GAT cannot express: in a controlled problem, we show that static attention hinders GAT from even fitting the training data.
To remove this limitation, we introduce a simple fix by modifying the order of operations and propose GATv2:a dynamic graph attention variant that is strictly more expressive than GAT.
We perform an extensive evaluation and show that GATv2 outperforms GAT across 12
OGB and other benchmarks while we match their parametric costs.
์ธ ์ค ์์ฝ
1. ๋ค๋ค GAT๋ก ์ด๊ฑฐ(Veliฤkoviฤ et al.) ์ฐ๋๋ฐ,
2. ๊ทธ๊ฑฐ ์ฐ๋ฉด Attention์ด staticํ๋๋ผ
์ฆ๋ช
query์ ๊ด๊ณ ์์ด ๋์ผํ key(k8)์ ๊ฐ์ฅ ์ ์๊ฐ ๋์. ์ ์๋ค์ ์์๋ k8 > k6 > ~~ ์ผ๋ก ๋ชจ๋ ๋์ผ.
โข
static attention := ๋ชจ๋ query์ ๋ํด ์ต๊ณ attention score์ ๋ฐ๋ key๊ฐ ๋์ผํจ
โข
์ฌ์ง์ด (Veliฤkoviฤ et al.)๊ฑฐ ์ฐ๋ฉด query์ ์๊ด์์ด key๋ค์ attention score ranking๊น์ง ๋์ผํจ
โข
๊ฒฝํ์ ์ผ๋ก๋ง ๊ทธ๋ฐ ๊ฒ ์๋๋ผ, ํญ์ ๊ทธ๋ ๋ค๋ ์ฆ๋ช
๋ ํ ์ ์์.
โข
attention์ query์ ๋ง๊ฒ key๋ฅผ ์ ๊ณจ๋ผ์ผ ํ๋ ๋ชจ๋์ธ๋ฐ, query์ ์๊ด ์์ด ๋๊ฐ์ key์๋ง ์ง์คํ๋ attention์ด๋ฉด ์จ ๋จน๊ฒ ์?
3. ๊ทธ๋์ ์ฐ๋ฆฌ๊ฐ ์ฐ์ฐ ์์๋ง ๋ฐ๊ฟ ๋ดค๋๋(GATv2) ์ด์ static ํ์ง ์์
query์ ๋ฐ๋ผ ์๋ก ๋ค๋ฅธ key์ ์ง์คํ๊ฒ ๋จ
โข
12๊ฐ ๋ฒค์น๋งํฌ๋ก ์ฑ๋ฅ ํ
์คํธํด๋ดค๋๋ GAT๋ณด๋ค GATv2๊ฐ ๋ ์ํจ.
์คํ ๊ฒฐ๊ณผ๋ค
1. DictionaryLookup
โข
Dynamic Attention์ด ๋๋์ง๋ฅผ ํ์ธํ ์ ์๋ ํฉ์ฑ ๋ฐ์ดํฐ์
โข
Query Node(attribute๋ง ์์)์ Key Node(attribute, value๊ฐ ๋ชจ๋ ์์)๊ฐ ์ฃผ์ด์ก์ ๋, Query Node์ ๋ํด value๋ฅผ ์์ธกํ๋ ๋ฌธ์
โข
query node์ ๋ํด ๋์ผํ attribute๋ฅผ ๊ฐ๋ key node์ ์ง์คํ์ฌ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์
โข
์ฑ๋ฅ?
โฆ
GATv2๋ v1 ํ์ดํผํ๋ผ๋ฏธํฐ ๊ทธ๋๋ก ์ฐ๊ณ , ํ๋ผ๋ฏธํฐ ์ซ์๋ ๋์ผํ๊ฒ ๋ง์ถฐ์คฌ๋๋ฐ๋ ์ฑ๋ฅ์ด ์๋ฑํ๋ค.
โฆ
์ ์ด์ GATv1๋ head๊ฐ ํ๋์ผ ๋๋ ํ์ต๋ ๋์ง ์์๊ณ , head๊ฐ ๋์ด๋๋ ์กฑ์กฑ ๊ฒ์ฆ ์ฑ๋ฅ์ด ์ฌ๋ผ๊ฐ๋ค(ํํ๋ ฅ์ด ์ ํ์ ์ด๋ค).
โฆ
GATv2๋ ํค๋๊ฐ ํ๋์ฌ๋ ์ฑ๋ฅ์ด ์ข๋ค: ์ผ๋ฐํ ์ฑ๋ฅ์ด ์ด๋ฏธ ๋ฐ์ด๋๋ค.
2. Robustness to Noise
โข
๋ ๊ฐ์ Node Prediction ๋ฌธ์ (ogbn-arxiv|mag)์์, ์ค์ ๊ทธ๋ํ์ ์๋ ์ฃ์ง๋ฅผ p์ ๋น์จ๋ก ์์๋ก ์ถ๊ฐํ์ฌ(๋
ธ์ด์ฆ) Task ์ฑ๋ฅ์ ํ์ธ
โข
์ญ์ GATv2๊ฐ ๋ ์ฑ๋ฅ ์ข๋ค.
โข
dynamic attention์ด ๋
ธ์ด์ฆ์ ๋
ธ์ด์ฆ๊ฐ ์๋ ์ฃ์ง๋ฅผ ๊ตฌ๋ถํ ์ ์๊ฒ ๋๊ธฐ ๋๋ฌธ์ผ ๊ฒ์ด๋ค.
3. VarMisuse: Node-Pointing Problem
VarMisuse
โข
์
๋ ฅ์ ๋ํ ์ต์ ๋
ธ๋๋ฅผ ์ ํํ๋ ๋ฌธ์
โข
๋
ธ๋ ๊ฐ ์ํธ์์ฉ ์ข
๋ฅ๊ฐ ๋ณต์ก๋ค์(11์ข
์ ์ํธ์์ฉ)
โข
์ญ์ v2>v1
4. Node-Prediction
โข
๋
ธ๋์ ์์ฑ์ ์์ธกํ๋ ๋ฌธ์
โข
v2 > v1
โข
proteins ๋ฌธ์ ์์ v1๋ ํค๋ ์๋ฅผ ๋๋ ค์ผ ์ํ์ง๋ง, v2๋ ํค๋ ํ๋๋ ์ถฉ๋ถํ ์ํ๋ค
5. Graph-Prediction
โข
๊ทธ๋ํ ์์ฒด์ ์์ฑ์ ์์ธกํ๋ ๋ฌธ์
โข
v2 > v1
โข
๊ทผ๋ฐ ๋ช๋ช ์์ฑ์ ๋ํด์๋ Attention์ด ์๋ ์น๊ตฌ๋ค์ด ๋ ์ํ๋ค.
6. Link-Prediction
โข
๋
ธ๋ ๊ฐ ์ฐ๊ฒฐ ๊ด๊ณ๋ฅผ ์์ธกํ๋ ๋ฌธ์
โข
v2 > v1
โข
๊ทผ๋ฐ Attention์ด ์๋ ์น๊ตฌ๋ค์ด ํจ์ฌ ๋ ์ํ๋ค. ์?
โฆ
๊ฐ์ค: ํ๊ท ์ ์ผ๋ก high-degree์ธ ๊ทธ๋ํ์์ attention์ด ๋ ์ ํฉํ ๊ฒ
โฆ
ogbn-proteins(avg deg=597), ogbn-products(avg deg=50.5)์์๋ attention ์๋ ๋ชจ๋๋ค์ด ๋ ์ํ์
โฆ
dynamic attention ์ฑ์ง์ degree๊ฐ ๋๊ณ relevant ๋
ธ๋๋ฅผ ์ ์ ํํด์ผ ํ๋ ๊ฒฝ์ฐ์ ์ ์ฉํ ๊ฒ
๊ฒฐ๋ก
static attention๋ฐ์ ์ ๋๋ ๋ฌธ์ ์ ์ค์ ๋ฐ์ดํฐ์
์์์ ํ๊ณ๋ฅผ ์ง๋ชฉํ ๊ฑด ์ฐ๋ฆฌ๊ฐ ์ฒ์์ด๋ค.
Velickovic๋ GATv1์ global node importance๊ฐ ์ ์ฉ๋๋ ์ํฉ์์ ์ข๋ค๊ณ ์๊ธฐํ๋ค.
๊ทธ๋์ ์ฐ์ฐ ์์๋ง ๋ฐ๊ฟ์ v2 ๋ง๋ค์๋ค. ์ฐ์ฐ ๋ณต์ก๋ ๋์ผํ๋ฐ dynamic attention ๋๊ณ ์ฑ๋ฅ์ ๋ ๋ฐ์ด๋๋ค.














