推理与记忆Inference & memory推論と記憶

先整理线索,再重读长文Collect the Clues, Then Read Again手がかりを整理してから読み直す

第一遍推理发现的目标、引用和搜索线索,能否在第二遍阅读长文时派上用场?Trace as State 把这些文本前置到原文之前。关键比较不是“多想一次是否更好”,而是相同轨迹、相同原文,仅改变轨迹位置,是否让重读更有效。Can targets, resolved references, and search clues discovered during reasoning help a second reading of a long source? Trace as State prepends that text. The decisive comparison is not simply whether another attempt helps: it holds the traces and source fixed and changes where the traces enter.初回の推論で見つけた対象、参照、探索の手がかりは再読を助けるでしょうか。Trace as Stateはそのテキストを原文の前に置きます。問うのは単なる追加試行の効果ではなく、同じ軌跡と原文を保って配置だけを変えた効果です。

静态图Static figure静止図Same clues, different positions
从左到右是输入 token 顺序;每一行是一次独立输入。Left to right is token order; each row represents a separate input.左から右が入力tokenの順序です。各行は別々の入力です。

1 · 从推理文本构造可重用状态1 · Construct a reusable textual state1 · 推論テキストから再利用する状態を作る

令 x 为长上下文、q 为问题,第 j 次首轮运行产生推理 rⱼ 与独立可见答案 aⱼ。固定序列化器将推理组织为 T=π(r₁,…,rₙ)。T 是可能有损、错误的文本状态代理,不是隐藏激活、KV cache 或权重快照。只保留最终答案,不能视为保留了相同状态。Let x be the long context and q the question. Initial run j produces reasoning rⱼ and a separate visible answer aⱼ. A fixed serializer forms T=π(r₁,…,rₙ). T is a potentially lossy or incorrect textual proxy, not hidden activations, a KV cache, or a weight snapshot. Keeping only final answers does not preserve the same state.長文をx、質問をqとし、初回jは推論rⱼと別の可視回答aⱼを出します。固定の直列化でT=π(r₁,…,rₙ)を作ります。Tは欠落や誤りを含むテキストの代理状態であり、隠れ活性、KV cache、重みのsnapshotではありません。最終回答だけでは同じ状態を保持できません。

三种条件是首轮 [x,q]、后置 [x,T,q]、前置 [T,x,q]。前置和后置给同一模型相同的 T、x、q;只有顺序改变,q 都在末尾。与首轮相比则额外增加信息和计算,因此“相对首轮的总收益”和“前置相对后置的位置收益”需要分别解释。The conditions are first pass [x,q], append [x,T,q], and prepend [T,x,q]. Append and prepend give the same model the same T, x, and q, with q kept last; only order changes. Both add information and computation relative to the first pass, so total improvement over baseline and placement improvement over append answer different questions.条件は初回[x,q]、後置[x,T,q]、前置[T,x,q]です。後置と前置は同じモデルに同じT、x、qを与え、qは末尾に固定し、順序だけを変えます。初回との比較では情報と計算も増えるため、総改善と配置の改善を分けて読みます。

Trace as State · paper v1

2 · 因果顺序为什么会影响内存需求2 · Why order can change memory requirements2 · 因果順序が記憶量を変える理由

因果 Transformer 中,前面的 token 在同一遍计算中不能关注后出现的 T。后置仍可帮助最终生成,却不能追溯改变已经处理的原文表示。前置后重新前向,原文 token 从一开始便可利用目标、已排除假设或搜索边界。这是跨次反馈、每次内部仍保持因果处理的设计。In a causal transformer, source tokens cannot attend to a later T during that pass. Appending can help subsequent generation but cannot retroactively change those earlier representations. A fresh pass with T first lets source tokens use targets, rejected hypotheses, or search frontiers from the outset. Feedback crosses passes while each pass remains causal.因果Transformerでは同じ計算中、原文tokenは後ろのTを参照できません。後置は回答生成を助けても、先に作った原文表現を遡って変えません。Tを前にして再計算すれば、原文を読む段階から対象や棄却仮説、探索境界を使えます。各回は因果的で、回の間にフィードバックを置きます。

论文形式化 sᵢ=U(sᵢ₋₁,cᵢ)、s₀=z。若先给 z,只跟踪一条实际状态路径,b=log₂|S| 时约需 ⌈b⌉ bit;若最后才给 z,最坏情况要保存序列对所有起始状态的响应函数,需至少 ⌈b·2ᵇ⌉ bit。该界属于确定、单遍的特定构造,不意味着真实 LLM 显存、时间或准确率指数改善;文本 T 也不保证等于理论 z。The formal system is sᵢ=U(sᵢ₋₁,cᵢ), s₀=z. With z first, one realized path needs about ⌈b⌉ bits for b=log₂|S|. With z last, a worst-case sequence requires retaining its response for every possible initial state, at least ⌈b·2ᵇ⌉ bits. This is a bound for a particular deterministic, single-pass construction—not an exponential claim about LLM memory, time, or accuracy. Text T need not equal the formal z.形式化はsᵢ=U(sᵢ₋₁,cᵢ)、s₀=zです。zが先なら実際の1経路を追い、b=log₂|S|に対し約⌈b⌉ bitで足ります。zが後なら最悪時に全初期状態への応答を保持し、少なくとも⌈b·2ᵇ⌉ bitが必要です。特定の決定的単一走査の境界であり、LLMのメモリ、時間、精度が指数改善する証明ではありません。

Trace as State · paper v1

3 · 序列化、截断和问题位置属于方法3 · Serialization and boundaries are part of the method3 · 直列化と境界も方法の一部

论文 v1 主设置收集五次首轮推理,按原顺序拼接、添加固定标签和分隔符,并明确先前尝试可能有错。过长的每条复用轨迹仅取前 50,000 字符,以留出第二阶段输入空间。字符上限不是 token 上限;截断的是反馈代理,不应误述成所有原文都被无损压缩。Paper v1 collects five initial traces, preserves their order, and adds fixed labels, delimiters, and a reminder that previous attempts may be wrong. Each overlong reused trace is limited to its first 50,000 characters to fit the next prompt. Characters are not tokens, and truncating the feedback proxy is not lossless compression of the source.v1は初回軌跡を5本集め、順序を保ち、固定のラベル、区切り、以前の試行も誤り得るという注意を加えます。長い軌跡は各50,000文字までに切ります。文字数はtoken数ではなく、フィードバック代理の切詰めは原文の無損失圧縮ではありません。

问题固定在末尾是为了让模型聚焦同一任务。复现需冻结原文插入边界、轨迹序号、分隔模板与截断规则,而不是把“把总结放前面”当作同一实验。前置一个人工摘要、模型摘要、正确答案或其他问题的轨迹,均改变了 T 的信息来源,需要独立对照。Keeping the question last focuses both conditions on the same task. Reproduction must freeze source boundaries, trace order, separators, and truncation—not merely “put a summary first.” Human summaries, generated summaries, gold answers, and traces from other problems change the information source and require separate controls.質問末尾を固定することで同じ課題に集中させます。原文の境界、軌跡順、区切り、切詰め規則まで固定して再現します。「要約を前へ置く」だけでは同じ実験になりません。人の要約、生成要約、正解、別問題の軌跡は情報源を変えるため個別対照が必要です。

静态图Static figure静止図Reread with relations to verify
保留完整材料,重新验证轨迹中的假设。Retain the source and recheck hypotheses carried by the trace.原資料を残し、軌跡に含まれる仮説を再確認します。

Trace as State · paper v1

4 · 模型、任务与失败分母4 · Models, tasks, and failure denominators4 · モデル、課題、失敗の分母

实验涵盖 DeepSeek V4 Pro Preview、Qwen 3.7 Max、GLM-5.2。前两种任务分别是长边列表上的图状态推理与多轮请求绑定;NUB-1M Season 2 是约 400–700K token 小说理解。不同 tokenizer 使 1M bin 难公平容纳反馈,因而选 GraphWalks 256K、MRCRv2 256K/512K。The models are DeepSeek V4 Pro Preview, Qwen 3.7 Max, and GLM-5.2. GraphWalks tests graph state over long edge lists; MRCRv2 tests request-response binding; NUB-1M Season 2 tests a roughly 400–700K-token novel. Tokenizer differences make the 1M bins difficult to fit fairly with feedback, motivating GraphWalks 256K and MRCRv2 256K/512K.モデルはDeepSeek V4 Pro Preview、Qwen 3.7 Max、GLM-5.2です。GraphWalksは長い辺リスト、MRCRv2は依頼と応答の対応、NUB-1M Season 2は約400–700K tokenの小説理解を扱います。tokenizer差とフィードバックの余地から1M binでなく256K/512K条件を選びます。

三者采用最高可用 reasoning 配置(DeepSeek/GLM max;Qwen 以官方 xhigh prompt)。论文列出的输出预算是能力配置,不等于每次实际请求显式设置了该上限;记录只证明未传自定义 max-output。blocked、超长、格式错、缺失、非终止和内容过滤均计失败。NUB 是模型判题准确率,不能与图集合 EM/F1 当成同一指标。The study uses the highest available reasoning settings: max for DeepSeek/GLM and an official xhigh prompt for Qwen. Listed output budgets describe model configurations; logs establish only that no custom maximum-output argument was sent, not the effective provider default. Blocked, overlong, malformed, missing, nonterminal, and filtered cases count as failures. NUB uses model-judged accuracy, distinct from graph EM and set F1.推論設定はDeepSeek/GLMがmax、Qwenは公式xhigh promptです。表の出力予算と実リクエストの上限指定は別で、記録が示すのは独自max-outputを送らなかったことです。遮断、超長、形式不良、欠落、未終端、filterを失敗に含めます。NUBのモデル採点精度とグラフEM/F1は別指標です。

任务Task課題问题数 / 重复Problems / repeats問題数/反復计分Scoring採点
GraphWalks 256KGraphWalks 256KGraphWalks 256K200 / 5200 / 5200 / 5EM · set F1EM · set F1EM · set F1
MRCRv2 8-needle 256K/512KMRCRv2 8-needle 256K/512KMRCRv2 8-needle 256K/512K200 / 5200 / 5200 / 5EM · SequenceMatcherEM · SequenceMatcherEM · SequenceMatcher
NUB-1M Season 2NUB-1M Season 2NUB-1M Season 220 / 520 / 520 / 5DeepSeek Judge accuracyDeepSeek-judged accuracyDeepSeek採点精度

Trace as State · paper v1

5 · 主结果:Parents 增益最强5 · Main results: the strongest gain is on Parents5 · 主結果:Parentsで最大の改善

下表为 GraphWalks Parents 的 EM 百分数,均为五次重复平均。DeepSeek 的 29.2→81.8 是该模型该子任务的变化,不是整体准确率。GLM 的 100.0 也只属于该冻结测试条件;不能推广为任意百万 token 推理都能满分。The table reports GraphWalks Parents EM percentages averaged over five repeats. DeepSeek’s 29.2→81.8 concerns this model and subtask, not overall intelligence. GLM’s 100.0 is likewise confined to the frozen test setting, not arbitrary million-token reasoning.表はGraphWalks ParentsのEM、5反復平均です。DeepSeekの29.2→81.8はこのモデルと小課題の値です。GLMの100.0も固定したテスト条件であり、任意の百万token推論の満点を意味しません。

前置在 27 个模型×任务×指标组合中超过后置 26 个;唯一例外是 GLM BFS F1:后置 75.8、前置 75.0,但 EM 前置更高。其他改善较温和,例如 DeepSeek MRCRv2 512K EM 为 45.4/49.4/52.6,NUB 为 60/71/73(基线/后置/前置)。结果显示一致倾向和任务差异,不能只选最大增益代表全部。Prepending exceeds appending in 26 of 27 model/task/metric combinations. The exception is GLM BFS F1: 75.8 appended versus 75.0 prepended, although EM favors prepend. Other gains are smaller: DeepSeek MRCRv2 512K EM is 45.4/49.4/52.6 and NUB is 60/71/73 for baseline/append/prepend. The pattern is broad but task-dependent.27のモデル×課題×指標のうち26で前置が後置を上回ります。例外はGLM BFS F1の後置75.8、前置75.0で、EMは前置が上です。DeepSeek MRCRv2 512K EMは45.4/49.4/52.6、NUBは60/71/73で、改善幅には課題差があります。

模型Modelモデル首轮First pass初回后置Append後置前置Prepend前置
DeepSeek V4 Pro PreviewDeepSeek V4 Pro PreviewDeepSeek V4 Pro Preview29.229.229.243.043.043.081.881.881.8
Qwen 3.7 MaxQwen 3.7 MaxQwen 3.7 Max60.860.860.871.071.071.096.496.496.4
GLM-5.2GLM-5.2GLM-5.266.466.466.483.283.283.2100.0100.0100.0

Trace as State · paper v1

6 · 消融排除了哪些替代解释6 · What the ablations rule out6 · アブレーションで切り分ける説明

DeepSeek 的 Parents 消融把信息和位置拆开。只前置问题已有帮助,重复原文也有效;前置最终答案或只读轨迹仍明显弱于 [T,x,q]。随机轨迹比基线更差,说明不是任意“推理样式文本”都有效。保留原文再依据任务相关线索重读,比单独相信线索更可靠。The DeepSeek Parents ablations separate information from placement. A leading question and a repeated source help; answer feedback and trace-only input remain well below [T,x,q]. Random traces hurt relative to baseline, so generic reasoning-shaped scaffolding is insufficient. The source remains useful when reread with task-specific clues.DeepSeek Parentsの対照では質問前置や原文反復も有効ですが、答えだけのフィードバックや軌跡だけでは[T,x,q]に及びません。ランダム軌跡は基準より悪く、推論風の文章なら何でもよいわけではありません。課題に沿う手がかりを持って元資料を再読する点が効いています。

Majority@5 是首轮五答案多数决,Oracle@5 是事后挑首轮最佳答案,Oracle 不能部署为真实选择器。前置超过其 50.0 EM 表明第二阶段不只是从既有答案挑一个;但这些对照并未自动配平总 token、缓存与延迟,所以不构成全面效率胜出。Majority@5 votes among five initial answers; Oracle@5 retrospectively chooses the best and is not a deployable selector. Exceeding its 50.0 EM shows that the feedback pass can do more than select an existing answer. The controls do not automatically equalize total tokens, caching, or latency, so they do not establish universal cost efficiency.Majority@5は初回5回答の多数決、Oracle@5は事後に最良を選ぶ実運用不能な上限です。その50.0 EMを超えるため、単なる既存回答の選別以上の効果があります。ただし総token、cache、遅延を揃えた比較ではなく、効率の全面優位は示しません。

条件Condition条件输入 / 方法Input / method入力/方法Parents EMParents EMParents EM
首轮First pass初回[x,q][x,q][x,q]29.229.229.2
Majority@5Majority@5Majority@5五答案投票Five-answer vote5回答の投票31.031.031.0
Oracle@5Oracle@5Oracle@5事后选最佳Retrospective best事後の最良50.050.050.0
问题前置Question first質問前置[q,x,q][q,x,q][q,x,q]53.053.053.0
Re2Re2Re2[x,q,x,q][x,q,x,q][x,q,x,q]50.050.050.0
答案反馈Answer feedback回答フィードバック[a,x,q][a,x,q][a,x,q]45.445.445.4
随机轨迹Random traceランダム軌跡[T_random,x,q][T_random,x,q][T_random,x,q]14.214.214.2
只有轨迹Trace only軌跡のみ[T,q][T,q][T,q]43.843.843.8
后置 / 前置Append / prepend後置/前置[x,T,q] / [T,x,q][x,T,q] / [T,x,q][x,T,q] / [T,x,q]43.0 / 81.843.0 / 81.843.0 / 81.8

Trace as State · paper v1

7 · 轨迹数量是额外计算轴7 · Trace count is another compute axis7 · 軌跡数も計算量の軸

数量消融让 n 从 1 到 5,按首次运行顺序取前 n 条合格轨迹,因此集合嵌套。每个 n 的前置和后置使用完全相同的 T,第二阶段各做五次新重复;n=0 是共享首轮均值。曲线总体随轨迹数增长,前置在每个 n≥1 都高于后置。The count ablation varies n from one to five, taking the first n eligible traces in repeat order so the sets are nested. At each n, prepend and append share exactly the same T and each receives five fresh second-pass repeats; n=0 is the shared first-pass mean. Performance generally rises with trace count, and prepend remains higher for every n≥1.本数消融は反復順の先頭n本を1~5で使う入れ子の集合です。各nで前置と後置は同じTを使い、第二段階を各5回新しく実行します。n=0は共通初回平均です。全体として本数とともに向上し、n≥1のすべてで前置が上回ります。

这支持在已测试范围内将轨迹数作为推理预算,但不能推出无限增加轨迹单调变好。重复信息、错误共识、前缀长度和截断会相互作用;更长 T 也挤占原文与输出空间。选择或压缩轨迹是下一步可检验方法,不能直接继承原五轨迹实验的数字。This supports trace count as a budget parameter within the tested range, not monotonic improvement without limit. Redundancy, shared errors, prefix length, and truncation interact, while T competes with source and output space. Selection or compression is a new intervention that cannot simply inherit the five-trace results.検証範囲内では本数を予算パラメータにできますが、無限に増やせば単調改善するとは限りません。冗長性、共通誤り、長さ、切詰めが絡み、Tは原文や出力の容量を使います。選別や圧縮は新しい介入で、5本条件の成績をそのまま引き継げません。

Trace as State · paper v1

8 · 第二阶段更短不等于总成本更低8 · A shorter second pass is not a cheaper system8 · 第二段階が短くても総費用は減らない

附录 F 把阶段成本和累计成本分开。DeepSeek GraphWalks 的首轮输出总量 62.507M token,前置第二阶段 27.975M,累计 90.482M;输出包含 reasoning token。第二阶段输出较短可以解释为有线索后少走弯路,但整体仍支付首轮轨迹成本。Appendix F separates stage and cumulative usage. DeepSeek GraphWalks uses 62.507M initial output tokens and 27.975M in the prepended second stage, totaling 90.482M; outputs include reasoning. A shorter second stage is consistent with more focused reasoning, but the system still pays for the initial traces.付録Fは段階別と累積を分けます。DeepSeek GraphWalksの初回出力は62.507M token、前置第二段階は27.975M、累積90.482Mで、推論tokenを含みます。第二段階が短くても、初回軌跡の費用は必要です。

完整核算还需重读输入、T 长度、每阶段请求次数、缓存命中、并行度和端到端延迟。把 T 插到原文前会改变前缀,可能降低多轮 KV cache 复用;后置更容易保留稳定原文前缀。应用时应比较等预算重试、普通摘要、append、prepend,而不是只报最后一次生成长度。Complete accounting includes reread input, T length, request count, cache hits, parallelism, and end-to-end latency. Placing T before the source changes its prefix and may reduce multi-round KV reuse, whereas append can preserve a stable source prefix. Compare equal-budget retries, summaries, append, and prepend rather than only final-generation length.全費用には再読入力、T長、呼出し数、cache、並列度、全遅延を含めます。Tの前置はprefixを変え、複数回でのKV再利用を減らし得ます。後置なら原文prefixを保ちやすいため、等予算の再試行、要約、後置、前置で比較します。

Trace as State · paper v1

9 · 可访问接口与错误传播的限制9 · Interface and error-propagation limits9 · インターフェースと誤り伝播の限界

原实现需要可取得的推理文本或明确暴露的状态接口。只返回最终答案的 API 不能直接复现原协议;可以研究外显摘要、工具笔记或证据清单,但应承认代理变了。T 中的错误会先于原文影响注意方向,随机轨迹消融也提醒我们:无关或误导反馈可能伤害准确率。The evaluated implementation needs accessible reasoning text or an exposed state interface. An answer-only API cannot reproduce it directly. Explicit summaries, tool notes, or evidence lists are possible alternatives, but they change the proxy. Errors in T can bias reading before the source arrives; the random-trace control illustrates the risk of irrelevant feedback.元の実装には取得可能な推論テキストか公開状態インターフェースが必要です。答えだけのAPIでは直接再現できません。要約、ツール記録、証拠一覧は代替研究になりますが、代理状態が変わります。Tの誤りは原文を読む方向を先に歪める可能性があります。

论文覆盖三模型、三类长上下文任务,没有测试多轮工具 Agent、Judge–Fix 或 AutoResearch。Graphs 的精确匹配、小说的模型判题、不同上下文档位也各有外推限制。关于文本状态的机制解释是理论动机与实验相互支持,不是对所有模型内在计算路径的直接观测。The study covers three models and three long-context task families, not multi-turn tool agents, Judge–Fix, or AutoResearch. Graph exact match, model-graded novel answers, and selected context bins each limit generalization. The mechanism is supported by a theoretical motivation and controlled behavior, not direct observation of every model’s internal computation.対象は3モデルと3種の長文課題で、多段ツールAgent、Judge–Fix、AutoResearchは未評価です。グラフ完全一致、小説のモデル採点、選ばれた長さには各々外挿の限界があります。理論と行動実験による支持であり、すべての内部計算を直接観測した証拠ではありません。

Trace as State · paper v1

10 · 在 Agent 中怎样做可检验的迁移10 · A testable transfer to agents10 · Agentへの移植を検証する方法

可把上一轮的当前假设、未验证依赖和已解析引用组织为带来源的 T,再放到下一轮材料前;原材料仍保留,假设与事实明确区分。例如依赖图任务先记录“哪些边需要核对”,再重读真实边列表,不能把猜测的间接祖先写成已确认直接父节点。这个例子是设计建议,不是论文的实测样本。A proposed agent interface can store current hypotheses, unresolved dependencies, and resolved references with provenance, then prepend them to the next source material. Keep the source and distinguish hypotheses from facts. A dependency task might record which edges require checking before rereading the edge list, rather than promote a guessed ancestor to a confirmed parent. This is a proposed design, not a paper result.Agentでは仮説、未検証依存、解決した参照を出典付きTに整理し、次の資料の前に置けます。資料を残し、仮説と事実を分けます。依存グラフなら確認すべき辺を記録して実際のリストを再読し、推測した祖先を直接の親と断定しません。これは設計提案で、論文の実測例ではありません。

实验固定任务、工具状态和可用证据,设无反馈重试、同内容后置、同内容前置、等长度摘要四组;把生成 T 的全部成本计入,并记录错误线索是否被纠正、工具执行成功率及最终任务验收。这样才能判断收益来自状态质量、位置、额外预算,还是把答案提前泄露给模型。Hold task, tool state, and evidence fixed. Compare feedback-free retries, identical appended feedback, identical prepended feedback, and a length-matched summary. Count the cost of constructing T and measure correction of false clues, tool success, and final acceptance. This separates state quality, placement, extra budget, and answer leakage.課題、ツール状態、証拠を固定し、無フィードバック再試行、同内容後置、同内容前置、同長要約を比較します。T生成費用、誤った手がかりの修正、ツール成功、最終受入れを測れば、状態品質、配置、追加予算、回答漏洩を切り分けられます。

Trace as State · paper v1

延伸阅读Further reading参考資料

图源与文字Figures and text図と本文のソース

三语正文与图结构 · JSONTrilingual text and diagram structure · JSON3言語の本文と図の構造 · JSON

放大的流程图