Introduction
Deep learning models for text classification are often criticized as "black boxes." While they achieve high accuracy, understanding why a model predicts a specific sentiment or category remains a challenge. Traditional interpretability methods typically rely on word-level saliency maps or internal attention weights, which can be too granular for human reasoning or unfaithful to the model's actual decision logic.
SELFEXPLAIN addresses these issues by introducing a novel architecture that provides human-friendly, phrase-based justifications. By moving beyond individual words and integrating global context from training data, it offers transparent predictions without compromising model performance.
The SELFEXPLAIN Architecture
The core innovation of SELFEXPLAIN lies in its ability to be integrated into standard transformer encoders like RoBERTa or XLNet. The architecture consists of three primary components designed to bridge the gap between machine logic and human language.
- Phrase-based Concepts: Instead of analyzing isolated words, the model utilizes a constituency parser to identify non-terminal phrases (e.g., "the good soup"). These phrases serve as the fundamental "concepts" for explanation, aligning more closely with how humans process language.
- Locally Interpretable Layer (LIL): This layer identifies the relevance of phrases within a specific input. It calculates an "activation difference" to determine how much a phrase contributes to the final prediction.
- Globally Interpretable Layer (GIL): To provide broader context, the GIL maintains a "concept store" from the training set. It retrieves the most influential training concepts that align with the current prediction, effectively providing "precedents" for the model's decision.
The entire system is trained end-to-end, ensuring that the explanation layers are inherently predictive of the final label rather than being mere post-hoc approximations.
Experimental Setup and Results
The researchers evaluated SELFEXPLAIN across five benchmarks, including sentiment analysis (SST-2, SST-5), question classification (TREC-6, TREC-50), and subjectivity detection (SUBJ).
Performance and Sufficiency
A significant finding was that SELFEXPLAIN maintains high accuracy. For instance, the RoBERTa-based version achieved 95.1% accuracy on SST-2, slightly outperforming the vanilla RoBERTa base (94.8%). Furthermore, the "sufficiency" of these explanations was tested: a classifier trained solely on the retrieved GIL concepts outperformed one using the full original text on SST-2 (93% vs 90%), demonstrating the potency of these extracted features.
Human Interpretability
To validate the quality of the explanations, a study was conducted with 14 human judges. SELFEXPLAIN was compared against traditional baselines like Influence Functions and Saliency Maps.
As shown in the evaluation results, SELFEXPLAIN provided a 32% gain in "adequate justification" and a 29% improvement in "understandability" over baselines. Humans also reported significantly higher trust in the model, as phrase-based explanations and global precedents made the machine's reasoning more accessible.
Discussion and Future Work
SELFEXPLAIN demonstrates that interpretability does not have to come at the cost of performance. By focusing on phrases—the "Goldilocks" zone of linguistic granularity—and providing global context, the model makes neural classifiers more accountable.
However, some limitations remain. The current implementation is optimized for sentence-level tasks and relies on external constituency parsers, which may struggle with ungrammatical text. Future research could explore higher levels of linguistic abstraction, such as semantic or pragmatic features, to further refine the "language" of machine explanations.
Summary updated