From Training to Deployment: Post-Hoc Causal Feature Identification via Sensitivity Ratios

Athanasios Vlontzos, Giorgos Papanastasiou, Bernhard Kainz, Sotirios TsaftarisarXiv 2026 · arXiv

TL;DR

The Normalised Sensitivity Ratio (NSR) is a new post-hoc, model-agnostic diagnostic tool that identifies whether an already-trained machine learning model relies on causal or spurious features. By measuring how a model's sensitivity to a feature varies across different data environments, NSR can perfectly audit black-box models before deployment without requiring retraining or knowledge of the training process.

What Problem Does This Paper Address?

Machine learning models are notorious for picking up on spurious correlations—patterns in the training data that mirror the target variable but fail to hold up in the real world. For instance, a hospital readmission model might learn to rely on the "day of the week" because a specific training site funnels high-severity cases into weekends. When deployed at a partner hospital with a different triaging policy, the model's performance collapses.

While frameworks like Invariant Risk Minimization (IRM) and Invariant Causal Prediction (ICP) exist to combat this, they must be applied during training. In practice, engineers are frequently handed pre-trained, black-box models and tasked with auditing their safety before deployment. This paper addresses the lack of post-hoc, model-agnostic tools capable of distinguishing between causal and spurious feature reliance in already-trained models.

Methods

The authors introduce the Normalised Sensitivity Ratio (NSR). It operates under a "structured-shift regime," which assumes that while the underlying causal mechanisms remain stable across different environments (e.g., different hospital sites or data batches), the distributions of spurious features (like equipment offsets or batch effects) shift.

NSR is calculated in two main steps:

  1. Causal Sensitivity Ratio (CSR): For a given feature, its values are swapped with random draws from a reference environment's distribution. The average absolute change in the model's output is measured. This isolates how sensitive the model is to that feature within a specific environment.
  2. Squaring the Coefficient of Variation ($CV^2$): NSR calculates the variance of these CSR values across all environments, normalized by the squared mean sensitivity.

Because causal feature distributions are stable across environments, a model's sensitivity to them remains constant, resulting in an NSR of exactly zero. Spurious features, tracking environmental shifts, cause the model's sensitivity to fluctuate, yielding a strictly positive NSR. Crucially, the normalization cancels out the model's learned weights, meaning NSR can detect highly spurious features even if the model only assigns them small weights.

Datasets

The authors validated NSR using both synthetic and real-world datasets:

  • Synthetic SCM Data: Linear Structural Causal Models were used to precisely map out the mathematical boundaries, phase transitions, and failure modes of the algorithm.
  • UCI Capital Bikeshare Dataset: Contains 17,379 samples. Ground truth labels categorize 8 features as causal (e.g., temperature, humidity, hour) and 4 as spurious/proxies (e.g., month, weekday, year).
  • UCI Wine Quality Dataset: Contains 6,497 samples, featuring 6 causal drivers and 5 proxy/redundant features.

Environments for the real-world datasets were constructed using domain-specific partitioning (such as month-quintiles for the bike data) to simulate natural structured shifts.

Key Insights and Ideas

  • The Environment as a Lens: NSR does not look at model weights to determine spuriousness. Instead, it looks at the geometry of the data environments. The model acts merely as a lens that makes this environmental geometry observable through its outputs.
  • Complementarity, Not Superiority: NSR is not a replacement for training-time methods like IRM or ICP; rather, their success conditions are structurally incomparable. Symmetrically designed environments favor IRM, whereas asymmetric, messy real-world environments favor NSR.
  • The Finite-Sample Rate Gap: Under the null hypothesis (a causal feature), empirical NSR converges to zero at a fast rate of $O_p(n^{-1})$. Under the alternative (a spurious feature), it converges at $O_p(n^{-1/2})$. This order-of-magnitude gap allows practitioners to use permutation-based thresholding to confidently separate features without making strict distributional assumptions.

Key Results

  • Perfect Identification: On synthetic data satisfying the structured-shift regime ($K \ge 5$ environments, shift magnitude $\epsilon \ge 1$), NSR achieved a perfect AUROC of 1.000 with zero variance.
Figure 1: RQ1: NSR AUROC as a function of K and ε (30 seeds per cell). K = 2: identically zero (Theorem 4.3(ii)). K ≥5, ε ≥1: AUROC = 1.000 with zero variance. K acts as a binary threshold, not a continuous dial.
  • Model Agnosticism: Feature rankings remained highly consistent across five distinct model families—OLS, Ridge, Random Forest, XGBoost, and MLP—confirming that the signal resides in the environment structure rather than the model architecture.
  • Real-World Success: On the Capital Bikeshare dataset, an ensemble implementation of NSR achieved a Precision@7 of 0.75, correctly identifying 6 out of 8 causal features in its top rankings and outperforming a standard LASSO baseline by 17 percentage points.
  • Sharp Failure Characterization: The authors mathematically proved and empirically verified exact geometric failure modes, such as when shifts are symmetric or when $K < 3$.
Table 1: Left (RQ1): AUROC and separation ratio for six shift configurations (n = 5,000, 50 seeds). Constant |∆β| or K = 2 gives chance AUROC; one broken symmetry restores perfect detection. Right (RQ1): NSR vs. IRM (mean ± std, 50 seeds); bold: predicted to detect.

Limitations and Future Work

NSR relies on Marginal Causal Stability, meaning the marginal distribution of causal features must remain fixed across environments. If the causal features themselves shift (e.g., due to demographic changes between hospital sites), NSR will assign them a positive score and potentially misclassify them as spurious.

Additionally, the current formulation assumes a uniform scalar shift across spurious features, which captures mean-shift heterogeneity but misses feature-specific or covariance shifts. The authors note that a promising future direction involves extending NSR to subspace-level interventions, estimating the spurious subspace via PCA of environment centroids to relax this scalar assumption.

Summary updated

Abstract

Given a model that is already trained, which features does it rely on causally versus spuriously? Existing methods require access to the training procedure and cannot answer this post-hoc. We introduce the \textbf{Normalised Sensitivity Ratio~(NSR)}, a post-hoc, model-agnostic diagnostic for this question under a structured-shift regime: environments differ primarily in the mean of spurious features while the causal mechanism and causal marginals remain stable, as in multi-site clinical data or multi-batch genomics. Within this regime, causal features induce constant model sensitivity across environments while spurious features track shift. NSR formalises this as the squared coefficient of variation of per-environment sensitivity. Under a linear structural causal model (SCM) with $K\ge3$ non-degenerate environments, NSR achieves exact identification (Theorem~1). We fully characterise failure: weak shifts ($O(\varepsilon^4)$ collapse), degenerate geometry, and proxy attenuation ($O((1-α)^4)$), giving practitioners quantitative criteria for assessing whether the regime holds. Finite-sample rates are $O_p(n^{-1})$ under the null and $O_p(n^{-1/2})$ under the alternative. Experiments confirm all theoretical predictions on synthetic data (area under the ROC curve [AUROC] $= 1.000$ under conditions satisfying the regime), show consistent rankings across five model families (Kendall $τ\ge0.529$), and recover six of eight causal features on bike-sharing data (Precision@7 $= 0.75$) without modifying any trained model.
BibTeX
@misc{vlontzos2026from,
  author = {Athanasios Vlontzos and Giorgos Papanastasiou and Bernhard Kainz and Sotirios Tsaftaris},
  title = {{From Training to Deployment: Post-Hoc Causal Feature Identification via Sensitivity Ratios}},
  year = {2026},
  eprint = {2607.25546},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.25546},
}
Figure