Semi-supervised learning (SSL) is a critical paradigm in machine learning, enabling models to leverage vast amounts of unlabeled data when labeled examples are scarce. A cornerstone of modern SSL is the consistency assumption: applying small perturbations to an input should not significantly alter the model's output. However, standard consistency-based methods often rely on "rough surrogates" for the underlying causal relationships in data. At AAAI-21, researchers introduced Explanation Consistency Training (ECT), a framework that requires models to be consistent not just in what they predict, but in why they predict it.
The Problem: Beyond Output Invariance
Traditional SSL methods focus on output invariance, ensuring that $h(x) \approx h(\hat{x})$ for a perturbed input $\hat{x}$. The authors argue that this is insufficient because models can be "right for the wrong reasons." A model might maintain a consistent label by shifting its focus from a causal feature (like a cat's ears) to a coincidental correlation (like background texture) after a perturbation. This leads to brittle models that are prone to bias and difficult to trust.
As illustrated in Figure 1, explanation invariance is a subset of output invariance and a superset of causality invariance. By enforcing consistency in explanations, ECT provides a more rigorous constraint that encourages the model to learn robust, causal features rather than exploitative shortcuts.
Methodology: Explanation Consistency Training (ECT)
The core innovation of ECT is to minimize the distance between the explanations of an original input $X$ and its perturbed version $\hat{X}$. Instead of simply aligning outputs, the training objective forces the model's internal reasoning to remain stable.
The framework is adaptable across domains by utilizing different explanation methods:
- Computer Vision (ECT-SM): Uses Saliency Maps (the gradient of the output with respect to input pixels) as the explanation $I$. This ensures the model focuses on the same physical features of an object despite noise or transformations.
- Natural Language Processing (ECT-ATT): Uses Attention weights as the explanation. It ensures the model "attends" to the same keywords even if the surrounding text is slightly modified.
Theoretically, the authors demonstrate that explanation consistency is a "stronger" constraint; if a model's explanations are consistent, its outputs will generally be consistent as well (a property related to local Lipschitz continuity), but the reverse is not necessarily true.
Experimental Evaluation
The researchers evaluated ECT across several benchmarks, demonstrating its superiority in both performance and robustness:
- Vision Benchmarks: On Fashion-MNIST with only 100 labels, ECT-SM achieved 72.37% accuracy, outperforming the popular Virtual Adversarial Training (VAT) at 71.89%. A hybrid version combining both output and explanation consistency reached 72.45%.
- Bias Mitigation: In a professional biography classification task designed to test gender bias, ECT forced the model to ignore gendered pronouns (he/she) and focus on professional keywords. On anonymized test data, the ECT-hybrid model reached 79.94% accuracy, significantly higher than the baseline (72.68%) or VAT (74.31%).
Key Insights and Future Directions
ECT positions model explanations as practical, differentiable surrogates for causal inference. By penalizing inconsistent reasoning, the model is discouraged from finding "shortcuts" on unlabeled data. Qualitatively, ECT-SM produces much "cleaner" saliency maps that focus tightly on the actual object of interest, whereas standard SSL often produces noisy, scattered explanations.
While promising, the method involves "gradients of gradients" (second-order optimization), which increases computational complexity. Future work may focus on extending this framework to non-differentiable explanations or optimizing the training process for extremely large-scale models. Ultimately, ECT represents a significant step toward building models that are not only accurate but also fundamentally more trustworthy and interpretable.
Summary updated