Abstract
Local explanation methods for text classifiers often suffer from instability and the generation of nonsensical neighborhoods. We present XPROAX, a novel approach that utilizes a two-stage progressive neighborhood approximation technique. By leveraging counterfactual landmarks and latent space interpolation via a Denoising Adversarial Autoencoder (DAAE), XPROAX generates semantically coherent factual and counterfactual examples. Our evaluation on sentiment analysis tasks demonstrates that XPROAX provides more stable and complete explanations compared to existing methods like LIME and XSPELLS.
Introduction
To explain why a "black-box" model, such as a deep neural network, classified a specific piece of text, researchers often use local surrogate models. These surrogates attempt to mimic the black box's behavior in the immediate neighborhood of the input. However, defining a meaningful "neighborhood" for text is notoriously difficult. Standard methods like LIME rely on random word-dropping, which often results in ungrammatical fragments. Newer methods using generative models often sample latent spaces purely at random, which is inefficient in high-dimensional spaces and leads to unstable explanations. XPROAX addresses these issues by introducing a guided, progressive approximation approach.
Methodology: Progressive Neighborhood Approximation
XPROAX (local eXplainer with PROgressive neighborhood ApproXimation) moves beyond random sampling by using a structured, two-stage approach to explore the decision boundary.
- Latent Space Mapping: Text is mapped into a continuous latent space using a Denoising Adversarial Autoencoder (DAAE), ensuring that semantically similar sentences are positioned closely.
- Counterfactual Landmarks: The process begins by identifying "seed landmarks"—existing corpus examples that the black box classifies differently from the target instance.
- Two-Stage Interpolation:
- Exploration: The algorithm interpolates between counterfactual landmarks to map the general vicinity of the decision boundary.
- Refinement: It then interpolates between these boundary points and the original input to pinpoint the exact "turning points" where the model's classification flips.
The resulting explanation includes intrinsic features (important words in the text), extrinsic features (important words not present that could change the outcome), and a diverse set of human-readable factual and counterfactual sentences.
Experimental Setup
The authors evaluated XPROAX using two sentiment analysis datasets focusing on short-form text:
- Yelp Reviews: Restaurant reviews limited to 16 words or fewer.
- Amazon Review Polarity: Review titles used to ensure brevity and focus.
These were tested against Random Forest (RF) and Deep Neural Network (DNN) black-box models, comparing XPROAX's performance against LIME and XSPELLS.
Key Results and Discussion
XPROAX demonstrates significant improvements in both quantitative completeness and qualitative coherence.
Quantitative Performance
In tests measuring "Confidence Drop"—the reduction in model certainty when key words are removed—XPROAX consistently outperformed LIME. For instance, on the Yelp dataset with a Random Forest model, XPROAX achieved a score of 0.740, compared to LIME's 0.364. This suggests that XPROAX identifies features that are more critical to the model's actual decision logic.
Qualitative Coherence and Stability
A major advantage of XPROAX is the readability of its generated neighborhoods. While previous latent-space methods like XSPELLS often produce nonsensical text, XPROAX generates grammatically correct and semantically relevant examples.
As shown in the comparison, XPROAX successfully identifies extrinsic words—such as "worst" or "disappointing" for a positive review—that highlight what the model is looking for to change its prediction. It also handles complex linguistic structures like negation (e.g., "n't worth") more robustly than LIME, which often struggles to pinpoint the exact influence of the negation.
Conclusion and Future Work
XPROAX represents a significant step forward in local text explanation by replacing random sampling with guided, landmark-based exploration. By focusing on stability and semantic coherence, it provides practitioners with more reliable insights into black-box model behavior. Future work will focus on extending these techniques to longer documents and exploring different generative architectures to further improve neighborhood quality in more complex domains.
Summary updated