arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.03616cs.CL
收藏

格式税

The Format Tax

UC San Diego(加州大学圣地亚哥分校)

Ivan Yee Lee, Loris D'Antoni, Taylor Berg-Kirkpatrick

AI总结:

本文发现要求大语言模型以JSON等结构化形式输出会显著降低推理和写作性能,提出分离推理与格式生成的方法可恢复大部分损失的准确性。

摘要:

让大型语言模型以JSON形式响应应是一种格式选择,而非能力税。然而我们发现结构化输出要求——JSON、XML、LaTeX、Markdown——在开放权重模型中显著降低了推理和写作性能。研究回应集中在受限解码,但采样偏差仅解释了部分降质。主要成本出现在提示中:要求格式的指令本身导致了大部分准确性损失,在应用任何解码约束之前。这一诊断指出了一个简单的原则:将推理与格式分离。无论是先生成自由形式再进行第二次格式化,还是在单次生成中启用扩展思考,将两者分离显著恢复了失去的准确性。在六个开放权重模型、四个API模型、四种格式以及涵盖数学、科学、逻辑和写作的任务中,分离恢复了大部分损失的准确性。值得注意的是,大多数最近的封闭权重模型显示几乎没有格式税,表明问题不在于结构化生成本身,而是一个当前开放权重模型尚未解决的差距。代码可在https://github.com/ivnle/the-format-tax获得。

英文摘要:

Asking a large language model to respond in JSON should be a formatting choice, not a capability tax. Yet we find that structured output requirements -- JSON, XML, LaTeX, Markdown -- substantially degrade reasoning and writing performance across open-weight models. The research response has focused on constrained decoding, but sampling bias accounts for only a fraction of the degradation. The dominant cost enters at the prompt: format-requesting instructions alone cause most of the accuracy loss, before any decoder constraint is applied. This diagnosis points to a simple principle: decouple reasoning from formatting. Whether by generating freeform first and reformatting in a second pass, or by enabling extended thinking within a single generation, separating the two concerns substantially recovers lost accuracy. Across six open-weight models, four API models, four formats, and tasks spanning math, science, logic, and writing, decoupling recovers most lost accuracy. Notably, most recent closed-weight models show little to no format tax, suggesting the problem is not inherent to structured generation but a gap that current open-weight models have yet to close. Code is available at https://github.com/ivnle/the-format-tax.

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

↑