阶段重放差异随KV缓存而变:固定前缀精度控制与双向缓存移植 Stage-Replay Divergence Follows the KV Cache: Fixed-Prefix Precision Controls and Bidirectional Cache Transplantation 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-07-30
👁️ 预览文献
💡 AI 中文简介
研究质疑了阶段重放诊断中的一个假设:用相同token重新预填充是否等同于从原始解码器状态继续。作者在Qwen2.5衍生系统上做了200项配对实验,比较保留的实时缓存与一次性预填充。结果发现BF16下两者在166个后缀和20个正确性标签上存在差异,但准确率仅差1个百分点;FP32下则无解码差异。双向移植全部48层KV缓存后,所有测试的差异续写都跟随其缓存供体。表明KV缓存是差异轨迹的因果充分载体,数值精度调节其行为表达。
领域自然语言处理 / 大语言模型推理与可解释性
适合谁读需要一定专业背景(了解Transformer解码、KV缓存、浮点精度)
核心贡献1. 证明相同token的重新预填充与保留实时缓存在BF16下会产生不同的续写轨迹,挑战了阶段重放诊断的等价性假设;2. 通过双向KV缓存移植实验,证明边界KV缓存是差异轨迹的因果充分载体,而数值精度调节其行为表达。
关键数据BF16下166个后缀和20个正确性标签存在差异,准确率差1个百分点(配对95% CI [-3.5, +5.5]);FP32下无解码差异(95% Wilson上界1.88%);增量与保留缓存比特级一致12/12行;双向移植48层KV缓存后,主检查点24/24、后续检查点43/43的差异续写均跟随缓存供体。
推荐理由如果你关心大模型推理的可重复性和缓存机制,这篇工作用精巧的对照实验揭示了‘相同输入≠相同状态’的关键问题,值得一读。
关键词["阶段重放", "KV缓存", "数值精度", "缓存移植", "自回归解码", "可重复性"]

原文摘要

查看英文原文摘要

Stage-replay diagnostics reconstruct intermediate token prefixes and treat fresh-prefill continuation as continuation from the decoder state that originally reached the prefix. We audit that assumption at a whole reasoning-stage boundary in a Qwen2.5-derived system. A matched 200-item experiment compares retained live cache with one-shot prefill of identical integer tokens and places an exact replica on both sides. In BF16, replicas remain exact while the constructions differ on 166 suffixes and 20 correctness labels; the accuracy difference is only one point (paired 95% CI [-3.5, +5.5]). A fixed-prefix 2x2 holds all 200 token states constant while crossing construction and precision. The BF16 disagreements recur, whereas FP32 produces no decoded disagreement (95% Wilson upper bound 1.88%). A prospective bridge makes token-by-token incremental and retained live caches bit-exact on 12/12 rows; an all-200 saved-ledger audit reproduces every retained trajectory and comparison fingerprint. Bidirectional transplantation of all 48 key/value layers makes every tested divergent continuation follow its cache donor, both on a selected set at the primary checkpoint (24/24) and an outcome-blind replication at a later checkpoint (43/43). Exact-token replay can therefore be repeatable without preserving live-state fidelity. On the tested states, boundary K/V cache is a causally sufficient carrier of the divergent trajectory, while numerical precision moderates its behavioral expression.