Introduction
Markov Decision Processes (MDPs) are a fundamental model for describing sequential decision-making processes under uncertainty, including reinforcement learning (RL) problems. Counterfactual reasoning for MDPs is central to policy evaluation, explanation, and accountability. Given an observed MDP path, i.e., a state-action sequence, one may ask: Would a different sequence of actions have led to a different outcome? Such questions arise in numerous applications, such as generating counterfactual explanations [23 , 29 , 30 ] , facilitating policy transfer [15 ] , data augmentation with counterfactual paths [18 , 28 ] , as well as LLM counterfactuals [4 , 25 ] .
However, two distinct sources of uncertainty complicate counterfactual reasoning for MDPs. First, counterfactuals in MDPs are generally not point-identified: many structural causal models (SCMs) can be compatible with the MDP, each yielding different counterfactual outcomes. We call this causal uncertainty . Yet, many approaches assume a fixed SCM, typically a Gumbel-max SCM [2 , 14 , 15 , 22 , 29 , 33 ] , potentially leading to invalid counterfactual conclusions. Second, the transition probabilities of an MDP are often estimated from finite trajectory data. Yet, most counterfactual analyses treat these point estimates as precise probabilities, ignoring statistical uncertainty in the learned MDP.
Recent work by Lally et al. [17 ] addresses the causal uncertainty problem by bounding counterfactual probabilities across all SCMs consistent with the MDP. Also, there is a well-established line of research (e.g., [21 , 26 , 27 ] ) on capturing statistical uncertainty by using uncertain MDPs, where each transition probability lies within a data-derived confidence set, most often an interval (yielding interval MDPs).
However, there is no work to date that addresses both kinds of uncertainty, even though both matter for identifying robust interventions and explanations. Consider a learned model for sepsis treatment. Suppose that, under a nominal transition estimate, changing the dosage at step t t t prevents an adverse outcome. So we would conclude that action a t a_t a t is a sufficient intervention to prevent that outcome, but only if the transition probabilities were precise. Since these are learned from data and subject to sampling variability, there could be alternative models supported by the data where the adverse outcome would have occurred regardless of the dosage at t t t , i.e., where intervening on a t a_t a t alone is not enough. Thus, we seek counterfactual interventions that are robust to statistical uncertainties, i.e., valid across all MDP models entailed by some data-derived confidence set. For a similar reason, since there are many SCM models compatible with an MDP, we want such interventions to be robust to causal uncertainty, because each SCM can yield different counterfactual probabilities and thus different counterfactual policies that would have led to the patient’s recovery.
In this paper, we develop a framework for robust counterfactual reasoning in uncertain MDPs. Our contributions span two main areas:
1) Counterfactual bounds for uncertain MDPs. We derive analytical bounds for the counterfactual transition probabilities of a given interval MDP (IMDP). Our bounds are robust to both sources of uncertainty in this setting: they are guaranteed to include the true (unknown) counterfactual probabilities for every MDP M \mathcal{M} M entailed by the IMDP, and every SCM compatible with M \mathcal{M} M . To achieve this, we build on the work of Lally et al. [17 ] , who derived bounds on counterfactual probabilities for standard (certain) MDPs, and extend it – for the first time – to the uncertain MDP setting. Crucially, without our analytical characterisation, computing robust counterfactual probabilities becomes prohibitive, as it entails solving an optimisation problem with a number of constraints exponential in the size of the MDP [7 , 31 , 32 ] . Finally, we prove that our analytical bounds are exact (i.e., tight) in all but one case. For this remaining case, we provide conservative (i.e., sound) bounds that remain empirically efficient. As a contribution of independent interest, we further derive conservative bounds for the special (parametric) case of Gumbel-max causal models.
Minimal robust counterfactual interventions. Building on these bounds, we define the notion of a minimal robust counterfactual intervention as an MDP policy that performs the smallest set of action changes to induce a desired counterfactual outcome across all the causal models induced by statistical and causal uncertainty. In our MDP setting, w.l.o.g., we define outcomes as constraints over the (counter)factual path’s expected return. Given an IMDP estimated from data and an observed path, to derive such robust interventions, our method first constructs a counterfactual IMDP by computing bounds for all its transitions; then, interventions are found as solutions to a robust value iteration procedure [20 ] modified so that its value function keeps track of the allowed number of action changes. Finally, we evaluate our approach on a variety of MDP environments to investigate sources of failure in suboptimal RL policies, demonstrating that our method remains accurate and robust to uncertainty in both the MDP transitions and the causal model.
Background
In this section, we outline the background connecting Markov Decision Processes (MDPs), structural causal models (SCMs), and counterfactual inference.
Markov Decision Processes
MDPs model sequential decision-making under uncertainty: at each time t t t , an agent in state s t s_t s t selects an action a t a_t a t via a policy π \pi π , transitions to s t + 1 ∼ P ( ⋅ ∣ s t , a t ) s_{t+1} \sim P(\cdot\mid s_t, a_t) s t + 1 ∼ P ( ⋅ ∣ s t , a t ) , and receives reward R ( s t , a t ) R(s_t, a_t) R ( s t , a t ) . Formally, an MDP is a tuple M = ( S , A , P , P I , R ) \mathcal{M} = (\mathcal{S}, \mathcal{A}, P, P_I, R) M = ( S , A , P , P I , R ) , where S \mathcal{S} S is the discrete state space, A \mathcal{A} A the set of actions, P : ( S × A ) → Δ ( S ) P : (\mathcal{S} \times\mathcal{A}) \to\Delta(\mathcal{S}) P : ( S × A ) → Δ ( S ) the transition probability function, P I ∈ Δ ( S ) P_I \in\Delta(\mathcal{S}) P I ∈ Δ ( S ) the initial state distribution, and R : ( S × A ) → R R : (\mathcal{S} \times\mathcal{A}) \to\mathbb{R} R : ( S × A ) → R the reward function.
A (deterministic) policy π \pi π for M \mathcal{M} M is a function π : S → A \pi: \mathcal{S} \to\mathcal{A} π : S → A . A path τ \tau τ of M \mathcal{M} M under policy π \pi π is a sequence τ = ( s 0 , a 0 , s 1 , a 1 , … , s T − 1 , a T − 1 , s T ) \tau= (s_0, a_0, s_1, a_1, \ldots, s_{T-1}, a_{T-1}, s_T) τ = ( s 0 , a 0 , s 1 , a 1 , … , s T − 1 , a T − 1 , s T ) where T = ∣ τ ∣ T = |\tau| T = ∣ τ ∣ is the path length, P I ( s 0 ) > 0 P_I(s_0) > 0 P I ( s 0 ) > 0 , a t = π ( s t ) a_t = \pi(s_t) a t = π ( s t ) for all t = 0 , … , T − 1 t = 0, \ldots, T - 1 t = 0 , … , T − 1 , and P ( s t + 1 ∣ s t , a t ) > 0 P(s_{t+1} \mid s_t, a_t) > 0 P ( s t + 1 ∣ s t , a t ) > 0 for all t = 0 , … , T − 1 t = 0, \ldots, T - 1 t = 0 , … , T − 1 .
While MDPs can model a wide range of real-world decision-making problems [8 ] , it is often challenging to determine the transition probability function P P P exactly. To address this, uncertain MDPs allow us to explicitly account for uncertainty in the transition dynamics. In particular, interval MDPs represent this uncertainty through lower and upper bounds on the transition probabilities.
Definition 2.1 (Interval MDP [6 ] ). An Interval Markov Decision Process (IMDP) is a tuple M I = ( S , A , P I , P I , R ) \mathcal{M}_{\mathcal{I}} = (\mathcal{S}, \mathcal{A}, P_{\mathcal{I}}, P_I, R) M I = ( S , A , P I , P I , R ) , where S \mathcal{S} S , A \mathcal{A} A , P I P_I P I , and R R R are as in a standard MDP, and P I P_{\mathcal{I}} P I is an uncertain transition function: for all s , s ′ ∈ S s, s' \in\mathcal{S} s , s ′ ∈ S and a ∈ A a \in\mathcal{A} a ∈ A there exist bounds 0 ≤ P M I L B ( s ′ ∣ s , a ) ≤ P M I U B ( s ′ ∣ s , a ) ≤ 1 0 \leq P_{\mathcal{M}_{\mathcal{I}}}^{\mathrm{LB}}(s' \mid s, a) \leq P_{\mathcal{M}_{\mathcal{I}}}^{\mathrm{UB}}(s' \mid s, a) \leq1 0 ≤ P M I LB ( s ′ ∣ s , a ) ≤ P M I UB ( s ′ ∣ s , a ) ≤ 1 such that P I ( s ′ ∣ s , a ) = [ P M I L B ( s ′ ∣ s , a ) , P M I U B ( s ′ ∣ s , a ) ] P_{\mathcal{I}}(s' \mid s, a) = [P_{\mathcal{M}_{\mathcal{I}}}^{\mathrm{LB}}(s' \mid s, a), P_{\mathcal{M}_{\mathcal{I}}}^{\mathrm{UB}}(s' \mid s, a)] P I ( s ′ ∣ s , a ) = [ P M I LB ( s ′ ∣ s , a ) , P M I UB ( s ′ ∣ s , a )] .
Counterfactual Inference
Structural causal models (SCMs) [12 , 24 ] provide a mathematical framework for reasoning about causality and counterfactual inference. Formally, a SCM is a tuple C = ( U , V , F , P ( U ) ) \mathcal{C} = (\mathcal{U}, \mathcal{V}, \mathcal{F}, P(\mathcal{U})) C = ( U , V , F , P ( U )) , where
V \mathcal{V} V is the set of endogenous (observed) variables, U \mathcal{U} U is a set of exogenous (unobserved) variables, P ( U ) P(\mathcal{U}) P ( U ) is a joint distribution over each U ∈ U U \in\mathcal{U} U ∈ U , and F \mathcal{F} F is a set of structural equations such that each f V ∈ F f_V \in\mathcal{F} f V ∈ F determines the value of variable V ∈ V V \in\mathcal{V} V ∈ V as a function of U V ∈ U U_V \in\mathcal{U} U V ∈ U and of V V V ’s endogenous parents Pa V ⊆ V \operatorname{Pa}_\mathcal{V} \subseteq\mathcal{V} Pa V ⊆ V . An intervention (denoted d o ( X = x ) do(\mathbf{X} = \mathbf{x}) d o ( X = x ) ) modifies the SCM by fixing one or more variables X ⊆ V \mathbf{X} \subseteq\mathcal{V} X ⊆ V to specific values x \mathbf{x} x and severing their dependence on their respective parents Pa V \operatorname{Pa}_{\mathcal{V}} Pa V in the causal graph; combined with the original P ( U ) P(\mathcal{U}) P ( U ) this yields an interventional distribution over the remaining variables. Counterfactual inference follows the same procedure, except it infers a posterior P ( U ∣ V ) P(\mathcal{U} \mid\mathcal{V}) P ( U ∣ V ) over the values of the exogenous variables associated with a given observation v \mathbf{v} v , and then applies the intervention d o ( X = x ) do(\mathbf{X} = \mathbf{x}) d o ( X = x ) using P ( U ∣ v ) P(\mathcal{U} \mid\mathbf{v}) P ( U ∣ v ) in place of P ( U ) P(\mathcal{U}) P ( U ) , yielding a distribution over the counterfactual outcomes.
Counterfactual Inference in MDPs
An MDP can be represented as an SCM with the causal graph of Figure 1 and the following structural equations:
Figure 1. MDP causal graph. White nodes are the endogenous variables; grey nodes are the exogenous variables.
S t + 1 = f ( S t , A t , U t ) ; A t = π ( S t ) ; S 0 = f I ( U I ) ; R t = f R ( S t , A t ) . (1) \begin{aligned}
S_{t+1} &= f(S_t, A_t, U_t); \quad A_t = \pi(S_t);\\
S_0 &= f_I(U_I); \quad R_t = f_R(S_t, A_t). \tag*{(1)}
\end{aligned} S t + 1 S 0 = f ( S t , A t , U t ) ; A t = π ( S t ) ; = f I ( U I ) ; R t = f R ( S t , A t ) . (1)
The exogenous variables U t U_t U t capture all sources of randomness in the MDP, rendering the structural equations deterministic (given U t U_t U t ). In this setting, the interventional distribution P ( S t + 1 = s ′ ∣ d o ( A t = a ) ) = s ′ P(S_{t+1} = s' \mid do(A_t = a)) = s' P ( S t + 1 = s ′ ∣ d o ( A t = a )) = s ′ corresponds to the MDP’s transition probabilities P ( ⋅ ∣ s , a ) P(\cdot\mid s, a) P ( ⋅ ∣ s , a ) and observations are paths τ = ( s 0 , a 0 , … , s T − 1 , a T − 1 , s T ) \tau= (s_0, a_0, \ldots, s_{T-1}, a_{T-1}, s_T) τ = ( s 0 , a 0 , … , s T − 1 , a T − 1 , s T ) of length T T T .
Counterfactual inference is applied at the level of the individual timesteps: given the observed transition s t , a t → s t + 1 s_t, a_t \to s_{t+1} s t , a t → s t + 1 at time t t t , we first infer the posterior distribution over the exogenous variable U t U_t U t consistent with this observation, P ( U t ∣ S t = s t , A t = a t , S t + 1 = s t + 1 ) P(U_t \mid S_t = s_t, A_t = a_t, S_{t+1} = s_{t+1}) P ( U t ∣ S t = s t , A t = a t , S t + 1 = s t + 1 ) . We then use this posterior to evaluate the counterfactual probability of reaching outcome S t + 1 = s ~ ′ S_{t+1} = \tilde{s}' S t + 1 = s ~ ′ , had we been in state S t = s ~ S_t = \tilde{s} S t = s ~ , and instead performed action A t = a ~ A_t = \tilde{a} A t = a ~ . Formally, we define this counterfactual probability as P ~ t ( s ~ ′ ∣ s ~ , a ~ ) = P ( S t + 1 ( S t ← s ~ , A t ← a ~ ) = s ~ ′ ∣ S t = s t , A t = a t , S t + 1 = s t + 1 ) \tilde{P}_t(\tilde{s}' \mid\tilde{s}, \tilde{a}) = P(S_{t+1}(S_{t \leftarrow\tilde{s}, A_t \leftarrow\tilde{a}}) = \tilde{s}' \mid S_t = s_t, A_t = a_t, S_{t+1} = s_{t+1}) P ~ t ( s ~ ′ ∣ s ~ , a ~ ) = P ( S t + 1 ( S t ← s ~ , A t ← a ~ ) = s ~ ′ ∣ S t = s t , A t = a t , S t + 1 = s t + 1 ) , where S t + 1 ( S t ← s ~ , A t ← a ~ ) S_{t+1}(S_{t \leftarrow\tilde{s}, A_t \leftarrow\tilde{a}}) S t + 1 ( S t ← s ~ , A t ← a ~ ) denotes variable S t + 1 S_{t+1} S t + 1 in the SCM after the intervention S t ← s ~ S_t \leftarrow\tilde{s} S t ← s ~ and A t ← a ~ A_t \leftarrow\tilde{a} A t ← a ~ .
These single-timestep counterfactual probabilities can be combined across all timesteps to construct a non-stationary counterfactual MDP [29 ] , allowing us to reason about counterfactual outcomes over an entire trajectory.
Definition 2.2 (Counterfactual MDP (CFMDP)). Given an MDP M \mathcal{M} M , a corresponding SCM C \mathcal{C} C of the form (1) (i.e., one whose interventional distribution matches the transition probabilities of M \mathcal{M} M ), and an observed path τ = ( s 0 , a 0 , s 1 , a 1 , … , s T − 1 , a T − 1 , s T ) \tau= (s_0, a_0, s_1, a_1, \ldots, s_{T-1}, a_{T-1}, s_T) τ = ( s 0 , a 0 , s 1 , a 1 , … , s T − 1 , a T − 1 , s T ) , the corresponding counterfactual MDP is a non-stationary MDP M ~ τ = \tilde{\mathcal{M}}_\tau= M ~ τ = ( S , A , P ~ , P ~ I , R ) (\mathcal{S}, \mathcal{A}, \tilde{P}, \tilde{P}_I, R) ( S , A , P ~ , P ~ I , R ) where P ~ I ( s 0 ) = 1 \tilde{P}_I(s_0) = 1 P ~ I ( s 0 ) = 1 and the time-dependent transition kernel is given, for any t ∈ { 0 , … , ∣ τ ∣ − 1 } t \in\{0,\ldots,|\tau|-1\} t ∈ { 0 , … , ∣ τ ∣ − 1 } , by P ~ t ( s ~ ′ ∣ s ~ , a ~ ) = P ( S t + 1 ( S t = s , A t = a ) = s ′ ∣ S t = s t , A t = a t , S t + 1 = s t + 1 ) \tilde{P}_t(\tilde{s}' \mid\tilde{s},\tilde{a}) = P(S_{t+1}(S_t=s,A_t=a) = s' \mid S_t=s_t,A_t=a_t,S_{t+1}=s_{t+1}) P ~ t ( s ~ ′ ∣ s ~ , a ~ ) = P ( S t + 1 ( S t = s , A t = a ) = s ′ ∣ S t = s t , A t = a t , S t + 1 = s t + 1 ) .
In addition to enabling predictions under hypothetical scenarios, counterfactual inference lets us identify the factors that were causally responsible for an observed outcome. In an MDP, an RL agent controls the outcome through its actions, so these factors correspond to the actions selected by the agent’s policy. The CFMDP M ~ τ \tilde{\mathcal{M}}_\tau M ~ τ lets us evaluate how the outcome would have changed under different actions, and therefore identify the fewest changes to the observed actions that would have led to a better outcome. However, constructing M ~ τ \tilde{\mathcal{M}}_\tau M ~ τ requires knowing both the MDP M \mathcal{M} M and its corresponding SCM C \mathcal{C} C , which is rarely the case; most often we face both statistical and causal uncertainty, which we address in the following sections.
Counterfactual Inference in Uncertain MDPs
We first review how Zhang et al. [32 ] ’s partial counterfactual inference approach applies to MDPs, and how Lally et al. [17 ] build on this to derive closed-form bounds on counterfactual MDP probabilities. We then extend these bounds to IMDPs, forming the basis of our robust counterfactual inference framework.
Canonical SCMs
To address the problem of causal model unidentifiability, Zhang et al. [32 ] introduce a family of canonical SCMs that can simultaneously capture all possible counterfactual probability distributions across all compatible causal models. They show how to optimise over these canonical SCMs to find the SCMs that minimise and maximise counterfactual probabilities, yielding tight bounds.
Lally et al. [17 ] construct canonical SCMs for MDPs. Specifically, given a known MDP M \mathcal{M} M (with a known transition function P M P_{\mathcal{M}} P M ), the first step is to associate each value of the exogenous variable u t ∈ U t u_t \in\mathcal{U}_t u t ∈ U t with a unique deterministic mapping f : S × A × U → S f:\mathcal{S}\times\mathcal{A}\times\mathcal{U}\to\mathcal{S} f : S × A × U → S that defines the next state for every state-action pair. Since there are finitely many such mappings1 , this gives ∣ U t ∣ = ∣ S ∣ ∣ S ∣ × ∣ A ∣ |\mathcal{U}_t|=|\mathcal{S}|^{|\mathcal{S}|\times|\mathcal{A}|} ∣ U t ∣ = ∣ S ∣ ∣ S ∣ × ∣ A ∣ . This mapping is represented by an indicator variable μ ∈ { 0 , 1 } ∣ S ∣ × ∣ A ∣ × ∣ U t ∣ × ∣ S ∣ \mu\in\{0,1\}^{|\mathcal{S}|\times|\mathcal{A}|\times|\mathcal{U}_t|\times|\mathcal{S}|} μ ∈ { 0 , 1 } ∣ S ∣ × ∣ A ∣ × ∣ U t ∣ × ∣ S ∣ such that, for any s , a , u t , s ′ s,a,u_t,s' s , a , u t , s ′ :
μ s , a , u t , s ′ = { 1 if f ( s , a , u t ) = s ′ 0 otherwise. \mu_{s,a,u_t,s'} =
\begin{cases}
1 & \text{if } f(s,a,u_t)=s' \\
0 & \text{otherwise.}
\end{cases} μ s , a , u t , s ′ = { 1 0 if f ( s , a , u t ) = s ′ otherwise.
That is, μ s , a , u t , s ′ = 1 \mu_{s,a,u_t,s'}=1 μ s , a , u t , s ′ = 1 when the mapping associated with u t u_t u t leads to the next state s ′ s' s ′ from state-action pair ( s , a ) (s,a) ( s , a ) . Next, we define a vector θ ∈ R ∣ U t ∣ \theta\in\mathbb{R}^{|\mathcal{U}_t|} θ ∈ R ∣ U t ∣ , where each θ u t \theta_{u_t} θ u t represents the probability P ( U t = u t ) P(U_t=u_t) P ( U t = u t ) . Each instantiation of θ \theta θ defines a unique SCM. Given an observed transition s t , a t → s t + 1 s_t,a_t\to s_{t+1} s t , a t → s t + 1 , we can express the counterfactual probability P ~ M , t ( s ′ ∣ s , a ) \tilde{P}_{\mathcal{M},t}(s'\mid s,a) P ~ M , t ( s ′ ∣ s , a ) of any transition s , a → s ′ s,a\to s' s , a → s ′ in terms of μ \mu μ and θ \theta θ as follows:
P ~ M , t ( s ′ ∣ s , a ) = ∑ u t = 1 ∣ U t ∣ μ s , a , u t , s ′ ⋅ μ s t , a t , u t , s t + 1 ⋅ θ u t P M ( s t + 1 ∣ s t , a t ) . (2) \tilde{P}_{\mathcal{M},t}(s'\mid s,a)=\frac{\sum_{u_t=1}^{|\mathcal{U}_t|}\mu_{s,a,u_t,s'}\cdot\mu_{s_t,a_t,u_t,s_{t+1}}\cdot\theta_{u_t}}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)} . \tag*{(2)} P ~ M , t ( s ′ ∣ s , a ) = P M ( s t + 1 ∣ s t , a t ) ∑ u t = 1 ∣ U t ∣ μ s , a , u t , s ′ ⋅ μ s t , a t , u t , s t + 1 ⋅ θ u t . (2)
To obtain bounds [ P ~ M , t L B ( s ′ ∣ s , a ) , P ~ M , t U B ( s ′ ∣ s , a ) ] [\tilde{P}^{LB}_{\mathcal{M},t}(s'\mid s,a),\tilde{P}^{UB}_{\mathcal{M},t}(s'\mid s,a)] [ P ~ M , t L B ( s ′ ∣ s , a ) , P ~ M , t U B ( s ′ ∣ s , a )] on the counterfactual transition probabilities, we optimise over all values of θ \theta θ (note that μ \mu μ is fixed and is not optimised over) consistent with the observed transition and interventional data (i.e., the MDP transition probabilities). This results in the following optimisation problem (omitting the constant denominator in (2) from the objective):
min / max θ ∑ u t = 1 ∣ U t ∣ μ s , a , u t , s ′ ⋅ μ s t , a t , u t , s t + 1 ⋅ θ u t , (3) \min/\max_{\theta}\ \sum_{u_t=1}^{|\mathcal{U}_t|}\mu_{s,a,u_t,s'}\cdot\mu_{s_t,a_t,u_t,s_{t+1}}\cdot\theta_{u_t}, \tag*{(3)} min / θ max u t = 1 ∑ ∣ U t ∣ μ s , a , u t , s ′ ⋅ μ s t , a t , u t , s t + 1 ⋅ θ u t , (3)
s.t. ∑ u t = 1 ∣ U t ∣ μ s ^ , a ^ , u t , s ′ ⋅ θ u t = P M ( s ^ ′ ∣ s ^ , a ^ ) , ∀ s ^ , a ^ , s ^ ′ , (4) \text{s.t.}\quad\sum_{u_t=1}^{|\mathcal{U}_t|}\mu_{\hat{s},\hat{a},u_t,s'}\cdot\theta_{u_t}=P_{\mathcal{M}}(\hat{s}'\mid\hat{s},\hat{a}),\quad\forall\hat{s},\hat{a},\hat{s}', \tag*{(4)} s.t. u t = 1 ∑ ∣ U t ∣ μ s ^ , a ^ , u t , s ′ ⋅ θ u t = P M ( s ^ ′ ∣ s ^ , a ^ ) , ∀ s ^ , a ^ , s ^ ′ , (4)
∀ u t , 0 ≤ θ u t ≤ 1 and ∑ u t = 1 ∣ U t ∣ θ u t = 1. (5) \forall u_t,\ 0\leq\theta_{u_t}\leq1\quad\text{and}\quad\sum_{u_t=1}^{|\mathcal{U}_t|}\theta_{u_t}=1. \tag*{(5)} ∀ u t , 0 ≤ θ u t ≤ 1 and u t = 1 ∑ ∣ U t ∣ θ u t = 1. (5)
Closed-form Bounds for MDPs
Lally et al. [17 ] prove that, in MDP settings, this optimisation problem reduces to exact, closed-form expressions. These bounds also incorporate two key assumptions, counterfactual stability and counterfactual monotonicity, to avoid unintuitive counterfactual probabilities. Without these assumptions, the optimisation in (3) –(5) tends to produce loose or trivial [ 0 , 1 ] [0,1] [ 0 , 1 ] bounds, which compound over multiple transitions in sequential decision-making and reduce the usefulness of counterfactual inference.
Counterfactual stability is a standard assumption in the literature [23 , 29 ] and states that the outcome under an intervention changes only if the relative probability of some other outcome increases relative to the observed outcome. Counterfactual monotonicity ensures that observing an outcome cannot make it less likely in the counterfactual setting, and that unobserved (but possible) outcomes cannot become more likely. Formal definitions and the resulting bounds are in Appendix A.
Extending the Bounds to IMDPs
To extend these counterfactual probability bounds to IMDPs, we generalise the optimisation problem in (3) –(5) as follows. Let M I \mathcal{M}_{\mathcal{I}} M I denote an arbitrary IMDP. For a given counterfactual transition s , a → s ′ s,a\to s' s , a → s ′ and observed transition s t , a t → s t + 1 s_t,a_t\to s_{t+1} s t , a t → s t + 1 , the upper and lower bounds P ~ M I , t U B ( s ′ ∣ s , a ) \tilde{P}^{UB}_{\mathcal{M}_{\mathcal{I}},t}(s'\mid s,a) P ~ M I , t U B ( s ′ ∣ s , a ) and P ~ M I , t L B ( s ′ ∣ s , a ) \tilde{P}^{LB}_{\mathcal{M}_{\mathcal{I}},t}(s'\mid s,a) P ~ M I , t L B ( s ′ ∣ s , a ) are obtained by solving
min M ∈ M I , θ / max M ∈ M I , θ ( ∑ u t = 1 ∣ U t ∣ μ s , a , u t , s ′ ⋅ μ s t , a t , u t , s t + 1 ⋅ θ u t P M ( s t + 1 ∣ s t , a t ) ) (6) \min_{\mathcal{M}\in\mathcal{M}_{\mathcal{I}},\theta}/\max_{\mathcal{M}\in\mathcal{M}_{\mathcal{I}},\theta}
\left(\frac{\sum_{u_t=1}^{|\mathcal{U}_t|}\mu_{s,a,u_t,s'}\cdot\mu_{s_t,a_t,u_t,s_{t+1}}\cdot\theta_{u_t}}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right) \tag*{(6)} M ∈ M I , θ min / M ∈ M I , θ max ( P M ( s t + 1 ∣ s t , a t ) ∑ u t = 1 ∣ U t ∣ μ s , a , u t , s ′ ⋅ μ s t , a t , u t , s t + 1 ⋅ θ u t ) (6)
subject to constraints (4) and (5), and crucially ensuring that M \mathcal{M} M is a valid MDP within the IMDP’s uncertainty set, i.e., ∀ s , a , ∑ s ′ ∈ S P M ( s ′ ∣ s , a ) = 1 \forall s,a,\sum_{s'\in\mathcal{S}}P_{\mathcal{M}}(s'\mid s,a)=1 ∀ s , a , ∑ s ′ ∈ S P M ( s ′ ∣ s , a ) = 1 . Since closed-form expressions for the counterfactual bounds are already available for a fixed MDP M \mathcal{M} M , the optimisation over the IMDP reduces to optimising these bounds over all admissible MDPs:
P ~ M I , t U B ( s ′ ∣ s , a ) = max M ∈ M I ( P ~ M , t U B ( s ′ ∣ s , a ) ) , (7) \tilde{P}^{UB}_{\mathcal{M}_{\mathcal{I}},t}(s'\mid s,a)=\max_{\mathcal{M}\in\mathcal{M}_{\mathcal{I}}}\left(\tilde{P}^{UB}_{\mathcal{M},t}(s'\mid s,a)\right), \tag*{(7)} P ~ M I , t U B ( s ′ ∣ s , a ) = M ∈ M I max ( P ~ M , t U B ( s ′ ∣ s , a ) ) , (7)
P ~ M I , t L B ( s ′ ∣ s , a ) = min M ∈ M I ( P ~ M , t L B ( s ′ ∣ s , a ) ) . (8) \tilde{P}^{LB}_{\mathcal{M}_{\mathcal{I}},t}(s'\mid s,a)=\min_{\mathcal{M}\in\mathcal{M}_{\mathcal{I}}}\left(\tilde{P}^{LB}_{\mathcal{M},t}(s'\mid s,a)\right). \tag*{(8)} P ~ M I , t L B ( s ′ ∣ s , a ) = M ∈ M I min ( P ~ M , t L B ( s ′ ∣ s , a ) ) . (8)
This formulation enables us to derive closed-form expressions for the counterfactual probability bounds. Without it, computing these bounds would require solving (6) directly: a joint optimisation over admissible MDPs M ∈ M I \mathcal{M}\in\mathcal{M}_{\mathcal{I}} M ∈ M I , and over θ \theta θ (whose cardinality is exponential in the size of the state and action spaces). However, deriving these closed-form expressions requires more than simply optimising the closed-form MDP bounds of Lally et al. [17 ] independently over each probability interval: the resulting extremal values must also be simultaneously achievable by a single, valid MDP M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ , which makes extending their bounds to IMDPs non-trivial. The exact closed-form expression depends on whether the counterfactual state-action pair ( s , a ) (s,a) ( s , a ) and the observed state-action pair have disjoint or overlapping support: in the IMDP setting, we say ( s , a ) (s,a) ( s , a ) has disjoint support from the observed ( s t , a t ) (s_t,a_t) ( s t , a t ) if their supports are disjoint for every admissible MDP M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ ; otherwise, they have overlapping support. The resulting closed-form bounds are summarised in Table 1 , using p s , a L B ( s ′ ) p^{\mathrm{LB}}_{s,a}(s') p s , a LB ( s ′ ) as shorthand for P M ↑ , t L B ( s ′ ∣ s , a ) P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) P M ↑ , t LB ( s ′ ∣ s , a ) and p s , a U B ( s ′ ) p^{\mathrm{UB}}_{s,a}(s') p s , a UB ( s ′ ) for P M ↑ , t U B ( s ′ ∣ s , a ) P^{\mathrm{UB}}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) P M ↑ , t UB ( s ′ ∣ s , a ) , for all s , a , s ′ s,a,s' s , a , s ′ ; full theorem statements and proofs are given in Appendix § 9 .
Table 1. Closed-form counterfactual probability upper and lower bounds. For s ′ ≠ s t + 1 s'\ne s_{t+1} s ′ = s t + 1 in the overlapping case, the upper and lower bound conditions are each applied in order, where CS always holds if p s t , a t L B ( s ′ ) > 0 p^{\mathrm{LB}}_{s_t,a_t}(s')>0 p s t , a t LB ( s ′ ) > 0 and p s , a L B ( s t + 1 ) p s t , a t U B ( s t + 1 ) ≥ p s , a U B ( s ′ ) p s t , a t L B ( s ′ ) \frac{p^{\mathrm{LB}}_{s,a}(s_{t+1})}{p^{\mathrm{UB}}_{s_t,a_t}(s_{t+1})}\ge\frac{p^{\mathrm{UB}}_{s,a}(s')}{p^{\mathrm{LB}}_{s_t,a_t}(s')} p s t , a t UB ( s t + 1 ) p s , a LB ( s t + 1 ) ≥ p s t , a t LB ( s ′ ) p s , a UB ( s ′ ) , and CS sometimes holds if p s t , a t U B ( s ′ ) > 0 p^{\mathrm{UB}}_{s_t,a_t}(s')>0 p s t , a t UB ( s ′ ) > 0 and p s , a U B ( s t + 1 ) p s t , a t L B ( s t + 1 ) ≥ p s , a L B ( s ′ ) p s t , a t U B ( s ′ ) \frac{p^{\mathrm{UB}}_{s,a}(s_{t+1})}{p^{\mathrm{LB}}_{s_t,a_t}(s_{t+1})}\ge\frac{p^{\mathrm{LB}}_{s,a}(s')}{p^{\mathrm{UB}}_{s_t,a_t}(s')} p s t , a t LB ( s t + 1 ) p s , a UB ( s t + 1 ) ≥ p s t , a t UB ( s ′ ) p s , a LB ( s ′ ) . P s u m = ∑ s ′ ≠ s t + 1 P ~ M ↓ , t U B ( s ′ ∣ s , a ) \mathcal{P}_{\mathrm{sum}}=\sum_{s'\ne s_{t+1}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\downarrow,t}}(s'\mid s,a) P sum = ∑ s ′ = s t + 1 P M ↓ , t UB ( s ′ ∣ s , a ) for the closed-form but conservative lower bound; for the tight, optimisation-based bound, P s u m = max M ∈ M ↓ ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M , t U B ( s ′ ′ ∣ s , a ) \mathcal{P}_{\mathrm{sum}}=\max_{\mathcal{M}\in\mathcal{M}_{\downarrow}}\sum_{s''\in\mathcal{S}\setminus\{s'\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s''\mid s,a) P sum = max M ∈ M ↓ ∑ s ′′ ∈ S ∖ { s ′ } P M , t UB ( s ′′ ∣ s , a ) .
Proof Sketch. Consider an observed transition s t , a t → s t + 1 s_t,a_t \to s_{t+1} s t , a t → s t + 1 and counterfactual transition s , a → s ′ s,a \to s' s , a → s ′ . From (2) , for a fixed MDP M \mathcal{M} M and exogenous distribution θ \theta θ , we see that the counterfactual probability P ~ M , t ( s ′ ∣ s , a ) \tilde{P}_{\mathcal{M},t}(s' \mid s,a) P ~ M , t ( s ′ ∣ s , a ) depends only on the subset of exogenous values u t u_t u t consistent with both transitions, since P M ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) , the denominator in (2), is fixed. Therefore, the optimisation involves identifying the θ \theta θ that maximises/minimises the following sum:
∑ u t = 1 ∣ U t ∣ μ s , a , u t , s ′ ⋅ μ s t , a t , u t , s t + 1 ⋅ θ u t = ∑ u t ∈ U t f ( s t , a t , u t ) = s t + 1 f ( s , a , u t ) = s ′ θ u t . \sum_{u_t=1}^{|U_t|} \mu_{s,a,u_t,s'} \cdot\mu_{s_t,a_t,u_t,s_{t+1}} \cdot\theta_{u_t}
=
\sum_{\substack{u_t \in U_t \\ f(s_t,a_t,u_t)=s_{t+1} \\ f(s,a,u_t)=s'}} \theta_{u_t}. u t = 1 ∑ ∣ U t ∣ μ s , a , u t , s ′ ⋅ μ s t , a t , u t , s t + 1 ⋅ θ u t = u t ∈ U t f ( s t , a t , u t ) = s t + 1 f ( s , a , u t ) = s ′ ∑ θ u t .
Importantly, Lally et al. [17 ] prove that the bounds for each ( s , a ) (s,a) ( s , a ) depend only on the probability distribution of this state-action pair and the observed state-action pair ( s t , a t ) (s_t,a_t) ( s t , a t ) , so we can decompose the optimisation problem. Since the bounds proven by Lally et al. [17 ] are tight, extending these bounds from MDPs to IMDPs (6) reduces to (7) and (8) , where we aim to identify, for each transition, the max/min possible counterfactual upper/lower bound across all admissible MDPs within the IMDP. In the proofs, we search over the interval probabilities for ( s , a ) (s,a) ( s , a ) and ( s t , a t ) (s_t,a_t) ( s t , a t ) to obtain these bounds, while ensuring that a valid MDP exists (i.e., where the probability distribution for each state-action pair sums to 1) that results in these bounds. Intuitively, each case reflects a different way probability mass can be distributed between the transitions from ( s , a ) (s,a) ( s , a ) and ( s t , a t ) (s_t,a_t) ( s t , a t ) under this constraint: when ( s , a ) = ( s t , a t ) (s,a)=(s_t,a_t) ( s , a ) = ( s t , a t ) , the bounds are immediate (the same ( s t , a t ) (s_t,a_t) ( s t , a t ) under the same context u t u_t u t must yield the same outcome); when the supports are disjoint, the counterfactual stability and counterfactual monotonicity assumptions are vacuously satisfied, and do not constrain how ( s , a ) (s,a) ( s , a ) and ( s t , a t ) (s_t,a_t) ( s t , a t ) behave under the same u t u_t u t , so the bound depends only on their marginal probabilities; and when the supports are overlapping, these assumptions constrain how probability mass can be distributed across the shared support of ( s , a ) (s,a) ( s , a ) and ( s t , a t ) (s_t,a_t) ( s t , a t ) .
Proposition 3.1 (Tightness of the Counterfactual IMDP Bounds). The upper bounds P ~ M ↑ , t U B ( s ′ ∣ s , a ) \tilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) P ~ M ↑ , t UB ( s ′ ∣ s , a ) are tight for all s , a , s ′ s,a,s' s , a , s ′ . The lower bounds P ~ M ↑ , t L B ( s ′ ∣ s , a ) \tilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) P ~ M ↑ , t LB ( s ′ ∣ s , a ) are tight for all s , a , s ′ s,a,s' s , a , s ′ , except when ( s , a ) ≠ ( s t , a t ) (s,a) \ne(s_t,a_t) ( s , a ) = ( s t , a t ) , the counterfactual and observed transitions have overlapping support, and the counterfactual stability constraint does not force the bound to 0 for all admissible MDPs M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ , i.e. Cases 1 and 3 of Theorem B.7.
Remark. In every case where a tight bound can be obtained (Theorems B.3, B.4, B.5, B.6, and Case 2 of B.7, each closed-form bound can be expressed as a function of a small, fixed set of individual transition probabilities. This lets us explicitly construct a single admissible MDP that sets each of these probabilities to its IMDP-level extremal (upper or lower) value, thereby minimising or maximising the overall expression. However, Cases 1 and 3 of B.7 differ structurally, as the bound depends on the sum of the upper-bound probabilities of alternative outcomes ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M ↑ , t U B ( s ′ ′ ∣ s , a ) \sum_{s''\in\mathcal{S}\setminus\{s'\}} \tilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\uparrow},t}(s'' \mid s,a) ∑ s ′′ ∈ S ∖ { s ′ } P ~ M ↑ , t UB ( s ′′ ∣ s , a ) , each term of which is itself the result of a separate optimisation over M ↑ \mathcal{M}_{\uparrow} M ↑ . This leaves us with two options: (i) solving the nested optimisation when necessary to obtain the true maximum of ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M ↑ , t U B ( s ′ ′ ∣ s , a ) \sum_{s''\in\mathcal{S}\setminus\{s'\}} \tilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\uparrow},t}(s'' \mid s,a) ∑ s ′′ ∈ S ∖ { s ′ } P ~ M ↑ , t UB ( s ′′ ∣ s , a ) achievable by a single admissible MDP, giving a tight bound, or (ii) computing a conservative lower bound by replacing this sum with the sum of the individually-optimised IMDP-level upper bounds ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M ↑ , t U B ( s ′ ′ ∣ s , a ) \sum_{s''\in\mathcal{S}\setminus\{s'\}} \tilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\uparrow},t}(s'' \mid s,a) ∑ s ′′ ∈ S ∖ { s ′ } P ~ M ↑ , t UB ( s ′′ ∣ s , a ) , which need not be jointly achievable. We compare these two approaches in our experiments.
Bounds for Gumbel-max SCMs. While this is not the main focus of our work, we also extend the Gumbel-max SCM counterfactual inference approach [15 , 23 , 29 ] from MDPs to IMDPs and, to our knowledge, provide the first bounds on Gumbel-max counterfactual probabilities for IMDPs. Although these bounds are not tight in general, they may be of independent interest given the popularity of Gumbel-max SCMs; we also use them in our experimental evaluation (Section 5) as a baseline to assess the robustness of our approach. The bounds and their proof are given in Appendix § 10 .
Methodology
We first describe how to derive an IMDP from paths sampled from the unknown MDP, and how to construct a counterfactual IMDP (CFIMDP) for a given observed path. We then formalise the notion of minimal robust counterfactual interventions and show how to compute them via robust value iteration over the CFIMDP.
Learning IMDPs from Data
We begin by collecting observed trajectories of length ∣ τ ∣ |\tau| ∣ τ ∣ (an environment-specific hyperparameter) from either the initial state, if defined, or any non-sink state. Following the standard approach [21 , 26 , 27 ] , we estimate the IMDP by computing a confidence interval for each transition probability from these observations, assuming that the MDP’s topology is known (the so-called grey-box setting)2 . We use the Clopper-Pearson method [5 ] , with an overall confidence level 1 − α 1-\alpha 1 − α distributed evenly across all nondeterministic transitions (see Appendix § 11 for more details). We assign a minimum probability ϵ \epsilon ϵ to all possible transitions (ϵ = 0.01 \epsilon=0.01 ϵ = 0.01 , or 10 − 4 10^{-4} 1 0 − 4 for Sepsis, whose smallest transition probability is approximately 10 − 4 10^{-4} 1 0 − 4 ) to ensure that observed transitions have strictly positive lower bounds, as required for valid counterfactual inference. We note our framework is agnostic to the estimation method: more sample-efficient methods than Clopper-Pearson may yield tighter IMDP bounds from the same data, and hence tighter CFIMDP bounds.
Constructing the CFIMDP
Given the counterfactual probability bounds in Table 1 , we can compute a non-stationary counterfactual interval MDP (CFIMDP) for any given IMDP M ↓ M_{\downarrow} M ↓ and observed path τ \tau τ . For each transition observed in τ \tau τ , we compute the counterfactual probability bounds for all possible transitions in the IMDP. These bounds are then combined to form a non-stationary CFIMDP by concatenating the time-dependent counterfactual transition probability bounds across time steps. Formally, a CFIMDP is defined as follows:
Definition 4.1 (Counterfactual Interval MDP (CFIMDP) [17 ] ). Given an observed path τ \tau τ and IMDP M ↓ M_{\downarrow} M ↓ , the counterfactual probability for each transition in the CFIMDP M ~ ↓ \widetilde{M}_{\downarrow} M ↓ is defined, for t = 0 , … , ∣ τ ∣ − 1 t=0,\ldots,|\tau|-1 t = 0 , … , ∣ τ ∣ − 1 , as P ~ t ( s ′ ∣ s , a ) = [ P ~ t L B ( s ′ ∣ s , a ) , P ~ t U B ( s ′ ∣ s , a ) ] \widetilde{P}_t(s'\mid s,a)=[\widetilde{P}^{\mathrm{LB}}_t(s'\mid s,a),\widetilde{P}^{\mathrm{UB}}_t(s'\mid s,a)] P t ( s ′ ∣ s , a ) = [ P t LB ( s ′ ∣ s , a ) , P t UB ( s ′ ∣ s , a )] .
Proposition 4.2 (Confidence propagation). Let M ↓ M_{\downarrow} M ↓ be a data-driven IMDP, which contains the true MDP with probability at least 1 − α 1-\alpha 1 − α . Then the CFIMDP derived from M ↓ M_{\downarrow} M ↓ contains the true CFMDP with probability at least 1 − α 1-\alpha 1 − α (proof in Appendix § 11 ).
Minimal Robust Counterfactual Interventions
The CFIMDP we just introduced allows us to systematically reason about counterfactual outcomes. Specifically, given an observed trajectory whose cumulative reward falls below a threshold λ \lambda λ , we seek an intervention that guarantees an expected counterfactual cumulative reward ≥ λ \ge\lambda ≥ λ . Using the CFIMDP, we can identify interventions that would have improved on the factual outcome in a robust way w.r.t. all models induced by statistical and causal uncertainties. Moreover, we are interested in minimal interventions, i.e., policies that require the fewest action changes to achieve this. Given our RL context, we focus on the expected cumulative reward. Properties like reach-avoid can be captured this way via a suitable Bellman recursion [1 ] ; more complex temporal logic properties can be encoded as reachability by taking the product of the CFIMDP with a reward machine [13 ] , which we leave for future work.
Let τ = ( s 0 , a 0 , … , s ∣ τ ∣ − 1 , a ∣ τ ∣ − 1 , s ∣ τ ∣ ) \tau=(s_0,a_0,\ldots,s_{|\tau|-1},a_{|\tau|-1},s_{|\tau|}) τ = ( s 0 , a 0 , … , s ∣ τ ∣ − 1 , a ∣ τ ∣ − 1 , s ∣ τ ∣ ) be an observed path, and let G ( τ ) = ∑ t = 0 ∣ τ ∣ − 1 R ( s t , a t ) G(\tau)=\sum_{t=0}^{|\tau|-1}R(s_t,a_t) G ( τ ) = ∑ t = 0 ∣ τ ∣ − 1 R ( s t , a t ) denote its cumulative reward. A counterfactual policy π \pi π chooses an action π ( t , s ) \pi(t,s) π ( t , s ) for each time step t t t and state s s s . We write M ~ ↓ ∈ M ~ ↓ \widetilde{M}_{\downarrow}\in\widetilde{\mathcal{M}}_{\downarrow} M ↓ ∈ M ↓ for any CFMDP within the CFIMDP, i.e., any non-stationary MDP whose transition probabilities satisfy P ~ t L B ( s ′ ∣ s , a ) ≤ P ~ t ( s ′ ∣ s , a ) ≤ P ~ t U B ( s ′ ∣ s , a ) \widetilde{P}^{\mathrm{LB}}_t(s'\mid s,a)\le\widetilde{P}_t(s'\mid s,a)\le\widetilde{P}^{\mathrm{UB}}_t(s'\mid s,a) P t LB ( s ′ ∣ s , a ) ≤ P t ( s ′ ∣ s , a ) ≤ P t UB ( s ′ ∣ s , a ) for all t , s , a t,s,a t , s , a and s ′ s' s ′ . Following π \pi π in M ~ ↓ \widetilde{M}_{\downarrow} M ↓ induces a distribution M ~ ↓ ( π ) \widetilde{M}_{\downarrow}(\pi) M ↓ ( π ) over counterfactual paths τ ~ = ( s ~ 0 , a ~ 0 , … , s ~ ∣ τ ∣ ) \widetilde{\tau}=(\widetilde{s}_0,\widetilde{a}_0,\ldots,\widetilde{s}_{|\tau|}) τ = ( s 0 , a 0 , … , s ∣ τ ∣ ) , and we define the worst-case expected counterfactual cumulative reward of π \pi π from the initial state s 0 s_0 s 0 as
V ↓ , π ( s 0 ) = min M ~ ↓ ∈ M ~ ↓ E M ~ ↓ ( π ) [ G ( τ ~ ) ∣ s ~ 0 = s 0 ] . (9) V^{\downarrow,\pi}(s_0)=\min_{\widetilde{M}_{\downarrow}\in\widetilde{\mathcal{M}}_{\downarrow}}\mathbb{E}_{\widetilde{M}_{\downarrow}(\pi)}\left[G(\widetilde{\tau})\mid\widetilde{s}_0=s_0\right]. \tag*{(9)} V ↓ , π ( s 0 ) = M ↓ ∈ M ↓ min E M ↓ ( π ) [ G ( τ ) ∣ s 0 = s 0 ] . (9)
The set M ~ ↓ \widetilde{\mathcal{M}}_{\downarrow} M ↓ contains the CFMDP of every MDP in the IMDP under every corresponding SCM. Since the CFIMDP bounds each counterfactual transition probability separately, it may also contain CFMDPs that combine probabilities induced by different MDPs or SCMs, and so do not correspond to any single causal model compatible with the IMDP. As is standard for IMDPs [9 ] , taking the worst case over this larger set yields conservative, but efficiently computable, guarantees.
For k ∈ { 0 , … , ∣ τ ∣ } k \in\{0,\ldots,|\tau|\} k ∈ { 0 , … , ∣ τ ∣ } , we denote with Π τ , k \Pi_{\tau,k} Π τ , k the set of counterfactual policies that change no more than k k k actions from τ \tau τ , i.e.,
Π τ , k = { π | ∑ t = 0 ∣ τ ∣ − 1 1 ( a ~ t ≠ a t ) ≤ k , ∀ M ~ τ ∈ M ~ τ and τ ~ ∈ supp ( M ~ τ ( π ) ) } . \Pi_{\tau,k} = \left\{ \pi\,\middle|\, \sum_{t=0}^{|\tau|-1} \mathbb{1}(\tilde{a}_t \ne a_t) \le k,\ \forall\tilde{M}_{\tau} \in\widetilde{\mathcal{M}}_{\tau}\text{ and }\tilde{\tau} \in\operatorname{supp}(\tilde{M}_{\tau}(\pi)) \right\}. Π τ , k = ⎩ ⎨ ⎧ π t = 0 ∑ ∣ τ ∣ − 1 1 ( a ~ t = a t ) ≤ k , ∀ M ~ τ ∈ M τ and τ ~ ∈ supp ( M ~ τ ( π )) ⎭ ⎬ ⎫ .
where 1 { ⋅ } \mathbb{1}\{\cdot\} 1 { ⋅ } denotes the indicator function, a ~ t = π ( t , s ~ t ) \tilde{a}_t = \pi(t,\tilde{s}_t) a ~ t = π ( t , s ~ t ) is the action taken by π \pi π at time t t t along τ ~ \tilde{\tau} τ ~ and supp ( M ~ τ ( π ) ) \operatorname{supp}(\tilde{M}_{\tau}(\pi)) supp ( M ~ τ ( π )) denotes the set of admissible paths of M ~ τ ( π ) \tilde{M}_{\tau}(\pi) M ~ τ ( π ) .
Definition 4.3 (Minimal Robust Counterfactual Intervention). A counterfactual policy π ∗ \pi^* π ∗ is a minimal robust counterfactual intervention for a path τ \tau τ and threshold λ \lambda λ if, for some k ∗ ∈ { 0 , … , ∣ τ ∣ } k^* \in\{0,\ldots,|\tau|\} k ∗ ∈ { 0 , … , ∣ τ ∣ } : (1) π ∗ ∈ Π τ , k ∗ \pi^* \in\Pi_{\tau,k^*} π ∗ ∈ Π τ , k ∗ and V ⊥ , π ∗ ( s 0 ) ≥ λ V^{\perp,\pi^*}(s_0) \ge\lambda V ⊥ , π ∗ ( s 0 ) ≥ λ , and (2) for all k < k ∗ k < k^* k < k ∗ , max π ∈ Π τ , k V ⊥ , π ( s 0 ) < λ \max_{\pi\in\Pi_{\tau,k}} V^{\perp,\pi}(s_0) < \lambda max π ∈ Π τ , k V ⊥ , π ( s 0 ) < λ .
Conversely, if the observed cumulative reward is at least λ \lambda λ , we can identify the minimal interventions that would have robustly led to a cumulative reward below λ \lambda λ , i.e., the observed actions responsible for the success, by reversing the inequalities and replacing the V ⊥ , π V^{\perp,\pi} V ⊥ , π with the corresponding best-case (optimistic) value V ⊤ , π V^{\top,\pi} V ⊤ , π .
Computing minimal robust counterfactual interventions. We compute minimal robust counterfactual interventions via pessimistic value iteration [20 ] , which maximises the expected cumulative reward under the worst-case CFMDP within the CFIMDP. To restrict the search to π ∈ Π τ , k \pi\in\Pi_{\tau,k} π ∈ Π τ , k , we augment the state with a counter k k k that tracks the remaining allowed number of action changes, and define
V ∗ ( s , t , k ) = max π min P ~ t ∈ P ~ t E s ′ ∼ P ~ t ( ⋅ ∣ s , π ( t , s ) ) [ R ( s , π ( t , s ) ) + V ∗ ( s ′ , t + 1 , k − 1 { π ( t , s ) ≠ a t } ) ] . (10) V^*(s,t,k) = \max_{\pi}\min_{\widetilde{P}_t \in\widetilde{\mathcal{P}}_t} \mathbb{E}_{s' \sim\widetilde{P}_t(\cdot\mid s,\pi(t,s))}\left[R(s,\pi(t,s)) + V^*(s',t+1,k-\mathbb{1}\{\pi(t,s) \ne a_t\})\right]. \tag*{(10)} V ∗ ( s , t , k ) = π max P t ∈ P t min E s ′ ∼ P t ( ⋅ ∣ s , π ( t , s )) [ R ( s , π ( t , s )) + V ∗ ( s ′ , t + 1 , k − 1 { π ( t , s ) = a t }) ] . (10)
where V ∗ ( s , ∣ τ ∣ , k ) = 0 V^*(s,|\tau|,k)=0 V ∗ ( s , ∣ τ ∣ , k ) = 0 for all s s s and k k k , and, for k = 0 k=0 k = 0 , the maximum is restricted to π ( t , s ) = a t \pi(t,s)=a_t π ( t , s ) = a t . Since the CFIMDP selects transition probabilities independently for each ( t , s , a ) (t,s,a) ( t , s , a ) , the worst case can be computed one step at a time [9 ] , so V ∗ ( s 0 , 0 , k ) = max π ∈ Π τ , k V ⊥ , π ( s 0 ) V^*(s_0,0,k)=\max_{\pi\in\Pi_{\tau,k}} V^{\perp,\pi}(s_0) V ∗ ( s 0 , 0 , k ) = max π ∈ Π τ , k V ⊥ , π ( s 0 ) . Let k ∗ k^* k ∗ be the smallest k k k with V ∗ ( s 0 , 0 , k ) ≥ λ V^*(s_0,0,k) \ge\lambda V ∗ ( s 0 , 0 , k ) ≥ λ , and π ∗ \pi^* π ∗ the corresponding maximising policy. Then π ∗ ∈ Π τ , k ∗ \pi^* \in\Pi_{\tau,k^*} π ∗ ∈ Π τ , k ∗ achieves V ⊥ , π ∗ ( s 0 ) ≥ λ V^{\perp,\pi^*}(s_0) \ge\lambda V ⊥ , π ∗ ( s 0 ) ≥ λ , and no policy that changes fewer actions does, so π ∗ \pi^* π ∗ is a minimal robust counterfactual intervention (see Appendix § 12 for the full algorithm). With the conservative lower bounds, π ∗ \pi^* π ∗ is still guaranteed to achieve V ⊥ , π ∗ ( s 0 ) ≥ λ V^{\perp,\pi^*}(s_0) \ge\lambda V ⊥ , π ∗ ( s 0 ) ≥ λ , but k ∗ k^* k ∗ may be larger than with the tight bounds.
Relation to actual causation. Minimal robust counterfactual interventions are closely related to the notion of actual causes [11 ] . Informally, a set of observed actions is an actual cause of an outcome if changing those actions, while keeping all other actions at their observed values, would have changed the counterfactual outcome, and no strict subset of these actions has this property. Identifying an actual cause requires knowing the SCM and the context (the exogenous noise values), which together determine a single counterfactual path. In our setting, neither is known: we only know that the true CFMDP lies within the CFIMDP, and each CFMDP induces a distribution over counterfactual paths. We therefore require the change in outcome to hold robustly and in expectation, making our interventions a robust, policy-based analogue of actual causes.
Evaluation
We evaluate our approach along five axes: (1) its accuracy in off-policy evaluation tasks; (2) how its policies compare against those obtained from the exact CFIMDP (i.e., the CFIMDP derived from the true MDP); (3) its robustness relative to the Gumbel-max approach; (4) how well it identifies minimal action changes to achieve a desired counterfactual value; and (5) the trade-off of using conservative vs. tight lower bounds. We evaluate our approach on a range of MDP tasks, ranging from simple models (GridWorld and Frozen Lake) to more complex clinical and navigation tasks (Sepsis and Aircraft). Full descriptions of the MDP environments and system details can be found in the Appendix § 13 . The code is available at: https://github.com/jessicallaly/robust-cf-inference-beyond-mdps.
Off-Policy Evaluation
We first check the correctness of our counterfactual inference method for IMDPs in an off-policy evaluation (OPE) setting [3 , 23 ] , estimating the expected return of an optimal target policy π ∗ \pi^* π ∗ using trajectories generated by a suboptimal behavioural policy π \pi π . We construct a data-driven IMDP given a fixed number N N N of observed trajectories and confidence α = 0.1 \alpha=0.1 α = 0.1 , sample 100 trajectories from the true MDP under π \pi π , build a CFIMDP for each, and compute upper and lower bounds on the expected counterfactual return from the initial state. The counterfactual value averaged over observed trajectories should equal the interventional value. Hence, if the method is unbiased, the average bounds should contain the true interventional value V π ∗ ( s 0 ) V^{\pi^{*}}(s_{0}) V π ∗ ( s 0 ) . Table 2 shows the results for the GridWorld (p = 0.9 p = 0.9 p = 0.9 ) MDP (similar results for GridWorld (p = 0.4 p = 0.4 p = 0.4 ) can be found in Appendix § 14 ), alongside the exact bounds from the true MDP following Lally et al. [17 ] . The results confirm that our approach is valid and unbiased: the data-driven CFIMDP bounds consistently contain the true expected return, and converge towards the exact bounds as the number N N N of trajectories increases.
Table 2. Average lower (V ⊥ , π ∗ ( s 0 ) V^{\perp,\pi^*}(s_0) V ⊥ , π ∗ ( s 0 ) ) and upper (V ⊤ , π ∗ ( s 0 ) V^{\top,\pi^*}(s_0) V ⊤ , π ∗ ( s 0 ) ) bounds on the counterfactual value of π ∗ \pi^* π ∗ over 100 randomly sampled observed paths, under the exact CFIMDP and data-driven CFIMDPs whose MDPs are learnt from N N N simulated paths. The true interventional value is V π ∗ ( s 0 ) = 333 V^{\pi^*}(s_0)=333 V π ∗ ( s 0 ) = 333 .
Evaluating Performance
Next, we evaluate the impact of learning the model from data by comparing the performance of the counterfactual policies derived from our data-driven IMDP (with conservative lower bounds) against those derived from the exact CFIMDP. We use a suboptimal observational policy π \pi π that selects a random action over the optimal action with probability 0.5, construct an IMDP with hyperparameters (N = 100,000 N = 100{,}000 N = 100 , 000 , α = 0.1 \alpha= 0.1 α = 0.1 ), and derive CFIMDPs for 100 paths sampled under π \pi π using both approaches. We then compare the average values V ∗ ( s 0 , 0 , k ) V^{*}(s_{0},0,k) V ∗ ( s 0 , 0 , k ) of the resulting pessimistic optimal policies, where s 0 s_{0} s 0 is the MDP’s initial state, for each maximum number of action changes k k k .
For GridWorld and Frozen Lake (Figure 2 a-Figure 2 c), our approach yields estimates of V ∗ ( s 0 , 0 , k ) V^{*}(s_{0},0,k) V ∗ ( s 0 , 0 , k ) close to those obtained from the exact CFIMDP, showing that the statistical uncertainty in the MDP has little impact on the robust counterfactual policies. For Sepsis and Aircraft (Figure 2 d and Figure 2 e), V ∗ ( s 0 , 0 , k ) V^{*}(s_{0},0,k) V ∗ ( s 0 , 0 , k ) is slightly lower, as the larger state spaces require wider bounds in the IMDP to maintain an overall significance level of α = 0.1 \alpha= 0.1 α = 0.1 ; with more data, these estimates would tighten. The resulting policies may therefore identify more conservative interventions, i.e., change more actions than strictly necessary. However, since the statistical guarantees on the IMDP carry over to the CFIMDP, these interventions remain valid at the stated confidence level. Finally, as shown in § 5.3 , policies derived from data-driven IMDPs tend to exceed their estimated performance when evaluated on the true CFIMDP, suggesting that these policies are generally accurate and close to the optimal policy obtained without statistical uncertainty.
Figure 2. Average pessimistic counterfactual value V ∗ ( s 0 , 0 , k ) V^{*}(s_{0},0,k) V ∗ ( s 0 , 0 , k ) over 100 randomly sampled observed trajectories, on the data-driven CFIMDP (N = 100,000 N = 100{,}000 N = 100 , 000 , α = 0.1 \alpha= 0.1 α = 0.1 ) (●) vs. the exact CFIMDP (■), for each k k k . The data-driven value is a certified lower bound, so the gap to the exact curve is the price of learning the model from data. Error bars show standard deviation.
Evaluating Robustness
To evaluate robustness, we compare the counterfactual policies generated by our approach (with conservative lower bounds) and
from the data-driven Gumbel-max approach on the exact CFIMDP, i.e., by their worst-case counterfactual value across all causal models compatible with the true MDP (Table 3 )3 . Our policies perform close to the optimal policies learned from the true CFIMDP, showing little impact from statistical uncertainty in these examples. In contrast, the Gumbel-max CFIMDP policies perform suboptimally, suggesting that committing to a specific causal model (even when accounting for uncertainty in the transition dynamics) can be unreliable if the assumed model is misspecified.
Table 3. Average worst-case counterfactual value V ⊥ , π k ∗ ( s 0 ) V^{\perp,\pi_k^*}(s_0) V ⊥ , π k ∗ ( s 0 ) on the exact CFIMDP of policies derived from data-driven CFIMDPs (N = 100,000 N=100{,}000 N = 100 , 000 , α = 0.1 \alpha=0.1 α = 0.1 ) and of the exact CFIMDP’s pessimistic optimal policy, over 100 observed trajectories τ \tau τ with k = ∣ τ ∣ − 1 k=|\tau|-1 k = ∣ τ ∣ − 1 . Values are mean ± standard deviation.
Computing Robust Interventions
We now evaluate how well our approach identifies minimal action changes that achieve a counterfactual value ≥ λ \geq\lambda ≥ λ . To do so, we use the same 100 observed trajectories as before. For each trajectory and k ∈ { 0 , … , ∣ τ ∣ − 1 } k \in\{0,\ldots,|\tau|-1\} k ∈ { 0 , … , ∣ τ ∣ − 1 } , we compute the pessimistic policy π k ∗ \pi^{*}_{k} π k ∗ and its value V ∗ ( s 0 , 0 , k ) V^{*}(s_{0},0,k) V ∗ ( s 0 , 0 , k ) under the exact CFIMDP, our data-driven CFIMDPs (conservative and tight lower bounds), and the Gumbel-max CFIMDP, and report the smallest k ∗ k^{*} k ∗ such that V ∗ ( s 0 , 0 , k ) ≥ λ V^{*}(s_{0},0,k) \geq\lambda V ∗ ( s 0 , 0 , k ) ≥ λ . Figure 3 shows that both data-driven approaches identify interventions involving similar numbers of action changes to the exact CFIMDP, being only slightly more conservative, whereas Gumbel-max often underestimates k ∗ k^{*} k ∗ , particularly in GridWorld (p = 0.9 p = 0.9 p = 0.9 ) and Aircraft, so its interventions may be unreliable. Figure 4 visualises the identified interventions for one catastrophic trajectory. In GridWorld, with k = 1 k = 1 k = 1 the policy changes the second action to move back towards the start, so most counterfactual paths avoid the fire, but none reach the goal; with k = 2 k = 2 k = 2 , it instead changes the action that led into the fire, allowing over 60% of counterfactual paths to reach the goal. The size of a robust intervention thus depends on the outcome compared against: avoiding catastrophe requires one change, while reaching the goal requires two. Similarly, in Sepsis, mortality falls, and recovery rises as k k k grows. Appendix § 14 shows these counterfactual paths in more detail, plotting each vital sign and treatment over time for every k k k .
Figure 3. Minimum number of action changes k ∗ k^* k ∗ needed for V ∗ ( s 0 , 0 , k ) V^*(s_0, 0, k) V ∗ ( s 0 , 0 , k ) to reach a threshold λ \lambda λ , averaged over 100 randomly sampled observed trajectories. We compare the exact CFIMDP (black, solid) with data-driven CFIMDPs using conservative lower bounds (dashed), tight lower bounds (dotted), and the Gumbel-max model (dash-dot).3
Figure 4. Behaviour of the data-driven counterfactual policy for a single observed catastrophic path, with varying k k k , under a CFMDP adversarially chosen from the exact CFIMDP.
Execution Times and Bound Widths
Finally, we assess the impact of using conservative lower bounds (closed-form, efficient) instead of tight lower bounds (optimisation-based, expensive). For the same 100 paths, we derive the CFIMDPs with both approaches and measure the percentage of transitions whose lower bound changes when the tight bound is used, both across all transitions and across non-zero probability transitions only, together with the average change in bound width. The full results are reported in Table 5 in Appendix § 14 . The overall effect is small: at most 4.4% of all transitions change, and among non-zero probability transitions, at most 21% in GridWorld (p = 0.9 p = 0.9 p = 0.9 ) and at most 6% elsewhere, with an average width change of at most 0.06 for the transitions that change. As the previous experiments show, this has little impact on the derived policies, and since tight lower bounds require solving an additional optimisation problem and are slower to compute, the conservative approach is preferable in practice. While comparable in the smaller environments, the Gumbel-max approach scales poorly with the MDP state space, taking 293s on average for Aircraft compared with 10s for our conservative bounds, and is computationally prohibitive for Sepsis.
Table 5. Left: effect on CFIMDP transitions of using tight (but more expensive) bounds in place of conservative closed-form bounds. Right: comparison of runtimes for constructing the CFIMDP (using N = 100 , 000 N = 100,000 N = 100 , 000 , α = 0.1 \alpha= 0.1 α = 0.1 and averaging over 100 randomly generated suboptimal paths).
Conclusion
We have presented a counterfactual inference approach for MDPs that is robust to both uncertainty in the underlying transition dynamics and the unknown causal model. We derived closed-form bounds on counterfactual transition probabilities, enabling scalable inference in larger MDPs. Building on these bounds, we introduced minimal robust counterfactual interventions: non-stationary policies that guarantee a desired expected return under all admissible counterfactual dynamics, while minimising the maximum number of action changes. Experiments across diverse MDP environments demonstrate the robustness and scalability of our approach, with counterfactual interventions closely tracking those of the exact counterfactual MDP. Future work will address unobserved confounding in offline trajectory datasets and extend our approach to continuous and partially-observable environments.
References
Counterfactual Probability Bounds for MDPs
We copy the counterfactual probability bounds proven by Lally et al. [17 ] below, under the assumptions of counterfactual stability and counterfactual monotonicity:
Definition A.1 (Counterfactual stability). An MDP SCM (1) satisfies counterfactual stability if, given we observed the transition s t , a t → s t + 1 s_t, a_t \to s_{t+1} s t , a t → s t + 1 at time t t t , the counterfactual outcome under a different state-action pair ( s , a ) (s, a) ( s , a ) will not change to some s t + 1 = s ′ ≠ s t + 1 s_{t+1} = s' \ne s_{t+1} s t + 1 = s ′ = s t + 1 unless P ( s t + 1 ∣ s , a ) P ( s t + 1 ∣ s t , a t ) < P ( s ′ ∣ s , a ) P ( s ′ ∣ s t , a t ) \frac{P(s_{t+1} \mid s, a)}{P(s_{t+1} \mid s_t, a_t)} < \frac{P(s' \mid s, a)}{P(s' \mid s_t, a_t)} P ( s t + 1 ∣ s t , a t ) P ( s t + 1 ∣ s , a ) < P ( s ′ ∣ s t , a t ) P ( s ′ ∣ s , a ) .
Definition A.2 (Counterfactual monotonicity). An MDP SCM (1) satisfies counterfactual monotonicity if, upon observing the transition s t , a t → s t + 1 s_t, a_t \to s_{t+1} s t , a t → s t + 1 , then, ∀ s ∈ S , a ∈ A \forall s \in S, a \in\mathcal{A} ∀ s ∈ S , a ∈ A :
(Mon1) P ~ t ( s t + 1 ∣ s , a ) ≥ P ( s t + 1 ∣ s , a ) \widetilde{P}_t(s_{t+1} \mid s, a) \ge P(s_{t+1} \mid s, a) P t ( s t + 1 ∣ s , a ) ≥ P ( s t + 1 ∣ s , a ) (i.e., observing an outcome cannot make it less likely in the counterfactual world), and
(Mon2) ∀ s ′ ≠ s t + 1 \forall s' \ne s_{t+1} ∀ s ′ = s t + 1 with P ( s ′ ∣ s t , a t ) > 0 P(s' \mid s_t, a_t) > 0 P ( s ′ ∣ s t , a t ) > 0 , P ~ t ( s ′ ∣ s , a ) ≤ P ( s ′ ∣ s , a ) \widetilde{P}_t(s' \mid s, a) \le P(s' \mid s, a) P t ( s ′ ∣ s , a ) ≤ P ( s ′ ∣ s , a ) (i.e., not observing a possible outcome cannot make it more likely in the counterfactual world).
For any MDP M \mathcal{M} M and observed transition s t , a t → s t + 1 s_t, a_t \to s_{t+1} s t , a t → s t + 1 , we can bound the counterfactual probability of any transition s , a → s ′ s, a \to s' s , a → s ′ as follows.
Theorem A.3. When the counterfactual state-action pair is the observed state-action pair, ( s , a ) = ( s t , a t ) (s, a) = (s_t, a_t) ( s , a ) = ( s t , a t ) , the counterfactual probability bounds are as follows:
P ~ t L B ( s t + 1 ∣ s t , a t ) = P ~ t U B ( s t + 1 ∣ s t , a t ) = 1 \widetilde{P}^{LB}_t(s_{t+1} \mid s_t, a_t) = \widetilde{P}^{UB}_t(s_{t+1} \mid s_t, a_t) = 1 P t L B ( s t + 1 ∣ s t , a t ) = P t U B ( s t + 1 ∣ s t , a t ) = 1 ∀ s ′ ∈ S ∖ { s t + 1 } , P ~ t L B ( s ′ ∣ s t , a t ) = P ~ t U B ( s ′ ∣ s t , a t ) = 0 \forall s' \in S \setminus\{s_{t+1}\}, \widetilde{P}^{LB}_t(s' \mid s_t, a_t) = \widetilde{P}^{UB}_t(s' \mid s_t, a_t) = 0 ∀ s ′ ∈ S ∖ { s t + 1 } , P t L B ( s ′ ∣ s t , a t ) = P t U B ( s ′ ∣ s t , a t ) = 0
Theorem A.4. When the counterfactual state-action pair ( s , a ) ≠ ( s t , a t ) (s, a) \ne(s_t, a_t) ( s , a ) = ( s t , a t ) and has disjoint support from the observed ( s t , a t ) (s_t, a_t) ( s t , a t ) , the counterfactual probability bounds are as follows, ∀ s ′ ∈ S \forall s' \in S ∀ s ′ ∈ S :
P ~ t U B ( s ′ ∣ s , a ) = { P ( s ′ ∣ s , a ) P ( s t + 1 ∣ s t , a t ) if P ( s ′ ∣ s , a ) < P ( s t + 1 ∣ s t , a t ) 1 otherwise \widetilde{P}^{UB}_t(s' \mid s, a) =
\begin{cases}
\frac{P(s' \mid s, a)}{P(s_{t+1} \mid s_t, a_t)} & \text{if } P(s' \mid s, a) < P(s_{t+1} \mid s_t, a_t) \\
1 & \text{otherwise}
\end{cases} P t U B ( s ′ ∣ s , a ) = { P ( s t + 1 ∣ s t , a t ) P ( s ′ ∣ s , a ) 1 if P ( s ′ ∣ s , a ) < P ( s t + 1 ∣ s t , a t ) otherwise P ~ t L B ( s ′ ∣ s , a ) = { P ( s ′ ∣ s , a ) − ( 1 − P ( s t + 1 ∣ s t , a t ) ) P ( s t + 1 ∣ s t , a t ) if P ( s ′ ∣ s , a ) > 1 − P ( s t + 1 ∣ s t , a t ) 0 otherwise. \widetilde{P}^{LB}_t(s' \mid s, a) =
\begin{cases}
\frac{P(s' \mid s, a) - (1 - P(s_{t+1} \mid s_t, a_t))}{P(s_{t+1} \mid s_t, a_t)} & \text{if } P(s' \mid s, a) > 1 - P(s_{t+1} \mid s_t, a_t) \\
0 & \text{otherwise.}
\end{cases} P t L B ( s ′ ∣ s , a ) = { P ( s t + 1 ∣ s t , a t ) P ( s ′ ∣ s , a ) − ( 1 − P ( s t + 1 ∣ s t , a t )) 0 if P ( s ′ ∣ s , a ) > 1 − P ( s t + 1 ∣ s t , a t ) otherwise.
Theorem A.5. When the counterfactual state-action pair ( s , a ) ≠ ( s t , a t ) (s, a) \ne(s_t, a_t) ( s , a ) = ( s t , a t ) and has overlapping support with the observed ( s t , a t ) (s_t, a_t) ( s t , a t ) , the counterfactual probability bounds are as follows, ∀ s ′ ∈ S \forall s' \in S ∀ s ′ ∈ S :
P ~ t U B ( s ′ ∣ s , a ) = { min ( P ( s t + 1 ∣ s t , a t ) , P ( s t + 1 ∣ s , a ) ) P ( s t + 1 ∣ s t , a t ) if s ′ = s t + 1 0 if CS conditions hold min ( P ( s ′ ∣ s , a ) , 1 − P ( s t + 1 ∣ s , a ) ) if P ( s ′ ∣ s t , a t ) > 0 min ( 1 − P ( s t + 1 ∣ s , a ) , P ( s ′ ∣ s , a ) P ( s t + 1 ∣ s t , a t ) ) otherwise \widetilde{P}^{UB}_t(s' \mid s, a) =
\begin{cases}
\frac{\min\left(P(s_{t+1} \mid s_t, a_t), P(s_{t+1} \mid s, a)\right)}{P(s_{t+1} \mid s_t, a_t)} & \text{if } s' = s_{t+1} \\
0 & \text{if CS conditions hold} \\
\min\left(P(s' \mid s, a), 1 - P(s_{t+1} \mid s, a)\right) & \text{if } P(s' \mid s_t, a_t) > 0 \\
\min\left(1 - P(s_{t+1} \mid s, a), \frac{P(s' \mid s, a)}{P(s_{t+1} \mid s_t, a_t)}\right) & \text{otherwise}
\end{cases} P t U B ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ P ( s t + 1 ∣ s t , a t ) m i n ( P ( s t + 1 ∣ s t , a t ) , P ( s t + 1 ∣ s , a ) ) 0 min ( P ( s ′ ∣ s , a ) , 1 − P ( s t + 1 ∣ s , a ) ) min ( 1 − P ( s t + 1 ∣ s , a ) , P ( s t + 1 ∣ s t , a t ) P ( s ′ ∣ s , a ) ) if s ′ = s t + 1 if CS conditions hold if P ( s ′ ∣ s t , a t ) > 0 otherwise P ~ t L B ( s ′ ∣ s , a ) = { max ( P ( s ′ ∣ s , a ) , 1 − ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ t U B ( s ′ ′ ∣ s , a ) ) if s ′ = s t + 1 0 if CS conditions hold max ( 0 , 1 − ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ t U B ( s ′ ′ ∣ s , a ) ) otherwise \widetilde{P}^{LB}_t(s' \mid s, a) =
\begin{cases}
\max\left(P(s' \mid s, a), 1 - \sum_{s'' \in S \setminus\{s'\}} \widetilde{P}^{UB}_t(s'' \mid s, a)\right) & \text{if } s' = s_{t+1} \\
0 & \text{if CS conditions hold} \\
\max\left(0, 1 - \sum_{s'' \in S \setminus\{s'\}} \widetilde{P}^{UB}_t(s'' \mid s, a)\right) & \text{otherwise}
\end{cases} P t L B ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ max ( P ( s ′ ∣ s , a ) , 1 − ∑ s ′′ ∈ S ∖ { s ′ } P t U B ( s ′′ ∣ s , a ) ) 0 max ( 0 , 1 − ∑ s ′′ ∈ S ∖ { s ′ } P t U B ( s ′′ ∣ s , a ) ) if s ′ = s t + 1 if CS conditions hold otherwise *where the counterfactual stability (CS) conditions are P ( s ′ ∣ s t , a t ) > 0 P(s' \mid s_t, a_t) > 0 P ( s ′ ∣ s t , a t ) > 0 and P ( s t + 1 ∣ s , a ) P ( s t + 1 ∣ s t , a t ) ≥ P ( s ′ ∣ s , a ) P ( s ′ ∣ s t , a t ) \frac{P(s_{t+1} \mid s, a)}{P(s_{t+1} \mid s_t, a_t)} \ge\frac{P(s' \mid s, a)}{P(s' \mid s_t, a_t)} P ( s t + 1 ∣ s t , a t ) P ( s t + 1 ∣ s , a ) ≥ P ( s ′ ∣ s t , a t ) P ( s ′ ∣ s , a )
Proofs
Let M ↕ M_{\updownarrow} M ↕ be an arbitrary IMDP. For a given counterfactual transition s , a → s ′ s, a \to s' s , a → s ′ and observed transition s t , a t → s t + 1 s_t, a_t \to s_{t+1} s t , a t → s t + 1 , the optimisation problems defined in (7) and (8) yield the upper and lower bounds on the counterfactual probability of s , a → s ′ s, a \to s' s , a → s ′ respectively, under the following assumptions.
Assumption B.1 (Normalisation). For any IMDP M ↕ M_{\updownarrow} M ↕ , we assume the transition bounds have been normalised in the sense that, ∀ s , a , s ′ \forall s, a, s' ∀ s , a , s ′ :
P M ↕ L B ( s ′ ∣ s , a ) ≥ 1 − ∑ s ′ ′ ∈ S ∖ { s ′ } P M ↕ U B ( s ′ ′ ∣ s , a ) P^{LB}_{M_{\updownarrow}}(s' \mid s,a) \ge1 - \sum_{s'' \in\mathcal{S}\setminus\{s'\}} P^{UB}_{M_{\updownarrow}}(s'' \mid s,a) P M ↕ L B ( s ′ ∣ s , a ) ≥ 1 − s ′′ ∈ S ∖ { s ′ } ∑ P M ↕ U B ( s ′′ ∣ s , a ) P M ↕ U B ( s ′ ∣ s , a ) ≤ 1 − ∑ s ′ ′ ∈ S ∖ { s ′ } P M ↕ L B ( s ′ ′ ∣ s , a ) P^{UB}_{M_{\updownarrow}}(s' \mid s,a) \le1 - \sum_{s'' \in\mathcal{S}\setminus\{s'\}} P^{LB}_{M_{\updownarrow}}(s'' \mid s,a) P M ↕ U B ( s ′ ∣ s , a ) ≤ 1 − s ′′ ∈ S ∖ { s ′ } ∑ P M ↕ L B ( s ′′ ∣ s , a )
This is not a strong assumption, because any feasible MDP M ∈ M ↕ \mathcal{M} \in M_{\updownarrow} M ∈ M ↕ must have transition probabilities that sum to 1, so any IMDP can be tightened to meet the above conditions without altering the set of compatible MDPs.
Assumption B.2 (Non-zero Lower Bounds of Observed Transitions). Given any arbitrary IMDP M ↕ M_{\updownarrow} M ↕ , we assume that, for any feasible M ∈ M ↕ \mathcal{M} \in M_{\updownarrow} M ∈ M ↕ , P M ( s t + 1 ∣ s t , a t ) > 0 P_{\mathcal{M}}(s_{t+1} \mid s_t, a_t) > 0 P M ( s t + 1 ∣ s t , a t ) > 0 , i.e., we assume P M ↕ L B ( s t + 1 ∣ s t , a t ) > 0 P^{LB}_{M_{\updownarrow}}(s_{t+1} \mid s_t, a_t) > 0 P M ↕ L B ( s t + 1 ∣ s t , a t ) > 0 .
This assumption must hold, because we observed the transition s t , a t → s t + 1 s_t, a_t \to s_{t+1} s t , a t → s t + 1 , hence the true MDP must have P M ( s t + 1 ∣ s t , a t ) > 0 P_{\mathcal{M}}(s_{t+1} \mid s_t, a_t) > 0 P M ( s t + 1 ∣ s t , a t ) > 0 .
Observed ( s t , a t ) (s_t, a_t) ( s t , a t )
Theorem B.3. Assume ( s , a ) = ( s t , a t ) (s, a) = (s_t, a_t) ( s , a ) = ( s t , a t ) . For outgoing transitions from the observed state-action pair ( s t , a t ) (s_t, a_t) ( s t , a t ) , the optimisation problem in (7) will produce an upper bound of:
P ~ M ↓ U B ( s ′ ∣ s , a ) = { 1 if s ′ = s t + 1 0 otherwise \widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s' \mid s, a) =
\begin{cases}
1 & \text{if } s' = s_{t+1} \\
0 & \text{otherwise}
\end{cases} P M ↓ UB ( s ′ ∣ s , a ) = { 1 0 if s ′ = s t + 1 otherwise and the optimisation problem in (8) will produce a lower bound of:
P ~ M ↓ L B ( s ′ ∣ s , a ) = { 1 if s ′ = s t + 1 0 otherwise \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s' \mid s, a) =
\begin{cases}
1 & \text{if } s' = s_{t+1} \\
0 & \text{otherwise}
\end{cases} P M ↓ LB ( s ′ ∣ s , a ) = { 1 0 if s ′ = s t + 1 otherwise across all M ∈ M ↓ \mathcal{M} \in\mathcal{M}_{\downarrow} M ∈ M ↓ .
Proof. For all MDPs M ∈ M ↓ \mathcal{M} \in\mathcal{M}_{\downarrow} M ∈ M ↓ , we know that the counterfactual probability for all transitions from the observed state-action pair ( s t , a t ) (s_t, a_t) ( s t , a t ) will be:
P ~ M , t L B ( s t + 1 ∣ s t , a t ) = P ~ M , t U B ( s t + 1 ∣ s t , a t ) = 1 \widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s_{t+1} \mid s_t, a_t) = \widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s_{t+1} \mid s_t, a_t) = 1 P M , t LB ( s t + 1 ∣ s t , a t ) = P M , t UB ( s t + 1 ∣ s t , a t ) = 1 ∀ s ′ ∈ S ∖ { s t + 1 } , P ~ M , t L B ( s ′ ∣ s t , a t ) = P ~ M , t U B ( s ′ ∣ s t , a t ) = 0 \forall s' \in\mathcal{S} \setminus\{s_{t+1}\},\ \widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s' \mid s_t, a_t) = \widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s' \mid s_t, a_t) = 0 ∀ s ′ ∈ S ∖ { s t + 1 } , P M , t LB ( s ′ ∣ s t , a t ) = P M , t UB ( s ′ ∣ s t , a t ) = 0 Therefore, if s ′ = s t + 1 s' = s_{t+1} s ′ = s t + 1 :
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = max M ∈ M ↓ ( P ~ M , t U B ( s t + 1 ∣ s t , a t ) ) = max M ∈ M ↓ 1 = 1 \widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\downarrow},t}(s' \mid s, a) = \max_{\mathcal{M} \in\mathcal{M}_{\downarrow}} \left(\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s_{t+1} \mid s_t, a_t)\right) = \max_{\mathcal{M} \in\mathcal{M}_{\downarrow}} 1 = 1 P M ↓ , t UB ( s ′ ∣ s , a ) = M ∈ M ↓ max ( P M , t UB ( s t + 1 ∣ s t , a t ) ) = M ∈ M ↓ max 1 = 1 P ~ M ↓ , t L B ( s ′ ∣ s , a ) = min M ∈ M ↓ ( P ~ M , t L B ( s t + 1 ∣ s t , a t ) ) = min M ∈ M ↓ 1 = 1 \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\downarrow},t}(s' \mid s, a) = \min_{\mathcal{M} \in\mathcal{M}_{\downarrow}} \left(\widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s_{t+1} \mid s_t, a_t)\right) = \min_{\mathcal{M} \in\mathcal{M}_{\downarrow}} 1 = 1 P M ↓ , t LB ( s ′ ∣ s , a ) = M ∈ M ↓ min ( P M , t LB ( s t + 1 ∣ s t , a t ) ) = M ∈ M ↓ min 1 = 1 and if s ′ ∈ S ∖ { s t + 1 } s' \in\mathcal{S} \setminus\{s_{t+1}\} s ′ ∈ S ∖ { s t + 1 } :
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = max M ∈ M ↓ ( P ~ M , t U B ( s ′ ∣ s t , a t ) ) = max M ∈ M ↓ 0 = 0 \widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\downarrow},t}(s' \mid s, a) = \max_{\mathcal{M} \in\mathcal{M}_{\downarrow}} \left(\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s' \mid s_t, a_t)\right) = \max_{\mathcal{M} \in\mathcal{M}_{\downarrow}} 0 = 0 P M ↓ , t UB ( s ′ ∣ s , a ) = M ∈ M ↓ max ( P M , t UB ( s ′ ∣ s t , a t ) ) = M ∈ M ↓ max 0 = 0 P ~ M ↓ , t L B ( s ′ ∣ s , a ) = min M ∈ M ↓ ( P ~ M , t L B ( s ′ ∣ s t , a t ) ) = min M ∈ M ↓ 0 = 0 \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\downarrow},t}(s' \mid s, a) = \min_{\mathcal{M} \in\mathcal{M}_{\downarrow}} \left(\widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s' \mid s_t, a_t)\right) = \min_{\mathcal{M} \in\mathcal{M}_{\downarrow}} 0 = 0 P M ↓ , t LB ( s ′ ∣ s , a ) = M ∈ M ↓ min ( P M , t LB ( s ′ ∣ s t , a t ) ) = M ∈ M ↓ min 0 = 0
Disjoint ( s , a ) (s,a) ( s , a )
Upper Bound
Theorem B.4. Assume ( s , a ) ≠ ( s t , a t ) (s,a) \ne(s_t,a_t) ( s , a ) = ( s t , a t ) , and assume that the support of ( s , a ) (s,a) ( s , a ) is disjoint from the support of ( s t , a t ) (s_t,a_t) ( s t , a t ) in the IMDP M ↓ M_{\downarrow} M ↓ . In this case, the optimisation problem in (7) will produce an upper bound of:
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = { P M ↓ U B ( s ′ ∣ s , a ) P M ↓ L B ( s t + 1 ∣ s t , a t ) if P M ↓ U B ( s ′ ∣ s , a ) < P M ↓ L B ( s t + 1 ∣ s t , a t ) 1 otherwise \widetilde{P}^{\mathrm{UB}}_{M_{\downarrow},t}(s' \mid s,a) =
\begin{cases}
\frac{P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a)}{P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t)} & \text{if } P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) < P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) \\
1 & \text{otherwise}
\end{cases} P M ↓ , t UB ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ P M ↓ LB ( s t + 1 ∣ s t , a t ) P M ↓ UB ( s ′ ∣ s , a ) 1 if P M ↓ UB ( s ′ ∣ s , a ) < P M ↓ LB ( s t + 1 ∣ s t , a t ) otherwise
Proof. Because the supports of ( s , a ) (s,a) ( s , a ) and ( s t , a t ) (s_t,a_t) ( s t , a t ) are disjoint in the IMDP M ↓ M_{\downarrow} M ↓ , this means that ∀ s ′ ∈ S \forall s' \in S ∀ s ′ ∈ S , P M ↓ U B ( s ′ ∣ s , a ) > 0 ⇒ P M ↓ L B ( s ′ ∣ s t , a t ) = 0 P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) > 0 \Rightarrow P^{\mathrm{LB}}_{M_{\downarrow}}(s' \mid s_t,a_t) = 0 P M ↓ UB ( s ′ ∣ s , a ) > 0 ⇒ P M ↓ LB ( s ′ ∣ s t , a t ) = 0 , and ∀ s ′ ∈ S \forall s' \in S ∀ s ′ ∈ S , P M ↓ U B ( s ′ ∣ s t , a t ) > 0 ⇒ P M ↓ L B ( s ′ ∣ s , a ) = 0 P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s_t,a_t) > 0 \Rightarrow P^{\mathrm{LB}}_{M_{\downarrow}}(s' \mid s,a) = 0 P M ↓ UB ( s ′ ∣ s t , a t ) > 0 ⇒ P M ↓ LB ( s ′ ∣ s , a ) = 0 . Therefore, in any MDP M ∈ M ↓ M \in M_{\downarrow} M ∈ M ↓ , the supports of ( s , a ) (s,a) ( s , a ) and ( s t , a t ) (s_t,a_t) ( s t , a t ) are guaranteed to be disjoint as well.
For any MDP M ∈ M ↓ M \in M_{\downarrow} M ∈ M ↓ , the proven closed-form solution to the upper bound P ~ M , t U B ( s ′ ∣ s , a ) \widetilde{P}^{\mathrm{UB}}_{M,t}(s' \mid s,a) P M , t UB ( s ′ ∣ s , a ) is:
P ~ M , t U B ( s ′ ∣ s , a ) = { P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) if P M ( s ′ ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) 1 otherwise \widetilde{P}^{\mathrm{UB}}_{M,t}(s' \mid s,a) =
\begin{cases}
\frac{P_M(s' \mid s,a)}{P_M(s_{t+1} \mid s_t,a_t)} & \text{if } P_M(s' \mid s,a) < P_M(s_{t+1} \mid s_t,a_t) \\
1 & \text{otherwise}
\end{cases} P M , t UB ( s ′ ∣ s , a ) = { P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) 1 if P M ( s ′ ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) otherwise
Therefore, to identify the upper bound, we need to maximise this over all MDPs M ∈ M ↓ M \in M_{\downarrow} M ∈ M ↓ . Clearly, if there exist MDPs M ∈ M ↓ M \in M_{\downarrow} M ∈ M ↓ where P M ( s ′ ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) P_M(s' \mid s,a) < P_M(s_{t+1} \mid s_t,a_t) P M ( s ′ ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) , then P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) < 1 \frac{P_M(s' \mid s,a)}{P_M(s_{t+1} \mid s_t,a_t)} < 1 P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) < 1 , so the absolute maximum value of P ~ M , t U B ( s ′ ∣ s , a ) \widetilde{P}^{\mathrm{UB}}_{M,t}(s' \mid s,a) P M , t UB ( s ′ ∣ s , a ) across all MDPs cannot be greater than 1.
Consider whether P M ↓ U B ( s ′ ∣ s , a ) < P M ↓ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) < P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) P M ↓ UB ( s ′ ∣ s , a ) < P M ↓ LB ( s t + 1 ∣ s t , a t ) :
If P M ↓ U B ( s ′ ∣ s , a ) ≥ P M ↓ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) \ge P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) P M ↓ UB ( s ′ ∣ s , a ) ≥ P M ↓ LB ( s t + 1 ∣ s t , a t ) , then, because of Assumption B.1, there must exist an MDP M ∈ M ↓ M \in M_{\downarrow} M ∈ M ↓ where P M ( s t + 1 ∣ s t , a t ) = P M ↓ L B ( s t + 1 ∣ s t , a t ) P_M(s_{t+1} \mid s_t,a_t) = P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↓ LB ( s t + 1 ∣ s t , a t ) and P M ( s ′ ∣ s , a ) = P M ↓ U B ( s ′ ∣ s , a ) P_M(s' \mid s,a) = P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) P M ( s ′ ∣ s , a ) = P M ↓ UB ( s ′ ∣ s , a ) . Because P M ↓ U B ( s ′ ∣ s , a ) ≥ P M ↓ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) \ge P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) P M ↓ UB ( s ′ ∣ s , a ) ≥ P M ↓ LB ( s t + 1 ∣ s t , a t ) , we know that in MDP M M M , the upper bound counterfactual probability P ~ M , t U B ( s ′ ∣ s , a ) = 1 \widetilde{P}^{\mathrm{UB}}_{M,t}(s' \mid s,a) = 1 P M , t UB ( s ′ ∣ s , a ) = 1 . Since this is the maximum possible counterfactual probability, this means that P ~ M ↓ , t U B ( s ′ ∣ s , a ) = 1 \widetilde{P}^{\mathrm{UB}}_{M_{\downarrow},t}(s' \mid s,a) = 1 P M ↓ , t UB ( s ′ ∣ s , a ) = 1 .
Otherwise, if P M ↓ U B ( s ′ ∣ s , a ) < P M ↓ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) < P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) P M ↓ UB ( s ′ ∣ s , a ) < P M ↓ LB ( s t + 1 ∣ s t , a t ) , then, for every MDP M ∈ M ↓ M \in M_{\downarrow} M ∈ M ↓ , P M ( s ′ ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) P_M(s' \mid s,a) < P_M(s_{t+1} \mid s_t,a_t) P M ( s ′ ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) . Therefore, for every MDP, the upper bound counterfactual probability for the transition will be P ~ M , t U B ( s ′ ∣ s , a ) = P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) \widetilde{P}^{\mathrm{UB}}_{M,t}(s' \mid s,a) = \frac{P_M(s' \mid s,a)}{P_M(s_{t+1} \mid s_t,a_t)} P M , t UB ( s ′ ∣ s , a ) = P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) . Therefore, the maximum upper bound counterfactual probability is:
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = max M ∈ M ↓ ( P ~ M , t U B ( s ′ ∣ s , a ) ) = max M ∈ M ↓ ( P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) = P M ↓ U B ( s ′ ∣ s , a ) P M ↓ L B ( s t + 1 ∣ s t , a t ) \begin{aligned}
\widetilde{P}^{\mathrm{UB}}_{M_{\downarrow},t}(s' \mid s,a)
&= \max_{M \in M_{\downarrow}}\left(\widetilde{P}^{\mathrm{UB}}_{M,t}(s' \mid s,a)\right) \\
&= \max_{M \in M_{\downarrow}}\left(\frac{P_M(s' \mid s,a)}{P_M(s_{t+1} \mid s_t,a_t)}\right) \\
&= \frac{P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a)}{P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t)}
\end{aligned} P M ↓ , t UB ( s ′ ∣ s , a ) = M ∈ M ↓ max ( P M , t UB ( s ′ ∣ s , a ) ) = M ∈ M ↓ max ( P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) ) = P M ↓ LB ( s t + 1 ∣ s t , a t ) P M ↓ UB ( s ′ ∣ s , a )
Because of Assumption B.1, there must exist an MDP M M M where P M ( s t + 1 ∣ s t , a t ) = P M ↓ L B ( s t + 1 ∣ s t , a t ) P_M(s_{t+1} \mid s_t,a_t) = P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↓ LB ( s t + 1 ∣ s t , a t ) and P M ( s ′ ∣ s , a ) = P M ↓ U B ( s ′ ∣ s , a ) P_M(s' \mid s,a) = P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) P M ( s ′ ∣ s , a ) = P M ↓ UB ( s ′ ∣ s , a ) . Also, note that because of Assumption B.2, P M ↓ L B ( s t + 1 ∣ s t , a t ) > 0 P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) > 0 P M ↓ LB ( s t + 1 ∣ s t , a t ) > 0 . Therefore, the maximum upper bound counterfactual probability in this case is
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = P M ↓ U B ( s ′ ∣ s , a ) P M ↓ L B ( s t + 1 ∣ s t , a t ) \widetilde{P}^{\mathrm{UB}}_{M_{\downarrow},t}(s' \mid s,a) = \frac{P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a)}{P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t)} P M ↓ , t UB ( s ′ ∣ s , a ) = P M ↓ LB ( s t + 1 ∣ s t , a t ) P M ↓ UB ( s ′ ∣ s , a )
Also, note that because of Assumption B.2, P M ↓ L B ( s t + 1 ∣ s t , a t ) > 0 P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) > 0 P M ↓ LB ( s t + 1 ∣ s t , a t ) > 0 .
We can combine these cases as follows:
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = { P M ↓ U B ( s ′ ∣ s , a ) P M ↓ L B ( s t + 1 ∣ s t , a t ) if P M ↓ U B ( s ′ ∣ s , a ) < P M ↓ L B ( s t + 1 ∣ s t , a t ) 1 otherwise \widetilde{P}^{\mathrm{UB}}_{M_{\downarrow},t}(s' \mid s,a) =
\begin{cases}
\frac{P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a)}{P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t)} & \text{if } P^{\mathrm{UB}}_{M_{\downarrow}}(s' \mid s,a) < P^{\mathrm{LB}}_{M_{\downarrow}}(s_{t+1} \mid s_t,a_t) \\
1 & \text{otherwise}
\end{cases} P M ↓ , t UB ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ P M ↓ LB ( s t + 1 ∣ s t , a t ) P M ↓ UB ( s ′ ∣ s , a ) 1 if P M ↓ UB ( s ′ ∣ s , a ) < P M ↓ LB ( s t + 1 ∣ s t , a t ) otherwise
Lower Bound
Theorem B.5. Assume ( s , a ) ≠ ( s t , a t ) (s,a) \ne(s_t,a_t) ( s , a ) = ( s t , a t ) , and assume that the support of ( s , a ) (s,a) ( s , a ) is disjoint from the support of ( s t , a t ) (s_t,a_t) ( s t , a t ) in the IMDP M ↑ \mathcal{M}_{\uparrow} M ↑ . In this case, the optimisation problem in (8) will produce a lower bound of:
P ~ M ↑ , t L B ( s ′ ∣ s , a ) = { P M ↑ L B ( s ′ ∣ s , a ) − ( 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) ) P M ↑ L B ( s t + 1 ∣ s t , a t ) if P M ↑ L B ( s ′ ∣ s , a ) > 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) 0 otherwise \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) =
\begin{cases}
\frac{P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) - \left(1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t)\right)}{P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t)} & \text{if } P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) > 1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) \\
0 & \text{otherwise}
\end{cases} P M ↑ , t LB ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ P M ↑ LB ( s t + 1 ∣ s t , a t ) P M ↑ LB ( s ′ ∣ s , a ) − ( 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) ) 0 if P M ↑ LB ( s ′ ∣ s , a ) > 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) otherwise
Proof. Because the supports of ( s , a ) (s,a) ( s , a ) and ( s t , a t ) (s_t,a_t) ( s t , a t ) are disjoint in the IMDP M ↑ \mathcal{M}_{\uparrow} M ↑ , this means that ∀ s ′ ∈ S , P M ↑ U B ( s ′ ∣ s , a ) > 0 ⇒ P M ↑ U B ( s ′ ∣ s t , a t ) = 0 \forall s' \in S, P^{\mathrm{UB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) > 0 \Rightarrow P^{\mathrm{UB}}_{\mathcal{M}_{\uparrow}}(s' \mid s_t,a_t) = 0 ∀ s ′ ∈ S , P M ↑ UB ( s ′ ∣ s , a ) > 0 ⇒ P M ↑ UB ( s ′ ∣ s t , a t ) = 0 , and ∀ s ′ ∈ S , P M ↑ U B ( s ′ ∣ s t , a t ) > 0 ⇒ P M ↑ U B ( s ′ ∣ s , a ) = 0 \forall s' \in S, P^{\mathrm{UB}}_{\mathcal{M}_{\uparrow}}(s' \mid s_t,a_t) > 0 \Rightarrow P^{\mathrm{UB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) = 0 ∀ s ′ ∈ S , P M ↑ UB ( s ′ ∣ s t , a t ) > 0 ⇒ P M ↑ UB ( s ′ ∣ s , a ) = 0 . Therefore, in any MDP M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ , the supports of ( s , a ) (s,a) ( s , a ) and ( s t , a t ) (s_t,a_t) ( s t , a t ) are guaranteed to be disjoint as well.
For any MDP M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ , the proven closed-form solution to the lower bound P ~ M , t L B ( s ′ ∣ s , a ) \widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s' \mid s,a) P M , t LB ( s ′ ∣ s , a ) is:
P ~ M , t L B ( s ′ ∣ s , a ) = { P M ( s ′ ∣ s , a ) − ( 1 − P M ( s t + 1 ∣ s t , a t ) ) P M ( s t + 1 ∣ s t , a t ) if P M ( s ′ ∣ s , a ) > 1 − P M ( s t + 1 ∣ s t , a t ) 0 otherwise \widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s' \mid s,a) =
\begin{cases}
\frac{P_{\mathcal{M}}(s' \mid s,a) - \left(1-P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)\right)}{P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)} & \text{if } P_{\mathcal{M}}(s' \mid s,a) > 1-P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t) \\
0 & \text{otherwise}
\end{cases} P M , t LB ( s ′ ∣ s , a ) = { P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) − ( 1 − P M ( s t + 1 ∣ s t , a t ) ) 0 if P M ( s ′ ∣ s , a ) > 1 − P M ( s t + 1 ∣ s t , a t ) otherwise
Therefore, to identify the lower bound, we need to minimise this over all MDPs M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ . Clearly, for any MDP M \mathcal{M} M where P M ( s ′ ∣ s , a ) > 1 − P M ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s' \mid s,a) > 1-P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t) P M ( s ′ ∣ s , a ) > 1 − P M ( s t + 1 ∣ s t , a t ) :
P M ( s ′ ∣ s , a ) − ( 1 − P M ( s t + 1 ∣ s t , a t ) ) P M ( s t + 1 ∣ s t , a t ) > 0 \frac{P_{\mathcal{M}}(s' \mid s,a) - \left(1-P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)\right)}{P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)} > 0 P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) − ( 1 − P M ( s t + 1 ∣ s t , a t ) ) > 0
Therefore, the absolute minimum value of P ~ M , t L B ( s ′ ∣ s , a ) \widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s' \mid s,a) P M , t LB ( s ′ ∣ s , a ) across all MDPs cannot be less than 0. Consider whether P M ↑ L B ( s ′ ∣ s , a ) > 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) > 1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) P M ↑ LB ( s ′ ∣ s , a ) > 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) :
If P M ↑ L B ( s ′ ∣ s , a ) ≤ 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) \le1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) P M ↑ LB ( s ′ ∣ s , a ) ≤ 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) , then, because of Assumption B.1, there must exist an MDP M \mathcal{M} M where P M ( s t + 1 ∣ s t , a t ) = P M ↑ L B ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t) = P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↑ LB ( s t + 1 ∣ s t , a t ) and P M ( s ′ ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s' \mid s,a) = P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) P M ( s ′ ∣ s , a ) = P M ↑ LB ( s ′ ∣ s , a ) . Because P M ↑ L B ( s ′ ∣ s , a ) ≤ 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) \le1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) P M ↑ LB ( s ′ ∣ s , a ) ≤ 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) , we know that in this MDP M \mathcal{M} M , the lower bound counterfactual probability P ~ M , t L B ( s ′ ∣ s , a ) = 0 \widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s' \mid s,a) = 0 P M , t LB ( s ′ ∣ s , a ) = 0 . Since this is the minimum possible counterfactual probability across all MDPs, this means that P ~ M ↑ , t L B ( s ′ ∣ s , a ) = 0 \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) = 0 P M ↑ , t LB ( s ′ ∣ s , a ) = 0 .
Otherwise, if P M ↑ L B ( s ′ ∣ s , a ) > 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) > 1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) P M ↑ LB ( s ′ ∣ s , a ) > 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) , then, for every MDP M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ , P M ( s ′ ∣ s , a ) > 1 − P M ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s' \mid s,a) > 1-P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t) P M ( s ′ ∣ s , a ) > 1 − P M ( s t + 1 ∣ s t , a t ) . Therefore, for every MDP, the lower bound counterfactual probability for the transition will be P ~ M , t ( s ′ ∣ s , a ) = P M ( s ′ ∣ s , a ) − ( 1 − P M ( s t + 1 ∣ s t , a t ) ) P M ( s t + 1 ∣ s t , a t ) \widetilde{P}_{\mathcal{M},t}(s' \mid s,a) = \frac{P_{\mathcal{M}}(s' \mid s,a) - (1-P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t))}{P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)} P M , t ( s ′ ∣ s , a ) = P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) − ( 1 − P M ( s t + 1 ∣ s t , a t )) . Therefore, the minimum lower bound counterfactual probability will be:
P ~ M ↑ L B ( s ′ ∣ s , a ) = min M ∈ M ↑ ( P ~ M , t L B ( s ′ ∣ s , a ) ) = min M ∈ M ↑ ( P M ( s ′ ∣ s , a ) − ( 1 − P M ( s t + 1 ∣ s t , a t ) ) P M ( s t + 1 ∣ s t , a t ) ) = min M ∈ M ↑ ( P M ( s ′ ∣ s , a ) − 1 + P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s t , a t ) ) = min M ∈ M ↑ ( 1 − 1 − P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) \begin{aligned}
\widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a)
&= \min_{\mathcal{M} \in\mathcal{M}_{\uparrow}} \left(\widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s' \mid s,a)\right) \\
&= \min_{\mathcal{M} \in\mathcal{M}_{\uparrow}} \left(\frac{P_{\mathcal{M}}(s' \mid s,a) - (1-P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t))}{P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)}\right) \\
&= \min_{\mathcal{M} \in\mathcal{M}_{\uparrow}} \left(\frac{P_{\mathcal{M}}(s' \mid s,a) - 1 + P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)}{P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)}\right) \\
&= \min_{\mathcal{M} \in\mathcal{M}_{\uparrow}} \left(1-\frac{1-P_{\mathcal{M}}(s' \mid s,a)}{P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t)}\right)
\end{aligned} P M ↑ LB ( s ′ ∣ s , a ) = M ∈ M ↑ min ( P M , t LB ( s ′ ∣ s , a ) ) = M ∈ M ↑ min ( P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) − ( 1 − P M ( s t + 1 ∣ s t , a t )) ) = M ∈ M ↑ min ( P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) − 1 + P M ( s t + 1 ∣ s t , a t ) ) = M ∈ M ↑ min ( 1 − P M ( s t + 1 ∣ s t , a t ) 1 − P M ( s ′ ∣ s , a ) )
Clearly, this formula will be minimal when P M ( s ′ ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s' \mid s,a) = P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) P M ( s ′ ∣ s , a ) = P M ↑ LB ( s ′ ∣ s , a ) and P M ( s t + 1 ∣ s t , a t ) = P M ↑ L B ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t) = P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↑ LB ( s t + 1 ∣ s t , a t ) . Because of Assumption B.1, there must exist an MDP M \mathcal{M} M where P M ( s ′ ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s' \mid s,a) = P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) P M ( s ′ ∣ s , a ) = P M ↑ LB ( s ′ ∣ s , a ) and P M ( s t + 1 ∣ s t , a t ) = P M ↑ L B ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1} \mid s_t,a_t) = P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↑ LB ( s t + 1 ∣ s t , a t ) . Also, note that because of Assumption B.2, P M ↑ L B ( s t + 1 ∣ s t , a t ) > 0 P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) > 0 P M ↑ LB ( s t + 1 ∣ s t , a t ) > 0 .
Therefore, the minimum lower bound counterfactual probability in this case is:
P ~ M ↑ L B ( s ′ ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) − ( 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) ) P M ↑ L B ( s t + 1 ∣ s t , a t ) \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) = \frac{P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) - \left(1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t)\right)}{P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t)} P M ↑ LB ( s ′ ∣ s , a ) = P M ↑ LB ( s t + 1 ∣ s t , a t ) P M ↑ LB ( s ′ ∣ s , a ) − ( 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) )
We can combine these cases as follows:
P ~ M ↑ , t L B ( s ′ ∣ s , a ) = { P M ↑ L B ( s ′ ∣ s , a ) − ( 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) ) P M ↑ L B ( s t + 1 ∣ s t , a t ) if P M ↑ L B ( s ′ ∣ s , a ) > 1 − P M ↑ L B ( s t + 1 ∣ s t , a t ) 0 otherwise \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) =
\begin{cases}
\frac{P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) - \left(1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t)\right)}{P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t)} & \text{if } P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s,a) > 1-P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t,a_t) \\
0 & \text{otherwise}
\end{cases} P M ↑ , t LB ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ P M ↑ LB ( s t + 1 ∣ s t , a t ) P M ↑ LB ( s ′ ∣ s , a ) − ( 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) ) 0 if P M ↑ LB ( s ′ ∣ s , a ) > 1 − P M ↑ LB ( s t + 1 ∣ s t , a t ) otherwise
□ \square □
Overlapping Support (s, a)
Upper Bound
Theorem B.6. Assume ( s , a ) ≠ ( s t , a t ) (s,a) \ne(s_t,a_t) ( s , a ) = ( s t , a t ) , and assume that the support of ( s , a ) (s,a) ( s , a ) overlaps with the support of ( s t , a t ) (s_t,a_t) ( s t , a t ) in the IMDP M ↓ \mathcal{M}_{\downarrow} M ↓ . In this case, the optimisation problem in (7) will produce an upper bound of:
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = { min ( 1 , P M ↓ U B ( s t + 1 ∣ s , a ) P M ↓ L B ( s t + 1 ∣ s t , a t ) ) if s ′ = s t + 1 0 if P M ↓ L B ( s ′ ∣ s t , a t ) > 0 and P M ↓ L B ( s t + 1 ∣ s t , a t ) P M ↓ L B ( s ′ ∣ s t , a t ) ≥ P M ↓ U B ( s ′ ∣ s , a ) P M ↓ L B ( s ′ ∣ s t , a t ) min ( P M ↓ U B ( s ′ ∣ s , a ) , 1 − P M ↓ L B ( s t + 1 ∣ s , a ) ) if P M ↓ L B ( s ′ ∣ s t , a t ) > 0 min ( 1 − P M ↓ L B ( s t + 1 ∣ s , a ) , P M ↓ U B ( s ′ ∣ s , a ) max ( 1 − ∑ s ′ ′ ∈ S ∖ { s ′ , s t + 1 } P M ↓ U B ( s ′ ′ ∣ s t , a t ) , P M ↓ L B ( s t + 1 ∣ s t , a t ) ) ) otherwise \widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\downarrow,t}}(s' \mid s,a) =
\begin{cases}
\min\left(1,\dfrac{P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a)}{P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t)}\right) & \text{if }s'=s_{t+1} \\
0 & \text{if }P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)>0\text{ and }\dfrac{P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t)}{P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)}\ge\dfrac{P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s'\mid s,a)}{P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)} \\
\min\left(P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s'\mid s,a),1-P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a)\right) & \text{if }P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)>0 \\
\min\left(1-P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a),\dfrac{P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s'\mid s,a)}{\max\left(1-\sum_{s''\in\mathcal{S}\setminus\{s',s_{t+1}\}}P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s''\mid s_t,a_t),P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t)\right)}\right) & \text{otherwise}
\end{cases} P M ↓ , t UB ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ min ( 1 , P M ↓ LB ( s t + 1 ∣ s t , a t ) P M ↓ UB ( s t + 1 ∣ s , a ) ) 0 min ( P M ↓ UB ( s ′ ∣ s , a ) , 1 − P M ↓ LB ( s t + 1 ∣ s , a ) ) min 1 − P M ↓ LB ( s t + 1 ∣ s , a ) , max ( 1 − ∑ s ′′ ∈ S ∖ { s ′ , s t + 1 } P M ↓ UB ( s ′′ ∣ s t , a t ) , P M ↓ LB ( s t + 1 ∣ s t , a t ) ) P M ↓ UB ( s ′ ∣ s , a ) if s ′ = s t + 1 if P M ↓ LB ( s ′ ∣ s t , a t ) > 0 and P M ↓ LB ( s ′ ∣ s t , a t ) P M ↓ LB ( s t + 1 ∣ s t , a t ) ≥ P M ↓ LB ( s ′ ∣ s t , a t ) P M ↓ UB ( s ′ ∣ s , a ) if P M ↓ LB ( s ′ ∣ s t , a t ) > 0 otherwise
Proof. For any MDP M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ , the proven closed-form solution to the upper bound P ~ M , t ( s ′ ∣ s , a ) \widetilde{P}_{\mathcal{M},t}(s'\mid s,a) P M , t ( s ′ ∣ s , a ) is as follows:
P ~ M , t ( s ′ ∣ s , a ) = { min ( P M ( s t + 1 ∣ s t , a t ) , P M ( s t + 1 ∣ s , a ) ) P M ( s t + 1 ∣ s t , a t ) if s ′ = s t + 1 0 if P M ( s ′ ∣ s t , a t ) > 0 and P M ( s t + 1 ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ≥ P M ( s ′ ∣ s , a ) P M ( s ′ ∣ s t , a t ) min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a ) ) if P M ( s ′ ∣ s t , a t ) > 0 min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) otherwise \widetilde{P}_{\mathcal{M},t}(s'\mid s,a)=
\begin{cases}
\dfrac{\min(P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t),P_{\mathcal{M}}(s_{t+1}\mid s,a))}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)} & \text{if }s'=s_{t+1} \\
0 & \text{if }P_{\mathcal{M}}(s'\mid s_t,a_t)>0\text{ and }\dfrac{P_{\mathcal{M}}(s_{t+1}\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\ge\dfrac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s'\mid s_t,a_t)} \\
\min(P_{\mathcal{M}}(s'\mid s,a),1-P_{\mathcal{M}}(s_{t+1}\mid s,a)) & \text{if }P_{\mathcal{M}}(s'\mid s_t,a_t)>0 \\
\min\left(1-P_{\mathcal{M}}(s_{t+1}\mid s,a),\dfrac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right) & \text{otherwise}
\end{cases} P M , t ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ P M ( s t + 1 ∣ s t , a t ) min ( P M ( s t + 1 ∣ s t , a t ) , P M ( s t + 1 ∣ s , a )) 0 min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a )) min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) ) if s ′ = s t + 1 if P M ( s ′ ∣ s t , a t ) > 0 and P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s , a ) ≥ P M ( s ′ ∣ s t , a t ) P M ( s ′ ∣ s , a ) if P M ( s ′ ∣ s t , a t ) > 0 otherwise
Consider the following disjoint cases.
Case 1: s ′ = s t + 1 s'=s_{t+1} s ′ = s t + 1 . In this case, for any MDP M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ , the closed-form solution is:
P ~ M , t U B ( s t + 1 ∣ s , a ) = min ( P M ( s t + 1 ∣ s t , a t ) , P M ( s t + 1 ∣ s , a ) ) P M ( s t + 1 ∣ s t , a t ) \widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s_{t+1}\mid s,a)=\dfrac{\min(P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t),P_{\mathcal{M}}(s_{t+1}\mid s,a))}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)} P M , t UB ( s t + 1 ∣ s , a ) = P M ( s t + 1 ∣ s t , a t ) min ( P M ( s t + 1 ∣ s t , a t ) , P M ( s t + 1 ∣ s , a ))
Therefore, we need to maximise this over all MDPs M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ . Clearly, for any MDP M \mathcal{M} M where P M ( s t + 1 ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1}\mid s,a)<P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t) P M ( s t + 1 ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) , P M ( s t + 1 ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) < 1 \dfrac{P_{\mathcal{M}}(s_{t+1}\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}<1 P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s , a ) < 1 , so the maximum possible value of P ~ M , t U B ( s ′ ∣ s , a ) \widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s'\mid s,a) P M , t UB ( s ′ ∣ s , a ) across all MDPs is 1 1 1 . Consider now whether P M ↓ U B ( s t + 1 ∣ s , a ) < P M ↓ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a)<P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t) P M ↓ UB ( s t + 1 ∣ s , a ) < P M ↓ LB ( s t + 1 ∣ s t , a t ) :
(1) If P M ↓ U B ( s t + 1 ∣ s , a ) ≥ P M ↓ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a)\ge P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t) P M ↓ UB ( s t + 1 ∣ s , a ) ≥ P M ↓ LB ( s t + 1 ∣ s t , a t ) , then, because of Assumption B.1, we know there exists an MDP M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ where P M ( s t + 1 ∣ s , a ) = P M ↓ U B ( s t + 1 ∣ s , a ) P_{\mathcal{M}}(s_{t+1}\mid s,a)=P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a) P M ( s t + 1 ∣ s , a ) = P M ↓ UB ( s t + 1 ∣ s , a ) and P M ( s t + 1 ∣ s t , a t ) = P M ↓ L B ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)=P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↓ LB ( s t + 1 ∣ s t , a t ) . Also, note that because of Assumption B.2, P M ↓ L B ( s t + 1 ∣ s t , a t ) > 0 P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t)>0 P M ↓ LB ( s t + 1 ∣ s t , a t ) > 0 . In this MDP M \mathcal{M} M , we know P M ( s t + 1 ∣ s , a ) ≥ P M ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1}\mid s,a)\ge P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t) P M ( s t + 1 ∣ s , a ) ≥ P M ( s t + 1 ∣ s t , a t ) , therefore, the upper bound counterfactual probability P ~ M , t ( s ′ ∣ s , a ) = P M ( s t + 1 ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) = 1 \widetilde{P}_{\mathcal{M},t}(s'\mid s,a)=\dfrac{P_{\mathcal{M}}(s_{t+1}\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}=1 P M , t ( s ′ ∣ s , a ) = P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s , a ) = 1 , and since this is the maximum possible counterfactual probability, P ~ M ↓ , t U B ( s t + 1 ∣ s , a ) = 1 \widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\downarrow},t}(s_{t+1}\mid s,a)=1 P M ↓ , t UB ( s t + 1 ∣ s , a ) = 1 .
(2) Otherwise, if P M ↓ U B ( s t + 1 ∣ s , a ) < P M ↓ L B ( s t + 1 ∣ s t , a t ) P^{\mathrm{UB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a)<P^{\mathrm{LB}}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t) P M ↓ UB ( s t + 1 ∣ s , a ) < P M ↓ LB ( s t + 1 ∣ s t , a t ) , then, for every MDP M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ , P M ( s t + 1 ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1}\mid s,a)<P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t) P M ( s t + 1 ∣ s , a ) < P M ( s t + 1 ∣ s t , a t ) . Therefore, for every MDP, the upper bound counterfactual probability for the transition will be P ~ M , t U B ( s ′ ∣ s , a ) = P M ( s t + 1 ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) \widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s'\mid s,a)=\dfrac{P_{\mathcal{M}}(s_{t+1}\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)} P M , t UB ( s ′ ∣ s , a ) = P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s , a ) . The maximum upper bound counterfactual probability, therefore, will be:
P ~ M ↑ , t U B ( s t + 1 ∣ s , a ) = max M ∈ M ↑ ( P ~ M , t U B ( s t + 1 ∣ s , a ) ) = max M ∈ M ↑ ( P M ( s t + 1 ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) = P M ↑ U B ( s t + 1 ∣ s , a ) P M ↑ L B ( s t + 1 ∣ s t , a t ) \widetilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s_{t+1}\mid s,a)=\max_{\mathcal{M}\in\mathcal{M}_{\uparrow}}\left(\widetilde{P}^{UB}_{\mathcal{M},t}(s_{t+1}\mid s,a)\right)
=\max_{\mathcal{M}\in\mathcal{M}_{\uparrow}}\left(\frac{P_{\mathcal{M}}(s_{t+1}\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right)
=\frac{P^{UB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s,a)}{P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t)} P M ↑ , t U B ( s t + 1 ∣ s , a ) = M ∈ M ↑ max ( P M , t U B ( s t + 1 ∣ s , a ) ) = M ∈ M ↑ max ( P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s , a ) ) = P M ↑ L B ( s t + 1 ∣ s t , a t ) P M ↑ U B ( s t + 1 ∣ s , a )
Because of Assumption B.1, there must exist an MDP M \mathcal{M} M where P M ( s t + 1 ∣ s t , a t ) = P M ↑ L B ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↑ L B ( s t + 1 ∣ s t , a t ) and P M ( s ′ ∣ s , a ) = P M ↑ U B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s'\mid s,a)=P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a) P M ( s ′ ∣ s , a ) = P M ↑ U B ( s ′ ∣ s , a ) .
Also, note that because of Assumption B.2, P M ↑ L B ( s t + 1 ∣ s t , a t ) > 0 P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t)>0 P M ↑ L B ( s t + 1 ∣ s t , a t ) > 0 .
Therefore, the maximum upper bound counterfactual probability in this case is
P ~ M ↑ U B ( s ′ ∣ s , a ) = P M ↑ U B ( s ′ ∣ s , a ) P M ↑ L B ( s t + 1 ∣ s t , a t ) \widetilde{P}^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a)=\frac{P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a)}{P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t)} P M ↑ U B ( s ′ ∣ s , a ) = P M ↑ L B ( s t + 1 ∣ s t , a t ) P M ↑ U B ( s ′ ∣ s , a )
We can combine these cases as follows:
P ~ M ↑ , t U B ( s t + 1 ∣ s , a ) = min ( 1 , P M ↑ U B ( s t + 1 ∣ s , a ) P M ↑ L B ( s t + 1 ∣ s t , a t ) ) \widetilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s_{t+1}\mid s,a)=\min\left(1,\frac{P^{UB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s,a)}{P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t)}\right) P M ↑ , t U B ( s t + 1 ∣ s , a ) = min ( 1 , P M ↑ L B ( s t + 1 ∣ s t , a t ) P M ↑ U B ( s t + 1 ∣ s , a ) )
Case 2: P M ↑ L B ( s ′ ∣ s t , a t ) > 0 P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)>0 P M ↑ L B ( s ′ ∣ s t , a t ) > 0 and P M ↑ L B ( s t + 1 ∣ s , a ) P M ↑ U B ( s t + 1 ∣ s t , a t ) ≥ P M ↑ U B ( s ′ ∣ s , a ) P M ↑ L B ( s ′ ∣ s t , a t ) \frac{P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s,a)}{P^{UB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t)}\geq\frac{P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a)}{P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)} P M ↑ U B ( s t + 1 ∣ s t , a t ) P M ↑ L B ( s t + 1 ∣ s , a ) ≥ P M ↑ L B ( s ′ ∣ s t , a t ) P M ↑ U B ( s ′ ∣ s , a ) . This is a valid condition, because, by assumption, P M ↑ L B ( s ′ ∣ s t , a t ) > 0 P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)>0 P M ↑ L B ( s ′ ∣ s t , a t ) > 0 , and P M ↑ L B ( s t + 1 ∣ s t , a t ) > 0 P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t)>0 P M ↑ L B ( s t + 1 ∣ s t , a t ) > 0 since this was the observed transition (Assumption B.2).
If this condition holds, then, for every M ∈ M ↑ \mathcal{M}\in\mathcal{M}_{\uparrow} M ∈ M ↑ , P M ( s t + 1 ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ≥ P M ( s ′ ∣ s , a ) P M ( s ′ ∣ s t , a t ) \frac{P_{\mathcal{M}}(s_{t+1}\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\geq\frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s'\mid s_t,a_t)} P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s , a ) ≥ P M ( s ′ ∣ s t , a t ) P M ( s ′ ∣ s , a ) , and so, for every M ∈ M ↑ \mathcal{M}\in\mathcal{M}_{\uparrow} M ∈ M ↑ the upper bound counterfactual probability must be 0, to satisfy the counterfactual stability constraint. Therefore, we know the maximum upper bound counterfactual probability P ~ M ↑ U B ( s ′ ∣ s , a ) \widetilde{P}^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a) P M ↑ U B ( s ′ ∣ s , a ) will be:
P ~ M ↑ U B ( s ′ ∣ s , a ) = max M ∈ M ↑ ( P ~ M U B ( s ′ ∣ s , a ) ) = max M ∈ M ↑ ( 0 ) = 0 \widetilde{P}^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a)=\max_{\mathcal{M}\in\mathcal{M}_{\uparrow}}\left(\widetilde{P}^{UB}_{\mathcal{M}}(s'\mid s,a)\right)
=\max_{\mathcal{M}\in\mathcal{M}_{\uparrow}}(0)
=0 P M ↑ U B ( s ′ ∣ s , a ) = M ∈ M ↑ max ( P M U B ( s ′ ∣ s , a ) ) = M ∈ M ↑ max ( 0 ) = 0
Case 3: P M ↑ L B ( s ′ ∣ s t , a t ) > 0 P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)>0 P M ↑ L B ( s ′ ∣ s t , a t ) > 0 . If P M ↑ L B ( s ′ ∣ s t , a t ) > 0 P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)>0 P M ↑ L B ( s ′ ∣ s t , a t ) > 0 , then, for all MDPs M ∈ M ↑ \mathcal{M}\in\mathcal{M}_{\uparrow} M ∈ M ↑ , the counterfactual probability of the transition P ~ M , t ( s ′ ∣ s , a ) ≤ P M ( s ′ ∣ s , a ) \widetilde{P}_{\mathcal{M},t}(s'\mid s,a)\leq P_{\mathcal{M}}(s'\mid s,a) P M , t ( s ′ ∣ s , a ) ≤ P M ( s ′ ∣ s , a ) , due to the counterfactual monotonicity constraints.
For every MDP M ∈ M ↑ \mathcal{M}\in\mathcal{M}_{\uparrow} M ∈ M ↑ , the counterfactual probability P ~ M , t U B ( s ′ ∣ s , a ) = min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a ) ) \widetilde{P}^{UB}_{\mathcal{M},t}(s'\mid s,a)=\min(P_{\mathcal{M}}(s'\mid s,a),1-P_{\mathcal{M}}(s_{t+1}\mid s,a)) P M , t U B ( s ′ ∣ s , a ) = min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a )) , as long as the counterfactual stability constraint does not constrain the counterfactual probability to 0. This leads to the following optimisation problem:
P ~ M ↑ , t U B ( s ′ ∣ s , a ) = max M ∈ M ↑ ( P ~ M , t U B ( s ′ ∣ s , a ) ) = max M ∈ M ↑ ( min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a ) ) ) \widetilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s'\mid s,a)=\max_{\mathcal{M}\in\mathcal{M}_{\uparrow}}\left(\widetilde{P}^{UB}_{\mathcal{M},t}(s'\mid s,a)\right)
=\max_{\mathcal{M}\in\mathcal{M}_{\uparrow}}\left(\min(P_{\mathcal{M}}(s'\mid s,a),1-P_{\mathcal{M}}(s_{t+1}\mid s,a))\right) P M ↑ , t U B ( s ′ ∣ s , a ) = M ∈ M ↑ max ( P M , t U B ( s ′ ∣ s , a ) ) = M ∈ M ↑ max ( min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a )) )
Because of Assumption B.1, there must exist an MDP M ∈ M ↑ \mathcal{M}\in\mathcal{M}_{\uparrow} M ∈ M ↑ with
P M ( s ′ ∣ s , a ) = P M ↑ U B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s'\mid s,a)=P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a) P M ( s ′ ∣ s , a ) = P M ↑ U B ( s ′ ∣ s , a )
P M ( s t + 1 ∣ s , a ) = P M ↑ L B ( s t + 1 ∣ s , a ) P_{\mathcal{M}}(s_{t+1}\mid s,a)=P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s,a) P M ( s t + 1 ∣ s , a ) = P M ↑ L B ( s t + 1 ∣ s , a )
P M ( s ′ ∣ s t , a t ) = P M ↑ L B ( s ′ ∣ s t , a t ) P_{\mathcal{M}}(s'\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t) P M ( s ′ ∣ s t , a t ) = P M ↑ L B ( s ′ ∣ s t , a t )
P M ( s t + 1 ∣ s t , a t ) = P M ↑ U B ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)=P^{UB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↑ U B ( s t + 1 ∣ s t , a t )
This MDP results in the maximum possible values of P M ( s ′ ∣ s , a ) P_{\mathcal{M}}(s'\mid s,a) P M ( s ′ ∣ s , a ) and 1 − P M ( s t + 1 ∣ s , a ) 1-P_{\mathcal{M}}(s_{t+1}\mid s,a) 1 − P M ( s t + 1 ∣ s , a ) , therefore, this also produces the maximum possible value of min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a ) ) \min(P_{\mathcal{M}}(s'\mid s,a),1-P_{\mathcal{M}}(s_{t+1}\mid s,a)) min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a )) .
In this case, we know P M ↑ L B ( s t + 1 ∣ s , a ) P M ↑ U B ( s t + 1 ∣ s t , a t ) < P M ↑ U B ( s ′ ∣ s , a ) P M ↑ L B ( s ′ ∣ s t , a t ) \frac{P^{LB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s,a)}{P^{UB}_{\mathcal{M}_{\uparrow}}(s_{t+1}\mid s_t,a_t)}<\frac{P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a)}{P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)} P M ↑ U B ( s t + 1 ∣ s t , a t ) P M ↑ L B ( s t + 1 ∣ s , a ) < P M ↑ L B ( s ′ ∣ s t , a t ) P M ↑ U B ( s ′ ∣ s , a ) (otherwise, we would be in Case 2), therefore for this MDP M \mathcal{M} M , the counterfactual stability constraint will not constrain the counterfactual transition probability P ~ M , t ( s ′ ∣ s , a ) \widetilde{P}_{\mathcal{M},t}(s'\mid s,a) P M , t ( s ′ ∣ s , a ) . Therefore, the maximum counterfactual probability across all MDPs M ∈ M ↑ \mathcal{M}\in\mathcal{M}_{\uparrow} M ∈ M ↑ will be:
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = min ( P M ↓ U B ( s ′ ∣ s , a ) , 1 − P M ↓ L B ( s t + 1 ∣ s , a ) ) \widetilde{P}^{UB}_{\mathcal{M}_{\downarrow},t}(s' \mid s,a)=\min\left(P^{UB}_{\mathcal{M}_{\downarrow}}(s' \mid s,a),1-P^{LB}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a)\right) P M ↓ , t U B ( s ′ ∣ s , a ) = min ( P M ↓ U B ( s ′ ∣ s , a ) , 1 − P M ↓ L B ( s t + 1 ∣ s , a ) )
Case 4: P M ↓ U B ( s ′ ∣ s t , a t ) = 0 P^{UB}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)=0 P M ↓ U B ( s ′ ∣ s t , a t ) = 0 . If P M ↓ U B ( s ′ ∣ s t , a t ) = 0 P^{UB}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)=0 P M ↓ U B ( s ′ ∣ s t , a t ) = 0 , then, for all MDPs M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ , P M U B ( s ′ ∣ s t , a t ) = 0 P^{UB}_{\mathcal{M}}(s'\mid s_t,a_t)=0 P M U B ( s ′ ∣ s t , a t ) = 0 . Therefore, the upper bound counterfactual probability of the transition for all MDPs M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ is as follows:
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) \widetilde{P}^{UB}_{\mathcal{M}_{\downarrow},t}(s'\mid s,a)=\min\left(1-P_{\mathcal{M}}(s_{t+1}\mid s,a),\frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right) P M ↓ , t U B ( s ′ ∣ s , a ) = min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) )
This results in the following optimisation problem:
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = max M ∈ M ↓ ( P ~ M , t U B ( s ′ ∣ s , a ) ) = max M ∈ M ↓ ( min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) ) \begin{aligned}
\widetilde{P}^{UB}_{\mathcal{M}_{\downarrow},t}(s'\mid s,a)
&=\max_{\mathcal{M}\in\mathcal{M}_{\downarrow}}\left(\widetilde{P}^{UB}_{\mathcal{M},t}(s'\mid s,a)\right)\\
&=\max_{\mathcal{M}\in\mathcal{M}_{\downarrow}}\left(\min\left(1-P_{\mathcal{M}}(s_{t+1}\mid s,a),\frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right)\right)
\end{aligned} P M ↓ , t U B ( s ′ ∣ s , a ) = M ∈ M ↓ max ( P M , t U B ( s ′ ∣ s , a ) ) = M ∈ M ↓ max ( min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) ) )
Because of Assumption B.1, there must exist an MDP M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ where:
P M ( s t + 1 ∣ s , a ) = P M ↓ L B ( s t + 1 ∣ s , a ) P_{\mathcal{M}}(s_{t+1}\mid s,a)=P^{LB}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a) P M ( s t + 1 ∣ s , a ) = P M ↓ L B ( s t + 1 ∣ s , a )
P M ( s ′ ∣ s , a ) = P M ↓ U B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s'\mid s,a)=P^{UB}_{\mathcal{M}_{\downarrow}}(s'\mid s,a) P M ( s ′ ∣ s , a ) = P M ↓ U B ( s ′ ∣ s , a )
P M ( s t + 1 ∣ s t , a t ) = P M ↓ L B ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M ↓ L B ( s t + 1 ∣ s t , a t )
Also, note that because of Assumption B.2, P M ↓ L B ( s t + 1 ∣ s t , a t ) > 0 P^{LB}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t)>0 P M ↓ L B ( s t + 1 ∣ s t , a t ) > 0 .
This MDP results in the maximum possible values of 1 − P M ( s t + 1 ∣ s , a ) 1-P_{\mathcal{M}}(s_{t+1}\mid s,a) 1 − P M ( s t + 1 ∣ s , a ) and P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) \frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)} P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) , and therefore produces the maximum possible value of min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) \min\left(1-P_{\mathcal{M}}(s_{t+1}\mid s,a),\frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right) min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) ) .
Therefore, the maximum counterfactual probability across all MDPs M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ will be:
P ~ M ↓ , t U B ( s ′ ∣ s , a ) = min ( 1 − P M ↓ L B ( s t + 1 ∣ s , a ) , P M ↓ U B ( s ′ ∣ s , a ) P M ↓ L B ( s t + 1 ∣ s t , a t ) ) \widetilde{P}^{UB}_{\mathcal{M}_{\downarrow},t}(s'\mid s,a)=\min\left(1-P^{LB}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a),\frac{P^{UB}_{\mathcal{M}_{\downarrow}}(s'\mid s,a)}{P^{LB}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t)}\right) P M ↓ , t U B ( s ′ ∣ s , a ) = min ( 1 − P M ↓ L B ( s t + 1 ∣ s , a ) , P M ↓ L B ( s t + 1 ∣ s t , a t ) P M ↓ U B ( s ′ ∣ s , a ) )
Case 5: P M ↓ L B ( s ′ ∣ s t , a t ) = 0 P^{LB}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)=0 P M ↓ L B ( s ′ ∣ s t , a t ) = 0 and P M ↓ U B ( s ′ ∣ s t , a t ) > 0 P^{UB}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)>0 P M ↓ U B ( s ′ ∣ s t , a t ) > 0 . For every MDP M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ , the counterfactual probability of P ~ M , t ( s ′ ∣ s , a ) \widetilde{P}_{\mathcal{M},t}(s'\mid s,a) P M , t ( s ′ ∣ s , a ) depends on the value of P M ( s ′ ∣ s t , a t ) P_{\mathcal{M}}(s'\mid s_t,a_t) P M ( s ′ ∣ s t , a t ) :
If P M ( s ′ ∣ s t , a t ) > 0 P_{\mathcal{M}}(s'\mid s_t,a_t)>0 P M ( s ′ ∣ s t , a t ) > 0 , then the counterfactual probability of the transition will either be P ~ M , t ( s ′ ∣ s , a ) = min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a ) ) \widetilde{P}_{\mathcal{M},t}(s'\mid s,a)=\min(P_{\mathcal{M}}(s'\mid s,a),1-P_{\mathcal{M}}(s_{t+1}\mid s,a)) P M , t ( s ′ ∣ s , a ) = min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a )) , because of the counterfactual monotonicity constraint, or 0 0 0 if the counterfactual stability constraint holds.
Otherwise, if P M ( s ′ ∣ s t , a t ) = 0 P_{\mathcal{M}}(s'\mid s_t,a_t)=0 P M ( s ′ ∣ s t , a t ) = 0 , then the counterfactual probability of the transition P ~ M , t ( s ′ ∣ s , a ) = min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) \widetilde{P}_{\mathcal{M},t}(s'\mid s,a)=\min\left(1-P_{\mathcal{M}}(s_{t+1}\mid s,a),\frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right) P M , t ( s ′ ∣ s , a ) = min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) ) .
Because ∀ M ∈ M ↓ , 0 < P M ( s t + 1 ∣ s t , a t ) ≤ 1 \forall\mathcal{M}\in\mathcal{M}_{\downarrow},0<P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)\leq1 ∀ M ∈ M ↓ , 0 < P M ( s t + 1 ∣ s t , a t ) ≤ 1 we have, for all MDPs M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ :
min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) ≥ min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a ) ) \min\left(1-P_{\mathcal{M}}(s_{t+1}\mid s,a),\frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right)\geq\min(P_{\mathcal{M}}(s'\mid s,a),1-P_{\mathcal{M}}(s_{t+1}\mid s,a)) min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) ) ≥ min ( P M ( s ′ ∣ s , a ) , 1 − P M ( s t + 1 ∣ s , a ))
and, trivially,
min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) ≥ 0 \min\left(1-P_{\mathcal{M}}(s_{t+1}\mid s,a),\frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\right)\geq0 min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) ) ≥ 0
Therefore, the counterfactual transition probability for MDPs where P M ( s ′ ∣ s t , a t ) = 0 P_{\mathcal{M}}(s'\mid s_t,a_t)=0 P M ( s ′ ∣ s t , a t ) = 0 will always be greater than or equal to the counterfactual transition probability when P M ( s ′ ∣ s t , a t ) > 0 P_{\mathcal{M}}(s'\mid s_t,a_t)>0 P M ( s ′ ∣ s t , a t ) > 0 . Because of Assumption B.1, and since P M ↓ L B ( s ′ ∣ s t , a t ) = 0 P^{LB}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)=0 P M ↓ L B ( s ′ ∣ s t , a t ) = 0 , there must exist an MDP M ∈ M ↓ \mathcal{M}\in\mathcal{M}_{\downarrow} M ∈ M ↓ where:
P M ( s ′ ∣ s t , a t ) = P M ↓ L B ( s ′ ∣ s t , a t ) = 0 P_{\mathcal{M}}(s'\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\downarrow}}(s'\mid s_t,a_t)=0 P M ( s ′ ∣ s t , a t ) = P M ↓ L B ( s ′ ∣ s t , a t ) = 0
P M ( s t + 1 ∣ s t , a t ) = max ( 1 − ∑ s ′ ′ ∈ S ∖ { s ′ , s t + 1 } P M ↓ U B ( s ′ ′ ∣ s t , a t ) , P M ↓ L B ( s t + 1 ∣ s t , a t ) ) P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)=\max\left(1-\sum_{s''\in\mathcal{S}\setminus\{s',s_{t+1}\}}P^{UB}_{\mathcal{M}_{\downarrow}}(s''\mid s_t,a_t),P^{LB}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s_t,a_t)\right) P M ( s t + 1 ∣ s t , a t ) = max ( 1 − ∑ s ′′ ∈ S ∖ { s ′ , s t + 1 } P M ↓ U B ( s ′′ ∣ s t , a t ) , P M ↓ L B ( s t + 1 ∣ s t , a t ) )
P M ( s ′ ∣ s , a ) = P M ↓ U B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s'\mid s,a)=P^{UB}_{\mathcal{M}_{\downarrow}}(s'\mid s,a) P M ( s ′ ∣ s , a ) = P M ↓ U B ( s ′ ∣ s , a )
P M ( s t + 1 ∣ s , a ) = P M ↓ L B ( s t + 1 ∣ s , a ) P_{\mathcal{M}}(s_{t+1}\mid s,a)=P^{LB}_{\mathcal{M}_{\downarrow}}(s_{t+1}\mid s,a) P M ( s t + 1 ∣ s , a ) = P M ↓ L B ( s t + 1 ∣ s , a )
This assignment leads to the maximum possible value of min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s ′ ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ) \min\left(1-P_M(s_{t+1}\mid s,a),\frac{P_M(s'\mid s,a)}{P_M(s_{t+1}\mid s_t,a_t)}\right) min ( 1 − P M ( s t + 1 ∣ s , a ) , P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s , a ) ) . Therefore, the maximum upper bound counterfactual probability is:
P ~ M , t U B ( s t + 1 ∣ s , a ) = min ( 1 − P M , t L B ( s t + 1 ∣ s , a ) , P M , t U B ( s ′ ∣ s , a ) max ( 1 − ∑ s ′ ′ ∈ S ∖ { s ′ , s t + 1 } P M , t U B ( s ′ ′ ∣ s t , a t ) P M , t L B ( s t + 1 ∣ s t , a t ) ) ) \widetilde{P}^{UB}_{M,t}(s_{t+1}\mid s,a)=\min\left(1-P^{LB}_{M,t}(s_{t+1}\mid s,a),\frac{P^{UB}_{M,t}(s'\mid s,a)}{\max\left(\frac{1-\sum_{s''\in S\setminus\{s',s_{t+1}\}}P^{UB}_{M,t}(s''\mid s_t,a_t)}{P^{LB}_{M,t}(s_{t+1}\mid s_t,a_t)}\right)}\right) P M , t U B ( s t + 1 ∣ s , a ) = min 1 − P M , t L B ( s t + 1 ∣ s , a ) , max ( P M , t L B ( s t + 1 ∣ s t , a t ) 1 − ∑ s ′′ ∈ S ∖ { s ′ , s t + 1 } P M , t U B ( s ′′ ∣ s t , a t ) ) P M , t U B ( s ′ ∣ s , a )
□ \square □
Lower Bound
Because the lower bound closed-form solutions for each MDP M \mathcal{M} M contain ∑ s ′ ∈ S ∖ { s ′ } P ~ M , t U B ( s ′ ∣ s , a ) \sum_{s'\in\mathcal{S}\setminus\{s'\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s' \mid s,a) ∑ s ′ ∈ S ∖ { s ′ } P M , t UB ( s ′ ∣ s , a ) , this makes it challenging to identify the minimum lower bound counterfactual probability across all MDPs M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † . Because of this, we provide two solutions: a closed-form solution for a non-tight lower bound, and a reduced optimisation problem that solves for the exact lower bound as efficiently as possible.
Solution 1: Non-tight Lower Bound.
Theorem B.7. Assume ( s , a ) ≠ ( s t , a t ) (s,a)\ne(s_t,a_t) ( s , a ) = ( s t , a t ) , and assume that the support of ( s , a ) (s,a) ( s , a ) overlaps with the support of ( s t , a t ) (s_t,a_t) ( s t , a t ) in the IMDP M † \mathcal{M}_{\dagger} M † . In this case, the optimisation problem in (8) will produce a lower bound that is guaranteed to be no smaller than:
P ~ M † , t L B ( s ′ ∣ s , a ) = { max ( P M † L B ( s ′ ∣ s , a ) , 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M † , t U B ( s ′ ′ ∣ s , a ) ) if s ′ = s t + 1 0 if P M † U B ( s ′ ∣ s t , a t ) > 0 and P M † U B ( s t + 1 ∣ s , a ) P M † L B ( s t + 1 ∣ s t , a t ) ≥ P M † L B ( s ′ ∣ s , a ) P M † U B ( s ′ ∣ s t , a t ) max ( 0 , 1 − ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M † , t U B ( s ′ ′ ∣ s , a ) ) otherwise \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\dagger},t}(s'\mid s,a)=
\begin{cases}
\max\left(P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s'\mid s,a),1-\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\dagger},t}(s''\mid s,a)\right) & \text{if }s'=s_{t+1}\\
0 & \text{if }P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s'\mid s_t,a_t)>0\text{ and }\frac{P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s,a)}{P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s_t,a_t)}\ge\frac{P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s'\mid s,a)}{P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s'\mid s_t,a_t)}\\
\max\left(0,1-\sum_{s''\in\mathcal{S}\setminus\{s'\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\dagger},t}(s''\mid s,a)\right) & \text{otherwise}
\end{cases} P M † , t LB ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ max ( P M † LB ( s ′ ∣ s , a ) , 1 − ∑ s ′′ ∈ S ∖ { s t + 1 } P M † , t UB ( s ′′ ∣ s , a ) ) 0 max ( 0 , 1 − ∑ s ′′ ∈ S ∖ { s ′ } P M † , t UB ( s ′′ ∣ s , a ) ) if s ′ = s t + 1 if P M † UB ( s ′ ∣ s t , a t ) > 0 and P M † LB ( s t + 1 ∣ s t , a t ) P M † UB ( s t + 1 ∣ s , a ) ≥ P M † UB ( s ′ ∣ s t , a t ) P M † LB ( s ′ ∣ s , a ) otherwise Consider the following disjoint cases.
Case 1: s ′ = s t + 1 s'=s_{t+1} s ′ = s t + 1 . Because of Assumption B.2, for any MDP M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † , P M ( s t + 1 ∣ s t , a t ) > 0 P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)>0 P M ( s t + 1 ∣ s t , a t ) > 0 since this was the observed transition. Therefore, for any MDP M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † , the monotonicity assumption ensures that P ~ M , t ( s t + 1 ∣ s , a ) ≥ P M ( s t + 1 ∣ s , a ) \widetilde{P}_{\mathcal{M},t}(s_{t+1}\mid s,a)\ge P_{\mathcal{M}}(s_{t+1}\mid s,a) P M , t ( s t + 1 ∣ s , a ) ≥ P M ( s t + 1 ∣ s , a ) , and the closed-form solution is:
P ~ M , t L B ( s t + 1 ∣ s , a ) = max ( P M ( s t + 1 ∣ s , a ) , 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) ) \widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s_{t+1}\mid s,a)=\max\left(P_{\mathcal{M}}(s_{t+1}\mid s,a),1-\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s''\mid s,a)\right) P M , t LB ( s t + 1 ∣ s , a ) = max P M ( s t + 1 ∣ s , a ) , 1 − s ′′ ∈ S ∖ { s t + 1 } ∑ P M , t UB ( s ′′ ∣ s , a ) We need to minimise this condition over all MDPs M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † . We can immediately see that the minimum values of each part of the closed-form solution, i.e., P M ( s t + 1 ∣ s , a ) P_{\mathcal{M}}(s_{t+1}\mid s,a) P M ( s t + 1 ∣ s , a ) and 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) 1-\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s''\mid s,a) 1 − ∑ s ′′ ∈ S ∖ { s t + 1 } P M , t UB ( s ′′ ∣ s , a ) will occur in the same MDP M \mathcal{M} M . This is because, to minimise 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) 1-\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s''\mid s,a) 1 − ∑ s ′′ ∈ S ∖ { s t + 1 } P M , t UB ( s ′′ ∣ s , a ) , we need to identify an MDP M \mathcal{M} M which maximises the value of ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t ( s ′ ′ ∣ s , a ) \sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}_{\mathcal{M},t}(s''\mid s,a) ∑ s ′′ ∈ S ∖ { s t + 1 } P M , t ( s ′′ ∣ s , a ) . Clearly, the maximum value of ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t ( s ′ ′ ∣ s , a ) \sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}_{\mathcal{M},t}(s''\mid s,a) ∑ s ′′ ∈ S ∖ { s t + 1 } P M , t ( s ′′ ∣ s , a ) is 1 − P M † L B ( s t + 1 ∣ s , a ) 1-P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s,a) 1 − P M † LB ( s t + 1 ∣ s , a ) , and the minimum value of P M ( s t + 1 ∣ s , a ) P_{\mathcal{M}}(s_{t+1}\mid s,a) P M ( s t + 1 ∣ s , a ) across all MDPs M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † is P M † L B ( s t + 1 ∣ s , a ) P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s,a) P M † LB ( s t + 1 ∣ s , a ) . Therefore, we can consider each part of this closed-form solution separately.
Now, consider the minimum value of 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) 1-\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s''\mid s,a) 1 − ∑ s ′′ ∈ S ∖ { s t + 1 } P M , t UB ( s ′′ ∣ s , a ) across all MDPs M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † . In any MDP M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † , we require the transition probabilities from every state-action pair to sum to 1. Because of this, it is challenging to determine the MDP with the greatest value of ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) \sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s''\mid s,a) ∑ s ′′ ∈ S ∖ { s t + 1 } P M , t UB ( s ′′ ∣ s , a ) . However, to identify a non-tight lower bound, we can ignore this constraint, and instead find the value of ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M † , t U B ( s ′ ′ ∣ s , a ) \sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\dagger},t}(s''\mid s,a) ∑ s ′′ ∈ S ∖ { s t + 1 } P M † , t UB ( s ′′ ∣ s , a ) across the whole IMDP M † \mathcal{M}_{\dagger} M † . Clearly, ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M † , t U B ( s ′ ′ ∣ s , a ) ≥ ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) \sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\dagger},t}(s''\mid s,a)\ge\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M},t}(s''\mid s,a) ∑ s ′′ ∈ S ∖ { s t + 1 } P M † , t UB ( s ′′ ∣ s , a ) ≥ ∑ s ′′ ∈ S ∖ { s t + 1 } P M , t UB ( s ′′ ∣ s , a ) for any MDP M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † , so 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M † , t U B ( s ′ ′ ∣ s , a ) 1-\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\dagger},t}(s''\mid s,a) 1 − ∑ s ′′ ∈ S ∖ { s t + 1 } P M † , t UB ( s ′′ ∣ s , a ) results in a lower bound.
Therefore, a minimum (but not necessarily tight) lower bound would be:
max ( P M † L B ( s ′ ∣ s , a ) , 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M † , t U B ( s ′ ′ ∣ s , a ) ) \max\left(P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s'\mid s,a),1-\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{\mathrm{UB}}_{\mathcal{M}_{\dagger},t}(s''\mid s,a)\right) max P M † LB ( s ′ ∣ s , a ) , 1 − s ′′ ∈ S ∖ { s t + 1 } ∑ P M † , t UB ( s ′′ ∣ s , a ) Case 2: P M † U B ( s ′ ∣ s t , a t ) > 0 P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s'\mid s_t,a_t)>0 P M † UB ( s ′ ∣ s t , a t ) > 0 and P M † U B ( s t + 1 ∣ s , a ) P M † L B ( s t + 1 ∣ s t , a t ) ≥ P M † L B ( s ′ ∣ s , a ) P M † U B ( s ′ ∣ s t , a t ) \frac{P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s,a)}{P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s_t,a_t)}\ge\frac{P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s'\mid s,a)}{P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s'\mid s_t,a_t)} P M † LB ( s t + 1 ∣ s t , a t ) P M † UB ( s t + 1 ∣ s , a ) ≥ P M † UB ( s ′ ∣ s t , a t ) P M † LB ( s ′ ∣ s , a ) . This is a valid condition, because, by assumption, P M † U B ( s ′ ∣ s t , a t ) > 0 P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s'\mid s_t,a_t)>0 P M † UB ( s ′ ∣ s t , a t ) > 0 , and P M † U B ( s t + 1 ∣ s t , a t ) ≥ P M † L B ( s t + 1 ∣ s t , a t ) > 0 P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s_t,a_t)\ge P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s_t,a_t)>0 P M † UB ( s t + 1 ∣ s t , a t ) ≥ P M † LB ( s t + 1 ∣ s t , a t ) > 0 since this was the observed transition (Assumption B.2).
Because of Assumption B.1, there must exist an MDP M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † with:
P M ( s ′ ∣ s , a ) = P M † L B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s'\mid s,a)=P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s'\mid s,a) P M ( s ′ ∣ s , a ) = P M † LB ( s ′ ∣ s , a )
P M ( s t + 1 ∣ s , a ) = P M † L B ( s t + 1 ∣ s , a ) P_{\mathcal{M}}(s_{t+1}\mid s,a)=P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s,a) P M ( s t + 1 ∣ s , a ) = P M † LB ( s t + 1 ∣ s , a )
P M ( s ′ ∣ s t , a t ) = P M † U B ( s ′ ∣ s t , a t ) P_{\mathcal{M}}(s'\mid s_t,a_t)=P^{\mathrm{UB}}_{\mathcal{M}_{\dagger}}(s'\mid s_t,a_t) P M ( s ′ ∣ s t , a t ) = P M † UB ( s ′ ∣ s t , a t )
P M ( s t + 1 ∣ s t , a t ) = P M † L B ( s t + 1 ∣ s t , a t ) P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)=P^{\mathrm{LB}}_{\mathcal{M}_{\dagger}}(s_{t+1}\mid s_t,a_t) P M ( s t + 1 ∣ s t , a t ) = P M † LB ( s t + 1 ∣ s t , a t )
Therefore, for this MDP M \mathcal{M} M , P M ( s t + 1 ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) ≥ P M ( s ′ ∣ s , a ) P M ( s ′ ∣ s t , a t ) \frac{P_{\mathcal{M}}(s_{t+1}\mid s,a)}{P_{\mathcal{M}}(s_{t+1}\mid s_t,a_t)}\ge\frac{P_{\mathcal{M}}(s'\mid s,a)}{P_{\mathcal{M}}(s'\mid s_t,a_t)} P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s , a ) ≥ P M ( s ′ ∣ s t , a t ) P M ( s ′ ∣ s , a ) , and so the lower bound counterfactual probability for P ~ M , t L B ( s ′ ∣ s , a ) = 0 \widetilde{P}^{\mathrm{LB}}_{\mathcal{M},t}(s'\mid s,a)=0 P M , t LB ( s ′ ∣ s , a ) = 0 , to satisfy the counterfactual stability constraint. Since the counterfactual probability of any transition cannot be smaller than 0, we know the minimum lower bound counterfactual probability across all MDPs M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † , P ~ M † , t L B ( s ′ ∣ s , a ) \widetilde{P}^{\mathrm{LB}}_{\mathcal{M}_{\dagger},t}(s'\mid s,a) P M † , t LB ( s ′ ∣ s , a ) will be:
P ~ M ↑ , t L B ( s ′ ∣ s , a ) = min M ∈ M ↑ ( P ~ M , t L B ( s ′ ∣ s , a ) ) = min M ∈ M ↑ ( 0 ) = 0 \tilde{P}^{LB}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) = \min_{M \in\mathcal{M}_{\uparrow}}\left(\tilde{P}^{LB}_{M,t}(s' \mid s,a)\right)
= \min_{M \in\mathcal{M}_{\uparrow}}(0)
= 0 P ~ M ↑ , t L B ( s ′ ∣ s , a ) = M ∈ M ↑ min ( P ~ M , t L B ( s ′ ∣ s , a ) ) = M ∈ M ↑ min ( 0 ) = 0
Case 3: P M ↑ U B ( s t + 1 ∣ s , a ) P M ↑ L B ( s t + 1 ∣ s t , a t ) > 0 \frac{P^{UB}_{M_{\uparrow}}(s_{t+1} \mid s,a)}{P^{LB}_{M_{\uparrow}}(s_{t+1} \mid s_t,a_t)} > 0 P M ↑ L B ( s t + 1 ∣ s t , a t ) P M ↑ U B ( s t + 1 ∣ s , a ) > 0 and P M ↑ L B ( s ′ ∣ s , a ) P M ↑ U B ( s ′ ∣ s t , a t ) < P M ↑ U B ( s t + 1 ∣ s , a ) P M ↑ L B ( s t + 1 ∣ s t , a t ) \frac{P^{LB}_{M_{\uparrow}}(s' \mid s,a)}{P^{UB}_{M_{\uparrow}}(s' \mid s_t,a_t)} < \frac{P^{UB}_{M_{\uparrow}}(s_{t+1} \mid s,a)}{P^{LB}_{M_{\uparrow}}(s_{t+1} \mid s_t,a_t)} P M ↑ U B ( s ′ ∣ s t , a t ) P M ↑ L B ( s ′ ∣ s , a ) < P M ↑ L B ( s t + 1 ∣ s t , a t ) P M ↑ U B ( s t + 1 ∣ s , a ) , or P M ↑ U B ( s ′ ∣ s t , a t ) = 0 P^{UB}_{M_{\uparrow}}(s' \mid s_t,a_t) = 0 P M ↑ U B ( s ′ ∣ s t , a t ) = 0 . In this case, because either P M ↑ U B ( s ′ ∣ s t , a t ) P M ↑ L B ( s t + 1 ∣ s t , a t ) > 0 \frac{P^{UB}_{M_{\uparrow}}(s' \mid s_t,a_t)}{P^{LB}_{M_{\uparrow}}(s_{t+1} \mid s_t,a_t)} > 0 P M ↑ L B ( s t + 1 ∣ s t , a t ) P M ↑ U B ( s ′ ∣ s t , a t ) > 0 and P M ↑ U B ( s t + 1 ∣ s , a ) P M ↑ L B ( s t + 1 ∣ s t , a t ) < P M ↑ L B ( s ′ ∣ s , a ) P M ↑ U B ( s ′ ∣ s t , a t ) \frac{P^{UB}_{M_{\uparrow}}(s_{t+1} \mid s,a)}{P^{LB}_{M_{\uparrow}}(s_{t+1} \mid s_t,a_t)} < \frac{P^{LB}_{M_{\uparrow}}(s' \mid s,a)}{P^{UB}_{M_{\uparrow}}(s' \mid s_t,a_t)} P M ↑ L B ( s t + 1 ∣ s t , a t ) P M ↑ U B ( s t + 1 ∣ s , a ) < P M ↑ U B ( s ′ ∣ s t , a t ) P M ↑ L B ( s ′ ∣ s , a ) , or P M ↑ U B ( s ′ ∣ s t , a t ) = 0 P^{UB}_{M_{\uparrow}}(s' \mid s_t,a_t) = 0 P M ↑ U B ( s ′ ∣ s t , a t ) = 0 , then, for every MDP M ∈ M ↑ M \in\mathcal{M}_{\uparrow} M ∈ M ↑ , either P M ( s ′ ∣ s t , a t ) P M ( s t + 1 ∣ s t , a t ) > 0 \frac{P_M(s' \mid s_t,a_t)}{P_M(s_{t+1} \mid s_t,a_t)} > 0 P M ( s t + 1 ∣ s t , a t ) P M ( s ′ ∣ s t , a t ) > 0 and P M ( s t + 1 ∣ s , a ) P M ( s t + 1 ∣ s t , a t ) < P M ( s ′ ∣ s , a ) P M ( s ′ ∣ s t , a t ) \frac{P_M(s_{t+1} \mid s,a)}{P_M(s_{t+1} \mid s_t,a_t)} < \frac{P_M(s' \mid s,a)}{P_M(s' \mid s_t,a_t)} P M ( s t + 1 ∣ s t , a t ) P M ( s t + 1 ∣ s , a ) < P M ( s ′ ∣ s t , a t ) P M ( s ′ ∣ s , a ) , or P M ( s ′ ∣ s t , a t ) = 0 P_M(s' \mid s_t,a_t) = 0 P M ( s ′ ∣ s t , a t ) = 0 . Therefore, the closed-form solution for every MDP M ∈ M ↑ M \in\mathcal{M}_{\uparrow} M ∈ M ↑ will be:
P ~ M , t L B ( s ′ ∣ s , a ) = max ( 0 , 1 − ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M , t U B ( s ′ ′ ∣ s , a ) ) \tilde{P}^{LB}_{M,t}(s' \mid s,a) = \max\left(0, 1 - \sum_{s'' \in\mathcal{S}\setminus\{s'\}} \tilde{P}^{UB}_{M,t}(s'' \mid s,a)\right) P ~ M , t L B ( s ′ ∣ s , a ) = max 0 , 1 − s ′′ ∈ S ∖ { s ′ } ∑ P ~ M , t U B ( s ′′ ∣ s , a )
We need to minimise this condition over all MDPs M ∈ M ↑ M \in\mathcal{M}_{\uparrow} M ∈ M ↑ . Clearly, the counterfactual probability of any transition cannot be any smaller than 0. Therefore, if there exists an MDP M ∈ M ↑ M \in\mathcal{M}_{\uparrow} M ∈ M ↑ where P ~ M , t L B ( s ′ ∣ s , a ) = 0 \tilde{P}^{LB}_{M,t}(s' \mid s,a) = 0 P ~ M , t L B ( s ′ ∣ s , a ) = 0 , then the absolute minimum value of P ~ M ↑ , t L B ( s ′ ∣ s , a ) = 0 \tilde{P}^{LB}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) = 0 P ~ M ↑ , t L B ( s ′ ∣ s , a ) = 0 as well. The minimum lower bound counterfactual probability P ~ M ↑ , t L B ( s ′ ∣ s , a ) \tilde{P}^{LB}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a) P ~ M ↑ , t L B ( s ′ ∣ s , a ) will only be greater than 0 if for every MDP M ∈ M ↑ M \in\mathcal{M}_{\uparrow} M ∈ M ↑ , ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M , t U B ( s ′ ′ ∣ s , a ) > 0 \sum_{s'' \in\mathcal{S}\setminus\{s'\}} \tilde{P}^{UB}_{M,t}(s'' \mid s,a) > 0 ∑ s ′′ ∈ S ∖ { s ′ } P ~ M , t U B ( s ′′ ∣ s , a ) > 0 .
Now, consider the minimum value of 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) 1 - \sum_{s'' \in\mathcal{S}\setminus\{s_{t+1}\}} \tilde{P}^{UB}_{M,t}(s'' \mid s,a) 1 − ∑ s ′′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′′ ∣ s , a ) . In any MDP M ∈ M ↑ M \in\mathcal{M}_{\uparrow} M ∈ M ↑ , we require the transition probabilities from every state-action pair to sum to 1. Because of this, it is challenging to determine the MDP with the greatest value of ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) \sum_{s'' \in\mathcal{S}\setminus\{s_{t+1}\}} \tilde{P}^{UB}_{M,t}(s'' \mid s,a) ∑ s ′′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′′ ∣ s , a ) . However, to identify a non-tight lower bound, we can ignore this constraint, and instead find the value of ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M ↑ , t U B ( s ′ ′ ∣ s , a ) \sum_{s'' \in\mathcal{S}\setminus\{s_{t+1}\}} \tilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s'' \mid s,a) ∑ s ′′ ∈ S ∖ { s t + 1 } P ~ M ↑ , t U B ( s ′′ ∣ s , a ) across the whole IMDP M ↑ \mathcal{M}_{\uparrow} M ↑ . Clearly, ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M ↑ , t U B ( s ′ ′ ∣ s , a ) ≥ ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′ ′ ∣ s , a ) \sum_{s'' \in\mathcal{S}\setminus\{s_{t+1}\}} \tilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s'' \mid s,a) \ge\sum_{s'' \in\mathcal{S}\setminus\{s_{t+1}\}} \tilde{P}^{UB}_{M,t}(s'' \mid s,a) ∑ s ′′ ∈ S ∖ { s t + 1 } P ~ M ↑ , t U B ( s ′′ ∣ s , a ) ≥ ∑ s ′′ ∈ S ∖ { s t + 1 } P ~ M , t U B ( s ′′ ∣ s , a ) for any MDP M ∈ M ↑ M \in\mathcal{M}_{\uparrow} M ∈ M ↑ , so 1 − ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ M ↑ , t U B ( s ′ ′ ∣ s , a ) 1 - \sum_{s'' \in\mathcal{S}\setminus\{s_{t+1}\}} \tilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s'' \mid s,a) 1 − ∑ s ′′ ∈ S ∖ { s t + 1 } P ~ M ↑ , t U B ( s ′′ ∣ s , a ) results in a lower bound.
Therefore, a minimum (but not necessarily tight) lower bound would be:
max ( 0 , 1 − ∑ s ′ ∈ S ∖ { s ′ } P ~ M ↑ , t U B ( s ′ ∣ s , a ) ) \max\left(0, 1 - \sum_{s' \in\mathcal{S}\setminus\{s'\}} \tilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s' \mid s,a)\right) max 0 , 1 − s ′ ∈ S ∖ { s ′ } ∑ P ~ M ↑ , t U B ( s ′ ∣ s , a )
Solution 2: Reducing the Optimisation Problem. Alternatively, if it is computationally feasible, we can calculate the exact lower bound for the counterfactual probability of any transition by calculating the true minimum value of 1 − ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M ↑ , t U B ( s ′ ′ ∣ s , a ) 1 - \sum_{s'' \in\mathcal{S}\setminus\{s'\}} \tilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s'' \mid s,a) 1 − ∑ s ′′ ∈ S ∖ { s ′ } P ~ M ↑ , t U B ( s ′′ ∣ s , a ) , for Cases 1 and 3 in Solution 1. This can be solved by maximising the value of ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ M ↑ , t U B ( s ′ ′ ∣ s , a ) \sum_{s'' \in\mathcal{S}\setminus\{s'\}} \tilde{P}^{UB}_{\mathcal{M}_{\uparrow},t}(s'' \mid s,a) ∑ s ′′ ∈ S ∖ { s ′ } P ~ M ↑ , t U B ( s ′′ ∣ s , a ) , in a nested optimisation problem, as follows:
max P M ( ⋅ ∣ s t , a t ) ∈ P M ↑ ( ⋅ ∣ s t , a t ) P M ( ⋅ ∣ s , a ) ∈ P M ↑ ( ⋅ ∣ s , a ) ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ t U B ( s ′ ′ ∣ s , a ) s.t. ∑ s ′ ∈ S P M ( s ′ ∣ s t , a t ) = 1 ∑ s ′ ∈ S P M ( s ′ ∣ s , a ) = 1 P M ↑ L B ( s ′ ∣ s t , a t ) ≤ P M ( s ′ ∣ s t , a t ) ≤ P M ↑ U B ( s ′ ∣ s t , a t ) , ∀ s ′ ∈ S P M ↑ L B ( s ′ ∣ s , a ) ≤ P M ( s ′ ∣ s , a ) ≤ P M ↑ U B ( s ′ ∣ s , a ) , ∀ s ′ ∈ S \begin{aligned}
\max_{\substack{P_M(\cdot\mid s_t,a_t)\in P_{\mathcal{M}_{\uparrow}}(\cdot\mid s_t,a_t)\\ P_M(\cdot\mid s,a)\in P_{\mathcal{M}_{\uparrow}}(\cdot\mid s,a)}}\quad
&\sum_{s''\in\mathcal{S}\setminus\{s'\}}\tilde{P}^{UB}_{t}(s''\mid s,a)\\
\text{s.t.}\quad
&\sum_{s'\in\mathcal{S}}P_M(s'\mid s_t,a_t)=1\\
&\sum_{s'\in\mathcal{S}}P_M(s'\mid s,a)=1\\
&P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)\le P_M(s'\mid s_t,a_t)\le P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t),\quad\forall s'\in\mathcal{S}\\
&P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a)\le P_M(s'\mid s,a)\le P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a),\quad\forall s'\in\mathcal{S}
\end{aligned} P M ( ⋅ ∣ s t , a t ) ∈ P M ↑ ( ⋅ ∣ s t , a t ) P M ( ⋅ ∣ s , a ) ∈ P M ↑ ( ⋅ ∣ s , a ) max s.t. s ′′ ∈ S ∖ { s ′ } ∑ P ~ t U B ( s ′′ ∣ s , a ) s ′ ∈ S ∑ P M ( s ′ ∣ s t , a t ) = 1 s ′ ∈ S ∑ P M ( s ′ ∣ s , a ) = 1 P M ↑ L B ( s ′ ∣ s t , a t ) ≤ P M ( s ′ ∣ s t , a t ) ≤ P M ↑ U B ( s ′ ∣ s t , a t ) , ∀ s ′ ∈ S P M ↑ L B ( s ′ ∣ s , a ) ≤ P M ( s ′ ∣ s , a ) ≤ P M ↑ U B ( s ′ ∣ s , a ) , ∀ s ′ ∈ S
where
P ~ t U B ( s ′ ∣ s , a ) = { min ( P ( s t + 1 ∣ s t , a t ) , P ( s t + 1 ∣ s , a ) ) P ( s t + 1 ∣ s t , a t ) if s ′ = s t + 1 0 if P ( s ′ ∣ s t , a t ) > 0 P ( s t + 1 ∣ s , a ) and P ( s t + 1 ∣ s , a ) P ( s t + 1 ∣ s t , a t ) ≥ P ( s ′ ∣ s , a ) P ( s ′ ∣ s t , a t ) if P ( s ′ ∣ s t , a t ) > 0 min ( P ( s ′ ∣ s , a ) , 1 − P ( s t + 1 ∣ s , a ) ) min ( 1 − P ( s t + 1 ∣ s , a ) , P ( s ′ ∣ s , a ) P ( s t + 1 ∣ s t , a t ) ) otherwise \widetilde{P}_{t}^{UB}(s' \mid s,a)=
\begin{cases}
\dfrac{\min\left(P(s_{t+1}\mid s_t,a_t),P(s_{t+1}\mid s,a)\right)}{P(s_{t+1}\mid s_t,a_t)} & \text{if }s'=s_{t+1}\\
0 & \text{if }P(s'\mid s_t,a_t)>0\\
P(s_{t+1}\mid s,a) \text{ and } \dfrac{P(s_{t+1}\mid s,a)}{P(s_{t+1}\mid s_t,a_t)}\ge\dfrac{P(s'\mid s,a)}{P(s'\mid s_t,a_t)} & \text{if }P(s'\mid s_t,a_t)>0\\
\min\left(P(s'\mid s,a),1-P(s_{t+1}\mid s,a)\right) & \\
\min\left(1-P(s_{t+1}\mid s,a),\dfrac{P(s'\mid s,a)}{P(s_{t+1}\mid s_t,a_t)}\right) & \text{otherwise}
\end{cases} P t U B ( s ′ ∣ s , a ) = ⎩ ⎨ ⎧ P ( s t + 1 ∣ s t , a t ) min ( P ( s t + 1 ∣ s t , a t ) , P ( s t + 1 ∣ s , a ) ) 0 P ( s t + 1 ∣ s , a ) and P ( s t + 1 ∣ s t , a t ) P ( s t + 1 ∣ s , a ) ≥ P ( s ′ ∣ s t , a t ) P ( s ′ ∣ s , a ) min ( P ( s ′ ∣ s , a ) , 1 − P ( s t + 1 ∣ s , a ) ) min ( 1 − P ( s t + 1 ∣ s , a ) , P ( s t + 1 ∣ s t , a t ) P ( s ′ ∣ s , a ) ) if s ′ = s t + 1 if P ( s ′ ∣ s t , a t ) > 0 if P ( s ′ ∣ s t , a t ) > 0 otherwise
This works, because we have proven in existing work that the counterfactual probability of any given transition depends only on the interventional distributions from the observed state-action pair ( s t , a t ) (s_t,a_t) ( s t , a t ) and the counterfactual state-action pair ( s , a ) (s,a) ( s , a ) (hence the closed-form solution for P ~ t U B ( s ′ ∣ s , a ) \widetilde{P}^{UB}_t(s'\mid s,a) P t U B ( s ′ ∣ s , a ) depends only on these two distributions), so we don’t need to consider any other state-action pair in our optimisation.
Given this nested optimisation, we can correctly calculate the lower bounds in Cases 1 and 3 as follows:
P ~ M ↑ L B ( s t + 1 ∣ s , a ) = max ( P M ↑ L B ( s t + 1 ∣ s , a ) , 1 − max P M ↓ ( ⋅ ∣ s t , a t ) ∈ P M ↓ ( ⋅ ∣ s t , a t ) P M ↓ ( ⋅ ∣ s , a ) ∈ P M ↓ ( ⋅ ∣ s , a ) ∑ s ′ ′ ∈ S ∖ { s t + 1 } P ~ t U B ( s ′ ′ ∣ s , a ) ) \widetilde{P}^{LB}_{M_{\uparrow}}(s_{t+1}\mid s,a)=\max\left(P^{LB}_{M_{\uparrow}}(s_{t+1}\mid s,a),1-\max_{\substack{P_{M_{\downarrow}}(\cdot\mid s_t,a_t)\in P_{M_{\downarrow}}(\cdot\mid s_t,a_t)\\P_{M_{\downarrow}}(\cdot\mid s,a)\in P_{M_{\downarrow}}(\cdot\mid s,a)}}\sum_{s''\in\mathcal{S}\setminus\{s_{t+1}\}}\widetilde{P}^{UB}_t(s''\mid s,a)\right) P M ↑ L B ( s t + 1 ∣ s , a ) = max P M ↑ L B ( s t + 1 ∣ s , a ) , 1 − P M ↓ ( ⋅ ∣ s t , a t ) ∈ P M ↓ ( ⋅ ∣ s t , a t ) P M ↓ ( ⋅ ∣ s , a ) ∈ P M ↓ ( ⋅ ∣ s , a ) max s ′′ ∈ S ∖ { s t + 1 } ∑ P t U B ( s ′′ ∣ s , a )
P ~ M ↑ L B ( s ′ ∣ s , a ) = max ( 0 , 1 − max P M ↓ ( ⋅ ∣ s t , a t ) ∈ P M ↓ ( ⋅ ∣ s t , a t ) P M ↓ ( ⋅ ∣ s , a ) ∈ P M ↓ ( ⋅ ∣ s , a ) ∑ s ′ ′ ∈ S ∖ { s ′ } P ~ t U B ( s ′ ′ ∣ s , a ) ) \widetilde{P}^{LB}_{M_{\uparrow}}(s'\mid s,a)=\max\left(0,1-\max_{\substack{P_{M_{\downarrow}}(\cdot\mid s_t,a_t)\in P_{M_{\downarrow}}(\cdot\mid s_t,a_t)\\P_{M_{\downarrow}}(\cdot\mid s,a)\in P_{M_{\downarrow}}(\cdot\mid s,a)}}\sum_{s''\in\mathcal{S}\setminus\{s'\}}\widetilde{P}^{UB}_t(s''\mid s,a)\right) P M ↑ L B ( s ′ ∣ s , a ) = max 0 , 1 − P M ↓ ( ⋅ ∣ s t , a t ) ∈ P M ↓ ( ⋅ ∣ s t , a t ) P M ↓ ( ⋅ ∣ s , a ) ∈ P M ↓ ( ⋅ ∣ s , a ) max s ′′ ∈ S ∖ { s ′ } ∑ P t U B ( s ′′ ∣ s , a )
Gumbel-max SCMs
The Gumbel-max SCM for an MDP is expressed as:
S t + 1 = f ( S t , A t , U t = ( G s , t ) s ∈ S ) = arg max s ∈ S { log ( P M ( s ∣ S t , A t ) ) + G s , t } (11) S_{t+1}=f\left(S_t,A_t,U_t=(G_{s,t})_{s\in\mathcal{S}}\right)=\underset{s\in\mathcal{S}}{\arg\max}\left\{\log\left(P_M(s\mid S_t,A_t)\right)+G_{s,t}\right\} \tag*{(11)} S t + 1 = f ( S t , A t , U t = ( G s , t ) s ∈ S ) = s ∈ S arg max { log ( P M ( s ∣ S t , A t ) ) + G s , t } (11)
where P M P_M P M is the MDP’s transition probabilities, S t S_t S t , A t A_t A t and S t + 1 S_{t+1} S t + 1 are endogenous variables representing the state, action and next state, and the values of the exogenous variable U t = ( G s , t ) s ∈ S U_t=(G_{s,t})_{s\in\mathcal{S}} U t = ( G s , t ) s ∈ S are sampled from the standard Gumbel distribution.4
Algorithm 1 Gumbel-max Topdown Sampling
Input: l o g i t s logits l o g i t s , observed s t + 1 s_{t+1} s t + 1 , number of samples n s a m p = 1 nsamp=1 n s am p = 1
Output: g u m b e l s gumbels g u mb e l s
t o p g u m b e l ← topgumbel\leftarrow t o p g u mb e l ← sample n s a m p nsamp n s am p values from Gumbel(0,1)
g u m b e l s ← gumbels\leftarrow g u mb e l s ← zero matrix of shape ( n s a m p , ∣ S ∣ ) (nsamp,|\mathcal{S}|) ( n s am p , ∣ S ∣ )
for i = 0 i=0 i = 0 to ∣ S ∣ − 1 |\mathcal{S}|-1 ∣ S ∣ − 1 do
if i = s t + 1 i=s_{t+1} i = s t + 1 then
g u m b e l s [ : , i ] ← t o p g u m b e l − l o g i t s [ i ] gumbels[:,i]\leftarrow topgumbel-logits[i] g u mb e l s [ : , i ] ← t o p g u mb e l − l o g i t s [ i ] {Observed outcome}
else if l o g i t s [ i ] ≠ − ∞ logits[i]\ne-\infty l o g i t s [ i ] = − ∞ then
g ← g\leftarrow g ← sample n s a m p nsamp n s am p values from Gumbel(0,1) + l o g i t s [ i ] logits[i] l o g i t s [ i ]
g u m b e l s [ : , i ] ← − log ( exp ( − g ) + exp ( − t o p g u m b e l ) ) − l o g i t s [ i ] gumbels[:,i]\leftarrow-\log(\exp(-g)+\exp(-topgumbel))-logits[i] g u mb e l s [ : , i ] ← − log ( exp ( − g ) + exp ( − t o p g u mb e l )) − l o g i t s [ i ] {Truncated Gumbel}
else
g u m b e l s [ : , i ] ← gumbels[:,i]\leftarrow g u mb e l s [ : , i ] ← sample n s a m p nsamp n s am p values from Gumbel(0,1) {Unconstrained state}
end if
end for
return g u m b e l s gumbels g u mb e l s
We can perform (approximate) posterior inference of P ( ( G s , t ) s ∈ S ∣ s t , a t , s t + 1 ) P((G_{s,t})_{s\in\mathcal{S}}\mid s_t,a_t,s_{t+1}) P (( G s , t ) s ∈ S ∣ s t , a t , s t + 1 ) through rejection sampling [23 ] , or the top-down Gumbel sampling [19 ] algorithm, given in Algorithm 1. This algorithm returns a finite sample of values from the posterior Gumbel distribution, G s , t ′ G'_{s,t} G s , t ′ . The counterfactual transition probabilities can then be calculated as follows:
P M , t ( s ′ ∣ s , a ) = P ( s ′ = arg max q ∈ S { log ( P M ( q ∣ s , a ) ) + G q , t ′ } ) ≈ 1 N ∑ j = 1 N 1 ( s ′ = arg max q ∈ S { log ( P M ( q ∣ s , a ) ) + G q , t ′ ( j ) } ) (12) P_{M,t}(s'\mid s,a)=P\left(s'=\underset{q\in\mathcal{S}}{\arg\max}\left\{\log(P_M(q\mid s,a))+G'_{q,t}\right\}\right)\approx\frac{1}{N}\sum_{j=1}^{N}\mathbb{1}\left(s'=\underset{q\in\mathcal{S}}{\arg\max}\left\{\log(P_M(q\mid s,a))+G'^{(j)}_{q,t}\right\}\right) \tag*{(12)} P M , t ( s ′ ∣ s , a ) = P ( s ′ = q ∈ S arg max { log ( P M ( q ∣ s , a )) + G q , t ′ } ) ≈ N 1 j = 1 ∑ N 1 ( s ′ = q ∈ S arg max { log ( P M ( q ∣ s , a )) + G q , t ′ ( j ) } ) (12)
Given an IMDP M † \mathcal{M}_{\dagger} M † , we can derive conservative bounds for counterfactual transition probabilities as follows;
Theorem C.1. Given an arbitrary IMDP M † \mathcal{M}_{\dagger} M † , observed transition s t , a t → s t + 1 s_t,a_t\to s_{t+1} s t , a t → s t + 1 , and counterfactual transition s , a → s ′ s,a\to s' s , a → s ′ , under the Gumbel-max SCM the counterfactual transition probabilities of the observed state-action pair are exact for all M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † : P ~ t ( s t + 1 ∣ s t , a t ) = 1 \widetilde{P}_t(s_{t+1}\mid s_t,a_t)=1 P t ( s t + 1 ∣ s t , a t ) = 1 and P ~ t ( s ′ ∣ s t , a t ) = 0 \widetilde{P}_t(s'\mid s_t,a_t)=0 P t ( s ′ ∣ s t , a t ) = 0 for all s ′ ≠ s t + 1 s'\ne s_{t+1} s ′ = s t + 1 .
For ( s , a ) ≠ ( s t , a t ) (s,a)\ne(s_t,a_t) ( s , a ) = ( s t , a t ) , a lower bound for the counterfactual transition probability across all MDPs M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † , produced by the Gumbel-max SCM, is given by:
P ~ t L B ( s ′ ∣ s , a ) = P ( s ′ = arg max q ∈ S { log ( P ^ L B ( q ∣ s , a ) ) + G q , t ′ } ) , \widetilde{P}^{LB}_t(s'\mid s,a)=P\left(s'=\underset{q\in\mathcal{S}}{\arg\max}\left\{\log\left(\widehat{P}^{LB}(q\mid s,a)\right)+G'_{q,t}\right\}\right), P t L B ( s ′ ∣ s , a ) = P ( s ′ = q ∈ S arg max { log ( P L B ( q ∣ s , a ) ) + G q , t ′ } ) ,
where
P ^ L B ( q ∣ s , a ) = { P M † U B ( s ′ ∣ s , a ) if q = s ′ , P M † L B ( q ∣ s , a ) otherwise , \widehat{P}^{LB}(q\mid s,a)=
\begin{cases}
P^{UB}_{\mathcal{M}_{\dagger}}(s'\mid s,a) & \text{if }q=s',\\
P^{LB}_{\mathcal{M}_{\dagger}}(q\mid s,a) & \text{otherwise},
\end{cases} P L B ( q ∣ s , a ) = { P M † U B ( s ′ ∣ s , a ) P M † L B ( q ∣ s , a ) if q = s ′ , otherwise ,
and G q , t ′ G'_{q,t} G q , t ′ is derived given P M ( s ′ ∣ s t , a t ) = P M † U B ( s ′ ∣ s t , a t ) P_M(s'\mid s_t,a_t)=P^{UB}_{\mathcal{M}_{\dagger}}(s'\mid s_t,a_t) P M ( s ′ ∣ s t , a t ) = P M † U B ( s ′ ∣ s t , a t ) , and ∀ s ′ ′ ≠ s ′ \forall s''\ne s' ∀ s ′′ = s ′ , P M ( s ′ ′ ∣ s t , a t ) = P M † L B ( s ′ ′ ∣ s t , a t ) P_M(s''\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\dagger}}(s''\mid s_t,a_t) P M ( s ′′ ∣ s t , a t ) = P M † L B ( s ′′ ∣ s t , a t ) .
An upper bound for the counterfactual transition probability across all MDPs M ∈ M † \mathcal{M}\in\mathcal{M}_{\dagger} M ∈ M † , produced by the Gumbel-max SCM, is given by:
P ~ t U B ( s ′ ∣ s , a ) = P ( s ′ = arg max q ∈ S { log ( P ^ U B ( q ∣ s , a ) ) + G q , t ′ } ) , \widetilde{P}^{UB}_t(s'\mid s,a)=P\left(s'=\underset{q\in\mathcal{S}}{\arg\max}\left\{\log\left(\widehat{P}^{UB}(q\mid s,a)\right)+G'_{q,t}\right\}\right), P t U B ( s ′ ∣ s , a ) = P ( s ′ = q ∈ S arg max { log ( P U B ( q ∣ s , a ) ) + G q , t ′ } ) ,
where
P ^ U B ( q ∣ s , a ) = { P M † U B ( s ′ ∣ s , a ) if q = s ′ , P M † L B ( q ∣ s , a ) otherwise , \widehat{P}^{UB}(q\mid s,a)=
\begin{cases}
P^{UB}_{\mathcal{M}_{\dagger}}(s'\mid s,a) & \text{if }q=s',\\
P^{LB}_{\mathcal{M}_{\dagger}}(q\mid s,a) & \text{otherwise},
\end{cases} P U B ( q ∣ s , a ) = { P M † U B ( s ′ ∣ s , a ) P M † L B ( q ∣ s , a ) if q = s ′ , otherwise ,
and G q , t ′ G'_{q,t} G q , t ′ is derived given P M ( s ′ ∣ s t , a t ) = P M † L B ( s ′ ∣ s t , a t ) P_M(s'\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\dagger}}(s'\mid s_t,a_t) P M ( s ′ ∣ s t , a t ) = P M † L B ( s ′ ∣ s t , a t ) , and ∀ s ′ ′ ≠ s ′ \forall s''\ne s' ∀ s ′′ = s ′ , P M ( s ′ ′ ∣ s t , a t ) = P M † U B ( s ′ ′ ∣ s t , a t ) P_M(s''\mid s_t,a_t)=P^{UB}_{\mathcal{M}_{\dagger}}(s''\mid s_t,a_t) P M ( s ′′ ∣ s t , a t ) = P M † U B ( s ′′ ∣ s t , a t ) .4 Proof. We first consider the observed state-action pair ( s t , a t ) (s_t, a_t) ( s t , a t ) . For any M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ , its corresponding Gumbel-max SCM produces counterfactual probabilities P ~ M , t ( s t + 1 ∣ s t , a t ) = 1 \widetilde{P}_{\mathcal{M},t}(s_{t+1} \mid s_t, a_t) = 1 P M , t ( s t + 1 ∣ s t , a t ) = 1 and P ~ M , t ( s ′ ∣ s t , a t ) = 0 \widetilde{P}_{\mathcal{M},t}(s' \mid s_t, a_t) = 0 P M , t ( s ′ ∣ s t , a t ) = 0 for all s ′ ≠ s t + 1 s' \ne s_{t+1} s ′ = s t + 1 , since the posterior Gumbel values are, by construction, those for which s t + 1 s_{t+1} s t + 1 is the arg max under the same logits. These bounds are therefore exact.
For the remaining state-action pairs ( s , a ) ≠ ( s t , a t ) (s, a) \ne(s_t, a_t) ( s , a ) = ( s t , a t ) , let us consider the lower counterfactual probability bound (the proof for the upper counterfactual probability bound follows similarly by reversing all bounds throughout). To derive the lower counterfactual probability bound, we need to consider how we can minimise P ~ M , t ( s ′ ∣ s , a ) \widetilde{P}_{\mathcal{M},t}(s' \mid s, a) P M , t ( s ′ ∣ s , a ) across all M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ :
min / max M ∈ M ↑ P ~ M , t ( s ′ ∣ s , a ) = min / max M ∈ M ↑ P ( s ′ = arg max q ∈ S { log ( P M ( q ∣ s , a ) ) + G q , t ′ } ) (13) \min/\max_{\mathcal{M} \in\mathcal{M}_{\uparrow}} \widetilde{P}_{\mathcal{M},t}(s' \mid s, a) = \min/\max_{\mathcal{M} \in\mathcal{M}_{\uparrow}} P\left(s' = \arg\max_{q \in\mathcal{S}} \left\{\log(P_{\mathcal{M}}(q \mid s, a)) + G'_{q,t}\right\}\right) \tag*{(13)} min / M ∈ M ↑ max P M , t ( s ′ ∣ s , a ) = min / M ∈ M ↑ max P ( s ′ = arg q ∈ S max { log ( P M ( q ∣ s , a )) + G q , t ′ } ) (13)
First, we assume the IMDP satisfies the normalisation assumption (Assumption B.1).
Next, from (13) , we can see that the counterfactual transition probabilities depend only on the logits of the observed state-action pair ( s t , a t ) (s_t, a_t) ( s t , a t ) and the counterfactual state-action pair ( s , a ) (s, a) ( s , a ) . This means we only need to consider these logits within their bounds to determine the upper and lower bounds of the counterfactual transition probability for any transition. Also, from (13) , we can see that to minimise the counterfactual transition probability P M , t ( s ′ ∣ s , a ) P_{\mathcal{M},t}(s' \mid s, a) P M , t ( s ′ ∣ s , a ) , we must minimise the number of samples where s ′ s' s ′ is the arg max over all states q ∈ S q \in\mathcal{S} q ∈ S (and vice versa for maximising the counterfactual probability). To achieve this, we need to minimise both log P M ( s ′ ∣ s , a ) \log P_{\mathcal{M}}(s' \mid s, a) log P M ( s ′ ∣ s , a ) and G s ′ , t ′ G'_{s',t} G s ′ , t ′ , while maximising the corresponding quantities log P M ( q ∣ s , a ) \log P_{\mathcal{M}}(q \mid s, a) log P M ( q ∣ s , a ) and G q , t ′ G'_{q,t} G q , t ′ of all other states q ≠ s ′ q \ne s' q = s ′ .
Clearly, we can minimise log P M ( s ′ ∣ s , a ) \log P_{\mathcal{M}}(s' \mid s, a) log P M ( s ′ ∣ s , a ) by setting P M ( s ′ ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s' \mid s, a) = P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s, a) P M ( s ′ ∣ s , a ) = P M ↑ LB ( s ′ ∣ s , a ) , and maximise log P M ( q ∣ s , a ) \log P_{\mathcal{M}}(q \mid s, a) log P M ( q ∣ s , a ) for each q ≠ s ′ q \ne s' q = s ′ by setting P M ( q ∣ s , a ) = P M ↑ U B ( q ∣ s , a ) P_{\mathcal{M}}(q \mid s, a) = P^{\mathrm{UB}}_{\mathcal{M}_{\uparrow}}(q \mid s, a) P M ( q ∣ s , a ) = P M ↑ UB ( q ∣ s , a ) . Note that we take these extremal values for each next state individually, so together they need not form a valid probability distribution (i.e., they need not correspond to any admissible MDP M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ ); as we show below, this still yields a valid, though possibly not tight, lower bound.
Now, we need to consider how to minimise the posterior Gumbel distribution G s ′ , t ′ G'_{s',t} G s ′ , t ′ , which is derived from the top-down sampling algorithm in Algorithm 1. Note that the Gumbel values are determined entirely by the logits of the observed state-action pair, log P M ( ⋅ ∣ s t , a t ) \log P_{\mathcal{M}}(\cdot\mid s_t, a_t) log P M ( ⋅ ∣ s t , a t ) . We will examine the following disjoint cases separately.
Case 1: s ′ = s t + 1 s' = s_{t+1} s ′ = s t + 1 . In this case, the Gumbel values are given by
topgumbel − log P M ( s t + 1 ∣ s t , a t ) . \operatorname{topgumbel} - \log P_{\mathcal{M}}(s_{t+1} \mid s_t, a_t). topgumbel − log P M ( s t + 1 ∣ s t , a t ) .
where topgumbel \operatorname{topgumbel} topgumbel is sampled from the standard Gumbel distribution. Therefore, to minimise the Gumbel values, we need to maximise log P M ( s t + 1 ∣ s t , a t ) \log P_{\mathcal{M}}(s_{t+1} \mid s_t, a_t) log P M ( s t + 1 ∣ s t , a t ) . Since log P M ( s t + 1 ∣ s t , a t ) ≤ 0 \log P_{\mathcal{M}}(s_{t+1} \mid s_t, a_t) \le0 log P M ( s t + 1 ∣ s t , a t ) ≤ 0 (because 0 ≤ P M ( s t + 1 ∣ s t , a t ) ≤ 1 0 \le P_{\mathcal{M}}(s_{t+1} \mid s_t, a_t) \le1 0 ≤ P M ( s t + 1 ∣ s t , a t ) ≤ 1 ), this maximum is achieved when
P M ( s t + 1 ∣ s t , a t ) = P M ↑ U B ( s t + 1 ∣ s t , a t ) . P_{\mathcal{M}}(s_{t+1} \mid s_t, a_t) = P^{\mathrm{UB}}_{\mathcal{M}_{\uparrow}}(s_{t+1} \mid s_t, a_t). P M ( s t + 1 ∣ s t , a t ) = P M ↑ UB ( s t + 1 ∣ s t , a t ) .
Case 2: s ′ ≠ s t + 1 s' \ne s_{t+1} s ′ = s t + 1 and P M ↑ L B ( s ′ ∣ s t , a t ) > 0 P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s_t, a_t) > 0 P M ↑ LB ( s ′ ∣ s t , a t ) > 0 . If s ′ ≠ s t + 1 s' \ne s_{t+1} s ′ = s t + 1 and P M ↑ L B ( s ′ ∣ s t , a t ) > 0 P^{\mathrm{LB}}_{\mathcal{M}_{\uparrow}}(s' \mid s_t, a_t) > 0 P M ↑ LB ( s ′ ∣ s t , a t ) > 0 , then the top-down sampling algorithm produces the following Gumbel values, across all MDPs M ∈ M ↑ \mathcal{M} \in\mathcal{M}_{\uparrow} M ∈ M ↑ :
G s ′ , t ′ = − log ( exp ( − ( g + log P M ( s ′ ∣ s t , a t ) ) ) + exp ( − topgumbel ) ) − log P M ( s ′ ∣ s t , a t ) , G'_{s',t} = -\log\left(\exp\left(-(g + \log P_{\mathcal{M}}(s' \mid s_t, a_t))\right) + \exp(-\operatorname{topgumbel})\right) - \log P_{\mathcal{M}}(s' \mid s_t, a_t), G s ′ , t ′ = − log ( exp ( − ( g + log P M ( s ′ ∣ s t , a t )) ) + exp ( − topgumbel ) ) − log P M ( s ′ ∣ s t , a t ) ,
where g g g and topgumbel \operatorname{topgumbel} topgumbel are sampled from the standard Gumbel distribution.
Let us analyse how this depends on P M ( s ′ ∣ s t , a t ) P_{\mathcal{M}}(s' \mid s_t, a_t) P M ( s ′ ∣ s t , a t ) . Set log P M ( s ′ ∣ s t , a t ) = L \log P_{\mathcal{M}}(s' \mid s_t, a_t) = L log P M ( s ′ ∣ s t , a t ) = L , and define
Z = exp ( − ( g + L ) ) + exp ( − topgumbel ) . Z = \exp(-(g + L)) + \exp(-\operatorname{topgumbel}). Z = exp ( − ( g + L )) + exp ( − topgumbel ) .
Then
G s ′ , t ′ = − log Z − L . G'_{s',t} = -\log Z - L. G s ′ , t ′ = − log Z − L .
We compute
d d L [ − log Z − L ] = d d L [ − log Z ] − 1 = − 1 Z d Z d L − 1 , \frac{d}{dL}[-\log Z - L] = \frac{d}{dL}[-\log Z] - 1
= -\frac{1}{Z}\frac{dZ}{dL} - 1, d L d [ − log Z − L ] = d L d [ − log Z ] − 1 = − Z 1 d L d Z − 1 ,
where
Z = exp ( − ( g + L ) ) + exp ( − topgumbel ) , Z = \exp(-(g + L)) + \exp(-\operatorname{topgumbel}), Z = exp ( − ( g + L )) + exp ( − topgumbel ) ,
d Z d L = − exp ( − ( g + L ) ) . \frac{dZ}{dL} = -\exp(-(g + L)). d L d Z = − exp ( − ( g + L )) .
Thus
d d L = − 1 Z − exp ( − ( g + L ) ) exp ( − ( g + L ) ) + exp ( − t o p g u m b e l ) − 1 = exp ( − ( g + L ) ) exp ( − ( g + L ) ) + exp ( − t o p g u m b e l ) − 1 = − exp ( − t o p g u m b e l ) exp ( − ( g + L ) ) + exp ( − t o p g u m b e l ) (14) \begin{aligned}
\frac{d}{dL} &= -\frac{1}{Z} - \frac{\exp(-(g+L))}{\exp(-(g+L))+\exp(-\mathit{topgumbel})} - 1 \\
&= \frac{\exp(-(g+L))}{\exp(-(g+L))+\exp(-\mathit{topgumbel})} - 1 \\
&= \frac{-\exp(-\mathit{topgumbel})}{\exp(-(g+L))+\exp(-\mathit{topgumbel})} \tag*{(14)}
\end{aligned} d L d = − Z 1 − exp ( − ( g + L )) + exp ( − topgumbel ) exp ( − ( g + L )) − 1 = exp ( − ( g + L )) + exp ( − topgumbel ) exp ( − ( g + L )) − 1 = exp ( − ( g + L )) + exp ( − topgumbel ) − exp ( − topgumbel ) (14)
which is strictly negative, since exp ( x ) > 0 \exp(x)>0 exp ( x ) > 0 for all real x x x . Therefore, the minimum Gumbel value G s ′ , t ′ G'_{s',t} G s ′ , t ′ occurs when L L L is maximised, i.e.,
P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) . P_{\mathcal{M}}(s' \mid s_t,a_t)=P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t). P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) .
Case 3: s ′ ≠ s t + 1 s'\ne s_{t+1} s ′ = s t + 1 and P M ↑ U B ( s ′ ∣ s t , a t ) = 0 P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)=0 P M ↑ U B ( s ′ ∣ s t , a t ) = 0 . If P M ↑ U B ( s ′ ∣ s t , a t ) = 0 P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)=0 P M ↑ U B ( s ′ ∣ s t , a t ) = 0 , i.e., s ′ s' s ′ is not in the support of ( s t , a t ) (s_t,a_t) ( s t , a t ) , then the Gumbel values for s ′ s' s ′ are drawn from the standard Gumbel distribution. In this case, adjusting the logits for P M ( ⋅ ∣ s t , a t ) P_{\mathcal{M}}(\cdot\mid s_t,a_t) P M ( ⋅ ∣ s t , a t ) has no impact on the posterior Gumbel distribution, and therefore no effect on the counterfactual transition probability.
Case 4: s ′ ≠ s t + 1 s'\ne s_{t+1} s ′ = s t + 1 , P M ↑ L B ( s ′ ∣ s t , a t ) = 0 P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)=0 P M ↑ L B ( s ′ ∣ s t , a t ) = 0 , and P M ↑ U B ( s ′ ∣ s t , a t ) > 0 P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)>0 P M ↑ U B ( s ′ ∣ s t , a t ) > 0 . If P M ↑ L B ( s ′ ∣ s t , a t ) = 0 P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)=0 P M ↑ L B ( s ′ ∣ s t , a t ) = 0 and P M ↑ U B ( s ′ ∣ s t , a t ) > 0 P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t)>0 P M ↑ U B ( s ′ ∣ s t , a t ) > 0 , then depending on the choice of MDP M ∈ M ↑ \mathcal{M}\in\mathcal{M}_{\uparrow} M ∈ M ↑ , the top-down sampling algorithm could fall into different cases. However, the truncated Gumbel values (which occur when P M ( s ′ ∣ s t , a t ) > 0 P_{\mathcal{M}}(s'\mid s_t,a_t)>0 P M ( s ′ ∣ s t , a t ) > 0 ) are always smaller than Gumbel values sampled from the standard Gumbel distribution (which occur when P M ( s ′ ∣ s t , a t ) = 0 P_{\mathcal{M}}(s'\mid s_t,a_t)=0 P M ( s ′ ∣ s t , a t ) = 0 ). Therefore, to minimise the lower counterfactual probability, we should select an MDP where P ( s ′ ∣ s t , a t ) > 0 P(s'\mid s_t,a_t)>0 P ( s ′ ∣ s t , a t ) > 0 . Moreover, as shown in Case 2, the minimum Gumbel values for such an MDP occur when
P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) . P_{\mathcal{M}}(s'\mid s_t,a_t)=P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t). P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) .
Therefore, in all cases, we should derive G s ′ , t ′ G'_{s',t} G s ′ , t ′ given P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) P_{\mathcal{M}}(s'\mid s_t,a_t)=P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t) P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) to minimise G s ′ , t ′ G'_{s',t} G s ′ , t ′ ; by the same argument (Case 2), the remaining posterior Gumbel values G q , t ′ G'_{q,t} G q , t ′ , q ≠ s ′ q\ne s' q = s ′ , are maximised by setting P M ( q ∣ s t , a t ) = P M ↑ L B ( q ∣ s t , a t ) P_{\mathcal{M}}(q\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\uparrow}}(q\mid s_t,a_t) P M ( q ∣ s t , a t ) = P M ↑ L B ( q ∣ s t , a t ) . As before, these extremal values are chosen for each next state individually and need not form a valid distribution.
However, since the derivation depends on the realised Gumbel samples, we cannot deterministically specify which state will be the arg max sample for a given choice of transition probabilities. But, for any fixed realisation of the Gumbel samples g g g and t o p g u m b e l \mathit{topgumbel} topgumbel , whether s ′ s' s ′ is the arg max is monotone increasing in its interventional logit log P M ( s ′ ∣ s , a ) \log P_{\mathcal{M}}(s'\mid s,a) log P M ( s ′ ∣ s , a ) and posterior Gumbel value G s ′ , t ′ G'_{s',t} G s ′ , t ′ , and monotone decreasing in those of every other state q ≠ s ′ q\ne s' q = s ′ ; hence so is the probability that s ′ s' s ′ is the arg max. Therefore, although the arg max outcome itself is random, we can minimise the probability that s ′ s' s ′ is selected by minimising the former and maximising the latter.
Take the following assignment of interventional probabilities:
P M ( s ′ ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) P_{\mathcal{M}}(s'\mid s,a)=P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a) P M ( s ′ ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) , and ∀ s ′ ′ ≠ s ′ \forall s''\ne s' ∀ s ′′ = s ′ , P M ( s ′ ′ ∣ s , a ) = P M ↑ U B ( s ′ ′ ∣ s , a ) P_{\mathcal{M}}(s''\mid s,a)=P^{UB}_{\mathcal{M}_{\uparrow}}(s''\mid s,a) P M ( s ′′ ∣ s , a ) = P M ↑ U B ( s ′′ ∣ s , a )
P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) P_{\mathcal{M}}(s'\mid s_t,a_t)=P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t) P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) , and ∀ s ′ ′ ≠ s ′ \forall s''\ne s' ∀ s ′′ = s ′ , P M ( s ′ ′ ∣ s t , a t ) = P M ↑ L B ( s ′ ′ ∣ s t , a t ) P_{\mathcal{M}}(s''\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\uparrow}}(s''\mid s_t,a_t) P M ( s ′′ ∣ s t , a t ) = P M ↑ L B ( s ′′ ∣ s t , a t )
If there exists an MDP M ∈ M ↑ \mathcal{M}\in\mathcal{M}_{\uparrow} M ∈ M ↑ with this assignment of probabilities, this assignment simultaneously minimises P M ( s ′ ∣ s , a ) P_{\mathcal{M}}(s'\mid s,a) P M ( s ′ ∣ s , a ) and G s ′ , t ′ G'_{s',t} G s ′ , t ′ and maximises those of all other states, and therefore minimises the probability that s ′ s' s ′ will be the arg max, leading to a tight lower bound. If no admissible MDP satisfies this assignment exactly, we may still evaluate the Gumbel-max expression at these extremal logits. Since the probability of the arg max event is monotone in each logit (increasing in those of s ′ s' s ′ and decreasing in those of all other states), evaluating it at these extremal (possibly infeasible) logits yields a conservative lower bound.
This proves that a conservative lower bound is:
P ~ t L B ( s ′ ∣ s , a ) = P ( s ′ = arg max q ∈ S { log ( P ~ M ↑ L B ( q ∣ s , a ) ) + G ~ q , t ′ } ) . \widetilde{P}^{LB}_{t}(s'\mid s,a)=P\left(s'=\underset{q\in\mathcal{S}}{\arg\max}\left\{\log\left(\widetilde{P}^{LB}_{\mathcal{M}_{\uparrow}}(q\mid s,a)\right)+\widetilde{G}'_{q,t}\right\}\right). P t L B ( s ′ ∣ s , a ) = P ( s ′ = q ∈ S arg max { log ( P M ↑ L B ( q ∣ s , a ) ) + G q , t ′ } ) .
where P ~ M ↑ L B ( q ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) \widetilde{P}^{LB}_{\mathcal{M}_{\uparrow}}(q\mid s,a)=P^{LB}_{\mathcal{M}_{\uparrow}}(s'\mid s,a) P M ↑ L B ( q ∣ s , a ) = P M ↑ L B ( s ′ ∣ s , a ) if q = s ′ q=s' q = s ′ and P M ↑ U B ( q ∣ s , a ) P^{UB}_{\mathcal{M}_{\uparrow}}(q\mid s,a) P M ↑ U B ( q ∣ s , a ) otherwise, and G q , t ′ G'_{q,t} G q , t ′ is derived given P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) P_{\mathcal{M}}(s'\mid s_t,a_t)=P^{UB}_{\mathcal{M}_{\uparrow}}(s'\mid s_t,a_t) P M ( s ′ ∣ s t , a t ) = P M ↑ U B ( s ′ ∣ s t , a t ) and ∀ s ′ ′ ≠ s ′ \forall s''\ne s' ∀ s ′′ = s ′ , P M ( s ′ ′ ∣ s t , a t ) = P M ↑ L B ( s ′ ′ ∣ s t , a t ) P_{\mathcal{M}}(s''\mid s_t,a_t)=P^{LB}_{\mathcal{M}_{\uparrow}}(s''\mid s_t,a_t) P M ( s ′′ ∣ s t , a t ) = P M ↑ L B ( s ′′ ∣ s t , a t ) .
The proof for the upper bound follows similarly, by taking the opposite MDP bounds throughout.
In our experiments, we estimate these bounds using (12) with N = 10,000 N=10{,}000 N = 10 , 000 samples from the posterior Gumbel distribution per transition. For the observed state-action pair ( s t , a t ) (s_t,a_t) ( s t , a t ) , we fix the counterfactual transition probabilities to 1 for the observed next state s t + 1 s_{t+1} s t + 1 and 0 for all other states, since under the Gumbel-max SCM the counterfactual of the observed state-action pair always reproduces s t + 1 s_{t+1} s t + 1 (as in Theorem B.3). Because the remaining bounds are estimated by sampling, we clip them to [ 0 , 1 ] [0,1] [ 0 , 1 ] and, where sampling error places the lower bound above the upper bound, set the two equal. Finally, we rescale the lower bounds of each distribution to sum to at most 1 and the upper bounds to sum to at least 1, to ensure we have a valid CFIMDP.
Confidence Intervals over Counterfactual IMDP
Given a finite set of observed transitions in an MDP, we can build an interval MDP where transition probabilities are represented as intervals, capturing uncertainty in the transition probabilities due to limited data. For a given state-action pair, ( s , a ) (s, a) ( s , a ) , we can simulate a large number of transitions, and calculate:
m ( s , a ) m(s, a) m ( s , a ) : number of times action a a a was taken in state s s s .
n ( s , a , s ′ ) n(s, a, s') n ( s , a , s ′ ) : number of times the system transitioned to state s ′ s' s ′ after being in state s s s and taking action a a a .
Empirical probability P ^ ( s ′ ∣ s , a ) = n ( s , a , s ′ ) m ( s , a ) \hat{P}(s' \mid s, a) = \frac{n(s,a,s')}{m(s,a)} P ^ ( s ′ ∣ s , a ) = m ( s , a ) n ( s , a , s ′ ) .
Confidence Intervals
There are several methods we could use to produce confidence intervals over the probability of each transition. We require all transition probabilities to lie within their intervals simultaneously with probability at least 1 − α 1-\alpha 1 − α . To achieve this, we distribute the overall confidence evenly across all nondeterministic transitions: by a union bound, it suffices to compute each interval at confidence level 1 − α ′ 1-\alpha' 1 − α ′ , where α ′ = α / ∣ T ′ ∣ \alpha'=\alpha/|\mathcal{T}'| α ′ = α /∣ T ′ ∣ and T ′ \mathcal{T}' T ′ is the set of nondeterministic transitions5 . There are several methods we could use to produce confidence intervals over the probability of each transition:
Hoeffding’s inequality provides a high-probability bound on the deviation between the true transition probability P ( s ′ ∣ s , a ) P(s' \mid s, a) P ( s ′ ∣ s , a ) and P ^ ( s ′ ∣ s , a ) \hat{P}(s' \mid s, a) P ^ ( s ′ ∣ s , a ) . For a confidence level of 1 − α ′ 1-\alpha' 1 − α ′ ,
P r ( ∣ P ( s ′ ∣ s , a ) − P ^ ( s ′ ∣ s , a ) ∣ ≥ η ) ≤ 2 e − 2 ⋅ m ( s , a ) ⋅ η 2 Pr\left(\left|P(s' \mid s,a)-\hat{P}(s' \mid s,a)\right| \geq\eta\right) \leq2e^{-2\cdot m(s,a)\cdot\eta^2} P r ( P ( s ′ ∣ s , a ) − P ^ ( s ′ ∣ s , a ) ≥ η ) ≤ 2 e − 2 ⋅ m ( s , a ) ⋅ η 2
where
η = ln ( 2 / α ′ ) 2 ⋅ m ( s , a ) \eta=\sqrt{\frac{\ln(2/\alpha')}{2\cdot m(s,a)}} η = 2 ⋅ m ( s , a ) ln ( 2/ α ′ )
is chosen so that the right-hand side equals α ′ \alpha' α ′ . We can then construct an interval MDP as follows. For each transition s , a → s ′ s,a \to s' s , a → s ′ , we estimate its interval transition probability as:
P M ↑ ( s ′ ∣ s , a ) = [ max ( 0 , P ^ ( s ′ ∣ s , a ) − η ) , min ( 1 , P ^ ( s ′ ∣ s , a ) + η ) ] P_{\mathcal{M}_{\uparrow}}(s' \mid s,a) = [\max(0,\hat{P}(s' \mid s,a)-\eta),\min(1,\hat{P}(s' \mid s,a)+\eta)] P M ↑ ( s ′ ∣ s , a ) = [ max ( 0 , P ^ ( s ′ ∣ s , a ) − η ) , min ( 1 , P ^ ( s ′ ∣ s , a ) + η )]
P ( s ′ ∣ s , a ) ∈ [ Beta − 1 ( α ′ 2 ; n ( s , a , s ′ ) , m ( s , a ) − n ( s , a , s ′ ) + 1 ) , Beta − 1 ( 1 − α ′ 2 ; n ( s , a , s ′ ) + 1 , m ( s , a ) − n ( s , a , s ′ ) ) ] P(s' \mid s,a) \in\left[\operatorname{Beta}^{-1}\left(\frac{\alpha'}{2};n(s,a,s'),m(s,a)-n(s,a,s')+1\right),\operatorname{Beta}^{-1}\left(1-\frac{\alpha'}{2};n(s,a,s')+1,m(s,a)-n(s,a,s')\right)\right] P ( s ′ ∣ s , a ) ∈ [ Beta − 1 ( 2 α ′ ; n ( s , a , s ′ ) , m ( s , a ) − n ( s , a , s ′ ) + 1 ) , Beta − 1 ( 1 − 2 α ′ ; n ( s , a , s ′ ) + 1 , m ( s , a ) − n ( s , a , s ′ ) ) ]
where Beta − 1 ( q ; a , b ) \operatorname{Beta}^{-1}(q;a,b) Beta − 1 ( q ; a , b ) denotes the q q q -quantile of the Beta( a , b ) (a,b) ( a , b ) distribution. These intervals are typically tighter than those from Hoeffding’s inequality, so we use the Clopper–Pearson method in all our experiments.
Construction and Normalisation of the IMDP
In our approach, we use the Clopper–Pearson method to estimate the IMDP. The resulting intervals are then normalised to satisfy Assumptions B.1 and B.2, which ensure that counterfactual probabilities can be computed over the IMDP.
We have constructed the IMDP such that for any transition s , a → s ′ s,a \to s' s , a → s ′ in the MDP,
P r ( P ( s ′ ∣ s , a ) ∉ P M ↑ ( s ′ ∣ s , a ) ) ≤ α Pr(P(s' \mid s,a) \notin P_{\mathcal{M}_{\uparrow}}(s' \mid s,a)) \leq\alpha P r ( P ( s ′ ∣ s , a ) ∈ / P M ↑ ( s ′ ∣ s , a )) ≤ α
where P M ↑ ( s ′ ∣ s , a ) P_{\mathcal{M}_{\uparrow}}(s' \mid s,a) P M ↑ ( s ′ ∣ s , a ) is the true transition probability.
Propagation of Confidence to the CFIMDP
Proof of Proposition 4.2. For now, assume the derived counterfactual probability bounds are tight (we will consider what happens if we apply our non-tight lower bound later). Take our IMDP M ↑ \mathcal{M}_{\uparrow} M ↑ derived from observational data using the Clopper–Pearson bounds. By construction, the chance of any true transition probability lying outside the IMDP is at most α \alpha α , i.e. P r ( ∃ s , a , s ′ : P ( s ′ ∣ s , a ) ∉ P M ↑ ( s ′ ∣ s , a ) ) ≤ α Pr(\exists s,a,s' : P(s' \mid s,a) \notin P_{\mathcal{M}_{\uparrow}}(s' \mid s,a)) \leq\alpha P r ( ∃ s , a , s ′ : P ( s ′ ∣ s , a ) ∈ / P M ↑ ( s ′ ∣ s , a )) ≤ α .
Take an arbitrary transition s , a → s ′ s,a \to s' s , a → s ′ . In the worst case, where the true transition probability for this transition is not contained in the bound [ P M ↑ L B ( s ′ ∣ s , a ) , P M ↑ U B ( s ′ ∣ s , a ) ] [P_{\mathcal{M}_{\uparrow}}^{LB}(s' \mid s,a),P_{\mathcal{M}_{\uparrow}}^{UB}(s' \mid s,a)] [ P M ↑ L B ( s ′ ∣ s , a ) , P M ↑ U B ( s ′ ∣ s , a )] , the corresponding counterfactual probability bounds could be entirely disjoint from those in our CFIMDP (though in practice, some overlap is likely). However, the counterfactual bounds are exact given the true transition (interventional) probabilities, and, by construction, all true transition probabilities lie within the estimated IMDP with probability at least 1 − α 1-\alpha 1 − α . Hence, with probability at least 1 − α 1-\alpha 1 − α , all true counterfactual probabilities lie within their CFIMDP intervals simultaneously. Therefore, we can propagate the confidence bound through to the CFIMDP: the CFIMDP will contain the true counterfactual MDP (CFMDP) with probability at least 1 − α 1-\alpha 1 − α .5
Finally, when we use a non-tight lower bound for the CFIMDP, this will be an over-approximation (which includes all valid CFMDPs and possibly some invalid ones). Therefore, this only increases our confidence that the computed counterfactual probability bounds contain the true counterfactual transition probability. □
IMDP Value Iteration with Max Changes
Algorithm 2 IMDP Value Iteration with Max Changes
Input: CFIMDP M ~ τ ↑ \widetilde{\mathcal{M}}_{\tau}^{\uparrow} M τ ↑ with bounds P ~ τ ↑ \widetilde{P}_{\tau}^{\uparrow} P τ ↑ , observed path τ \tau τ , maximum number of changes K K K
Output: values V ∗ V^{*} V ∗ , policies π k ∗ \pi_{k}^{*} π k ∗ for k = 0 , … , K k = 0, \ldots, K k = 0 , … , K
for s ∈ S s \in\mathcal{S} s ∈ S , k = 0 k = 0 k = 0 to K K K do V ∗ ( s , ∣ τ ∣ , k ) ← 0 V^{*}(s, |\tau|, k) \leftarrow0 V ∗ ( s , ∣ τ ∣ , k ) ← 0 end for for t = ∣ τ ∣ − 1 t = |\tau| - 1 t = ∣ τ ∣ − 1 down to 0 0 0 do for k = 0 k = 0 k = 0 to K K K do for s ∈ S s \in\mathcal{S} s ∈ S do b e s t ← − ∞ best \leftarrow-\infty b es t ← − ∞ for a ∈ A a \in\mathcal{A} a ∈ A do if k = 0 k = 0 k = 0 and a ≠ a t a \ne a_t a = a t then continue {no changes remaining} end if k ′ ← k − 1 { a ≠ a t } k' \leftarrow k - 1\{a \ne a_t\} k ′ ← k − 1 { a = a t } Q ← R ( s , a ) + min P ~ t ∈ P ~ t ↑ ∑ s ′ P ~ t ( s ′ ∣ s , a ) V ∗ ( s ′ , t + 1 , k ′ ) Q \leftarrow R(s,a) + \min_{\widetilde{P}_t \in\widetilde{P}_t^{\uparrow}} \sum_{s'} \widetilde{P}_t(s' \mid s,a)V^{*}(s',t+1,k') Q ← R ( s , a ) + min P t ∈ P t ↑ ∑ s ′ P t ( s ′ ∣ s , a ) V ∗ ( s ′ , t + 1 , k ′ ) if Q > b e s t Q > best Q > b es t then b e s t ← Q best \leftarrow Q b es t ← Q ; π k ∗ ( t , s ) ← a \pi_k^{*}(t,s) \leftarrow a π k ∗ ( t , s ) ← a end if end for V ∗ ( s , t , k ) ← b e s t V^{*}(s,t,k) \leftarrow best V ∗ ( s , t , k ) ← b es t end for end for end for return V ∗ V^{*} V ∗ , { π k ∗ } k = 0 K \{\pi_k^{*}\}_{k=0}^{K} { π k ∗ } k = 0 K
Environment Descriptions and System Details
Below, we provide brief descriptions of the MDP environments and system specifications used in our experiments. The same environments as Lally et al. [17 ] are used to allow for comparison.
GridWorld
In the GridWorld MDP, an agent navigates a 4 × 4 4 \times4 4 × 4 grid starting from the top-left corner with the objective of reaching the goal state in the bottom-right corner. At each time step, the agent can choose to move up, down, left, or right; however, it moves only in the chosen direction with probability p p p , otherwise moving in a random direction. Reaching the goal state yields a reward of 100, and intermediate transitions provide shaped rewards proportional to the agent’s proximity to the goal. The grid also contains a hazardous, terminal state in the centre, and entering it incurs a penalty of − 100 -100 − 100 . In our experiments, we use two variants of the environment with different values of p p p , p = 0.9 p = 0.9 p = 0.9 (i.e., 90% chance of moving in the chosen direction) and p = 0.4 p = 0.4 p = 0.4 .
Frozen Lake
The Frozen Lake MDP is adapted from PRISM [10 , 16 ] . In this environment, the agent navigates a 4 × 4 4 \times4 4 × 4 grid to retrieve a frisbee, while avoiding a set of holes scattered across the grid. Since the original PRISM environment is formulated as a reachability problem, the environment has been converted to a reward-based setting, which yields a reward of 100 for successfully reaching the frisbee, and a penalty of − 100 -100 − 100 for falling into a hole. Both the goal state and states with holes are terminal.
Sepsis
The Sepsis MDP [23 ] simulates patient trajectories in a sepsis treatment setting. At each time step, the patient’s state is defined by four vital signs (heart rate, blood pressure, oxygen concentration, and glucose levels), each categorised as low, in normal range, or high. The RL agent controls three treatments (which can be switched on or off), with the goal of discharging the patient (which occurs when at least three of the vital signs are in normal range, and all three treatments are switched off). The patient dies if at least three vital signs are out of normal range at any time step. Rewards are shaped by the number of vital signs that are out of normal range, ranging from − 1000 -1000 − 1000 for patient death to + 1000 +1000 + 1000 for patient discharge.
Aircraft
The Aircraft MDP is a navigation task, also adapted from PRISM [10 , 16 ] . In this environment, the RL agent controls an aircraft that advances forward by one unit at each time step, and must choose to increase, decrease, or maintain its altitude, with a fixed probability of success. The goal is to successfully reach the right-hand side of the grid without colliding with another aircraft, which independently increases, decreases, or maintains its current altitude at each time step. Since the original PRISM environment is formulated as a reachability problem, it has been converted to a reward-based setting, which yields a reward of +100 for reaching the goal or a penalty of −100 for colliding with the other aircraft. Intermediate transitions receive a shaped reward inversely proportional to the proximity of the two aircraft.
System Specification
Our experiments were run in parallel using 32 threads on a 128-core machine with an Intel Xeon CPU and 512 GB RAM. Simulation of IMDPs and construction of the corresponding CFIMDPs were implemented in Python 3.10, while our extended value iteration algorithm was implemented by extending the Julia Interval MDP package (v0.6.0) with the algorithm described in Appendix § 12 .
Additional Experiments
Correctness for Off-policy Evaluation Experiment: GridWorld (p = 0.4 p = 0.4 p = 0.4 )
Table 4. Given 100 randomly sampled observed trajectories, we compare the average lower and upper bounds, V ⊥ , π ∗ ( s 0 ) V^{\bot,\pi^*}(s_0) V ⊥ , π ∗ ( s 0 ) and V ⊤ , π ∗ ( s 0 ) V^{\top,\pi^*}(s_0) V ⊤ , π ∗ ( s 0 ) , on the counterfactual value under the exact CFIMDP with those under data-driven CFIMDPs, whose IMDPs are learnt from N N N simulated trajectories. Averaged over observed trajectories, the counterfactual value equals the interventional value, so every pair of bounds should contain the true interventional value V π ∗ ( s 0 ) = − 40.1 V^{\pi^*}(s_0) = -40.1 V π ∗ ( s 0 ) = − 40.1 .
The results for the GridWorld (p = 0.4 p = 0.4 p = 0.4 ) experiment closely mirror those of the GridWorld (p = 0.9 p = 0.9 p = 0.9 ) experiment in § 5.1 , further confirming that our approach is valid and unbiased, as the data-driven CFIMDP bounds again consistently contain the true expected return, and converge towards the exact bounds as the number of trajectories increases.
Computing Minimal Robust Counterfactual Interventions: Sepsis
Figure 5 gives a more detailed view of the Sepsis counterfactual paths summarised in Figure 4 . For the same catastrophic observed trajectory and each k k k , we plot 200 counterfactual paths sampled under the policy π k ∗ \pi_k^* π k ∗ and an adversarially chosen CFMDP within the exact CFIMDP. Each row shows one component of the patient’s state over time: heart rate, systolic blood pressure, oxygen saturation and glucose, followed by the three treatments (antibiotics, vasopressors and ventilation). With k = 0 k = 0 k = 0 , the counterfactual paths follow the observed treatments and the patient’s vital signs deteriorate as observed. As k k k increases, π k ∗ \pi_k^* π k ∗ may change more of the observed treatments, and the vital signs of more counterfactual patients return to the normal range (dotted lines), consistent with the rise in recovery shown in Figure 4 .
Figure 5. Counterfactual Sepsis trajectories for one catastrophic observed trajectory, under π k ∗ \pi_k^* π k ∗ for varying numbers of allowed action changes k k k . Rows show the patient’s vital signs and applied treatments over time. The observed path is shown in black, and the 200 sampled counterfactual paths in blue, or red at steps where an action differs from the observed one (in the treatment rows, where that treatment was changed). Dotted lines mark the normal range of each vital sign.
Execution Times and Bound Widths