模型自主决定关注何处:忠实性与自动注意力引导的结合
Model Tells Itself Where to Attend: Faithfulness Meets Automatic Attention Steering
AI总结:
针对大语言模型易受干扰、回答忠实性不足的问题,提出推理阶段无需调参的AutoPASTA方法,通过自动识别关键上下文并显式引导模型注意力,在开卷QA任务上显著提升了模型忠实性与性能。
摘要:
大语言模型(LLMs)已在各类现实任务中展现出卓越性能,但它们往往难以充分理解并有效利用输入上下文,导致生成的回答缺乏忠实性或出现幻觉。当上下文较长或包含干扰信息时,这一问题会更加突出,这类信息会分散LLMs的注意力,使其无法完整捕捉关键证据。为解决该问题,诸多研究采用提示工程帮助LLMs更忠实地利用上下文信息。例如,迭代提示法分两步突出关键信息:首先要求LLM识别上下文中的重要片段,再据此推导答案。但提示类方法仅限于在token空间内隐式突出关键信息,通常不足以完全引导模型的注意力。为更可靠地提升模型忠实性,我们提出AutoPASTA方法,该方法可自动识别关键上下文信息,并通过引导LLM的注意力分数对其进行显式突出。与提示方法类似,AutoPASTA在推理阶段应用,无需修改任何模型参数。我们在开卷问答任务上开展的实验表明,AutoPASTA能有效帮助模型掌握关键上下文信息,大幅提升模型的忠实性与性能,例如LLAMA3-70B-Instruct的平均提升幅度达7.95%。代码将公开发布于https://github.com/QingruZhang/AutoPASTA 。
英文摘要:
Large language models (LLMs) have demonstrated remarkable performance across various real-world tasks. However, they often struggle to fully comprehend and effectively utilize their input contexts, resulting in responses that are unfaithful or hallucinated. This difficulty increases for contexts that are long or contain distracting information, which can divert LLMs from fully capturing essential evidence. To address this issue, many works use prompting to help LLMs utilize contextual information more faithfully. For instance, iterative prompting highlights key information in two steps that first ask the LLM to identify important pieces of context and then derive answers accordingly. However, prompting methods are constrained to highlighting key information implicitly in token space, which is often insufficient to fully steer the model's attention. To improve model faithfulness more reliably, we propose AutoPASTA, a method that automatically identifies key contextual information and explicitly highlights it by steering an LLM's attention scores. Like prompting, AutoPASTA is applied at inference time and does not require changing any model parameters. Our experiments on open-book QA demonstrate that AutoPASTA effectively enables models to grasp essential contextual information, leading to substantially improved model faithfulness and performance, e.g., an average improvement of 7.95% for LLAMA3-70B-Instruct. Code will be publicly available at https://github.com/QingruZhang/AutoPASTA .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。