开放权重LLM中的约束代价:结构化输出约束下工具调用抑制的实证研究
阅读原文· arxiv.org当同时启用Tool Calling与JSON Schema约束时,多个开放权重LLM出现工具调用抑制(Tool Suppression)。控制实验在多模型与部署设置下复现了该现象。分析表明,JSON Schema约束被编译成基于语法的token掩码,导致工具调用token在解码中不可达。研究提出约束优先级反转(CPI)假设,并设计透明两遍执行(Transparent Two-Pass Execution)推理策略,将工具执行与模式约束响应生成解耦,无需重训练即可恢复工具调用并维持结构化输出。结果表明,单独评估工具使用与结构化输出可能掩盖生产Agent系统的可靠性问题。
Tool Calling and Structured Output are two core capabilities of modern Agent systems, yet their interaction under joint deployment conditions remains insufficiently understood. This paper reports a reproducible phenomenon observed in a production Agent system: when Tool Calling and JSON Schema constraints are simultaneously enabled, multiple open-weight models cease invoking tools despite maintaining high schema compliance. We refer to this behavior as Tool Suppression. Through controlled experiments across multiple model families and deployment settings, we consistently reproduce Tool Suppression under joint constraints, while tool execution and schema compliance remain functional when evaluated independently. Further analysis reveals that JSON Schema constraints are compiled into grammar-based token masks, causing tool-call tokens to become unreachable during decoding. This provides an implementation-level explanation for the observed behavior. To interpret the phenomenon, we formulate the Constraint Priority Inversion (CPI) hypothesis, which suggests that schema satisfaction may dominate action-selection behavior under multiple simultaneous constraints. We present CPI as a behavioral hypothesis consistent with the observed evidence rather than a verified internal mechanism. To mitigate the problem, we propose Transparent Two-Pass Execution, an inference-time strategy that decouples tool execution from schema-constrained response generation. Experimental results show that this approach restores tool invocation while preserving structured output guarantees without requiring model retraining. These findings suggest that evaluating tool use and structured output separately may overlook important reliability issues in production Agent systems. Code, data, and docs will be released at https://github.com/Fzsama/Constrain-Tax-26-06.git.