Abstract
Text classification typically relies on extensive human-annotated data, which is costly and time-consuming to obtain. Extremely weakly supervised methods attempt to classify text using only class names, but often lack interpretability and robustness. We present XAI-CLASS, a framework that iteratively generates "pseudo-explanations" (word saliency) alongside class labels. By treating explanation as an auxiliary task, XAI-CLASS significantly improves classification accuracy and aligns model attention with human reasoning.
Introduction
In Natural Language Processing (NLP), supervised text classification is the standard but suffers from high annotation costs. While weakly supervised approaches have emerged, they often treat the classification process as a "black box," potentially leading to "Clever Hans" effects where models rely on spurious correlations. XAI-CLASS addresses this by integrating explainability directly into the learning process, requiring only category names as initial input.
Methodology
The XAI-CLASS framework consists of two primary stages: iterative pseudo-label generation and explainable multi-task learning.
Iterative Pseudo-Label Generation
The system employs a "conversation" between two pre-trained language models (PLMs) to refine labels and explanations. In Round 0, a classification model (e.g., FLAN-T5) predicts a label from raw text. An explanation model (e.g., BERT) then identifies salient words supporting that label. In subsequent rounds (Round 1+), the classifier receives these salient words as additional context, leading to more confident and consistent predictions.
Explainable Multi-Task Learning
The refined pseudo-labels and pseudo-explanations are used to train a BERT-based encoder. The model is optimized via a dual-loss function: one for category classification and another for word saliency prediction. This joint training forces the model to develop internal representations that are both accurate and interpretable.
Experimental Results
XAI-CLASS was evaluated on six datasets, including AGNews, UCINews, 20Newsgroup, IMDB, Twitter, and the clinical MIMIC-III dataset.
Performance Gains
The framework consistently outperformed state-of-the-art weakly supervised baselines. On UCINews, XAI-CLASS achieved a Macro-F1 of 0.8387. In the clinical domain (MIMIC-III), it improved Micro-F1 from 0.256 (Clinical-BERT) to 0.292.
As shown in Figure 5, the iterative process (moving from Round 0 to Round 1) provides a measurable boost in accuracy across multiple benchmarks, validating the "mutual enhancement" loop.
Interpretability
Beyond accuracy, XAI-CLASS demonstrates superior alignment with human rationales. By explicitly training on saliency, the model's attention mechanisms more closely mirror human reasoning compared to standard black-box models.
Discussion and Limitations
While XAI-CLASS represents a significant step forward, challenges remain. The model assumes disjoint label spaces, which can lead to confusion in datasets with overlapping categories like 20Newsgroup (e.g., "electronics" vs. "science"). Additionally, the iterative QA process involves multiple queries to large language models, posing a computational challenge for large-scale deployment. Future research will focus on extending the framework to multi-label scenarios and optimizing inference costs.
Conclusion
XAI-CLASS demonstrates that word importance is not merely a diagnostic tool but a powerful supervisory signal. By teaching models to explain themselves during the training phase, we can achieve high-performance text classification with minimal human intervention.
Summary updated