Research
Hide&Seek: Learning to Explain in an End-to-End Differentiable Network
Overview Research area: Machine learning explainability (XAI), specifically instance-wise feature selection and selector-predictor architectures. Technical level: Intermediate. Readers should be comfo
- arXiv
- 2608.16689
- Published
- 2026-08-17
- Authors
- Tal Ellinson, Hadi Mohasel Afshar, Sally Cripps
AI summary
Overview
Research area: Machine learning explainability (XAI), specifically instance-wise feature selection and selector-predictor architectures.
Technical level: Intermediate. Readers should be comfortable with neural network training, classification losses, and basic feature attribution concepts (LIME, SHAP, ablation).
Scope: The paper introduces Hide&Seek, an end-to-end differentiable framework that jointly learns which features matter for each individual prediction and how to use those features, while structurally preventing a known failure mode called information leakage.
What This Paper Is About
Many "explanation" models try to identify which input features matter for a prediction — and increasingly, which features matter for each individual instance, not just on average. A popular approach is to train a selector network (which picks features) alongside a predictor network (which uses them), but existing methods struggle: discrete feature selection is non-differentiable, forcing slow or indirect training, and jointly trained models can cheat by learning to recognize the pattern of removed features rather than the features themselves. Hide&Seek reformulates feature removal as a continuous, differentiable operation and replaces removed features with random draws instead of fixed values, solving both problems at once.
Key Contributions
-
A fully differentiable joint selector-predictor model. Rather than discretely removing a feature subset (a non-differentiable operation), Hide&Seek replaces a proportion of each feature via a continuous mask, so selection and prediction are trained together under a single objective.
-
A leakage-resistant replacement strategy. Unselected features are replaced with random draws from the feature distribution rather than a fixed ablation value (like zero or the mean). This makes it impossible for the predictor to exploit the ablation pattern as a side channel.
-
A parsimony-weight annealing schedule. The sparsity penalty on the mask is ramped up quadratically over training, letting the model first learn accurate predictions and only later compress the explanation, which stabilizes training and improves final results.
-
A more general theory of information leakage. The authors show that the standard loss used by ablation-based methods is an ill-posed proxy for the intended objective, and they derive a lower bound (Corollary A.2) on the rate at which genuinely important "switch features" can be misidentified.
Main Findings
-
Hide&Seek leads on instance-wise selection metrics. Across six synthetic benchmarks (Syn1–Syn6), it achieves the highest true positive rate and lowest false discovery rate among eight compared methods, including INVASE, REAL-x, L2X, SHAP, LIME, LASSO, and Random Forest.
-
Dramatically faster training. Hide&Seek trains in about 5 seconds versus roughly 1 minute 16 seconds for REAL-x and over 1 hour 18 minutes for INVASE on the same synthetic task, while L2X runs in 3 seconds but cannot adapt the number of selected features per instance.
-
Switch features are correctly identified. In Syn4–Syn6, the switch feature X₁₁ is identified as important with median accuracy of 100% by Hide&Seek and REAL-x, versus roughly 51% for INVASE and 58% for L2X — matching the 50% misidentification rate that the theory predicts for the flawed methods.
-
Robust under multicollinearity. On correlated-feature variants of the synthetic tasks (pairwise correlation ρ up to 0.9), Hide&Seek maintains the highest average IWFS F1 score and switch accuracy above 99.4%, indicating no leakage even with highly dependent features.
-
Semi-synthetic credit default data. Using real, correlated credit-card features with synthetic labels (including age as a switch feature), Hide&Seek achieves the best F1 scores overall and the highest AUROC in five of seven prediction settings, tying INVASE on the real default labels.
-
MNIST patches. On distinguishing 3s from 8s, only Hide&Seek and REAL-x consistently highlight the informative "left arc" region across images; LIME fails to identify meaningful patches while INVASE and SHAP show less variation.
-
Breast cancer gene analysis. Applied to TCGA microarray data with four cancer subtypes, Hide&Seek ranks ESR1 and CCNB2 as the top genes by mean mask size — both with established literature ties to breast cancer.
Methodology in Plain English
Hide&Seek splits the problem into two cooperating networks: a Hide network and a Seek network.
The Hide network looks at an input instance and outputs a mask — one number between 0 and 1 per feature, representing how important that feature is for this instance. Instead of keeping or deleting whole features (which would require an all-or-nothing decision that breaks gradient flow), the model blends: for each feature, it keeps a proportion given by the mask and replaces the rest with a noisy stand-in value.
The crucial detail is what that stand-in value is. Older methods replace removed features with a fixed number like zero. A predictor can quietly learn that "feature equals zero" itself carries information — effectively smuggling removed information back into the model. Hide&Seek instead draws stand-ins randomly from each feature's own distribution. For the predictor to cheat now, it would have to learn the entire data distribution and detect when a value looks out-of-distribution, which is far harder and, empirically, does not happen.
The blended input goes to the Seek network, which makes the prediction. Both networks are trained together with two goals: predict accurately, and keep the masks sparse so explanations stay small. To balance these, the sparsity penalty starts near zero and grows quadratically over training, so the model is not forced to be parsimonious before it has learned anything useful.
A feature counts as important for an instance when its mask value exceeds 0.5, which lets the model choose how many features matter for each instance rather than requiring that number to be fixed in advance.
Why This Matters
Impact on research. Hide&Seek resolves a tension that has constrained this subfield: prior methods had to choose between joint, end-to-end training (fast, but vulnerable to leakage) and disjoint training (leak-free, but slow and requiring an unusually expressive predictor). The paper's theoretical analysis also sharpens the community's understanding of when leakage arises, showing the standard loss can be a formally ill-posed proxy and quantifying a lower bound on resulting errors.
Real-world applications:
- Clinical diagnostics: Identifying which genes, biomarkers, or symptoms drive a diagnosis for a specific patient, where the relevant variables differ across individuals.
- Credit and lending decisions: Explaining which financial attributes drove an individual loan or default prediction, an area with regulatory expectations around per-applicant justification.
- Education policy: Detecting which factors affect outcomes for different student subpopulations rather than assuming uniform drivers.
- Scientific discovery: Surfacing previously unreported candidate genes or variables (the BRCA analysis flags candidates beyond the established literature), where instance-wise patterns would be averaged away by global methods.
Industry relevance. The training-time advantage is substantial — minutes versus hours on modest datasets — which lowers the barrier for iterative deployment. The adaptive number of important features per instance matches how real explanation requests arrive: an auditor or regulator asks about one case at a time, and the number of relevant factors varies by case. The public code release supports direct adoption.
Future Directions
-
Better replacement distributions. The paper samples stand-ins from the product of marginal distributions, an efficient approximation. Modeling the true conditional distribution p(X_unselected | X_selected) could tighten results, especially in strongly dependent feature settings, and the appendix sketches an alternative approach worth developing.
-
Extensions beyond classification. The current formulation targets binary and multi-class classification; regression is noted as a straightforward substitution of mean-squared error for cross-entropy but is not empirically explored.
-
Scaling to higher-dimensional and structured data. Experiments cover 11 synthetic features, 23 credit features, 784 MNIST pixels, and 100 genes. Whether the continuous-mask formulation remains efficient and stable on much larger feature spaces or on structured inputs like images and sequences end-to-end is an open question.
-
Validating biological and domain-specific discoveries. The BRCA analysis surfaces candidates beyond those previously reported. Those candidates require domain-expert follow-up to confirm whether they represent genuine findings or artifacts of the method's inductive biases.
Target Audience
This paper is most valuable to:
- Explainability and interpretability researchers working on feature attribution, particularly those familiar with LIME, SHAP, L2X, INVASE, or REAL-x who want to understand the leakage problem and a clean solution to it.
- Applied machine learning practitioners in regulated or high-stakes domains (healthcare, finance, education) who need per-instance explanations and care about training cost.
- Statisticians and ML theorists interested in the formal treatment of information leakage, ill-posed loss proxies, and identifiability bounds.
- Computational biologists analyzing high-dimensional expression or microarray data, given the BRCA case study.
The paper assumes comfort with neural network training, KL divergence, and standard attribution benchmarks; readers without that background may find the theory appendix and experimental comparisons harder to follow, though the core idea — blend instead of delete, and randomize instead of zeroing — is accessible to a general technical audience.
Authors’ abstract
Instance-wise feature selection is a valuable tool for interpreting labeled data and the predictions of black-box models. In contrast to global feature selection techniques, instance-wise methods dynamically identify important features for each instance. A growing number of methods learn a selector, which identifies important features, and a predictor, which uses these to make predictions. However, these pioneering methods face challenges including information leakage and lack of differentiability, which can slow training. In this paper, we present Hide&Seek, an end-to-end differentiable model for instance-wise feature selection. We jointly learn feature selection and prediction under a single objective without information leakage. Hide&Seek outperforms existing state-of-the-art models across a range of experiments and is fast to train. We achieve this by reformulating feature removal as a differentiable operation where instead of discretely removing features, we replace a proportion of each feature. Training is further stabilized via a parsimony-weight annealing framework.