Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Transformerの理論的解析

in-context learningは勾配降下法?

[2212.07677] Transformers learn in-context by gradient descent

MLP抜きのlinear self-attention(softmaxじゃないattention)の1層のTransformerは、勾配降下法の1ステップになる説

linear self-attentionは線形回帰の勾配降下法をエミュレートできる

通常のSelf Attention

ejej+hPhVhsoftmax(KhTqh,j)e_j \leftarrow e_j + \sum_h P_h V_h \text{softmax}(K^T_h q_{h,j})

Linear Self Attention

ejej+hPhVhKhTqh,je_j \leftarrow e_j + \sum_h P_h V_h K^T_h q_{h,j}

Transformer in Transformer

推論時に内部でfine-tuneしたり動きをシミュレーションする

[2307.01189] Trainable Transformer in Transformer

https://twitter.com/hillbig/status/1679253896362086401

Structural Grokking

Transformerは、検証誤差が下がりきった後も学習し続けることで階層構造も汎化する形で捉えられるStructural Grokkingが起きていると報告 https://twitter.com/hillbig/status/1678528273012215814

[2305.18741] Grokking of Hierarchical Structure in Vanilla Transformers