让大模型提前判断自己能否回答问题,节省计算成本。
Query-Level Uncertainty in Large Language Models
- 通过层与词元间的自评估,无须训练即可估算回答不确定性。
- 在事实问答和数学推理任务中,信心判断准确率高于基线方法。
- 可降低检索增强生成等场景的推理开销,适合追求效率的部署场景。
大型语言模型(LLMs)识别自身知识边界的能力至关重要,能区分出可自信回答的问题与超出能力范围的问题。这种认知使模型可进行自适应推理,如调用检索增强生成(RAG)、进行深度思考或主动回避回答,从而提升AI系统的效率与可信度。本文提出一种名为Internal Confidence的新方法,通过查询级不确定性检测,在生成任何标记前预估模型是否具备回答能力,避免无效生成开销。该方法无需训练,利用模型内部多层与词元间的自评估提供可靠的不确定性信号。在事实问答与数学推理任务上的实证研究表明,其信心判断质量优于多个基线方法,且计算开销更低。此外,在RAG与模型级联等自适应推理场景中,该方法有效降低推理成本,同时保持整体性能。
原文摘要 · Abstract (English)
It is important for Large Language Models (LLMs) to be aware of the boundary of their knowledge, distinguishing queries they can confidently answer from those that lie beyond their capabilities. Such awareness enables models to perform adaptive inference, such as invoking retrieval-augmented generation (RAG), engaging in slow and deep thinking, or abstaining from answering when appropriate. These mechanisms are key to developing efficient and trustworthy AI. In this work, we propose a method to detect knowledge boundaries via Query-Level Uncertainty, which estimates if a model is capable of answering a given query before generating any tokens, thus avoiding the generation cost. To this end, we propose a novel, training-free method called Internal Confidence, which leverages self-evaluations across layers and tokens to provide a reliable signal of uncertainty. Empirical studies on both factual question answering and mathematical reasoning tasks demonstrate that our Internal Confidence outperforms several baselines in quality of confidence while being computationally cheaper. Furthermore, we demonstrate its benefits in adaptive inference settings, showing that for RAG and model cascading it reduces inference costs while preserving overall performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。