arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.27009cs.AIcs.LGcs.MA
收藏

迭代式LLM智能体循环的语义早停

Semantic Early-Stopping for Iterative LLM Agent Loops

Sahil Shrivastava

AI总结:

针对多智能体LLM循环中固定迭代次数终止的低效问题,提出基于语义相似度和质量评估的早停机制,理论证明终止确定性,实验表明无质量门控的语义早停在HotpotQA上节省38%操作token且性能持平。

摘要:

多智能体大语言模型(LLM)循环,例如一个起草者(Writer)和一个修订者(Critic),几乎总是通过固定的迭代上限(max_iterations)终止。这是一种语法层面的终止开关:它无法判断答案是否仍在改进,因此对简单输入会过度消耗token,而对困难输入则过早截断。我们研究语义早停:当连续草稿的嵌入在意义上停止变化(基于余弦距离和耐心窗口)且答案的测量质量停止改进时,循环终止。我们的工作有三项贡献。首先,一个严谨的理论基础:我们证明了确定性终止和良定义性,并通过机器验证这些断言,同时将距离序列的收敛性视为经验验证的猜想,而非(先前被过度声称的)巴拿赫压缩。其次,一个评估者高效的评估协议:我们为每个问题生成一次完整轨迹,在每个停止策略下重放相同的草稿,并缓存每次LLM评估调用,从而以低成本实现严格配对的效率与质量比较;我们进一步将操作token(由策略计费)与评估token(测量工具)分离。第三,在多跳检索增强问答(HotpotQA)上的实证研究。在60个问题的测试集上,无评估者的语义停止器相对于固定迭代上限在质量持平的情况下(Delta-IS = -0.004, p = 0.81)减少了38%的操作token,而完整的质量门控变体则适得其反,因为其每轮评估主导了成本。一个选择最佳轮次的神谕(oracle)比所有实际策略获得+0.115的信息得分(p ~ 4e-11),将问题从“何时停止”(容易)重新定义为“哪一轮最佳”(开放)。

英文摘要:

Multi-agent large language model (LLM) loops, for example a Writer that drafts and a Critic that revises, are almost always terminated by a fixed iteration cap (max_iterations). This is a syntactic kill-switch: it is blind to whether the answer is still improving, so it over-spends tokens on easy inputs and truncates hard ones. We study semantic early-stopping: the loop halts when consecutive draft embeddings stop changing in meaning (cosine distance with a patience window) and the answer's measured quality stops improving. Our work makes three contributions. First, an honest theoretical footing: we prove deterministic termination and well-definedness and machine-check these claims, while treating the convergence of the distance sequence as an empirically tested conjecture rather than a (previously over-claimed) Banach contraction. Second, a judge-efficient evaluation protocol: we generate each question's full trajectory once, replay every stopping policy over the identical drafts, and cache every LLM-judge call, yielding a strictly paired efficiency-versus-quality comparison at low cost; we further separate operational tokens (charged to a policy) from evaluation tokens (a measurement instrument). Third, an empirical study on multi-hop retrieval-augmented question answering (HotpotQA). On the 60-question test split, a judge-free semantic stopper reduces operational tokens by 38% relative to max_iterations at parity quality (Delta-IS = -0.004, p = 0.81), whereas the full quality-gated variant is counter-productive because its per-round judging dominates cost. An oracle that selects the best round attains +0.115 Information Score over every practical policy (p ~ 4e-11), reframing the problem from "when to stop" (easy) to "which round is best" (open).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑