定義
入力系列のどこに注目すべきかを 動的に重み付けする仕組み。 Transformer の中核。
Attention 機構とは(詳しく解説)
Attention 機構とは、 ニューラルネットが 入力系列のどの位置に注目すべきかを 動的に重み付けする仕組み。 文章「彼は本を読んだ。 それは面白かった」 で 「それ」 が 「本」 を指すと理解する判断などに使われる。 Transformer は Self-Attention (同一系列内の各位置同士の関連) と Cross-Attention (異なる系列間) を組み合わせる。 2026 年は Flash Attention / Multi-Query Attention / Grouped-Query Attention などの最適化版が標準で、 推論速度が初代から 5-10 倍高速化された。 実装の中身は行列積 + softmax と意外と単純で、 GPU 並列性が極めて高いのが普及理由。