Large language models (LLMs) exhibit impressive natural language capabilities but suffer from hallucination -- generating content ungrounded in the realities of training data. Recent work has focused on decoding techniques to improve factuality during inference by leveraging LLMs' hierarchical representation of factual knowledge, manipulating the predicted distributions at inference time. Current state-of-the-art approaches refine decoding by contrasting early-exit distributions from a lower layer with the final layer to exploit information related to factuality within the model forward procedure. However, such methods often assume the final layer is the most reliable and the lower layer selection process depends on it. In this work, we first propose extrapolation of critical token probabilities beyond the last layer for more accurate contrasting. We additionally employ layer-wise entropy-guided lower layer selection, decoupling the selection process from the final layer. Experiments demonstrate strong performance - surpassing state-of-the-art on multiple different datasets by large margins. Analyses show different kinds of prompts respond to different selection strategies.
翻译:大型语言模型虽展现出卓越的自然语言能力,却存在生成脱离训练数据事实的“幻觉”问题。近期研究聚焦于解码技术,通过利用语言模型对事实知识的分层表征,在推理阶段操控预测分布以提升事实准确性。当前最先进的方法通过对比模型前向过程中低层与末层输出分布,利用与事实性相关的信息改进解码过程。然而这类方法常默认末层最可靠,且低层选择依赖末层结果。本文首次提出对关键标记概率进行跨层外推以实现更精准的对比,同时引入基于层间熵的引导式低层选择机制,使选择过程脱离对末层的依赖。实验表明,本方法在多组数据集上以显著优势超越现有最优水平。分析揭示,不同类型提示对应差异化的选择策略。