解析、合理、错误:输出格式控制小模型语义解析中的静默错误

·

研究论文 · 2026/11/17

本文研究小型微调语义解析器中输出格式对静默错误的影响。在PIZZA基准上,对两个十亿参数以下的模型(Qwen3.5-0.8B和LFM2.5-350M)使用LoRA微调,比较同一目标树的六种无损编码(从44.3到10.9个token)。通过300次运行(5种训练池大小、5个种子)和分层自助法及Holm校正,发现单纯缩短长度无益,但用普通词语编码目标能提高准确率(Qwen上87.5% vs 85.8%精确匹配)并减少4.1倍token,同时将静默错误率降低2.3倍(Qwen)和1.8倍(LFM2)。错误分析表明增益主要来自否定处理。所有运行都学会了拒绝菜单外输入(95.9-99.0%处理率)和应用话语内自我纠正,但严格拒绝有代价:2.1-10.1%的真实订单被拒绝。

该研究揭示了输出格式这一常被忽视的设计选择对小型语义解析器可靠性的重大影响,提供了可操作的改进方案(词语编码),并量化了严格拒绝策略的代价,对实际部署有直接指导意义。

A small fine-tuned parser that emits a well-formed but wrong tree fails silently: nothing downstream can tell. We ask whether the output format, a free design choice, controls how often this happens. On the PIZZA ordering benchmark we fine-tune two sub-billion models (Qwen3.5-0.8B and LFM2.5-350M) with LoRA on six lossless encodings of the same target tree, from 44.3 down to 10.9 tokens per order, including two matched-length pairs that vary surface form at fixed length. Across 300 runs (5 training pool sizes, 5 seeds) with a hierarchical bootstrap and Holm correction fixed before the results were read, shortening alone never helps, but writing the target in ordinary words does. The word encoding is the most accurate format on both models (87.5% vs. 85.8% exact match for the native s-expression on Qwen) while emitting 4.1x fewer tokens, and it cuts the silent error rate by 2.3x on Qwen and 1.8x on LFM2, separating at every pool size. Error analysis locates much of the gain in negation. All runs also learn to refuse off-menu input (held out: 95.9-99.0% handled) and to apply in-utterance self-corrections. Strict refusal has a measured price: 2.1-10.1% of real, mostly polite, orders are refused.

阅读原文

参与讨论