arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.09408cs.CLcs.AI
收藏

Token Constraint Decoding 提升大型语言模型问答的鲁棒性

Token Constraint Decoding Improves Robustness on Question Answering for Large Language Models

Department of Computer Science and Information Engineering(计算机科学与信息工程系);National Taiwan University of Science and Technology(台湾科技大学);Bachelor’s Program in Computer Science(计算机科学学士班);University of London(伦敦大学)

Jui-Ming Yao, Hao-Yuan Chen, Zi-Xian Tang, Bing-Jia Tan, Sheng-Wei Peng, Bing-Cheng Xie, Shun-Feng Su

AI总结:

针对 LLM 在选择题问答中易受轻微输入扰动影响的问题,提出推理时方法 TCD,通过约束 token 级预测对齐并结合 PE 修复,在多个基准上显著恢复噪声下性能。

摘要:

大型语言模型(LLM)在多项选择题问答(MCQA)基准上已展现出令人瞩目的性能,但它们仍极易受到轻微输入扰动的影响。本文提出并评估了 Token Constraint Decoding(TCD)。这一简单而有效的推理时算法通过强制 token 级预测之间的对齐,增强噪声环境下的鲁棒性。通过在 CommonsenseQA、MMLU 和 MMLU-Pro 上的大量实验,我们表明 TCD(尤其与 prompt engineering(PE)修复相结合时)能显著恢复因输入噪声而下降的性能,为 Gemma3 1B 等较弱模型带来最高 +39% 的绝对增益。惩罚扫描分析进一步揭示,TCD 隐式地正则化过度自信的输出,不同模型需要不同的惩罚调度以最大化恢复力。我们的研究结果确立 TCD 是一种实用且模型无关的方法,可在现实世界缺陷下提升推理稳定性,并为在安全关键或面向用户的应用中更可靠地部署 LLM 铺平道路。

英文摘要:

Large Language Models (LLMs) have demonstrated impressive performance on multiple-choice question answering (MCQA) benchmarks, yet they remain highly vulnerable to minor input perturbations. In this paper, we introduce and evaluate Token Constraint Decoding (TCD). This simple yet effective inference-time algorithm enforces alignment between token-level predictions to enhance robustness in noisy settings. Through extensive experiments on CommonsenseQA, MMLU, and MMLU-Pro, we show that TCD, especially when paired with prompt engineering (PE) fixes, significantly restores performance degraded by input noise, yielding up to +39\% absolute gains for weaker models like Gemma3 1B. Penalty sweep analyses further reveal that TCD implicitly regularizes overconfident outputs, with different models requiring distinct penalty schedules to maximize resilience. Our findings establish TCD as a practical, model-agnostic approach for improving reasoning stability under real-world imperfections and pave the way for more reliable deployment of LLMs in safety-critical or user-facing applications.

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

↑