Counterfactuals As a Means for Evaluating Faithfulness of Attribution Methods in Autoregressive Language Models

Sepehr Kamahi, Yadollah Yaghoobzadeh
8/21/2024
6 citations
cs.CL

Official code: Sepehr-Kamahi/faith (2 stars, Jupyter Notebook, MIT, last commit 2024-12-20).

Abstract

Despite the widespread adoption of autoregressive language models, explainability evaluation research has predominantly focused on span infilling and masked language models. Evaluating the faithfulness of an explanation method -- how accurately it explains the inner workings and decision-making of the model -- is challenging because it is difficult to separate the model from its explanation.

Show full abstract

Most faithfulness evaluation techniques corrupt or remove input tokens deemed important by a particular attribution (feature importance) method and observe the resulting change in the model's output. However, for autoregressive language models, this approach creates out-of-distribution inputs due to their next-token prediction training objective. In this study, we propose a technique that leverages counterfactual generation to evaluate the faithfulness of attribution methods for autoregressive language models. Our technique generates fluent, in-distribution counterfactuals, making the evaluation protocol more reliable.

View on arXivView PDF

Code Implementations(1)

MIT

counterfactuals as a means to test faithfulness

20Jupyter Notebook, PythonFeb 23, 20241 years agoMIT

Similar Papers

Cite this paper

@article{kamahi2024counterfactuals,
  title  = {Counterfactuals As a Means for Evaluating Faithfulness of Attribution Methods in Autoregressive Language Models},
  author = {Sepehr Kamahi and Yadollah Yaghoobzadeh},
  year   = {2024},
  eprint = {2408.11252},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.11252v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.11252.svg)](https://codeofpaper.com/paper/2408.11252)

Discussion