arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2406.07735cs.CLcs.LG

REAL Sampling:通过渐近熵提升开放式生成的事实性与多样性

REAL Sampling: Boosting Factuality and Diversity of Open-Ended Generation via Asymptotic Entropy

Amazon AGI Foundations(亚马逊AGI基础研究部)

Haw-Shiuan Chang, Nanyun Peng, Mohit Bansal, Anil Ramakrishna, Tagyoung Chung

AI总结:

本文提出 REAL 采样,利用不同规模 LLM 外推渐近熵并通过 THF 模型预测幻觉风险,以自适应调整 top-p 阈值,从而同时提升开放式生成的事实性与多样性。

摘要:

大型语言模型(LLM)的解码方法通常难以在确保事实性与保持多样性之间取得平衡。例如,nucleus(top-p)采样中较高的 p 阈值会提高多样性,但会降低事实性,反之亦然。本文提出 REAL(Residual Entropy from Asymptotic Line,来自渐近线的残差熵)采样,这是一种通过预测自适应 p 阈值,在事实性和多样性方面均优于 nucleus 采样的解码方法。具体而言,REAL 采样会逐步预测 LLM 产生幻觉的可能性,并在 LLM 可能产生幻觉时降低 p 阈值;否则,REAL 采样会提高 p 阈值以增强多样性。为了在无监督条件下预测逐步幻觉可能性,我们构建了 Token 级幻觉预测(Token-level Hallucination Forecasting,THF)模型,通过外推一系列不同规模 LLM 的下一 token 熵,预测下一 token 的渐近熵(即固有不确定性)。如果某个 LLM 的熵高于渐近熵(即该 LLM 比其应有的状态更不确定),THF 模型会预测较高的幻觉风险,从而使 REAL 采样采用较低的 p 阈值。在 FactualityPrompts 基准测试中,我们证明,基于 70M THF 模型的 REAL 采样能够同时显著改善 7B LLM 的事实性和多样性,这一结论由基于检索的指标和人工评估共同判定。与对比解码结合后,REAL 采样优于 9 种采样方法,所生成文本比贪心采样更具事实性,并比 p=0.5 的 nucleus 采样更具多样性。此外,预测得到的渐近熵也是用于幻觉检测任务的有效无监督信号。

英文摘要:

Decoding methods for large language models (LLMs) usually struggle with the tradeoff between ensuring factuality and maintaining diversity. For example, a higher p threshold in the nucleus (top-p) sampling increases the diversity but decreases the factuality, and vice versa. In this paper, we propose REAL (Residual Entropy from Asymptotic Line) sampling, a decoding method that achieves improved factuality and diversity over nucleus sampling by predicting an adaptive threshold of $p$. Specifically, REAL sampling predicts the step-wise likelihood of an LLM to hallucinate, and lowers the p threshold when an LLM is likely to hallucinate. Otherwise, REAL sampling increases the p threshold to boost the diversity. To predict the step-wise hallucination likelihood without supervision, we construct a Token-level Hallucination Forecasting (THF) model to predict the asymptotic entropy (i.e., inherent uncertainty) of the next token by extrapolating the next-token entropies from a series of LLMs with different sizes. If a LLM's entropy is higher than the asymptotic entropy (i.e., the LLM is more uncertain than it should be), the THF model predicts a high hallucination hazard, which leads to a lower p threshold in REAL sampling. In the FactualityPrompts benchmark, we demonstrate that REAL sampling based on a 70M THF model can substantially improve the factuality and diversity of 7B LLMs simultaneously, judged by both retrieval-based metrics and human evaluation. After combined with contrastive decoding, REAL sampling outperforms 9 sampling methods, and generates texts that are more factual than the greedy sampling and more diverse than the nucleus sampling with $p=0.5$. Furthermore, the predicted asymptotic entropy is also a useful unsupervised signal for hallucination detection tasks.

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

↑