Competition of Mechanisms: Tracing How Language Models Handle Facts and Counterfactuals

Published: 21 Sept 2024, Last Modified: 06 Oct 2024BlackboxNLP 2024EveryoneRevisionsBibTeXCC BY 4.0
Track: Extended abstract
Keywords: Mechanistic Interpretability, Knowledge Recall, Competition of Mechanism, In-Context Learning
TL;DR: This study investigates how factual recall and copy mechanisms interact and compete within LLMs to produce outputs, revealing key model components and positions that control these interactions.
Abstract: Interpretability research aims to bridge the gap between empirical success and our scientific understanding of the inner workings of large language models (LLMs). However, most existing research focuses on analyzing a single mechanism, such as how models copy or recall factual knowledge. In this work, we propose a formulation of competition of mechanisms, which focuses on the interplay of multiple mechanisms instead of individual mechanisms and traces how one of them becomes dominant in the final prediction. We uncover how and where mechanisms compete within LLMs using two interpretability methods: logit inspection and attention modification. Our findings show traces of the mechanisms and their competition across various model components and reveal attention positions that effectively control the strength of certain mechanisms.
Submission Number: 14
Loading