arXiv:2503.05318cs.CLcs.AI2025-03ICLR被引 14

让语言模型生成时识别不确定,避免幻觉输出。

Uncertainty-Aware Decoding with Minimum Bayes Risk

  • 用后验概率改进最小贝叶斯风险解码,显式建模模型不确定性。
  • 在多个数据集上提升生成质量,且无需额外计算开销。
  • 适合对可靠性要求高的场景,如医疗、法律问答。

尽管当前语言模型在多数场景表现优异,但仍会偶尔生成幻觉文本等不良输出。虽然这类行为与模型不确定性有关,但缺乏在生成过程中主动考虑不确定性的方法。本文将最小贝叶斯风险(MBR)解码扩展为一种原则性不确定感知解码方法:通过在计算期望风险时引入模型参数的后验分布,显式建模不确定性。该方法不仅有助于选择更优输出,还能判断何时应放弃生成,提升可靠性。实验表明,学习后验分布的方法中,预测多样性越高性能越好。所提方法无需额外计算开销,代码已公开。

原文摘要 · Abstract (English)

Despite their outstanding performance in the majority of scenarios, contemporary language models still occasionally generate undesirable outputs, for example, hallucinated text. While such behaviors have previously been linked to uncertainty, there is a notable lack of methods that actively consider uncertainty during text generation. In this work, we show how Minimum Bayes Risk (MBR) decoding, which selects model generations according to an expected risk, can be generalized into a principled uncertainty-aware decoding method. In short, we account for model uncertainty during decoding by incorporating a posterior over model parameters into MBR's computation of expected risk. We show that this modified expected risk is useful for both choosing outputs and deciding when to abstain from generation and can provide improvements without incurring overhead. We benchmark different methods for learning posteriors and show that performance improves with prediction diversity. We release our code publicly.

语言模型不确定性解码优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。