通过调节激活幅度提升大模型工具调用准确性,避免错误修复导致新问题。
Amplitude-Only FFN Intervention for Tool-Structured LLM Inference Method: Gated Evaluation Protocol, and Cross-Model Empirical Results
- 仅调节前馈网络激活强度,不改变权重方向,降低干预副作用。
- 在Qwen3.5-9B上工具调用准确率提升4.27个百分点,部分接口提升超7.6点。
- 提出新型评估协议,可精准区分修复、错误和保持结果,适合调试工具调用模型。
大型语言模型越来越多地作为工具使用代理运行,微小的格式、参数或函数调用错误即可导致本应合理的回复失效。本文研究推理阶段前馈网络(FFN)干预,以在不重新训练模型权重的情况下改善结构化输出。先前的项目特定方法——正交残差投影(ORP)虽揭示了敏感的SwiGLU FFN位置及非单调能量效应,但其方向反转操作在关键诊断中修复少于错误。为此,我们提出幅度门控(AG),保留预训练FFN权重方向,仅调节解码过程中的激活幅度。AG将候选生成、排序与接受/回退决策分离。同时引入逐样本修复-伤害评估(PFHE),以配对报告形式补充任务原生指标,记录修复、伤害、保持正确与保持错误案例。在唯一通过源对齐审计的跨位置联合数据集上,探索性离线混合选择器将Qwen3.5-9B工具路径的微平均准确率从38.66%提升至42.92%(+4.27个百分点);两个Hermes函数调用端点分别提升+7.64和+7.62点。相同输出格式的PFHE记录显示,在2,556个样本中,共48次修复、26次伤害、294次保持正确、2,188次保持错误,原生与严格效应的配对自助区间均为正。对Qwen3-8B和Qwen2.5-7B的分组五折随机森林诊断表明,非线性排序信号较弱,干预强制执行,缺乏基线回退与配对不确定性,且不能作为部署证据。结果支持模型与任务特定的选择并配合严格回退,而非通用的AG开关。
原文摘要 · Abstract (English)
Large language models increasingly operate as tool-using agents, where small format, argument, or function-call errors can invalidate otherwise plausible responses. We study inference-time feed-forward network (FFN) intervention as a way to improve structured outputs without retraining model weights. An earlier project-specific approach, Orthogonal Residual Projection (ORP), exposed sensitive SwiGLU FFN sites and non-monotonic energy effects, but its direction-changing operation produced more regressions than repairs in a key diagnostic. We therefore propose Amplitude Gating (AG), which preserves pretrained FFN weight directions and modulates activation magnitudes during decoding. AG separates candidate generation, ranking, and a prospective acceptance/fallback decision. We also introduce Per-Sample Fix-Harm Evaluation (PFHE), a paired reporting protocol that complements native task metrics with fixes, harms, preserved-correct cases, and preserved-wrong cases. On the only cross-position union that passes source-alignment audit, an exploratory offline mixed selector raises the descriptive heterogeneous-scorer Qwen3.5-9B tool-route micro-average from 38.66% to 42.92% (+4.27 percentage points); two Hermes function-call endpoints improve by +7.64 and +7.62 points. The same-output PFHE-format view records 48 fixes, 26 harms, 294 preserved-correct cases, and 2,188 preserved-wrong cases over 2,556 units, with positive paired bootstrap intervals for native and strict effects. Protocol-separated Qwen3-8B and Qwen2.5-7B analyses retain oracle headroom but no positive train-selected fixed tool route. A grouped five-fold RF diagnostic suggests weak nonlinear ranking signal but forces intervention, lacks baseline fallback and paired uncertainty, and is not deployment evidence. The results support model- and task-specific selection with strict fallback, not a universal AG switch.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。