Transformadores como redes neurais de grafos

TL; DR : tradução da postagem de Chaitanya Joshi " Transformers are Graph Neural Networks ": diagramas, fórmulas, idéias, links importantes. Publicado com a gentil permissão do autor.

Os amigos do datacenter costumam fazer a mesma pergunta: Graph Neural Networks é uma ótima idéia, mas eles têm pelo menos algumas histórias de sucesso reais? Eles têm alguma aplicação prática?



Você pode dar um exemplo das opções já conhecidas - sistemas de recomendação no Pinterest , Alibaba e Twitter . Mas há uma história complicada de sucesso: a tempestade que levou o processamento industrial da arquitetura de linguagem natural do 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.


. , hi- Sll+1:


hi+1=Attention(Qhi ,Khj ,Vhj),


i.e., hi+1=jSwij(Vhj),


 wij=softmaxj(QhiKhj),


jS, Q,K,V— ( Query, Key Value). , . ! — RNN, .


, :



hihj; jSwij(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 hihi, hjjN(i):


hi+1=σ(Uhi+jN(i)(Vhj)),


U,V— GNN, σ— (, , ReLU). —


jN(i), , , / - — , .


, ?


, :



j, , Graph Attention Network (GAT). , — — "" !

— , —


, , — , . GNN, (.. ) (.. ) , .



, GNN . — jN(i), NLP S, jS.


, , , , , , — . 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).


E, finalmente, escrevemos recentemente um artigo no qual aplicamos transformadores a um conjunto de dados com esboços do QuickDraw . Confira!


Adição


O post também foi traduzido para chinês . Participe da discussão dele no reddit e no Twitter !


Tradução do inglês: Anton Alekseev
(laboratório de inteligência artificial, POMI RAS com o nome de V.A. Steklov).

Para comentários valiosos, o tradutor agradece Denis Kiryanov.kirdin e Mikhail Evtikhiev aspr_spb.

All Articles