用语义变化判断何时停止大模型迭代,省token又不丢质量。
Semantic Early-Stopping for Iterative LLM Agent Loops

- 根据草稿语义变化和质量提升情况自动终止迭代,不再死守最大轮数。
- 在HotpotQA上减少38%的计算消耗,质量几乎不变(Δ-IS=-0.004)。
- 适合追求效率的LLM应用,尤其在多跳问答等复杂任务中效果显著。
多代理大型语言模型循环(如撰写者与评论者协作)通常以固定轮数上限终止,但这无法判断答案是否仍在改进,导致简单问题浪费资源,复杂问题提前截断。本文提出语义早停:当连续草稿的嵌入向量语义变化趋缓(余弦距离+耐心窗口)且质量无提升时停止。贡献有三:一、提供严谨理论基础,证明终止确定性与良定义性,将距离收敛视为可验证假设而非错误宣称的巴拿赫收缩;二、设计高效评估协议:仅生成一次完整轨迹,复用所有草稿并缓存所有判别调用,实现低开销的严格对比,区分操作令牌与评估令牌;三、在多跳检索增强问答(HotpotQA)上的实证研究显示,在60个测试题上,无需裁判的语义早停使操作令牌减少38%,质量持平(Δ-IS = -0.004, p = 0.81),而带质量门控的完整版本因每轮判别成本过高反而不利。一个理想选择最优轮次的“预言机”比所有实际策略高出+0.115信息得分(p ~ 4e-11),揭示问题本质已从“何时停止”转向“哪一轮最好”。
原文摘要 · Abstract (English)
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).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。