SlowGuess/NeurIPS_2023_OCR huggingface dataset:
(i) units  $u$  such that  $Y_{d_0}(u) = 1$ ,  $Y_{d_1}(u) = 1$ , called safe,
(ii) units  $u$  such that  $Y_{d_0}(u) = 1, Y_{d_1}(u) = 0$ , called harmed,
(iii) units  $u$  such that  $Y_{d_0}(u) = 0, Y_{d_1}(u) = 1$ , called helped,
(iv) units  $u$  such that  $Y_{d_0}(u) = 0, Y_{d_1}(u) = 0$ , called doomed.
In decision-making, the goal is to treat as many units who are helped by the treatment, and as few who are harmed by it. As we demonstrate next, the potential outcomes  $Y_{d_0}(u), Y_{d_1}(u)$  depend precisely on the canonical types described above.
Proposition 7 (Canonical Types Decomposition). Let  $\mathcal{M}$  be an SCM compatible with the SFM. Let  $D$  be a binary decision that possibly affects the outcome  $Y$ . Denote by  $(s,d,c,u)(x,z,w)$  the proportion of each of the canonical types from Def. 6, respectively, for a fixed set of covariates  $(x,z,w)$ . It then holds that
$$
P \left(y _ {d _ {1}} \mid x, z, w\right) = c (x, z, w) + s (x, z, w), \tag {46}
$$
$$
P \left(y _ {d _ {0}} \mid x, z, w\right) = d (x, z, w) + s (x, z, w). \tag {47}
$$
$$
\begin{array}{l} \Delta (x, z, w) := P \left(y _ {d _ {1}} \mid x, z, w\right) - P \left(y _ {d _ {0}} \mid x, z, w\right) (48) \\ = c (x, z, w) - d (x, z, w). (49) \\ \end{array}
$$
Proof. Notice that we can write:
$$
\begin{array}{l} P \left(y _ {d _ {1}} \mid x, z, w\right) = P \left(y _ {d _ {1}} = 1, y _ {d _ {0}} = 1 \mid x, z, w\right) + P \left(y _ {d _ {1}} = 1, y _ {d _ {0}} = 0 \mid x, z, w\right) (50) \\ = s (x, z, w) + c (x, z, w). (51) \\ \end{array}
$$
where the first line follows from the law of total probability, and the second by definition. Similarly, we have that
$$
\begin{array}{l} P \left(y _ {d _ {0}} \mid x, z, w\right) = P \left(y _ {d _ {0}} = 1, y _ {d _ {1}} = 1 \mid x, z, w\right) + P \left(y _ {d _ {0}} = 1, y _ {d _ {1}} = 0 \mid x, z, w\right) (52) \\ = s (x, z, w) + d (x, z, w), (53) \\ \end{array}
$$
The proposition shows us that the degree of benefit  $\Delta(x, z, w)$  captures exactly the difference between the proportion of those helped by the treatment, versus those who are harmed by it. From the point of view of the decision-maker, this is very valuable information since higher  $\Delta(x, z, w)$  values indicate a higher utility of treating the group corresponding to covariates  $(x, z, w)$ . This insight can be used to prove Thm. 2, which states that the policy  $D^{*}$  obtained by Alg. 1 is optimal:
Proof. Note that the objective in Eq. 1 can be written as:
$$
\begin{array}{l} \mathbb {E} \left[ Y _ {D} \right] = P \left(Y _ {D} = 1\right) (54) \\ = \sum_ {x, z, w} P \left(Y _ {D} = 1 \mid x, z, w\right) P (x, z, w) (55) \\ = \sum_ {x, z, w} \left[ P \left(Y _ {d _ {1}} = 1, D = 1 \mid x, z, w\right) + P \left(Y _ {d _ {0}} = 1, D = 0 \mid x, z, w\right) \right] P (x, z, w). (56) \\ \end{array}
$$
Eq. 55 follows from the law of total probability, and Eq. 56 from the consistency axiom. Now, note that  $Y_{d_0}, Y_{d_1} \perp D \mid X, Z, W$ , from which it follows that
$$
\begin{array}{l} \mathbb {E} \left[ Y _ {D} \right] = \sum_ {x, z, w} \left[ P \left(y _ {d _ {1}} \mid x, z, w\right) P (D = 1 \mid x, z, w) + P \left(y _ {d _ {0}} \mid x, z, w\right) P (D = 0 \mid x, z, w) \right] \tag {57} \\ * P (x, z, w). \\ \end{array}
$$
By noting that  $P(D = 0 \mid x, z, w) = 1 - P(D = 1 \mid x, z, w)$ , we can rewrite the objective as
$$
\begin{array}{l} \sum_ {x, z, w} \left[ (s (x, z, w) + c (x, z, w)) P (d \mid x, z, w) \right. \tag {58} \\ \left. + (s (x, z, w) + d (x, z, w)) (1 - P (d \mid x, z, w)) \right] P (x, z, w) \\ \end{array}
$$
$$
\begin{array}{l} = \sum_ {x, z, w} [ s (x, z, w) + P (d \mid x, z, w) [ c (x, z, w) - d (x, z, w) ] ] P (x, z, w) (59) \\ = P \left(y _ {d _ {0}} = 1, y _ {d _ {1}} = 1\right) + \sum_ {x, z, w} P (d \mid x, z, w) P (x, z, w) \Delta (x, z, w). (60) \\ \end{array}
$$
Only the second term in Eq. 60 can be influenced by the decision-maker, and optimizing the term is subject to the budget constraint:
$$
\sum_ {x, z, w} P (d \mid x, z, w) P (x, z, w) \leq b. \tag {61}
$$
Such an optimization problem is a simple linear programming exercise, for which the policy  $D^{*}$  from Alg. 1 is a (possibly non-unique) optimal solution.
Finally, as the next proposition shows, the values of  $P(y_{d_1} \mid x, z, w)$ ,  $P(y_{d_0} \mid x, z, w)$  can be used to bound the proportion of different canonical types:
Proposition 8 (Canonical Types Bounds and Tightness). Let  $(s,d,c,u)(x,z,w)$  denote the proportion of each of the canonical types from Def. 6 for a fixed set of covariates  $(x,z,w)$ . Let  $m_{1}(x,z,w) = P(y_{d_{1}}\mid x,z,w)$  and  $m_0(x,z,w) = P(y_{d_0}\mid x,z,w)$  and suppose that  $m_{1}(x,z,w)\geq m_{0}(x,z,w)$ . We then have that (dropping  $(x,z,w)$  from the notation):
$$
d \in [ 0, \min  \left(m _ {0}, 1 - m _ {1}\right) ], \tag {62}
$$
$$
c \in [ m _ {1} - m _ {0}, m _ {1} ]. \tag {63}
$$
In particular, the above bounds are tight, meaning that there exists an SCM  $\mathcal{M}$ , compatible with the observed data, that attains each of the values within the interval. Under monotonicity, the bounds collapse to single points, with  $d = 0$  and  $c = m_1 - m_0$ .
Figure 5: Canonical types solution space. The unit simplex is shown in yellow, the  $s + c = m_{1}$  plane in blue, and the  $s + d = m_{0}$  plane in red. The solution space for the possible values of  $(s(x,z,w),c(x,z,w),d(x,z,w))$  lies at the intersection of the red and blue planes, indicated by the dashed black line.
Proof. There are three linear relations that the values  $s, d, c, u$  obey:
$$
s + c = m _ {1}, \tag {64}
$$
$$
s + d = m _ {0}, \tag {65}
$$
$$
s + u + d + c = 1. \tag {66}
$$
On top of this, we know that  $s, d, c, u$  are all non-negative. Based on the linear relations, we know that the following parametrization of the vector  $(s, d, c, u)$  holds
$$
(s, d, c, u) = \left(m _ {0} - d, d, d + m _ {1} - m _ {0}, 1 - m _ {1} - d\right), \tag {67}
$$
which represents a line in the 3-dimensional space  $(s,d,c)$ . In particular, we know that the values of  $(s,d,c)$  have to lie below the unit simplex in Fig. 5 (in yellow). In particular, the red and the blue planes represent the linear constraints from Eq. 64-65. The line parametrized in Eq. 67 lies at the intersection of the red and blue planes. Notice that  $d\in [0,\min (m_0,1 - m_1)]$  since each of the elements in Eq. 67 is positive. This bound on  $d$  also implies that  $c\in [m_1 - m_0,m_1]$ . Finally, we need to construct an  $f_{Y}$  mechanism that achieves any value within the bounds. To this end, define
$$
f _ {Y} (x, z, w, d, u _ {y}) = \mathbb {1} (u _ {y} \in [ 0, s ]) + d * \mathbb {1} (u _ {y} \in [ s, s + c ]) + \tag {68}
$$
$$
(1 - d) * \mathbb {1} \left(u _ {y} \in [ s + c, s + c + d ]\right), \tag {69}
$$
$$
u _ {y} \sim \operatorname {U n i f} [ 0, 1 ]. \tag {70}
$$
which is both feasible and satisfies the proportion of canonical types to be  $(s,d,c,u)$ .
C Proof of Thm. 4
Proof. The first part of the theorem states the optimality of the  $D^{CF}$  policy in the counterfactual world. Given that the policy uses the true benefit values from the counterfactual world, we apply the argument of Thm. 2 to prove its optimality.
We next prove the optimality of the  $D^{UT}$  policy from Alg. 3. In Step 2 we check whether all individuals with a positive benefit can be treated. If yes, then the policy  $D^{UT}$  is the overall optimal policy. If not, in Step 6 we check whether the overall optimal policy has a disparity bounded by  $M$ . If this is the case,  $D^{UT}$  is the overall optimal policy for a budget  $\leq b$ , and cannot be strictly improved. For the remainder of the proof, we may suppose that  $D^{UT}$  uses the entire budget  $b$  (since we are operating under scarcity), and that  $D^{UT}$  has introduces a disparity  $\geq M$ . We also assume that the benefit  $\Delta$  admits a density, and that probability  $P(\Delta \in [a,b] \mid x) > 0$  for any  $[a,b] \subset [0,1]$  and  $x$ .
Let  $\delta^{(x_0)},\delta^{(x_1)}$  be the two thresholds used by the  $D^{UT}$  policy. Suppose that  $\widetilde{D}^{UT}$  is a policy that has a higher expected utility and introduces a disparity bounded by  $M$ , or treats everyone in the disadvantaged group. Then there exists an alternative policy  $\overline{D}^{UT}$  with a higher or equal utility that takes the form
$$
\bar {D} ^ {U T} = \left\{ \begin{array}{l} 1 \text {i f} \Delta \left(x _ {1}, z, w\right) > \delta^ {\left(x _ {1}\right) ^ {\prime}}, \\ 1 \text {i f} \Delta \left(x _ {0}, z, w\right) > \delta^ {\left(x _ {0}\right) ^ {\prime}}, \\ 0 \text {o t h e r w i s e .} \end{array} \right. \tag {71}
$$
with  $\delta^{(x_0)'}$ ,  $\delta^{(x_1)'}$  non-negative (otherwise, the policy can be trivially improved). In words, for any policy  $\overline{D}^{UT}$  there is a threshold based policy that is no worse. The policy  $D^{UT}$  is also a threshold based policy. Now, if we had
$$
\delta^ {\left(x _ {1}\right) ^ {\prime}} <   \delta^ {\left(x _ {1}\right)} \tag {72}
$$
$$
\delta^ {(x _ {0}) ^ {\prime}} <   \delta^ {(x _ {0})} \tag {73}
$$
it would mean policy  $\overline{D}^{UT}$  is using a larger budget than  $D^{UT}$ . However,  $D^{UT}$  uses a budget of  $b$ , making  $\overline{D}^{UT}$  infeasible. Therefore, we must have that
$$
\delta^ {(x _ {1}) ^ {\prime}} <   \delta^ {(x _ {1})}, \delta^ {(x _ {0}) ^ {\prime}} > \delta^ {(x _ {0})} \text {o r} \tag {74}
$$
$$
\delta^ {(x _ {1}) ^ {\prime}} > \delta^ {(x _ {1})}, \delta^ {(x _ {0}) ^ {\prime}} <   \delta^ {(x _ {0})}. \tag {75}
$$
We first handle the case in Eq. 74. In this case, the policy  $\overline{D}^{UT}$  introduces a larger disparity than  $D^{UT}$ . Since the disparity of  $D^{UT}$  is at least  $M$ , the disparity of  $\overline{D}^{UT}$  is strictly greater than  $M$ . Further, note that  $\delta^{(x_0)'} > \delta^{(x_0)} \geq 0$ , showing that  $\overline{D}^{UT}$  does not treat all individuals with a positive benefit in the disadvantaged group. Combined with a disparity of  $> M$ , this makes the policy  $\overline{D}^{UT}$  infeasible.
For the second case in Eq. 75, let  $U(\delta_0,\delta_1)$  denote the utility of a threshold based policy:
$$
U \left(\delta_ {0}, \delta_ {1}\right) = \mathbb {E} \left[ \Delta \mathbb {1} \left(\Delta > \delta_ {0}\right) \mathbb {1} \left(X = x _ {0}\right) \right] + \mathbb {E} \left[ \Delta \mathbb {1} \left(\Delta > \delta_ {1}\right) \mathbb {1} \left(X = x _ {1}\right) \right]. \tag {76}
$$
Thus, we have that
$$
\begin{array}{l} U \left(\delta^ {\left(x _ {0}\right)}, \delta^ {\left(x _ {1}\right)}\right) - U \left(\delta^ {\left(x _ {0}\right) ^ {\prime}}, \delta^ {\left(x _ {1}\right) ^ {\prime}}\right) = \mathbb {E} \left[ \Delta \mathbb {1} \left(\Delta \in \left[ \delta^ {\left(x _ {1}\right)}, \delta^ {\left(x _ {1}\right) ^ {\prime}} \right]\right) \mathbb {1} (X = x _ {1}) \right] (77) \\ - \mathbb {E} [ \Delta \mathbb {1} (\Delta \in [ \delta^ {(x _ {0}) ^ {\prime}}, \delta^ {(x _ {0})} ]) \mathbb {1} (X = x _ {0}) ] (78) \\ \geq \delta^ {(x _ {1})} \mathbb {E} \left[ \mathbb {1} \left(\Delta \in \left[ \delta^ {(x _ {1})}, \delta^ {(x _ {1}) ^ {\prime}} \right]\right) \mathbb {1} \left(X = x _ {1}\right) \right] (79) \\ - \delta^ {(x _ {0})} \mathbb {E} [ \mathbb {1} (\Delta \in [ \delta^ {(x _ {0}) ^ {\prime}}, \delta^ {(x _ {0})} ]) \mathbb {1} (X = x _ {0}) ] (80) \\ \geq \delta^ {(x _ {0})} \left(\mathbb {E} \left[ \mathbb {1} \left(\Delta \in \left[ \delta^ {\left(x _ {1}\right)}, \delta^ {\left(x _ {1}\right) ^ {\prime}} \right]\right) \mathbb {1} (X = x _ {1}) \right] \right. (81) \\ - \mathbb {E} \left[ \mathbb {1} \left(\Delta \in \left[ \delta^ {\left(x _ {0}\right) ^ {\prime}}, \delta^ {\left(x _ {0}\right)} \right]\right) \mathbb {1} (X = x _ {0}) \right] (82) \\ = \delta^ {(x _ {0})} \left(P \left(\Delta \in \left[ \delta^ {(x _ {1})}, \delta^ {(x _ {1}) ^ {\prime}} \right], x _ {1}\right) \right. (83) \\ - P \left(\Delta \in \left[ \delta^ {\left(x _ {0}\right) ^ {\prime}}, \delta^ {\left(x _ {0}\right)} \right], x _ {0}\right)\left. \right) (84) \\ \geq 0, (85) \\ \end{array}
$$
where the last line follows from the fact that  $\overline{D}^{UT}$  has a budget no higher than  $D^{UT}$ . Thus, this case also gives a contradiction.
Therefore, we conclude that policy  $D^{UT}$  is optimal among all policies with a budget  $\leq b$  that either introduce a bounded disparity in resource allocation  $|P(d \mid x_1) - P(d \mid x_0)| \leq M$  or treat everyone with a positive benefit in the disadvantaged group.
D Equivalence of CF and UT Methods in Alg. 3
A natural question to ask is whether the two methods in Alg. 3 yield the same decision policy in terms of the individuals that are selected for treatment. To examine this issue, we first define the notion of counterfactual crossing:
Definition 7 (Counterfactual crossing). We say that two units of the population  $u_{1}, u_{2}$  satisfy counterfactual crossing with respect to an intervention  $C$  if
(i)  $u_{1}, u_{2}$  belong to the same protected group,  $X(u_{1}) = X(u_{2})$ .
(ii) unit  $u_{1}$  has a higher factual benefit than  $u_{2}$ ,  $\Delta(u_{1}) > \Delta(u_{2})$ ,
(iii) unit  $u_{1}$  has a lower counterfactual benefit than  $u_{2}$  under the intervention  $C$ ,  $\Delta_C(u_1) < \Delta_C(u_2)$ .
In words, two units satisfy counterfactual crossing if  $u_{1}$  has a higher benefit than  $u_{2}$  in the factual world, while in the counterfactual world the benefit is larger for the unit  $u_{2}$ . Based on this notion, we can give a condition under which the causal and utilitarian approaches are equivalent:
Proposition 9 (Causal and Utilitarian Equivalence). Suppose that no two units of the population satisfy counterfactual crossing with respect to an intervention  $C$ , and suppose that the distribution of the benefit  $\Delta$  admits a density. Then, the causal approach based on applying Alg. 1 with counterfactual benefit  $\Delta_C$ , and the utilitarian approach based on factual benefit  $\Delta$  and the disparity  $M$  defined in Eq. 29, will select the same set of units for treatment.
Proof. The policy  $D^{UT}$  treats individuals who have the highest benefit  $\Delta$  in each group. The  $D^{CF}$  policy treats individuals with the highest counterfactual benefit  $\Delta_C$ . Importantly, the policies treat the same number of individuals in the  $x_0$  and  $x_1$  groups. Note that, in the absence of counterfactual crossing, the relative ordering of the values of  $\Delta$ ,  $\Delta_C$  does not change, since
$$
\Delta (u _ {1}) > \Delta (u _ {2}) \iff \Delta_ {C} (u _ {1}) > \Delta_ {C} (u _ {2}). \tag {86}
$$
Thus, since both policies pick the same number of individuals, and the relative order of  $\Delta, \Delta_C$  is the same,  $D^{UT}$  and  $D^{CF}$  will treat the same individuals.
E Experiment
We apply the causal framework of outcome control to the problem of allocating mechanical ventilation in intensive care units (ICUs), which is recognized as an important task when resources are scarce [5], such as during the COVID-19 pandemic [40, 42]. An increasing amount of evidence indicates that a sex-specific bias in the process of allocating mechanical ventilation may exist [27], and thus the protected attribute  $X$  will be sex ( $x_0$  for females,  $x_1$  for males).
To investigate this issue using the tools developed in this paper, we use the data from the MIMIC-IV dataset [17, 16] that originates from the Beth Israel Deaconess Medical Center in Boston, Massachusetts. In particular, we consider the cohort of all patients in the database admitted to the ICU. Patients who are mechanically ventilated immediately upon entering the ICU are subsequently removed. By focusing on the time window of the first 48 hours from admission to ICU, for each patient we determine the earliest time of mechanical ventilation, labeled  $t_{MV}$ . Since mechanical ventilation is used to stabilize the respiratory profile of patients, for each patient we determine the average oxygen saturation in the three-hour period  $[t_{MV} - 3, t_{MV}]$  prior to mechanical ventilation, labeled  $\mathrm{O}_2$ -pre. We also determine the oxygen saturation in the three-hour period following ventilation  $[t_{MV}, t_{MV} + 3]$ , labeled  $\mathrm{O}_2$ -post. For controls (patient not ventilated at any point in the first 48 hours), we take the reference point as 12 hours after ICU admission, and calculate the values in three hours before and after this time. Patients' respiratory stability, which represents the outcome of interest  $Y$ , is measured as follows:
$$
Y := \left\{ \begin{array}{l} 0 \text {i f O} _ {2} - \text {p o s t} \geq 9 7, \\ - \left(\mathrm {O} _ {2} - \text {p o s t} - 9 7\right) ^ {2} \text {o t h e r w i s e .} \end{array} \right. \tag {87}
$$
Values of oxygen saturation above 97 are considered stable, and the larger the distance from this stability value, the higher the risk for the patient. We also collect other important patient characteristics before intervention that are the key predictors of outcome, including the SOFA score [39], respiratory rate, and partial oxygen pressure  $(\mathrm{PaO}_2)$ . The data loading is performed using the ricu R-package [4], and the source code for reproducing the entire experiment can be found here.
(a) Disparity in  $D^{curr}$  decomposed.
Figure 6: Analyzing the existing policy  $D^{curr}$ .
(b) Benefit fairness criterion on  $D^{curr}$ .
Step 1: Obtain the SFM. After obtaining the data, the first step of the modeling is to obtain the standard fairness model (SFM). The SFM specification is the following:
$$
X = \text {s e x}, \tag {88}
$$
$$
Z = \text {a g e}, \tag {89}
$$
$$
W = \left\{\text {S O F A} \right. \text {s c o r e ,} \text {r e s p i r a t o r y} \text {r a t e ,} \mathrm {P a O} _ {2} \}, \tag {90}
$$
$$
D = \text {m e c h a n i c a l} \tag {91}
$$
$$
Y = \text {r e s p i r a t o r y} \tag {92}
$$
Step 2: Analyze the current policy using Alg. 2. Then, we perform an analysis of the currently implemented policy  $D^{curr}$ , by computing the disparity in resource allocation,  $P(d^{curr} \mid x_1) - P(d^{curr} \mid x_0)$ , and also the causal decomposition of the disparity into its direct, indirect, and spurious contributions:
$$
P \left(d ^ {\text {curr}} \mid x _ {1}\right) - P \left(d ^ {\text {curr}} \mid x _ {0}\right) = \underbrace {1.6 \%} _ {\text {DE}} + \underbrace {0.3 \%} _ {\text {IE}} + \underbrace {0.3 \%} _ {\text {SE}}. \tag{93}
$$
The results are shown in Fig. 6a, with vertical bars indicating  $95\%$  confidence intervals obtained using bootstrap. The decomposition demonstrates that the decision to mechanically ventilate a patient has a large direct effect of the protected attribute  $X$ , while the indirect and spurious effects explain a smaller portion of the disparity in resource allocation. We then compute
$$
P \left(d ^ {c u r r} \mid \Delta = \delta , x _ {1}\right) - P \left(d ^ {c u r r} \mid \Delta = \delta , x _ {0}\right), \tag {94}
$$
across the deciles of the benefit  $\Delta$ . In order to do so, we need to estimate the conditional potential outcomes  $Y_{d_0}, Y_{d_1}$ , and in particular their difference  $\mathbb{E}[Y_{d_1} - Y_{d_0} \mid x, z, w]$ . We fit an xgboost model which regresses  $Y$  on  $D, X, Z$ , and  $W$ , to obtain the fit  $\hat{Y}$ . The learning rate was fixed at  $\eta = 0.1$ , and the optimal number of rounds was chosen via 10-fold cross-validation. We then use the obtained model to generate predictions
$$
\widehat {Y} _ {d _ {1}} (x, z, w), \widehat {Y} _ {d _ {0}} (x, z, w), \tag {95}
$$
from which we can estimate the benefit  $\Delta$ . The results for the probability of treatment given a fixed decile are shown in Fig. 6b. Interestingly, at each decile, women are less likely to be mechanically ventilated, indicating a possible bias.
Step 3: Apply Alg. 1 to obtain  $D^{*}$ . Our next step is to introduce an optimal policy that satisfies benefit fairness. To do so, we make use of the benefit values. In our cohort of 50,827 patients, a total of 5,404 (10.6%) are mechanically ventilated. We assume that the new policy  $D^{*}$  needs to achieve the same budget. Therefore, we bin patients according to the percentile of their estimated benefit  $\Delta$ . For the percentiles [90%, 100%], all of the patients are treated. In the 89-90 percentile, only 60% of the patients can be treated. We thus make sure that
$$
P \left(d ^ {*} \mid \Delta \in \left[ \delta_ {89 \%,} \delta_ {90 \%} \right], x _ {1}\right) = P \left(d ^ {*} \mid \Delta \in \left[ \delta_ {89 \%,} \delta_ {90 \%} \right], x _ {0}\right) = 0.6. \tag{96}
$$
Due to the construction, the policy  $D^{*}$  satisfies the benefit fairness criterion from Def. 2.
(a) Disparity in  $D^{*}$  decomposed.
Figure 7: Causal analysis of  $D^{*}$  and  $\Delta$  using Alg. 2.
(b) Benefit  $\Delta$  disparity decomposition.
Step 4: Apply Alg. 2 to analyze  $D^{*}$ . We next decompose the disparity of the new policy  $D^{*}$ , and also decompose the disparity in the benefit  $\Delta$ . We obtain the following results:
$$
P \left(d ^ {*} \mid x _ {1}\right) - P \left(d ^ {*} \mid x _ {0}\right) = \underbrace{0.1 \%}_{\text {DE}} + \underbrace{0.6 \%}_{\text {IE}} + \underbrace{0.2 \%}_{\text {SE}}, \tag{97}
$$
$$
\mathbb {E} (\Delta \mid x _ {1}) - \mathbb {E} (\Delta \mid x _ {0}) = \underbrace {0 . 0 8} _ {\mathrm {D E}} + \underbrace {0 . 2 1} _ {\mathrm {I E}} + \underbrace {0 . 0 4} _ {\mathrm {S E}}. \tag {98}
$$
The two decompositions are also visualized in Fig. 7. Therefore, even after applying benefit fairness, some disparity between the sexes remains. The causal analysis reveals that males require more mechanical ventilation because they are more severely ill (indirect effect). They also require more mechanical ventilation since they are older (spurious effect), although this effect is not significant. Finally, males also seem to benefit more from treatment when all other variables are kept the same (direct effect, see Fig. 7b). We note that using Alg. 1 has reduced the disparity in resource allocation, with a substantial reduction of the direct effect (see Eq. 93 vs. Eq. 97).
Step 5: Apply Alg. 3 to create  $D^{CF}$ . In the final step, we wish to remove the direct effect of sex on the benefit  $\Delta$ . To construct the new policy  $D^{CF}$  we will make use of Alg. 3. Firstly, we need to compute the counterfactual benefit values, in the world where  $X = x_{1}$  along the direct pathway, while  $W$  attains its natural value  $W_{X(u)}(u)$ . That is, we wish to estimate  $\Delta_{x_1,W_{X(u)}}$  for all patients in the cohort. For the computation of the counterfactual values, we make use of the xgboost model developed above. In particular, we use the fitted model to estimate the potential outcomes
$$
\widehat {Y} _ {d _ {0}, x _ {1}, W _ {X (u)}}, \widehat {Y} _ {d _ {1}, x _ {1}, W _ {X (u)}}. \tag {99}
$$
The adjusted potential outcomes allow us to estimate  $\Delta_{x_1,W_{X(u)}}$ , after which we obtain the policy  $D^{CF}$  that satisfies the CBF criterion from Def. 3.
After constructing  $D^{CF}$ , we have a final look at the disparity introduced by this policy. By another application of Alg. 2, we obtain that
$$
P(d^{CF}\mid x_{1}) - P(d^{CF}\mid x_{0}) = \underbrace{0\%}_{\text{DE}} + \underbrace{0.5\%}_{\text{IE}} + \underbrace{0.2\%}_{\text{SE}}.
$$
Therefore, we can see that the removal of the direct effect from the benefit  $\Delta$  resulted in a further decrease in the overall disparity. The comparison of the causal decompositions for the original policy  $D^{curr}$ , optimal policy  $D^{*}$  obtained from Alg. 1, and the causally fair policy  $D^{CF}$  is shown in Fig. 8.
Figure 8: Causal comparison of policies  $D^{curr}$ ,  $D^{*}$ , and  $D^{CF}$ .
F Connection of Benefit Fairness and Demographic Parity
In this appendix, we discuss the connection of the benefit fairness (BF) criterion with demographic parity (DP). The connection is given in the following formal result.
Proposition 10 (Benefit Fairness & Demographic Parity). Suppose that the distribution of the benefit  $\Delta$  is equal between the groups  $x_0, x_1$ , that is
$$
\Delta \mid x _ {1} \stackrel {d} {=} \Delta \mid x _ {0} \tag {100}
$$