Transformers sebagai Graph Neural Networks

TL; DR : terjemahan dari pos Chaitanya Joshi " Transformers is Graph Neural Networks ": diagram, formula, ide, tautan penting. Diterbitkan dengan izin baik dari penulis.

Teman-teman Datacenter sering mengajukan pertanyaan yang sama: Grafik Neural Networks adalah ide bagus, tetapi apakah mereka memiliki kisah sukses yang nyata? Apakah mereka memiliki aplikasi praktis?



β€” Pinterest, Alibaba Twitter. : Transformer.


(Transformers). NLP- GNN-, , "" , .


β€” (representation learning).


NLP


, "" . () (latent/hidden) - . , . , (error/loss functions).


, (natural language processing; NLP), (recurrent neural networks; RNN) β€” , . RNN , . , RNN, .


, , RNN ( ) .


RNN NLP. : , , (attention mechanism; attention), . , β€” , "".


2017 , NLP β€” β€” RNN. , , !
, Yannic Kilcher.


. , hβ€” i- Sβ€” ll+1:


hiβ„“+1=Attention(Qβ„“hiβ„“ ,Kβ„“hjβ„“ ,Vβ„“hjβ„“),


i.e., hiβ„“+1=βˆ‘j∈Swij(Vβ„“hjβ„“),


 wij=softmaxj(Qβ„“hiβ„“β‹…Kβ„“hjβ„“),


j∈S, Qβ„“,Kβ„“,Vβ„“β€” ( Query, Key Value). , . ! β€” RNN, .


, :



hiβ„“hjβ„“; βˆ€j∈Swij(i,j), softmax j. , hiβ„“+1i, hjβ„“, wij. .

(Multi-Head Attention)


- --- (dot product attention): . , "" (attention heads) () ( "" ):


hiβ„“+1=Concat(head1,…,headK)Oβ„“,


headk=Attention(Qk,β„“hiβ„“ ,Kk,β„“hjβ„“ ,Vk,β„“hjβ„“),


Qk,β„“,Kk,β„“,Vk,β„“β€” k- "" , Oβ„“β€” , hiβ„“+1hiβ„“.


, "" " ", . .


""


Scale issues and the Feed-forward sub-layer


, - , , : . - (1), - " " , , wij. - (2), , "". hiβ„“+1. , (normalization layer).


(2) LayerNorm, . , --- (1).


, , : . , hiβ„“+1() , ReLU, , :


hiβ„“+1=LN(MLP(LN(hiβ„“+1)))


, , , . ! , LayerNorm . β€” , .
, !

:



"" , NLP- , . , ("") , (residual connections) "" "". .


GNN


NLP.


(GNN) (GCN) . (, , ). , . GNN (propagate) β€” β€” .



, , : , GNN, : "" .

GNN hiβ„“hiβ„“, hjβ„“j∈N(i):


hiβ„“+1=Οƒ(Uβ„“hiβ„“+βˆ‘j∈N(i)(Vβ„“hjβ„“)),


Uβ„“,Vβ„“β€” GNN, Οƒβ€” (, , ReLU). β€”


j∈N(i), , , / - β€” , .


, ?


, :



j, , Graph Attention Network (GAT). , β€” β€” "" !

β€” , β€”


, , β€” , . GNN, (.. ) (.. ) , .



, GNN . β€” j∈N(i), NLP S, j∈S.


, , , , , , β€” . GNN-. , GNN, .


?


, , , .


β€” , NLP?


( , ) : , . TreeLSTM, , , /GNN NLP?



(long-term dependencies)?


: . , , , nGNN n2. - n.


NLP-, . , "" LSH (Locality-Sensitive Hashing) . .


, , GNN. , (Binary Partitioning) " ".



" "?


NLP- , , , . , β€” , , β€” - " ".


, , " ".


"" β€” GNN , ( , ) , GNN ? .



? ?


. , , - "" . , , .


"" GNN, GAT , MoNet (Gaussian kernels) . . "" ?


, GNN (, ) . " " !


- , ? Yann Dauphin (ConvNet). , , !



?


, , , , (learning rate schedule), "" (warmup strategy) (decay settings). , , β€” , β€” .


, , , .



DeepMind- , - ? " 16 000 "" (warmup), 500 000 "" (decay), 9 000 ".

, , , : , " " ?


" "?


, , (inductive bias), ?



, : The Illustrated Transformer The Annotated Transformer.


GNN : Arthur Szlam Attention/Memory Networks, GNN . - (position paper) DeepMind, β€” "" β€” . , , DGL. seq2seq "" "" GNN.


, , GNN NLP ( HuggingFace: Transformers).


Dan akhirnya, kami baru-baru ini menulis sebuah artikel di mana kami menerapkan transformer ke dataset sketsa QuickDraw . Coba lihat!


Tambahan


Pos juga telah diterjemahkan ke dalam bahasa Cina . Bergabunglah dengan diskusi di reddit dan di Twitter !


Terjemahan dari bahasa Inggris: Anton Alekseev
(laboratorium kecerdasan buatan, POMI RAS dinamai V.A. Steklov)

Untuk komentar yang berharga, penerjemah berterima kasih kepada Denis Kiryanovkirdin dan Mikhail Evtikhiev aspr_spb.

All Articles