[Paper Review] The Out-of-Distribution Problem in Explainability and Search Methods for Feature Importance Explanations
This paper identifies that feature importance (FI) explanations in NLP are socially misaligned because counterfactual inputs—created by removing or replacing features—are out-of-distribution (OOD), leading to model behavior influenced by random weight initialization and prior. To resolve this, the authors propose training models on counterfactual inputs to align test-time explanations with training-time distributions, and introduce a novel Parallel Local Search (PLS) method that outperforms baselines by up to 5.4 points on Sufficiency and 17 points on Comprehensiveness across six text classification datasets.
Feature importance (FI) estimates are a popular form of explanation, and they are commonly created and evaluated by computing the change in model confidence caused by removing certain input features at test time. For example, in the standard Sufficiency metric, only the top-k most important tokens are kept. In this paper, we study several under-explored dimensions of FI explanations, providing conceptual and empirical improvements for this form of explanation. First, we advance a new argument for why it can be problematic to remove features from an input when creating or evaluating explanations: the fact that these counterfactual inputs are out-of-distribution (OOD) to models implies that the resulting explanations are socially misaligned. The crux of the problem is that the model prior and random weight initialization influence the explanations (and explanation metrics) in unintended ways. To resolve this issue, we propose a simple alteration to the model training process, which results in more socially aligned explanations and metrics. Second, we compare among five approaches for removing features from model inputs. We find that some methods produce more OOD counterfactuals than others, and we make recommendations for selecting a feature-replacement function. Finally, we introduce four search-based methods for identifying FI explanations and compare them to strong baselines, including LIME, Anchors, and Integrated Gradients. Through experiments with six diverse text classification datasets, we find that the only method that consistently outperforms random search is a Parallel Local Search (PLS) that we introduce. Improvements over the second-best method are as large as 5.4 points for Sufficiency and 17 points for Comprehensiveness. All supporting code for experiments in this paper is publicly available at https://github.com/peterbhase/ExplanationSearch.
Motivation & Objective
- To identify and address the social misalignment in feature importance (FI) explanations caused by out-of-distribution (OOD) counterfactual inputs during explanation evaluation.
- To evaluate and compare different feature-replacement functions (Replace functions) in terms of how OOD the resulting counterfactual inputs are to the model.
- To design and evaluate novel search-based methods for identifying high-quality FI explanations, improving upon existing baselines like LIME, Anchors, and Integrated Gradients.
- To propose a training-time intervention—exposing models to explanation counterfactuals during training—to make test-time counterfactuals in-distribution and reduce reliance on model prior and weight initialization.
- To empirically validate the effectiveness of the proposed methods across six diverse text classification datasets using standard metrics like Sufficiency and Comprehensiveness.
Proposed method
- Propose a new training procedure where models are fine-tuned on counterfactual inputs generated by explanation methods (e.g., replacing top-k features with a special token), making test-time counterfactuals in-distribution.
- Introduce a new search-based explanation method called Parallel Local Search (PLS), which explores multiple candidate explanations in parallel using local search heuristics to maximize the Sufficiency metric.
- Systematically compare five Replace functions: (1) removing tokens entirely, (2) replacing with zero embedding, (3) replacing with a special [MASK] token, (4) marginalizing over counterfactuals, and (5) editing the attention mask instead of the input text.
- Define and compute the Sufficiency metric as the drop in model confidence when features are replaced: $\textrm{Suff}(f,x,e) = f(x)_{\hat{y}} - f(\texttt{Replace}(x,e))_{\hat{y}}$, where $\hat{y}$ is the model’s original prediction.
- Use a compute budget measured in forward and backward passes to fairly compare search methods, with wall-clock time as a secondary benchmark.
- Evaluate all methods on six text classification datasets (e.g., FEVER, SNLI) using both Sufficiency and Comprehensiveness metrics, with ablation studies on Replace functions and training-time interventions.
Experimental results
Research questions
- RQ1How does the out-of-distribution (OOD) nature of counterfactual inputs used in FI explanation evaluation lead to socially misaligned explanations influenced by model prior and random weight initialization?
- RQ2Which feature-replacement functions (Replace functions) produce counterfactual inputs that are least OOD to the model, and how do they affect explanation quality and metric reliability?
- RQ3Can search-based methods outperform established baselines like LIME, Anchors, and Integrated Gradients in identifying high-quality feature importance explanations?
- RQ4Does fine-tuning models on counterfactual inputs during training improve the robustness and social alignment of test-time explanations?
- RQ5What is the relative performance of different search algorithms, and does the proposed Parallel Local Search (PLS) method consistently outperform alternatives across diverse datasets and metrics?
Key findings
- Training models on counterfactual inputs generated by explanation methods significantly reduces the OOD nature of test-time ablations, leading to more robust and socially aligned explanations.
- The Parallel Local Search (PLS) method consistently outperforms all baselines, achieving improvements of up to 5.4 points on the Sufficiency metric and 17 points on the Comprehensiveness metric across six text classification datasets.
- Among the five Replace functions evaluated, replacing with a special [MASK] token or using attention mask editing produced less OOD counterfactuals than zero-embedding or full removal, and were recommended for better metric reliability.
- The choice of Replace function has a measurable impact on explanation quality, with methods that preserve more structural and semantic coherence in the input producing more reliable and interpretable explanations.
- Models fine-tuned on counterfactuals showed improved robustness to ablations and reduced dependence on model prior and weight initialization, validating the training-time intervention as effective.
- Despite theoretical concerns about optimization objectives, the PLS method achieved superior performance not because it solved a different problem, but because it effectively explored the search space under the correct metric.
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.