arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.15098cs.CLcs.AIcs.LG
收藏

注意力满足:从约束满足视角看语言模型的事实错误

Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Models

Stanford University(斯坦福大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);UC Berkeley(加州大学伯克利分校);Microsoft Research(微软研究院)

Mert Yuksekgonul, Varun Chandrasekaran, Erik Jones, Suriya Gunasekar, Ranjita Naik, Hamid Palangi, Ece Kamar, Besmira Nushi

AI总结:

该研究从约束满足视角探究大语言模型事实错误的内部机制,发现注意力与事实准确性正相关,提出SAT Probe方法可预测错误并助力提升模型可靠性。

摘要:

我们研究了基于Transformer的大语言模型(LLM)生成事实错误文本时的内部行为。我们提出将事实查询建模为约束满足问题,并利用该框架研究LLM如何在内部与事实约束交互。我们发现,LLM对约束token的注意力与其生成内容的事实准确性之间存在强正相关关系。我们整理了包含超过40000个提示的10个数据集套件,用于研究Llama-2系列全规模(7B、13B、70B)模型的事实错误预测任务。我们提出了SAT Probe——一种探测注意力模式的方法,该方法能够预测事实错误和细粒度的约束满足情况,并支持早期错误识别。该方法和研究结果为利用LLM的机制理解提升其可靠性又迈进了一步。

英文摘要:

We investigate the internal behavior of Transformer-based Large Language Models (LLMs) when they generate factually incorrect text. We propose modeling factual queries as constraint satisfaction problems and use this framework to investigate how the LLM interacts internally with factual constraints. We find a strong positive relationship between the LLM's attention to constraint tokens and the factual accuracy of generations. We curate a suite of 10 datasets containing over 40,000 prompts to study the task of predicting factual errors with the Llama-2 family across all scales (7B, 13B, 70B). We propose SAT Probe, a method probing attention patterns, that can predict factual errors and fine-grained constraint satisfaction, and allow early error identification. The approach and findings take another step towards using the mechanistic understanding of LLMs to enhance their reliability.

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

↑