論文746 の記録のページです。住所(YOI)は https://www.yamagishiyuuki.com/yoi/746 で、論文の本文は下の PDF にあります。ファイルは自分で用意した置き場所(https://yamagishi.sakuraweb.com)に置き、日付の証拠(.ots)を添えています。Zenodo でも公開しています(DOI:10.5281/zenodo.23015111)。
本文のサイトの記事は、これから順に公開します。
日付の証拠(OpenTimestamps):日本語版の .ots・英語版の .ots・SHA256SUMS
予備の置き場所(ミラー。中身は上と同じです):PDF 日本語・PDF English・SHA256SUMS
住所:https://www.yamagishiyuuki.com/yoi/746・DOI 10.5281/zenodo.23015111・CC BY 4.0・プレプリント(査読を経ていません)・ORCID 0009-0006-8587-3450
引用するとき
山岸勇輝 (2026). 注意機構で長さの二乗に効くのは計算であって、記憶は区切れば長さに比例まで落ちる [論文746]. YOI: https://www.yamagishiyuuki.com/yoi/746 ・ DOI: 10.5281/zenodo.23015111
Yamagishi, Y. (2026). In Attention, What Grows with the Square of Length Is the Computation; the Memory Falls to Linear When Split into Blocks [Paper 746]. YOI: https://www.yamagishiyuuki.com/yoi/746; DOI: 10.5281/zenodo.23015111
@misc{yamagishi2026yoi746,
author = {Yamagishi, Yuuki},
title = {In Attention, What Grows with the Square of Length Is the Computation; the Memory Falls to Linear When Split into Blocks},
year = {2026},
howpublished = {YOI: https://www.yamagishiyuuki.com/yoi/746},
doi = {10.5281/zenodo.23015111},
note = {Preprint, edition 1}
}
指紋(SHA-256)と確かめ方
4efa39ace4711bfaa6cd1d395436b4add4211f8cda03a7fd1fb3223a517bc50c yamagishi_yoi746_v1_jp.pdffbfda104236d98b56ab4135617dc14347d3aa6d918cd8a4ab63444f3bc66162b yamagishi_yoi746_v1_en.pdfPDF と .ots を同じ場所に保存し、opentimestamps.org に .ots、続けて PDF を落とすと、記録された日時が表示されます。PDF が 1 バイトでも変わっていれば通りません。
日付の証拠(OpenTimestamps)
2026年10月1日に、2 本の PDF の指紋(SHA-256)をまとめて OpenTimestamps に送り、ビットコインのブロック 969440・969456・969461 に記録されました(2026年10月01日 19:28(日本時間))。この .ots があれば、PDF がその時点で存在したことを、このサイトや運営者を信用しなくても、誰でも確かめられます。
書誌
| 題名 | 注意機構で長さの二乗に効くのは計算であって、記憶は区切れば長さに比例まで落ちる |
|---|---|
| Title | In Attention, What Grows with the Square of Length Is the Computation; the Memory Falls to Linear When Split into Blocks |
| 著者 | 山岸 勇輝 (Yuuki YAMAGISHI)・ORCID 0009-0006-8587-3450 |
| 所属 | 山岸複雑性トーラス研究所 (Yamagishi Complexity Torus Lab, Japan) |
| 版 | 第1版(2026年9月) |
| 言語 | 日本語・英語 |
| 種別 | プレプリント(査読を経ていません) |
| ライセンス | CC BY 4.0(出典を示せば、複製・再配布・改変ができます) |
| YOI | https://www.yamagishiyuuki.com/yoi/746 |
| DOI(Zenodo) | 10.5281/zenodo.23015111 |
要旨
注意機構は長さの二乗で重くなる、と言われる。けれど「重い」には、計算の回数と、同時に持つ記憶の二つが束ねられている。その二つを分けて、長さを変えながら数える。新しい定理も法則も主張しない。
第一に、行列全体を持つと、記憶は長さの二乗で増える。長さ $32768$ で $1073741824$ 要素、半精度で $\mathbf{2.000000}$ GiB(第2節)。
第二に、鍵を区切って計算すると、記憶は長さに比例まで落ちる。区切り $1024$ で $\mathbf{0.062500}$ GiB、$\mathbf{32.000000}$ 分の $1$(第2節)。
第三に、これが本稿の芯である。区切っても、計算の回数は減らない。内積はどちらも $1073741824$ 回(第2節)。
第四に、長さを $2$ 倍にしたときの効き方が分かれる。計算 $4$ 倍、行列全体の記憶 $4$ 倍、区切ったときの記憶 $2$ 倍(第2節)。
第五に、区切っても出力は変わらない。長さ $64$ で、全体の計算と区切った計算の差は最大 $4.441\times10^{-16}$(第3節)。
第六に、分離子は、二乗で効くのが内積を計算する回数か、同時に持っておく行列の大きさかである。「注意は二乗で重い」は、どちらの重さかを言うまで、区切る工夫が効くかが決まらない(第4節)。
キーワード:注意機構、計算量と記憶量、長さの二乗、区切った計算、ソフトマックス、半精度
Abstract
Attention is said to grow heavy with the square of length. But “heavy” bundles two things: the number of computations and the memory held at once.The two are separated and counted as length varies.No new theorem or law is claimed.
First, holding the whole matrix, memory grows with the square of length、$1073741824$ elements at length $32768$, $\mathbf{2.000000}$ GiB in half precision (Section 2).
Second, computing with keys in blocks, memory falls to linear in length、$\mathbf{0.062500}$ GiB with blocks of $1024$, one part in $\mathbf{32.000000}$ (Section 2).
Third, and this is the core. Blocks do not reduce the number of computations、$1073741824$ dot products either way (Section 2).
Fourth, doubling the length acts in different ways、computation $4$ times, full-matrix memory $4$ times, blockwise memory $2$ times (Section 2).
Fifth, blocks do not change the output、at length $64$, full and blockwise outputs differ by at most $4.441\times10^{-16}$ (Section 3).
Sixth, the separator is whether what grows as the square is the number of dot products computed or the size of the matrix held at once、“attention is quadratically heavy” does not say whether splitting helps until one says which heaviness (Section 4).
Keywords: attention mechanism, computation and memory, square of sequence length, blockwise computation, softmax, half precision
版の記録
ここの PDF(倉庫の v1)は第1版(2026年9月)の原稿から作りました。ファイルは版ごとに分けて置いています(/yoi/746/v1/ の下)。中身を直すときは、このファイルを書き換えず、新しい版を足します(住所 https://www.yamagishiyuuki.com/yoi/746 はいつも最新の版を指します)。Zenodo の記録とは、Zenodo に上げる前の改訂のぶんだけ違うことがあります。