SlowGuess/NeurIPS_2023_OCR huggingface dataset:
The sensitivity parameter  $\Gamma_W$  controls the strength of unobserved confounding. In practice, one typically chooses  $\Gamma$  by domain knowledge or data-driven heuristics [35, 28]. One approach is to obtain the smallest  $\Gamma$  so that the corresponding partially identified interval includes 0. Then,  $\Gamma$  can be interpreted as a level of "causal uncertainty", quantifying the smallest violation of unconfoundedness that would explain away the causal effect [31, 33].
The weight function  $q(\mathbf{a}, \mathbf{x})$  offers additional opportunities to incorporate domain knowledge about the confounding
structure to obtain tighter bounds. Consider an observational study on the effect of smoking on cancer risk, confounded by certain unobserved genes. For example, it may be known that genes that act as unobserved confounders do not affect the cancer risk for a certain population with certain covariates  $\mathbf{x}$ , which allows us to set  $q(\mathbf{a},\mathbf{x}) = 1$ . Note that we can always set  $q(\mathbf{a},\mathbf{x}) = \mathbb{P}(\mathbf{a} \mid \mathbf{x})$  (discrete treatments) or  $q(\mathbf{a},\mathbf{x}) = 0$  (continuous treatments) if no domain knowledge is available, leading to established sensitivity models from the literature. For example, practitioners may use our bounds for the MSM in a mediation analysis setting without ever explicitly using the GMSM formulation via a weighting function.
Other sensitivity models: In this paper, we provide bounds for MSM-type sensitivity models. Recently, other types of sensitivity models have been proposed in the literature, which may provide less conservative bounds in situations where the data-generating process does not follow an MSM. Examples include  $f$ -sensitivity models [34],  $L_{2}$ -sensitivity models [81], curvature sensitivity models [48] and the  $\delta$ -MSM [45]. Extending our results to these sensitivity models may be another possible direction for future work.
Efficient estimation: Our main results (Theorem 1, Corollary 1, 2) are identifiability results, i.e., hold in the limit of infinite data. We did not provide results on efficient estimation. Therefore, future work may consider extending our approach to incorporate semiparametric efficiency theory [37].
Conclusion: We proposed a flexible generalization of the MSM and derived sharp bounds for a variety of different causal inference settings and data types (e.g., continuous, categorical). Our work provides practitioners with a unified framework for causal sensitivity analysis. This enables reliable causal inferences from observational data in the presence of unobserved confounders, thus promoting safe decision-making.
[78] Jinsung Yoon, James Jordan, and Mihaela van der Schaar. "GANITE: Estimation of individualized treatment effects using generative adversarial nets". In: ICLR. 2018.
[79] Marco Zaffalon, Alessandro Antonucci, and Rafael Cabañas. "Structural causal models are (solvable by) credal networks". In: International Conference on Probabilistic Graphical Models 2020. 2020.
[80] Junzhe Zhang, Jin Tian, and Elias Baireinboim. "Partial counterfactual identification from observational and experimental data". In: ICML. 2022.
[81] Yao Zhang and Qingyuan Zhao. "Bounds and semiparametric inference in  $L^{\infty}$  and  $L^{2}$  sensitivity analysis for observational studies". In: arXiv preprint arXiv:2211.04697 (2022).
[82] Qingyuan Zhao, Dylan S. Small, and Bhaswar B. Bhattacharya. "Sensitivity analysis for inverse probability weighting estimators via the percentile bootstrap". In: Journal of the Royal Statistical Society: Series B 81.4 (2019), pp. 735-761.
A.1 Partial identification under unobserved confounding
There are various works for partial identification (i.e., bounding causal effects) under unobserved confounding that do not impose sensitivity models. In the following, we discuss the difference between this literature stream, which we call causal partial identification (CPA), to causal sensitivity analysis (CSA).
The main difference between CSA and CPA is that CSA imposes sensitivity models, that is, assumptions on the strength of unobserved confounding, which is controlled by a sensitivity parameter  $\Gamma$ . Methods for CPA do not impose sensitivity constraints but instead impose other assumptions. In practice, CSA can be used to test the robustness of causal effect estimates to violations of the unconfoundedness assumption (by varying  $\Gamma$ ), while CPA may be applicable in situations where no domain knowledge about the confounding strength is available.
Approaches for CPA can be roughly described by two categories that describe the type of assumptions that are imposed to derive informative bounds.
1. Additional variables: In order to achieve informative bounds without restricting the strength of unobserved confounding, some works impose assumptions on the data-generating process by postulating the existence of additional variables. One example is instrumental variables (IVs), i.e., variables, which only have a direct effect on treatment variables but not on outcomes. Under certain assumptions, IVs render bounds for causal effects informative without assumptions on the underlying confounding structure [3, 25, 40, 54]. Other examples include leaky mediation [3, 54], differential effects [11], noisy proxy settings [26].
2. Discrete SCMs: Another stream of literature derives informative bounds in discrete SCMs. Examples include [20, 75, 79, 80].
Comparison with our bounds: None of the methods above is applicable in the causal inference settings we consider (e.g., continuous treatments or outcomes, no IVs available, etc.). In contrast, a well-known CPA result in our setting is the so-called no-assumptions bound [44] that leverages discrete treatments. In the following, we consider the standard setting for CATE estimation without mediators  $(\ell = 0)$  and a binary treatment  $A \in \{0,1\}$ . We show that we obtain the no-assumptions bound with our sensitivity analysis for the query  $\mathbb{E}[Y \mid x, do(A = a)]$  for  $\Gamma \to \infty$ , i.e. when lifting the sensitivity constraint. Let  $[p_1, p_2]$  denote the support of the conditional density  $\mathbb{P}(y \mid x, a)$  with c.d.f.  $F$ . Using the MSM we obtain
$$
\begin{array}{l} Q ^ {+} (\mathbf {x}, a, \mathcal {S}) = \int_ {p _ {1}} ^ {F ^ {- 1} \left(\frac {\Gamma}{1 + \Gamma}\right)} y \left((1 - \Gamma^ {- 1}) \mathbb {P} (a \mid \mathbf {x}) + \Gamma^ {- 1}\right) \mathbb {P} (y \mid \mathbf {x}, a) d y (9) \\ + \int_ {F ^ {- 1} \left(\frac {\Gamma}{1 + \Gamma}\right)} ^ {p _ {2}} y \left((1 - \Gamma) \mathbb {P} (a \mid \mathbf {x}) + \Gamma\right) \mathbb {P} (y \mid \mathbf {x}, a) d y (10) \\ \xrightarrow [ \Gamma \rightarrow \infty ]{} \mathbb {P} (a \mid \mathbf {x}) \mathbb {E} [ Y \mid \mathbf {x}, a ] + (1 - \mathbb {P} (a \mid \mathbf {x})) p _ {2}, (11) \\ \end{array}
$$
which corresponds to the result in [44]. The result for the lower bound  $Q^{-}(\mathbf{x},a,\mathcal{S})$  follows analogously.
A.2 Estimation of causal effects under unconfoundedness
Under certain additional assumptions, unconfoundedness makes it possible to point-identify causal effects from the observational data, so that the causal inference problem reduces to a purely statistical estimation problem. Various methods for estimating point-identified causal effects under unconfoundedness have been proposed that make use of machine learning and/or (semiparametric) statistical theory. Examples include methods for conditional average treatment effects [13, 16, 38, 42, 63, 72, 78], average treatment effects [24, 64, 69], instrumental variables [5, 23, 27, 65, 66, 76], time-varying data [8, 43, 46], mediation analysis [68, 22], and distributional effects [12, 39, 47, 49]. Note that all the methods above are biased if the unconfoundedness assumption is violated, which outlines the need for our causal sensitivity analysis.
B Proofs of the GMSM bounds
Proof. We give the proof for continuous  $W \in \mathbb{R}$  (see Eq. (4) in the main paper). The derivation for discrete  $W \in \mathbb{N}$  (see Eq. (5) in the main paper) follows with the same arguments and the normalization constraint  $\sum_{w} \mathbb{P}^{+}(w \mid \mathbf{x}, \mathbf{m}_{W}, \mathbf{a}) = 1$ . We first show the inequality
$$
F _ {+} (w) \leq \inf  _ {\mathcal {M} \in \mathcal {C} (\mathcal {S})} F _ {\mathcal {M}} (w) \tag {12}
$$
and then provide sharpness results by showing
$$
F _ {+} (w) \geq \inf  _ {\mathcal {M} \in \mathcal {C} (\mathcal {S})} F _ {\mathcal {M}} (w) \tag {13}
$$
under the sharpness conditions of Theorem 1. The result for  $F_{-}(w)$  follows analogously.
Validity of the bounds  $(\le)$ : We provide a proof by contradiction. To do so, we assume that there exists an SCM  $\mathcal{M} \in \mathcal{C}(\mathcal{S})$  and  $w \in \mathbb{R}$  so that
$$
F _ {+} (w) > F _ {\mathcal {M}} (w). \tag {14}
$$
By the definition of  $F_{+}(w)$ , there must exist a set  $\mathcal{W}_1 \subseteq \mathbb{R}_{\leq F^{-1}(c_W^+)}$ , so that
$$
\mathbb {P} _ {+} \left(w _ {1} \mid \mathbf {x}, \mathbf {m} _ {W}, \mathbf {a}\right) > \mathbb {P} \left(w _ {1} \mid \mathbf {x}, \mathbf {m} _ {W}, d o (\mathbf {A} = \mathbf {a})\right) \quad \text {f o r a l l} \quad w _ {1} \in \mathcal {W} _ {1}, \tag {15}
$$
or a set  $\mathcal{W}_2\subseteq \mathbb{R}_{>F^{-1}(c_W^+)}$  , so that
$$
\mathbb {P} _ {+} \left(w _ {2} \mid \mathbf {x}, \mathbf {m} _ {W}, \mathbf {a}\right) <   \mathbb {P} \left(w _ {2} \mid \mathbf {x}, \mathbf {m} _ {W}, d o (\mathbf {A} = \mathbf {a})\right) \quad \text {f o r a l l} \quad w _ {2} \in \mathcal {W} _ {2}, \tag {16}
$$
as otherwise  $\mathbb{P}(w\mid \mathbf{x},\mathbf{m}_W,do(\mathbf{A} = \mathbf{a}))$  would not integrate to 1. Let  $W = f(\mathbf{X},\mathbf{M}_W,\mathbf{A},\mathbf{U}_W)$  be the functional assignment of  $\mathcal{M}$  and let  $\mathcal{U}_1 = f_{\mathbf{x},\mathbf{m}_W,\mathbf{a}}^{-1}(\mathcal{W}_1)\subseteq \mathbb{R}^d$  and  $\mathcal{U}_2 = f_{\mathbf{x},\mathbf{m}_W,\mathbf{a}}^{-1}(\mathcal{W}_2)\subseteq \mathbb{R}^d$  denote the preimages of  $\mathcal{W}_1$  and  $\mathcal{W}_2$  under  $f_{\mathbf{x},\mathbf{m}_W,\mathbf{a}}$  in the confounding space.
We can again write  $\mathbb{P}_{+}(w|\mathbf{x},\mathbf{m}_{W},\mathbf{a})$  as a push forward
$$
\mathbb {P} ^ {+} (w \mid \mathbf {x}, \mathbf {m} _ {W}, \mathbf {a}) = f _ {\mathbf {x}, \mathbf {m} _ {W}, \mathbf {a} _ {\#}} \mathbb {P} _ {+} ^ {\mathbf {U} _ {W} | \mathbf {x}, \mathbf {a}} (w) \tag {17}
$$
for some density  $\mathbb{P}_{+}(\mathbf{u}_W\mid \mathbf{x},\mathbf{a})$  on the confounding space. By the definition of  $\mathbb{P}_{+}(w\mid \mathbf{x},\mathbf{m}_{W},\mathbf{a})$  and Eq. (28), we obtain
$$
\mathbb {P} _ {+} \left(\mathbf {u} _ {1} \mid \mathbf {x}, \mathbf {a}\right) = \frac {1}{s _ {W} ^ {+}} \mathbb {P} \left(\mathbf {u} _ {1} \mid \mathbf {x}, \mathbf {a}\right) \quad \text {a n d} \quad \mathbb {P} _ {+} \left(\mathbf {u} _ {2} \mid \mathbf {x}, \mathbf {a}\right) = \frac {1}{s _ {W} ^ {-}} \mathbb {P} \left(\mathbf {u} _ {2} \mid \mathbf {x}, \mathbf {a}\right) \tag {18}
$$
for all  $\mathbf{u}_1\in \mathcal{U}_1$  and  $\mathbf{u}_2\in \mathcal{U}_2$ . Due to the definition of  $\mathcal{U}_1$  and  $\mathcal{U}_2$ , it follows that there exist  $\mathbf{u}_1\in \mathcal{U}_1$  and  $\mathbf{u}_2\in \mathcal{U}_2$ , so that
$$
\frac {\mathbb {P} \left(\mathbf {u} _ {1} \mid \mathbf {x} , \mathbf {a}\right)}{\mathbb {P} \left(\mathbf {u} _ {1} \mid \mathbf {x} , d o (\mathbf {A} = \mathbf {a})\right)} > \frac {\mathbb {P} \left(\mathbf {u} _ {1} \mid \mathbf {x} , \mathbf {a}\right)}{\mathbb {P} _ {+} \left(\mathbf {u} _ {1} \mid \mathbf {x} , \mathbf {a}\right)} = s _ {W} ^ {+} \tag {19}
$$
$$
\frac {\mathbb {P} \left(\mathbf {u} _ {1} \mid \mathbf {x} , \mathbf {a}\right)}{\mathbb {P} \left(\mathbf {u} _ {1} \mid \mathbf {x} , d o (\mathbf {A} = \mathbf {a})\right)} <   \frac {\mathbb {P} \left(\mathbf {u} _ {1} \mid \mathbf {x} , \mathbf {a}\right)}{\mathbb {P} _ {+} \left(\mathbf {u} _ {1} \mid \mathbf {x} , \mathbf {a}\right)} = s _ {W} ^ {-}. \tag {20}
$$
Both Eq. (19) and Eq. (20) are contradictions to the GMSM constraint Eq. (3) of the main paper. Hence,  $\mathcal{M} \notin \mathcal{C}(\mathcal{S})$ .
Sharpness of the bounds  $(\ge)$ : We show that under the sharpness conditions from Theorem 1, there exists an SCM  $\mathcal{M} \in \mathcal{C}(\mathcal{S})$  with induced interventional density  $\mathbb{P}_{+}(w \mid \mathbf{x}, \mathbf{m}_{W}, \mathbf{a})$  for all  $w$ . The construction of  $\mathcal{M}$  is similar to that of our motivational toy example in Sec. 4.1 of the main paper. We first define an (interventional) probability density for the unobserved confounder  $\mathbf{U}_W \in \mathbb{R}^d$  given  $\mathbf{X}$  via
$$
\mathbb {P} \left(\mathbf {u} _ {W} \mid \mathbf {x}, d o (\mathbf {A} = \mathbf {a})\right) = \mathbb {1} \left(0 \leq u _ {W} ^ {(1)} \leq c _ {W} ^ {+}\right) \left(1 / s _ {W} ^ {+}\right) + \mathbb {1} \left(1 \geq u _ {W} ^ {(1)} > c _ {W} ^ {+}\right) \left(1 / s _ {W} ^ {-}\right), \tag {21}
$$
where  $u_W^{(1)}$  denotes the first coordinate of  $\mathbf{u}_W$ .  $\mathbb{P}(\mathbf{u}_W \mid \mathbf{x}, \mathbf{m}_W)$  is a properly normalized density with support  $[0, 1]^d$  because
$$
\int \mathbb {P} (\mathbf {u} _ {W} \mid \mathbf {x}, d o (\mathbf {A} = \mathbf {a})) \mathrm {d} \mathbf {u} _ {W} = \frac {c _ {W} ^ {+}}{s _ {W} ^ {+}} + \frac {1 - c _ {W} ^ {+}}{s _ {W} ^ {-}} = \frac {1 - s _ {W} ^ {-}}{s _ {W} ^ {+} - s _ {W} ^ {-}} + \frac {s _ {W} ^ {+} - 1}{s _ {W} ^ {+} - s _ {W} ^ {-}} = 1, \tag {22}
$$
where we used the definition of  $c_{W}^{+} = \frac{(1 - s_{W}^{-})s_{W}^{+}}{s_{W}^{+} - s_{W}^{-}}$ .
We now define the probability density for the unobserved confounder  $\mathbf{U}_W\in \mathbb{R}^d$  given  $\mathbf{X}$ ,  $\mathbf{M}_W$ , and treatments  $\mathbf{A}$  as the uniform density on  $[0,1]^d$ , i.e.,
$$
\mathbb {P} \left(\mathbf {u} _ {W} \mid \mathbf {x}, \mathbf {a}\right) = \mathbb {1} (0 \leq \mathbf {u} _ {W} \leq 1), \tag {23}
$$
where the indicator function is defined coordinate-wise.
We now need to show that there always exists an SCM  $\mathcal{M}$  which induces the densities in Eq. (21) and Eq. (22) and that satisfies the sensitivity constraints. For this purpose, we use the assumptions to write the interventional density for discrete  $\mathbf{A}$  as
$$
\mathbb {P} (\mathbf {u} _ {W} \mid \mathbf {x}, d o (\mathbf {A} = \mathbf {a}))) = \mathbb {P} (\mathbf {u} _ {W} \mid \mathbf {x}) = \mathbb {P} (\mathbf {a} \mid \mathbf {x}) + (1 - \mathbb {P} (\mathbf {a} \mid \mathbf {x})) \mathbb {P} (\mathbf {u} _ {W} \mid \mathbf {x}, \mathbf {A} \neq \mathbf {a}). \tag {24}
$$
Hence, our definitions for  $\mathbb{P}(\mathbf{u}_W\mid \mathbf{x},do(\mathbf{A}))$  and  $\mathbb{P}(\mathbf{u}_W\mid \mathbf{x},\mathbf{a})$  are valid whenever
$$
0 \leq \mathbb {P} \left(\mathbf {u} _ {W} \mid \mathbf {x}, \mathbf {A} \neq \mathbf {a}\right) = \frac {\mathbb {P} \left(\mathbf {u} _ {W} \mid \mathbf {x} , d o (\mathbf {A} = \mathbf {a})\right) - \mathbb {P} (\mathbf {a} \mid \mathbf {x})}{1 - \mathbb {P} (\mathbf {a} \mid \mathbf {x})}, \tag {25}
$$
which follows from the sharpness condition  $1 / s_W^+ \geq \mathbb{P}(\mathbf{a} \mid \mathbf{x})$ . Sharpness for continuous  $\mathbf{A}$  follows because we can approximate  $\mathbf{A}$  with a sequence of discrete treatments  $(\mathbf{A}_n)_n$  and it holds that  $\mathbb{P}(\mathbf{a}_n \mid \mathbf{x}) \underset{n \to \infty}{\longrightarrow} 0$  (as long as  $\mathbb{P}(\mathbf{a} \mid \mathbf{x})$  is non-degenerate). Finally, it holds that
$$
s _ {W} ^ {-} \leq \frac {\mathbb {P} \left(\mathbf {U} _ {W} = \mathbf {u} _ {W} \mid \mathbf {x} , \mathbf {a}\right)}{\mathbb {P} \left(\mathbf {U} _ {W} = \mathbf {u} _ {W} \mid \mathbf {x} , d o (\mathbf {A} = \mathbf {a})\right)} \leq s _ {W} ^ {+} \quad \text {f o r a l l} \quad \mathbf {u} _ {W} \in [ 0, 1 ] ^ {p}, \tag {26}
$$
so that  $\mathcal{M}$  respects the sensitivity constraint of the GMSM  $S$ .
Let now  $\mathbb{P}(w\mid \mathbf{x},\mathbf{m}_W,\mathbf{a})$  denote the observational density of  $W$  given  $\mathbf{X}$ ,  $\mathbf{M}_W$ , and  $\mathbf{A}$  with corresponding cumulative distribution function (CDF) given by  $F(w)$ . To complete our construction of  $\mathcal{M}$ , we define functional assignment  $W = f_{W}(\mathbf{X},\mathbf{M}_{W},\mathbf{A},\mathbf{U}_{W})$  via the inverse CDF
$$
f _ {W} (\mathbf {x}, \mathbf {m} _ {W}, \mathbf {a}, \mathbf {u} _ {W}) = F ^ {- 1} \left(u _ {W} ^ {(1)}\right). \tag {27}
$$
By denoting  $f_{W}(\mathbf{x},\mathbf{m}_{W},\mathbf{a},\cdot)$  as  $f_{\mathbf{x},\mathbf{m}_W,\mathbf{a}}$  , we can write the observational distribution under  $\mathcal{M}$  as the push forward
$$
f _ {\mathbf {x}, \mathbf {m} _ {W}, \mathbf {a} _ {\#}} \mathbb {P} ^ {\mathbf {U} _ {W} | \mathbf {x}, \mathbf {a}} (w) = \mathbb {P} (w \mid \mathbf {x}, \mathbf {m} _ {W}, \mathbf {a}) \tag {28}
$$
due to Eq. (22) and Eq. (27). Note that we used here that  $\mathbf{U}_W$  is not a parent of  $\mathbf{M}_W$  (see Fig. 1). Hence,  $\mathcal{M} \in \mathcal{C}(\mathcal{S})$  is compatible with the sensitivity model  $\mathcal{S}$ . Furthermore, the induced interventional distribution can be written as the push-forward
$$
f _ {\mathbf {x}, \mathbf {m} _ {W}, \mathbf {a} _ {\#}} \mathbb {P} ^ {\mathbf {U} _ {W} | \mathbf {x}, d o (\mathbf {A} = \mathbf {a})} (w) = \mathbb {P} _ {+} (w \mid \mathbf {x}, \mathbf {m} _ {W}, \mathbf {a}) \tag {29}
$$
because of Eq. (21).
Here, we formally restate Corollary 1 for monotone functionals. For two probability densities  $\mathbb{P}(y)$  and  $\mathbb{P}'(y)$ , we denote  $\mathbb{P} \leq \mathbb{P}'$  if  $F \geq F'$  holds almost surely for the corresponding CDFs.
Definition 5. A functional  $\mathcal{D}$  is called monotone if  $\mathcal{D}(\mathbb{P}(\cdot))\leq \mathcal{D}(\mathbb{P}'(\cdot))$  whenever  $\mathbb{P}\leq \mathbb{P}'$
Intuitively, a monotone functional increases if applied on a distribution that is further right-shifted. Note that both the expectation functional  $\mathcal{D}(\mathbb{P}(\cdot)) = \int y\mathbb{P}(y)\mathrm{d}y$  and the quantile functionals  $\mathcal{D}(\mathbb{P}(\cdot)) = F^{-1}(\alpha)$  for  $\alpha \in [0,1]$  are monotone.
Corollary 3 (Restatement). If  $\mathbf{M} = \emptyset$  and  $\mathcal{D}$  is monotone, we obtain sharp bounds
$$
Q ^ {+} (\mathbf {x}, \mathbf {a}, \mathcal {S}) = \mathcal {D} \left(\mathbb {P} _ {+} ^ {Y} (\cdot | \mathbf {x}, \mathbf {a})\right) \quad a n d \quad Q ^ {-} (\mathbf {x}, \mathbf {a}, \mathcal {S}) = \mathcal {D} \left(\mathbb {P} _ {-} ^ {Y} (\cdot | \mathbf {x}, \mathbf {a})\right). \tag {30}
$$
Proof. Follows directly from Theorem 1 for  $W = Y$ .
Proof. We derive Algorithm 1 for  $Q^{+}(\mathbf{x}, \bar{\mathbf{a}}_{\ell + 1}, \mathcal{S})$ . The case for  $Q^{-}(\mathbf{x}, \bar{\mathbf{a}}_{\ell + 1}, \mathcal{S})$  follows analogously. Recall that we want to maximize the causal effect
$$
Q (\mathbf {x}, \bar {\mathbf {a}}, \mathcal {M}) = \sum_ {\mathbf {m}} \mathcal {D} \left(\mathbb {P} ^ {Y} (\cdot \mid \mathbf {x}, \mathbf {m}, d o (\mathbf {A} = \mathbf {a} _ {\ell + 1})\right) \prod_ {i = 1} ^ {\ell} \mathbb {P} \left(m _ {i} \mid \mathbf {x}, \bar {\mathbf {m}} _ {i - 1}, d o (\mathbf {A} = \mathbf {a} _ {i})\right), \tag {31}
$$
over all possible SCMs  $\mathcal{M} \in \mathcal{C}(\mathcal{S})$  that are compatible with the GMSM  $\mathcal{S}$ . By using the assumption (no unobserved confounding between mediators and outcome), we can write  $Q(\mathbf{x},\bar{\mathbf{a}},\mathcal{M})$  in terms of functional assignments  $f_{\mathbf{x},\mathbf{m}_W,\mathbf{a}}^W$  defined via  $W = f^{W}(\mathbf{X},\mathbf{M}_{W},\mathbf{A},\mathbf{U}_{W})$  and induced (interventional) distributions  $\mathbb{P}^{\mathbf{U}_W|\mathbf{x}}$  in the following way:
$$
Q (\mathbf {x}, \bar {\mathbf {a}} _ {\ell + 1}, \mathcal {M}) = \sum_ {\mathbf {m}} \mathcal {D} \left(f _ {\mathbf {x}, \bar {\mathbf {m}} _ {\ell}, \mathbf {a} _ {\ell + 1} \#} ^ {Y} \mathbb {P} ^ {\mathbf {U} _ {Y} | \mathbf {x}} (\cdot)\right) \prod_ {i = 1} ^ {\ell} f _ {\mathbf {x}, \bar {\mathbf {m}} _ {i - 1}, \mathbf {a} _ {i} \#} ^ {M _ {i}} \mathbb {P} ^ {\mathbf {U} _ {M _ {i}} | \mathbf {x}} (m _ {i}). \tag {32}
$$
Hence, the optimization problem reduces to maximizing Eq. (32) over all functional assignments  $f_{\mathbf{x}, \mathbf{m}_W, \mathbf{a}}^W$  and distributions  $\mathbb{P}^{\mathbf{U}_W | \mathbf{x}}$  that are compatible with  $S$ . Note that the terms in the product do not depend on each other or the term in the sum. Thus, by rearranging the suprema and products, we can equivalently perform the following iterative procedure: First, we initialize
$$
Q _ {\ell + 1} ^ {+} (\mathbf {x}, \bar {\mathbf {m}} _ {\ell}, \bar {\mathbf {a}} _ {\ell + 1}, \mathcal {S}) = \sup  _ {\mathcal {M} \in \mathcal {C} (\mathcal {S})} \mathcal {D} \left(f _ {\mathbf {x}, \bar {\mathbf {m}} _ {\ell}, \mathbf {a} _ {\ell + 1} \#} ^ {Y} \mathbb {P} ^ {\mathbf {U} _ {Y} | \mathbf {x}} (\cdot)\right) \tag {33}
$$
and then define
$$
Q _ {i} ^ {+} (\mathbf {x}, \bar {\mathbf {m}} _ {i - 1}, \bar {\mathbf {a}} _ {\ell + 1}, \mathcal {S}) = \sup  _ {\mathcal {M} \in \mathcal {C} (\mathcal {S})} \sum_ {m _ {i}} Q _ {i + 1} ^ {+} (\mathbf {x}, \bar {\mathbf {m}} _ {i - 1}, m _ {i}, \bar {\mathbf {a}} _ {\ell + 1})) \left(f _ {\mathbf {x}, \bar {\mathbf {m}} _ {i - 1}, \mathbf {a} _ {i} \#} ^ {M _ {i}} \mathbb {P} ^ {\mathbf {U} _ {Y} | \mathbf {x}} (m _ {i})\right) \tag {34}
$$
for all  $i\in \{\ell ,\dots ,1\}$  , which results in the sharp upper bound
$$
Q ^ {+} (\mathbf {x}, \bar {\mathbf {a}} _ {\ell + 1}, \mathcal {S}) = Q _ {1} ^ {+} (\mathbf {x}, \bar {\mathbf {a}} _ {\ell + 1}, \mathcal {S}). \tag {35}
$$
For Eq. (33) and monotone  $\mathcal{D}$ , we can directly apply Theorem 1 and obtain
$$
\left. Q _ {\ell + 1} ^ {+} \left(\mathbf {x}, \bar {\mathbf {m}} _ {\ell}, \bar {\mathbf {a}} _ {\ell + 1}, \mathcal {S}\right) = \mathcal {D} \left(\mathbb {P} _ {+} ^ {Y} (\cdot | \mathbf {x}, \bar {\mathbf {m}} _ {\ell}, \mathbf {a} _ {\ell + 1})\right)\right). \tag {36}
$$
For Eq. (34), we need to find an induced distribution  $f_{\mathbf{x}, \bar{\mathbf{m}}_{i-1}, \mathbf{a}_i}^{M_i} \subsetneq \mathbb{P}^{\mathbf{U}_Y|\mathbf{x}}$  on  $M_i$  that is compatible with  $S$  and puts most probability mass on  $m_i$  where  $Q_{i+1}^+(x, \bar{\mathbf{m}}_{i-1}, m_i, \bar{\mathbf{a}}_{\ell+1})$  is large. Hence, we can apply the discrete version of Theorem 1 with  $W = \pi(M_i)$ , where  $\pi \colon \text{supp}(M_i) \to \text{supp}(M_i)$  is a permutation map so that  $\left(Q_{i+1}^+(x, \bar{\mathbf{m}}_{i-1}, \pi(m_i)), \bar{\mathbf{a}}_{\ell+1}\right)_{m_i \in \text{supp}(M_i)}$  is ordered in ascending order. The corresponding update step is shown in Algorithm 1.
C Special cases of the GMSM
In this section, we prove Lemma 1, i.e., we show that all sensitivity models introduced in Sec. 3.3 of the main paper are special cases of our (weighted) GMSM. Recall that we consider settings without mediators (i.e.,  $\ell = 0$ ), and write  $\Gamma = \Gamma_{Y}$  for the sensitivity parameter,  $q(\mathbf{a},\mathbf{x}) = q_{Y}(\mathbf{a},\mathbf{x})$  for the weight function, and  $\mathbf{U} = \mathbf{U}_Y$  for the unobserved confounders. In this case, the weighted GMSM is defined via the confounding restriction
$$
\frac {1}{(1 - \Gamma) q (\mathbf {a} , \mathbf {x}) + \Gamma} \leq \frac {\mathbb {P} (\mathbf {U} = \mathbf {u} \mid \mathbf {x} , \mathbf {a})}{\mathbb {P} (\mathbf {U} = \mathbf {u} \mid \mathbf {x} , d o (\mathbf {A} = \mathbf {a}))} \leq \frac {1}{(1 - \Gamma^ {- 1}) q (\mathbf {a} , \mathbf {x}) + \Gamma^ {- 1}}. \tag {37}
$$
C.1 Marginal sensitivity model (MSM):
The MSM [67] for binary treatment  $\mathbf{A} = A\in \{0,1\}$  is defined via
$$
\frac {1}{\Gamma} \leq \frac {\pi (\mathbf {x})}{1 - \pi (\mathbf {x})} \frac {1 - \pi (\mathbf {x} , \mathbf {u})}{\pi (\mathbf {x} , \mathbf {u})} \leq \Gamma , \tag {38}
$$