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

arXiv

Publication

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 model interacts internally with factual constraints. Specifically, we discover a strong positive relation between the model’s attention to constraint tokens and the factual accuracy of its responses. In our curated suite of 11 datasets with over 40,000 prompts, we 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 self-attention patterns, that can predict constraint satisfaction and factual errors, and allows early error identification. The approach and findings demonstrate how using the mechanistic understanding of factuality in LLMs can enhance reliability.

Evaluation and Understanding of Foundation Models

Microsoft Research Forum, January 30, 2024 Besmira Nushi, Principal Researcher at Microsoft Research AI Frontiers summarizes timely challenges and ongoing work on evaluating and in-depth understanding of large foundation models. See more at https://aka.ms/ResearchForum-Jan2024