# Contextual Explanation Networks

arXiv: https://arxiv.org/abs/1705.10301 · HTML: https://mlsanity.com/paper/1705.10301/

## Key facts

- Cited by 21 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 29 May 2017.

## Built on by (most cited first, 21 of 21)

- [A Review on Explainability in Multimodal Deep Neural Nets](https://mlsanity.com/paper/2105.07878/) (2021)
- [Shap-CAM: Visual Explanations for Convolutional Neural Networks based on Shapley Value](https://mlsanity.com/paper/2208.03608/) (2022)
- [A Comprehensive Survey on Self-Interpretable Neural Networks](https://mlsanity.com/paper/2501.15638/) (2025)
- [XAI Handbook: Towards a Unified Framework for Explainable AI](https://mlsanity.com/paper/2105.06677/) (2021)
- [Interpretability-Aware Vision Transformer](https://mlsanity.com/paper/2309.08035/) (2023)
- [Learning to Predict with Supporting Evidence: Applications to Clinical Risk Prediction](https://mlsanity.com/paper/2103.02768/) (2021)
- [Responsible and Regulatory Conform Machine Learning for Medicine: A Survey of Challenges and Solutions](https://mlsanity.com/paper/2107.09546/) (2021)
- [Contextual Feature Selection with Conditional Stochastic Gates](https://mlsanity.com/paper/2312.14254/) (2023)
- [The Contextual Lasso: Sparse Linear Models via Deep Neural Networks](https://mlsanity.com/paper/2302.00878/) (2023)
- [Interpretable Graph Neural Networks for Tabular Data](https://mlsanity.com/paper/2308.08945/) (2023)
- [Toward a Unified Framework for Debugging Concept-based Models](https://mlsanity.com/paper/2109.11160/) (2021)
- [Contextualized Policy Recovery: Modeling and Interpreting Medical Decisions with Adaptive Imitation Learning](https://mlsanity.com/paper/2310.07918/) (2023)
- [Contextualized Machine Learning](https://mlsanity.com/paper/2310.11340/) (2023)
- [Prediction via Shapley Value Regression](https://mlsanity.com/paper/2505.04775/) (2025)
- [A Brief Review of Explainable Artificial Intelligence in Healthcare](https://mlsanity.com/paper/2304.01543/) (2023)
- [Restyling Unsupervised Concept Based Interpretable Networks with Generative Models](https://mlsanity.com/paper/2407.01331/) (2024)
- [NOTMAD: Estimating Bayesian Networks with Sample-Specific Structures and Parameters](https://mlsanity.com/paper/2111.01104/) (2021)
- [Movement Analytics: Current Status, Application to Manufacturing, and Future Prospects from an AI Perspective](https://mlsanity.com/paper/2210.01344/) (2022)
- [ForestMonkey: Toolkit for Reasoning with AI-based Defect Detection and Classification Models](https://mlsanity.com/paper/2307.13815/) (2023)
- [A tree-based varying coefficient model](https://mlsanity.com/paper/2401.05982/) (2024)
- [Covariate-dependent Graphical Model Estimation via Neural Networks with Statistical Guarantees](https://mlsanity.com/paper/2504.16356/) (2025)

## Abstract (arXiv)

Modern learning algorithms excel at producing accurate but complex models of the data. However, deploying such models in the real-world requires extra care: we must ensure their reliability, robustness, and absence of undesired biases. This motivates the development of models that are equally accurate but can be also easily inspected and assessed beyond their predictive performance. To this end, we introduce contextual explanation networks (CEN)---a class of architectures that learn to predict by generating and utilizing intermediate, simplified probabilistic models. Specifically, CENs generate parameters for intermediate graphical models which are further used for prediction and play the role of explanations. Contrary to the existing post-hoc model-explanation tools, CENs learn to predict and to explain simultaneously. Our approach offers two major advantages: (i) for each prediction valid, instance-specific explanation is generated with no computational overhead and (ii) prediction via explanation acts as a regularizer and boosts performance in data-scarce settings. We analyze the proposed framework theoretically and experimentally. Our results on image and text classification and survival analysis tasks demonstrate that CENs are not only competitive with the state-of-the-art methods but also offer additional insights behind each prediction, that can be valuable for decision support. We also show that while post-hoc methods may produce misleading explanations in certain cases, CENs are consistent and allow to detect such cases systematically.
