直近の完全一致だけを参照するTransformer注意機構
Latest Exact Match Attention
この論文をやさしく読む
ひとことで言うと
過去の情報から二値のキーが完全一致する最新の一つだけを読む注意機構を考え、計算理論と実験の両面で調べた研究。
何に役立つ?
長い文脈を扱うモデルの計算量と記憶の設計を考える際、固定状態の方法と増大する記憶を持つ方法を比較する材料になる。
この研究の面白いところ
word-RAMとの双方向の模擬を示す理論結果に加え、非微分的な注意機構を学習する方法と、主記憶上の辞書を使う推論実装も示している。
どこまで分かった?
合成課題ではGDNを上回るが、まれな語句の繰り返しと針探しではsoftmax Transformerに及ばなかった。一定の生成速度という報告は辞書を主記憶に置いた実装の測定であり、すべての環境への一般化ではない。
v1のアブストラクトに基づくAI解説。日本語訳とは別に、用途の解釈を含みます。
アブストラクトの日本語訳
直近の完全一致注意機構(LEMA)を提案する。これはTransformerの注意機構の一種で、クエリとキーを二値化し、各クエリが完全に一致するキーのうち最新のものだけを参照する。連鎖的な思考を伴うLEMA Transformerは、以前に制約の緩い右端を選ぶ強い注意機構で示されたのと同様に、word-RAMを模擬できることを証明する。従来の強い注意機構と異なり、完全一致に制限すると逆方向も効率よく示せる。word-RAMは、文脈の長さに依存しないトークン当たりの費用でLEMA Transformerを模擬できる。合わせて、計算量と記憶量の両面で、この二つの計算モデルの近い対応が得られる。理論に加え、微分できない操作を扱うLEMA Transformerの学習方法も提案する。二値化にはストレートスルー推定器を使い、軟らかい注意機構による代替を徐々にLEMAへ近づける。この方法で学習したLEMAモデルは、合成的な連想記憶課題で増大する状態を使って多くの対応関係を記憶・再生し、状態の大きさが固定されたゲート付きDeltaNet(GDN)を上回った。規模拡大の最初の検証として、最大8億3,400万パラメーターのLEMA言語モデルを学習した。損失では、その約半分の規模のsoftmax Transformerと同等だった。まれな語句の繰り返しと針探し課題ではsoftmax Transformerに及ばなかったが、同程度の規模のGDNより長い距離をまたいで情報を思い出せた。最後に、辞書を使うLEMA Transformerの推論を実装した。状態は増え続けるが、辞書をVRAMではなく主記憶に置き、GDNと同程度の一定した生成速度を示した。コードも公開している。
v1の要旨から自動生成。本文の精読・人による確認は未実施。
- 初稿
- 2026-09-22(UTC)
- 最新改訂
- 2026-09-22 · v1
- 査読・掲載
- 査読状況未確認
更新履歴
- v1 2026-09-22 この版を読む
取得できた版を表示。版の更新は査読済みを意味しません。過去版の本文差分は未解析です。
原文の要旨
We introduce latest exact match attention (LEMA), an attention variant for transformers where queries and keys are binarized and each query attends only to the latest exactly matching key. We prove that LEMA transformers with chain of thought can simulate word-RAMs, as was recently shown for the less restrictive rightmost hard attention. In contrast to prior hard attention variants, the restriction to exact matches enables an efficient converse direction: word-RAMs can simulate LEMA transformers at a cost per token independent of the context length. Together, these results yield a close correspondence between the two computational models in terms of both compute and memory. Beyond the theory, we propose a training method for LEMA transformers that handles their non-differentiable operations with a straight-through estimator for the binarization and a soft attention surrogate annealed towards LEMA. On a synthetic associative recall task, LEMA models trained this way use their growing state to store and recall a large number of associations, outperforming gated DeltaNet (GDN) with its fixed state size. As a first scaling test, we train LEMA language models with up to 834 million parameters. They match softmax transformers of around half their size in loss and, on repeated rare phrases and a needle-retrieval task, remain behind softmax transformers but recall across longer distances than GDN models of comparable size. Finally, we implement dictionary-based inference for LEMA transformers and show constant generation speed comparable to GDN despite their growing state, with the dictionaries residing in main memory rather than VRAM. Code is available at https://github.com/moritzbroe/latest_exact_match_attention.
arXiv ID: 2609.25802 / 要約の誤りについて