Counterfactuals As a Means for Evaluating Faithfulness of Attribution Methods in Autoregressive Language Models
Sepehr Kamahi, Yadollah Yaghoobzadeh
TL;DR
This paper addresses the challenge of evaluating the faithfulness of attribution methods for autoregressive language models by introducing a counterfactual-based protocol that preserves the input distribution. It couples a counterfactual editor with a predictor and uses contrastive attributions to quantify how many token changes are needed to flip the model’s prediction, across multiple datasets and model configurations. The study demonstrates that counterfactual generators yield in-distribution text and produce consistent faithfulness rankings across editors, while traditional replacement strategies can induce OOD inputs and distort evaluations, especially for instruct-tuned models. Overall, the approach provides a principled, distribution-preserving framework for assessing attribution methods and reveals task- and model-dependent effectiveness of different FI techniques.
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. 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.
