Explanation Consistency Training: Facilitating Consistency-Based Semi-Supervised Learning with Interpretability

Tao Han, Wei-Wei Tu, Yufeng Li

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.

The hierarchy of model invariance: Explanation invariance serves as a stronger constraint than output invariance, moving closer to the ideal of causality invariance.

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 ECT framework: The model $h$ processes both original and perturbed inputs. Training minimizes the difference between their respective explanations $I(X, h)$ and $I(\hat{X}, h)$.

The framework is adaptable across domains by utilizing different explanation methods:

  1. 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.
  2. 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

Abstract

Unlabeled data exploitation and interpretability are usually both required in reality. They, however, are conducted independently, and very few works try to connect the two. For unlabeled data exploitation, state-of-the-art semi-supervised learning (SSL) results have been achieved via encouraging the consistency of model output on data perturbation, that is, consistency assumption. However, it remains hard for users to understand how particular decisions are made by state-of-the-art SSL models. To this end, in this paper we first disclose that the consistency assumption is closely related to causality invariance, where causality invariance lies in the main reason why the consistency assumption is valid. We then propose ECT (Explanation Consistency Training) which encourages a consistent reason of model decision under data perturbation. ECT employs model explanation as a surrogate of the causality of model output, which is able to bridge state-of-the-art interpretability to SSL models and alleviate the high complexity of causality. We realize ECT-SM for vision and ECT-ATT for NLP tasks. Experimental results on real-world data sets validate the highly competitive performance and better explanation of the proposed algorithms.
BibTeX
@inproceedings{han2021explanation,
  author = {Tao Han and Wei-Wei Tu and Yufeng Li},
  title = {{Explanation Consistency Training: Facilitating Consistency-Based Semi-Supervised Learning with Interpretability}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i9.16934},
}
Figure