Amplitude-Only FFN Intervention for Tool-Structured LLM Inference Method: Gated Evaluation Protocol, and Cross-Model Empirical Results
作者: Sheng Xu, Boyuan Huang, Ke Jia, Jiadun Zhu, Zhen Chen
分类: cs.CL
发布日期: 2026-07-13
备注: 28 pages, 15 figures
💡 一句话要点
提出幅度仅干预方法以优化工具结构化LLM推理
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 推理优化 幅度门控 工具结构化 前馈网络干预 性能提升 模型评估 智能助手
📋 核心要点
- 现有方法在处理工具结构化任务时,容易因小错误导致输出失效,影响模型的可靠性。
- 本文提出幅度门控(AG)方法,通过调节激活幅度而非改变权重方向,来改善模型输出的结构化质量。
- 实验结果显示,AG在多个模型上均有正向提升,尤其在工具结构化任务上表现突出,性能提升显著。
📝 摘要(中文)
大型语言模型越来越多地作为工具使用代理进行操作,其中小格式、参数或函数调用错误可能使得原本合理的响应失效。本文研究了一种推理时的前馈网络(FFN)干预方法,以在不重新训练模型权重的情况下改善结构化输出。我们提出了幅度门控(AG)作为一种非破坏性替代方案,保留预训练FFN权重方向,仅在生成过程中调节激活幅度。通过在多个模型上进行实验,AG在工具结构化任务上表现出显著的性能提升。具体而言,在Qwen3.5-9B模型上,学习门的引入使得工具/结构化/代理性能从38.66%提升至42.92%。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在推理过程中因小错误导致输出失效的问题。现有的干预方法如正交残差投影(ORP)虽然尝试修复,但往往造成更多的损害。
核心思路:论文提出的幅度门控(AG)方法通过保持预训练FFN权重方向,仅调节激活幅度,避免了对模型权重的破坏,从而实现更有效的干预。
技术框架:整体架构包括细粒度的干预系统,涵盖P1/P2/P3及分支特定的P1s/P2a/P2b位置。评估协议则将组合-神谕头室与固定配置和学习门分开,采用任务感知指标进行样本级别的评估。
关键创新:AG方法的核心创新在于其非破坏性干预机制,能够在不改变模型权重的情况下,提升模型在工具结构化任务上的表现。这与传统方法的本质区别在于对权重的保护。
关键设计:在设计上,AG方法通过定义不同的干预位置和评估标准,确保了干预的有效性和可控性。具体的参数设置和损失函数设计也经过精心调整,以适应不同模型和任务的需求。
🖼️ 关键图片
📊 实验亮点
实验结果显示,幅度门控(AG)在Qwen3.5-9B模型上将工具/结构化/代理性能从38.66%提升至42.92%,提升幅度达到4.27个百分点。在Qwen3-8B模型中,Hermes JSON模式的性能提升更是达到11.36个百分点,显示出AG在工具结构化任务中的显著效果。
🎯 应用场景
该研究的潜在应用领域包括智能助手、自动化工具和其他需要高可靠性输出的语言模型应用。通过优化工具结构化任务的推理能力,AG方法能够提升模型在实际应用中的表现,增强用户体验。未来,该方法可能会在更广泛的模型和任务中得到应用,推动语言模型的安全性和可靠性。
📄 摘要(原文)
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 for improving structured outputs without retraining model weights. Our project began with Orthogonal Residual Projection (ORP), a direction-changing repair attempt that revealed sensitive SwiGLU FFN intervention sites but often caused more harm than fixes. We therefore propose Amplitude Gating (AG), a non-destructive alternative that preserves pretrained FFN weight directions and modulates only activation magnitudes during generation. We define a fine-grained intervention system spanning P1/P2/P3 and branch-specific P1s/P2a/P2b sites, and introduce an evaluation protocol that separates combination-oracle headroom from fixed configurations and learned gates, enforces sample-level accounting, and uses task-aware metrics for binary and partial-credit datasets. Across Qwen3.5-9B, Qwen3-8B, and Qwen2.5-7B, AG is weakly positive in aggregate but strongest on tool-structured tasks. On Qwen3.5-9B, a category-level learned gate improves tool/structured/agentic performance from 38.66% to 42.92% (+4.27 percentage points), with Hermes function-call tasks reaching about +7.6 points. On Qwen3-8B, Hermes JSON mode improves by +11.36 points. Qwen2.5-7B retains oracle headroom but current learned gates fail to capture it, showing that deployment requires model- and category-specific routing. Comparisons of entropy AG with Newton-Schulz-windowed AG show that neither family is uniformly dominant. These results identify tool-structured inference as the most credible first target for safe FFN-level inference optimization, while prospective online validation and broader cross-model evaluation remain necessary.