Long-Horizon State Tracking in LLMs: Executing MD5 through a Deep Sequence of Dependent Tool Calls

Long-Horizon State Tracking in LLMs: Executing MD5 through a Deep Sequence of Dependent Tool Calls

大语言模型中的长程状态追踪:通过深度依赖工具调用序列执行 MD5

Abstract: Long-horizon tasks remain uncommon in large language model (LLM) evaluation, and for a reason: when each step depends on the last, per-step accuracy that looks excellent in isolation decays catastrophically, as errors cascade and the end-to-end failure probability grows sharply with length. 摘要: 长程任务在大语言模型(LLM)评估中并不常见,原因在于:当每一步都依赖于前一步时,虽然单步准确率看起来很出色,但随着错误不断累积,整体准确率会发生灾难性衰减,且端到端的失败概率会随任务长度急剧增加。

Existing agentic benchmarks report end-to-end success but confound this state-tracking difficulty with instruction interpretation, give no control group that isolates it, and are vulnerable to shortcuts such as a hallucinated final answer, so they cannot say why a long run fails. 现有的智能体基准测试虽然报告了端到端的成功率,但往往将这种状态追踪的难度与指令理解混为一谈,缺乏隔离该变量的对照组,且容易受到诸如“幻觉生成最终答案”等捷径的影响,因此无法准确分析长程任务失败的原因。

Whether an LLM can carry exact intermediate state across many tool calls at all is itself not well established. We test this cleanly by having the model compute a cryptographic hash, MD5, step by step: a sequence of 196 dependent tool calls over 64 rounds while it carries four 32-bit words (a,b,c,d) in its own context from one call to the next. 大语言模型是否能够跨越多次工具调用准确地传递中间状态,目前尚无定论。我们通过让模型逐步计算加密哈希算法 MD5 来进行纯净测试:在 64 轮中执行 196 次依赖性工具调用,同时要求模型在上下文窗口中从一次调用到下一次调用持续携带四个 32 位字 (a, b, c, d)。

Interpretation is trivial and, because we implement MD5 from scratch (RFC 1321), we align every call to the ground-truth trace and check the digest to the bit, so any failure is pure bookkeeping. 由于指令解释非常简单,且我们是从零开始实现 MD5(遵循 RFC 1321 标准),我们将每一次调用与真实轨迹对齐,并逐位校验摘要,因此任何失败都纯粹归因于状态记录(bookkeeping)的错误。

gpt-oss-120b, a mixture-of-experts model with only ~5.5B active parameters per token, at temperature 0 with a short fixed prompt, carries the full state across all 196 calls and returns the correct digest on a majority of completed runs. gpt-oss-120b 是一款混合专家模型(MoE),每个 token 的活跃参数仅约 55 亿。在温度系数为 0 且使用简短固定提示词的情况下,该模型能够跨越全部 196 次调用完整携带状态,并在大多数已完成的运行中返回正确的摘要。

In the strongest setting we replace every primitive tool with a second LLM, so a driver and a worker compute the whole hash from scratch with no exact-arithmetic oracle in the loop. 在最严苛的测试设置中,我们将每一个原始工具替换为第二个大语言模型,即由一个“驱动模型”和一个“工作模型”从零开始计算整个哈希值,过程中不依赖任何精确算术预言机(oracle)。

Two ingredients decide success and neither changes the weights: keeping the model’s own reasoning in its context each turn, and voting over a thinking-enabled worker to remove its modular-arithmetic slips. We localize the residual failures by origin, separating state-carrying from arithmetic and from serving. 决定成功的两个关键因素且无需修改模型权重:一是在每一轮中将模型自身的推理过程保留在上下文中;二是通过对具备思考能力的“工作模型”进行投票,以消除其在模运算中的失误。我们根据来源定位了剩余的失败案例,将状态传递错误与算术错误及服务错误区分开来。