Competition of Mechanisms: Tracing How Language Models Handle Facts and Counterfactuals
Fuente:
arXiv
Salvato in:
| Autori principali: | , , , , , |
|---|---|
| Natura: | Preprint |
| Pubblicazione: |
2024
|
| Soggetti: | |
| Accesso online: | |
| Tags: |
Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
|
| _version_ | 1866910475994791936 |
|---|---|
| author | Ortu, Francesco Jin, Zhijing Doimo, Diego Sachan, Mrinmaya Cazzaniga, Alberto Schölkopf, Bernhard |
| author_facet | Ortu, Francesco Jin, Zhijing Doimo, Diego Sachan, Mrinmaya Cazzaniga, Alberto Schölkopf, Bernhard |
| contents | 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. Code: https://github.com/francescortu/comp-mech. Data: https://huggingface.co/datasets/francescortu/comp-mech. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2402_11655 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | Competition of Mechanisms: Tracing How Language Models Handle Facts and Counterfactuals Ortu, Francesco Jin, Zhijing Doimo, Diego Sachan, Mrinmaya Cazzaniga, Alberto Schölkopf, Bernhard Computation and Language 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. Code: https://github.com/francescortu/comp-mech. Data: https://huggingface.co/datasets/francescortu/comp-mech. |
| title | Competition of Mechanisms: Tracing How Language Models Handle Facts and Counterfactuals |
| topic | Computation and Language |
| url | https://arxiv.org/abs/2402.11655 |