When Do Learned State Representations Break Sensitivity Analysis?

Siyu Wang, Xiaocong Chen, Quan Z. Sheng, Lina YaoNeurIPS 2026

TL;DR

When evaluating decision-making policies using historical data—think healthcare or robotics—unrecorded variables can secretly bias our safety estimates. We normally use "sensitivity analysis" to put mathematically guaranteed bounds on that hidden bias, but we almost always apply those bounds to compressed, AI-learned state representations rather than raw data. This paper reveals that compressing states can silently shatter those safety guarantees by amplifying hidden bias, and introduces a remarkably intuitive fix to keep our safety nets intact.

What Problem Does This Paper Address?

Imagine trying to evaluate a new clinical treatment policy using logged hospital records—a classic setup known as off-policy evaluation (OPE) in offline reinforcement learning. The catch? Doctors might base decisions on factors that never make it into the database (like a patient looking frail). Because this unobserved confounder ($U$) influences both the action ($A$) and the outcome ($R$), exact evaluation is impossible.

Enter causal sensitivity analysis: instead of guessing one exact policy value, you assume a reasonable cap on how strongly $U$ could sway actions, and compute a guaranteed interval $[V^-, V^+]$ containing the true value.

Here is the rub: modern RL pipelines rarely run on raw states ($S$). Instead, they use autoencoders or world models to compress $S$ into a tidy latent representation ($Z$), and then run sensitivity analysis in $Z$-space.

Figure 1: Causal structure. (a) One-step confounded decision problem. (b) Two-stage pipeline: ϕ maps S to Z; U-information enters Z only through compression. (c) Multi-step confounded MDP under dynamics-confounding separation: U affects S0 and all At but not the raw transition kernel directly; rewards may also depend on U. Solid arrows denote causal dependence; dashed arrows from U indicate the unobserved confounder’s effect on observed variables.

Nobody had directly checked whether the mathematical coverage guarantees survive this two-stage compression pipeline. Spoiler: in general, they don’t. When an encoder merges distinct raw states into the same latent bucket $Z$, $U$ cannot just shift actions within a state—it can also shift which raw state is active inside that latent bucket. These two effects compound, quietly inflating the effective confounding in latent space far past your assumed safety threshold.

Methods

First, the authors mathematically diagnose when a representation $Z$ is actually safe. They prove that confounding won't amplify if $U$ gives no clue about which raw state is active inside a latent bucket ($U \perp\!\!\!\perp S \mid Z$), and show that amplification grows continuously if this condition is slightly violated.

Of course, since $U$ is hidden, you cannot measure $U \perp\!\!\!\perp S \mid Z$ from logged data! However, for binary confounders and actions, the authors prove an observable proxy: if all raw states mapped to the same latent code share the same marginal action probability—their propensity $e(s) = P(A=1 \mid S=s)$—no extra amplification occurs.

Building on this, they propose Sensitivity-Preserving Representation Learning (SPRL):

  • Standard foundation: Start with a Latent Dynamics Model (LDM) that compresses states into $Z$ to predict future latent states (using a stop-gradient target) and rewards.
  • What's new: Pre-train and freeze a neural classifier $\hat{e}(s)$ on logged $(S, A)$ pairs to estimate propensities. During encoder training, add a kernel-weighted propensity homogeneity penalty ($\mathcal{L}_{\text{prop}}$). Using Gaussian weights based on latent distance, this penalty pushes the encoder not to merge raw states that have wildly different action propensities.

Datasets

The authors test their theory and SPRL across four synthetic and semi-synthetic environments:

  • Setting A (Synthetic, 1-step): Confounded features and reward-relevant features are completely separate, isolating whether safety intervals still capture the true policy value.
  • Setting B (Synthetic, 5-step MDP): Features overlap—variables shifted by $U$ also drive transitions and rewards, creating a tug-of-war between dynamics prediction and confounding amplification.
  • IHDP (Semi-synthetic, 1-step): Real clinical covariates (25 features) paired with injected confounding.
  • HalfCheetah (Semi-synthetic, multi-step): Physics-derived 17D state trajectories from the D4RL benchmark (mujoco/halfcheetah/medium-v0) paired with injected hidden confounding and binary actions.

Key Insights and Ideas

  • Amplification out of thin air: Even if actions are completely unconfounded in raw state space ($\Gamma_{\mathcal{S}} = 1$), merging a high-action state and a low-action state whose mixture weights depend on $U$ manufactures massive confounding in latent space (shooting up to $\Gamma_{\mathcal{Z}} \approx 20.75$ in a simple two-state example!).
  • Scrubbing $U$ out of $Z$ is a trap: You might think forcing $Z$ to forget $U$ solves the problem. In fact, a "Balanced" representation baseline had the lowest linear $U$-decodability (U-AUC of $0.595$) yet suffered the worst confounding amplification ($4.45\times$). Preserving sensitivity isn't about erasing $U$ globally; it's about preventing $U$-driven state-selection within latent cells. SPRL keeps U-AUC high ($\approx 0.99$) while cutting amplification.
  • Unsupervised encoders fail unpredictably: Standard Autoencoders, VAEs, and Contrastive models routinely miss the true target value in Setting A because they merge features without regard to action propensities.
Table 1: Setting A empirical target inclusion and samplewise interval width (K=100 seeds per strength, analytic target 0.700, nominal Λ = e|wu|). Incl is the number of seed intervals including the target; W/R is mean width divided by the samplewise Raw-State mean width. Widths remain descriptive when inclusion is low. SPRL is shown in bold.

Key Results

  • Target Inclusion (Setting A): Across 100 seeds, Raw State, LDM, Balanced, and SPRL capture the analytic target value $100/100$ times across all confounding strengths, whereas VAE drops as low as $0/100$ (at $w_u=0.3$). SPRL pays a modest interval-width cost, producing intervals $1.3\%$ to $5.9\%$ wider than LDM.
  • Slashing Amplification (Setting B): At mild confounding ($w_u = 0.3$), LDM amplifies confounding by a median of $2.88\times$ (95th percentile $4.92\times$), and Balanced hits $4.45\times$. SPRL ($\lambda=1$) cuts median amplification nearly in half to $1.45\times$ (p95 $2.66\times$).
  • Semi-Synthetic Benchmarks (at $w_u = 0.5$): SPRL consistently lowers the fitted median odds-ratio diagnostic relative to LDM—dropping from $1.36$ to $0.73$ on IHDP, and from $1.62$ to $1.10$ on HalfCheetah—though with wider intervals and higher reward-prediction errors than baselines.

Limitations and Future Work

The authors are admirably transparent about where the guardrails end:

  • Binary constraints: Propensity homogeneity guarantees preservation for binary hidden confounders and actions, but can fail when $U$ takes multiple values.
  • Heuristic gap: SPRL’s penalty minimizes average squared differences using a fitted propensity teacher, whereas the theoretical guarantee relies on the worst-case odds ratio of the true propensity. Thus, SPRL reduces amplification empirically rather than certifying safety mathematically.
  • Restrictive continuity math: The theoretical continuity bound only holds in a very tight local regime (requiring tiny independence violations as action probabilities near 0 or 1).
  • Next steps: Extending the framework to continuous action spaces, time-varying confounders, $f$-sensitivity models, and jointly training the propensity model alongside the encoder.

Summary updated

Abstract

Causal sensitivity analysis bounds the policy value of off-policy evaluation under unobserved confounding. In offline reinforcement learning, however, sensitivity bounds are typically applied not to raw states but to learned representations. We show that this two-stage pipeline can silently break the coverage guarantee: state aggregation under hidden confounding amplifies the effective pairwise action-sensitivity parameter in the latent space. Under outcome sufficiency and a common target, separate marginal-model constructions show that bounds computed at the nominal confounding level may exclude the true policy value. We characterize the amplification mechanism, give a sufficient condition for preservation, and prove a continuity result showing that the safety condition is not an isolated point: amplification grows continuously with the conditional-independence violation. Neither unsupervised nor standard task-aware representation objectives target the right quantity. We propose Sensitivity-Preserving Representation Learning (SPRL), which augments latent dynamics prediction with a kernel-weighted within-cell propensity homogeneity penalty, an observable proxy for exact population propensity homogeneity, which preserves action sensitivity under binary hidden confounding, and show across synthetic and semi-synthetic benchmarks that SPRL reduces fitted amplification relative to LDM, with interval-width and reward-prediction costs. Code: https://github.com/sy-siyu/SPRL.
BibTeX
@inproceedings{wang2026when,
  author = {Siyu Wang and Xiaocong Chen and Quan Z. Sheng and Lina Yao},
  title = {{When Do Learned State Representations Break Sensitivity Analysis?}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=h15TpswrQp},
}
Figure