TensorX
返回文献探索

Paper · arXiv 2309.15098

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

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

7 upvotesSeptember 26, 2023arXiv 预印本
AI 摘要

Transformer-based LLMs show a positive correlation between attention to constraint tokens and factual accuracy, and SAT Probe can predict factual errors by analyzing self-attention patterns.

Transformer-based Large Language Models (LLMs)Constraint Satisfaction Problemsfactual accuracyself-attention patternsSAT Probemechanistic understanding

Abstract

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Models | TensorX