On Explaining with Attention Matrices

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Naim, Omar, Asher, Nicholas
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916450911911936
author Naim, Omar
Asher, Nicholas
author_facet Naim, Omar
Asher, Nicholas
contents This paper explores the much discussed, possible explanatory link between attention weights (AW) in transformer models and predicted output. Contrary to intuition and early research on attention, more recent prior research has provided formal arguments and empirical evidence that AW are not explanatorily relevant. We show that the formal arguments are incorrect. We introduce and effectively compute efficient attention, which isolates the effective components of attention matrices in tasks and models in which AW play an explanatory role. We show that efficient attention has a causal role (provides minimally necessary and sufficient conditions) for predicting model output in NLP tasks requiring contextual information, and we show, contrary to [7], that efficient attention matrices are probability distributions and are effectively calculable. Thus, they should play an important part in the explanation of attention based model behavior. We offer empirical experiments in support of our method illustrating various properties of efficient attention with various metrics on four datasets.
format Preprint
id arxiv_https___arxiv_org_abs_2410_18541
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle On Explaining with Attention Matrices
Naim, Omar
Asher, Nicholas
Computation and Language
Artificial Intelligence
46-04
I.2.7; I.7.0
This paper explores the much discussed, possible explanatory link between attention weights (AW) in transformer models and predicted output. Contrary to intuition and early research on attention, more recent prior research has provided formal arguments and empirical evidence that AW are not explanatorily relevant. We show that the formal arguments are incorrect. We introduce and effectively compute efficient attention, which isolates the effective components of attention matrices in tasks and models in which AW play an explanatory role. We show that efficient attention has a causal role (provides minimally necessary and sufficient conditions) for predicting model output in NLP tasks requiring contextual information, and we show, contrary to [7], that efficient attention matrices are probability distributions and are effectively calculable. Thus, they should play an important part in the explanation of attention based model behavior. We offer empirical experiments in support of our method illustrating various properties of efficient attention with various metrics on four datasets.
title On Explaining with Attention Matrices
topic Computation and Language
Artificial Intelligence
46-04
I.2.7; I.7.0
url https://arxiv.org/abs/2410.18541