[Paper Review] Faithful Explanations of Black-box NLP Models Using LLM-generated Counterfactuals
This paper proposes two model-agnostic approaches for faithful, causal explanations of black-box NLP models using LLM-generated counterfactuals: (1) direct LLM-based counterfactual generation and (2) a fast, efficient matching method guided by LLM-generated counterfactuals during training. The matching method learns a causal embedding space that preserves faithfulness to a causal graph and outperforms many baselines, especially when combined with Top-K techniques.
Causal explanations of the predictions of NLP systems are essential to ensure safety and establish trust. Yet, existing methods often fall short of explaining model predictions effectively or efficiently and are often model-specific. In this paper, we address model-agnostic explanations, proposing two approaches for counterfactual (CF) approximation. The first approach is CF generation, where a large language model (LLM) is prompted to change a specific text concept while keeping confounding concepts unchanged. While this approach is demonstrated to be very effective, applying LLM at inference-time is costly. We hence present a second approach based on matching, and propose a method that is guided by an LLM at training-time and learns a dedicated embedding space. This space is faithful to a given causal graph and effectively serves to identify matches that approximate CFs. After showing theoretically that approximating CFs is required in order to construct faithful explanations, we benchmark our approaches and explain several models, including LLMs with billions of parameters. Our empirical results demonstrate the excellent performance of CF generation models as model-agnostic explainers. Moreover, our matching approach, which requires far less test-time resources, also provides effective explanations, surpassing many baselines. We also find that Top-K techniques universally improve every tested method. Finally, we showcase the potential of LLMs in constructing new benchmarks for model explanation and subsequently validate our conclusions. Our work illuminates new pathways for efficient and accurate approaches to interpreting NLP systems.
Motivation & Objective
- To address the lack of faithful, model-agnostic explanations for black-box NLP models by grounding explanations in causal reasoning.
- To overcome the limitations of existing methods that confuse correlation with causation, especially in the presence of confounding concepts.
- To reduce the high inference cost of LLM-based counterfactual generation while preserving explanation fidelity.
- To develop a training-time method that learns a causal representation space faithful to a given causal graph for efficient matching at inference.
- To demonstrate that LLMs can be used to construct high-quality, scalable benchmarks for model explanation.
Proposed method
- Proposes a counterfactual generation approach where an LLM is prompted to modify a specific concept in a text while preserving confounding concepts, producing faithful counterfactuals.
- Introduces a matching-based method that learns a causal representation space using contrastive loss, trained on LLM-generated counterfactuals and valid matches.
- Employs a causal graph to define adjustment variables satisfying the back-door criterion, ensuring valid confounder control in counterfactual approximation.
- Uses a contrastive objective to train the representation model: similar representations for query and CF/matched examples, dissimilar for misspecified ones.
- Applies Top-K techniques across all methods to improve robustness and performance, especially in matching and generation settings.
- Leverages GPT-4 at training time to generate high-quality counterfactuals and identify valid matches, enabling efficient inference without LLMs at test time.
Experimental results
Research questions
- RQ1Can LLM-generated counterfactuals serve as state-of-the-art, model-agnostic explanations for black-box NLP models?
- RQ2How can we achieve faithful, causal explanations without relying on expensive LLM inference at test time?
- RQ3Can a learned embedding space preserve causal faithfulness and enable efficient, accurate counterfactual matching?
- RQ4To what extent do Top-K techniques improve the performance of counterfactual explanation methods?
- RQ5Can LLMs be used to construct scalable, high-quality benchmarks for evaluating model explanation methods?
Key findings
- LLM-based counterfactual generation achieves state-of-the-art performance as a model-agnostic explainer, demonstrating high faithfulness to causal effects.
- The proposed matching method, which avoids LLM inference at test time, is up to 1000 times faster than generation and still outperforms multiple strong baselines.
- Top-K techniques universally improve performance across all evaluated methods, significantly enhancing robustness and accuracy.
- The learned causal embedding space effectively identifies valid counterfactual approximations, maintaining faithfulness to the underlying causal graph.
- LLMs can be effectively used to generate high-quality, scalable benchmarks for model explanation, reducing reliance on costly human annotation.
- Empirical results validate that approximating counterfactuals is necessary for faithful explanations, and non-causal methods often fail due to confounding bias.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.