arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.07889cs.LGcs.AIcs.CL
收藏

应变连贯性:编码代理执行轨迹中的故障前信号

Strained Coherence: A Pre-Failure Signal in Coding Agent Execution Trajectories

Marut Pandya, Kasey Zhang, Baiqing Lyu

AI总结:

提出“应变连贯性”模式,即编码代理识别到问题但仍按原计划行动,通过构建Claude Sonnet 4.6检测器在44条轨迹上实现94%故障预测精度,优于基线方法。

摘要:

基于LLM的编码代理有时会承认自身推理中的问题,但仍继续执行。我们将这种模式称为应变连贯性:一种与安全相关的故障模式,其中代理拥有应改变其行为的信息,陈述了该信息,却仍违背它行动。该模式与口头奖励黑客行为重叠,即代理指出任务代理与底层目标之间的冲突,却仍优化代理。我们给出操作性定义,构建一个Claude Sonnet 4.6评判器,读取完整轨迹并标记该模式出现的片段,并使用Qwen3.5-35B-A3B骨干在44条Terminal-bench-2轨迹上评估。标记轨迹的失败率为94%,而未标记轨迹为46%(47个百分点的差距,Fisher精确检验p=0.003;排除三个提示嵌入示例后为46个百分点,p=0.006)。在匹配选择性下,检测器达到94%的精确度,而词汇话语标记基线为88%;两种方法的10条轨迹交集具有100%的失败率(Clopper-Pearson 95%置信区间[69%, 100%])。我们在Gemma4-31B上使用43条轨迹进行复制:整体信号方向一致但不显著(20个百分点差距,p=0.31),衰减主要由13条零思考内容的轨迹驱动,其中检测器没有可分析的基础。在Gemma的高冗长度三分位中,差距为+30个百分点;在Qwen的中等和高冗长度三分位中,差距各为+40个百分点。两个模型的首次标记出现在轨迹经过时间的中位数83-84%处,且二元标记在软化显式冲突标记的释义中保持不变(8/8条轨迹)。与单变量预测器不同,检测器输出可解释的跨度级输出——引用的承认、引用的行动和类型化的冲突——显示代理看到并忽略了什么。

英文摘要:

LLM-based coding agents sometimes acknowledge a problem in their own reasoning and then proceed anyway. We call this pattern strained coherence: a safety-relevant failure mode in which an agent has information that should change its behavior, states that information, and still acts against it. The pattern overlaps with verbalized reward hacking, where an agent names a tension between a task proxy and the underlying goal yet optimizes the proxy anyway. We give an operational definition, build a Claude Sonnet 4.6 judge that reads full trajectories and flags spans where the pattern occurs, and evaluate it on 44 Terminal-bench-2 trajectories using a Qwen3.5-35B-A3B backbone. Flagged trajectories fail 94% of the time versus 46% for unflagged trajectories (47-point gap, Fisher's exact p = 0.003; 46 points after excluding three prompt-embedded examples, p = 0.006). At matched selectivity, the detector reaches 94% precision versus 88% for a lexical discourse-marker baseline; the 10-trajectory intersection of the two methods has a 100% failure rate (Clopper-Pearson 95% CI [69%, 100%]). We replicate on Gemma4-31B with 43 trajectories: the overall signal is directionally consistent but not significant (20-point gap, p = 0.31), with attenuation driven largely by 13 trajectories with zero think content, where the detector has no substrate to analyze. In the high-verbosity Gemma tertile, the gap is +30 points; in the mid- and high-verbosity Qwen tertiles, it is +40 points each. The first flag appears at a median of 83-84% of elapsed trajectory time across both models, and the binary flag survives paraphrases that soften explicit conflict markers (8/8 trajectories). Unlike univariate predictors, the detector emits interpretable span-level output -- quoted acknowledgment, quoted action, and typed conflict -- showing what the agent saw and ignored.

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

↑