Abstract
Estimating average causal effect (ACE) is useful whenever we want to know theeffect of an intervention on a given outcome. In the absence of a randomizedexperiment, many methods such as stratification and inverse propensityweighting have been proposed to estimate ACE. However, it is hard to know whichmethod is optimal for a given dataset or which hyperparameters to use for achosen method. To this end, we provide a framework to characterize the loss ofa causal inference method against the true ACE, by framing causal inference asa representation learning problem. We show that many popular methods, includingbackdoor methods can be considered as weighting or representation learningalgorithms, and provide general error bounds for their causal estimates. Inaddition, we consider the case when unobserved variables can confound thecausal estimate and extend proposed bounds using principles of robuststatistics, considering confounding as contamination under the Hubercontamination model. These bounds are also estimable; as an example, we provideempirical bounds for the Inverse Propensity Weighting (IPW) estimator and showhow the bounds can be used to optimize the threshold of clipping extremepropensity scores. Our work provides a new way to reason about competingestimators, and opens up the potential of deriving new methods by minimizingthe proposed error bounds.
Quick Read (beta)
Quantifying Error in the Presence of Confounders for Causal Inference
Abstract
Estimating average causal effect (ACE) is useful whenever we want to know the effect of an intervention on a given outcome. In the absence of a randomized experiment, many methods such as stratification and inverse propensity weighting have been proposed to estimate ACE. However, it is hard to know which method is optimal for a given dataset or which hyperparameters to use for a chosen method. To this end, we provide a framework to characterize the loss of a causal inference method against the true ACE, by framing causal inference as a representation learning problem. We show that many popular methods, including backdoor methods can be considered as weighting or representation learning algorithms, and provide general error bounds for their causal estimates. In addition, we consider the case when unobserved variables can confound the causal estimate and extend proposed bounds using principles of robust statistics, considering confounding as contamination under the Huber contamination model. These bounds are also estimable; as an example, we provide empirical bounds for the Inverse Propensity Weighting (IPW) estimator and show how the bounds can be used to optimize the threshold of clipping extreme propensity scores. Our work provides a new way to reason about competing estimators, and opens up the potential of deriving new methods by minimizing the proposed error bounds.
Quantifying Error in the Presence of Confounders for Causal Inference
Rathin Desai Microsoft Research India Bangalore, Karnataka [email protected] Amit Sharma Microsoft Research India Bangalore, Karnataka [email protected]
noticebox[b]Preprint. Under review.\[email protected]
1 Introduction
Consider the canonical causal inference problem where the goal is to find the effect of a treatment $T$ on some outcome $Y$, as shown in the structural causal model in Figure (a)a. This is relevant for estimating the effect of any fixed intervention, such as setting a system parameter, a medical intervention hernanbook or a policy in social science settings morgan2015counterfactuals . Here $W$ and $U$ are observed and unobserved common causes respectively, which affect the observed conditional distribution $\mathrm{Pr}(YT)$. To estimate the causal effect of $T$, methods typically condition on the observed common causes $W$ using the “backdoor” formula pearl2009book , including methods such as stratification lunceford2004stratification , matching rubin1996matching , and inverse weighting rosenbaum1983central . All of these methods work under the “ignorability" or the “selection on observables" assumption, where $U$ is assumed to have no effect once we condition on $W$ (i.e. $\mathrm{Pr}(YT,W)=\mathrm{Pr}(YT,W,U)$). In practice, however, ignorability is seldom satisfied and its violation can lead to significant errors, even changing the direction of the effect estimate. Because $U$ is unobserved, current methods provide no bounds on the error in a causal effect estimate when the assumption is violated. This makes it hard to compare methods for a given dataset, or to assess sensitivity of an estimate to unobserved confounding, except by simplistic simulations of the effect of $U$ rosenbaum2002observational .
In this paper, we provide a general framework for estimating error for causal inference methods, both in the presence and absence of $U$. Our insight is that the causal inference problem can be framed as a domain adaptation mansour2009domain problem, where the target distribution is generated from a (hypothetical) randomized experiment on $T$, as shown in Figure (b)b. Under this target distribution $P$, the observed effect $P(YT)$ is the same as the causal effect, $P(Ydo(T))$ since $T$ is no longer affected by $W$ or $U$ pearl2009book . The goal of causal inference then is to use data from a source distribution $Q$ and estimate a function that approximates $P(YT)$. Alternatively, one can consider this as a task of learning an intermediate distribution R (or a representation), such that $R(YT)$ will be as close as possible to $P(YT)$. In this paper, using the lens of domain adaptation mansour2009domain , we provide bounds on the error of such estimators for the average causal effect (ACE), based on distance (bias) of the intermediate distribution $R$ from $P$ and variance in estimating it. In particular, we show that many causal inference methods such as stratification and inverse propensity weighting (IPW) can be considered as learning an intermediate representation.
When $U$ is ignorable, we provide bounds that separate out the effects of bias and variance in choosing $R$ and derive a procedure to estimate them from data. Empirical simulations show the value of the proposed error bound in evaluating different intermediate representations, and correspondingly, causal inference algorithms. For instance, our bound can be used to select the optimal threshold for clipping extreme probabilities—a common technique in weighting algorithms such as IPW—in order to minimize error. When $U$ is not ignorable, we utilize theory from robust estimators to characterize $U$’s effect on $Y$. The intuition is that confounding effect of $U$ on $Y$ can be considerd as contamination (noise) added to true function between $T$ and $Y$. In addition, we assume that this noise affects only a fraction of input data rows. Such an assumption is plausible whenever effect of $U$ is specific to certain units, for example, unobserved genes may only affect some people’s health outcome and be ignorable for other people. We use the Hubercontamination model huber1992robust to model this noise, provide a robust estimator for the causal effect lai2016agnostic , and bound its error under the assumption that $U$ only affects a fraction of all outcomes $Y$. When such an assumption is not plausible, the bounds still allow us to study the sensitivity of the error as the amount of contamination (confounding) by $U$ is changed. Overall, our error bounds on causal estimators provides a principled way to compare different estimators and conduct sensitivity analysis of causal estimates with minimal parametric assumptions.
2 Background & Contributions
2.1 Defining predictive and causal effect
We first define the average causal effect (ACE) and show its connection to the average predictive effect. Let $V=\{W,T,Y\}$ be the set of observed variables. $T$ represents the treatment variable and $Y$ the outcome variable. $W$ represents the set of all observed common causes of $T$ and $Y$, and $U$ denotes the set of all unobserved common causes of $T$ and $Y$. Throughout, we assume that the treatment is binary, $T\in \{0,1\}$, where $T=1$ denotes that a treatment was assigned and otherwise for $T=0$. $Y$ and $W$ can be discrete or continuous. $U$ are unobserved common causes and we make no assumptions about them. Figure (a)a shows this observed data distribution as the source distribution $Q$, using the structural causal graph pearl2009book notation. Vertices represent variables and edges represent the potential causal link between these variables.
Under the source distribution $Q$, we define the average predictive effect (APE) of $T$ on $Y$ as:
$$AP{E}_{Q}={E}_{Q}[YT=1]{E}_{Q}[YT=0]$$  (1) 
Intuitively, APE captures the correlation between $T$ and $Y$. In general, correlation is not a sufficient condition to imply that the treatment had actually caused the observed outcome. This is because Reichenbach’s common cause principle states that if two random variables $T$ and $Y$ are statistically dependent $(T\overline{)\phantom{\rule{1.66666666666667pt}{0ex}}}\u27c2\u27c2Y)$, then there exists a third variable, say $W$ that can causally influence both. Thus, using the dooperator pearl2009book , we can write the average causal effect of T on Y as,
$ACE$  $\triangleq E[Ydo(T=1)]E[Ydo(T=0)]$  (2) 
where $do(T=1)$ operator denotes setting the value of $T=1$ independent of all ancestors of $T$ in the causal graph. A randomized experiment where one randomizes $T$ and then observes effect on $Y$ is one way for estimating the ACE. Due to randomization, any effect of W or U on T is wiped out and thus the method is considered as a “gold standard” for ACE. Effectively, randomization constructs a new distribution $P$ where there are no backdoor paths that confound effect of T on Y and thus average predictive effect equals ACE (formally, due to Rule2 of docalculus pearl2009book ). We call this the target distribution $P$ and write:
$$AP{E}_{P}={E}_{P}[YT=1]{E}_{P}[YT=0]=E[Ydo(T=1)]E[Ydo(T=0)]=ACE$$  (3) 
2.2 Causal inference methods
Without a randomized experiment, however, the ACE cannot be identified from observational data from $Q$. Methods for causal inference typically make the ignorability assumption, implying that U does not any additional effect after conditioning on the effect of W. That is, $\mathrm{Pr}(YT,W)=\mathrm{Pr}(YT,W,U)$. In graphical language, conditioning on W “dseparates” $T$ and $Y$ in a modified graph that has no outgoing edges from $T$. Under this assumption, various methods have been proposed using the ideas of conditioning or weighting; for a review see hernanbook ; rosenbaum2002observational ; rubin1996matching .
In conditioningbased methods, we separate data into strata based on $W$, estimate the predictive effect in each stratum which is equal to the causal effect, and then use the backdoor formula pearl2009book to aggregate the estimate. This method is called stratification (matching when each stratum is of size 1).
$Q(YW,T=1)=P(YW,T=1)\Rightarrow E(Ydo(T=1))={\displaystyle \sum _{W}}{E}_{Q}(YW,T=1)Q(W)$  (4) 
Alternatively, in weightingbased methods, one can weight samples from the source data Q to resemble a sample from P. In other words, we ensure that the treatment assignment probability $Q(T=1W)$ matches the target distribution $P$ as far as possible. This is achieved using importance sampling, or a common variant called inverse propensity weighting where each sample point’s weight is inversely proportional to its probability of occurence in the data. This weighting gives more weight to samples that do not occur frequently due to effect from $W$, thus compensating for selection bias in $Q(T=1)$. Assuming $n$ is the number of samples from Q, we write:
$$\widehat{IPW}=\frac{1}{n}\left(\sum _{i=1}^{n}\frac{{T}_{i}*{Y}_{i}}{Q({T}_{i}=1{W}_{i})}\sum _{i=1}^{n}\frac{(1{T}_{i})*{Y}_{i}}{1Q({T}_{i}=1{W}_{i})}\right)$$  (5) 
2.3 Our contributions
We make the following contributions:

•
Using the relationship between APE and ACE, we formulate causal inference as the problem of learning a representation R such that $AP{E}_{R}$ approximates $AP{E}_{P}$. Specifically, we use a probability weighting method to construct a representation R, and show that popular methods such as stratification and IPW are special cases of the weighting method. (Section 3)

•
We provide bounds for the loss in estimating ACE as $AP{E}_{R}$ and separate out the loss incurred due to bias and variance in selecting $R$. We apply these bounds to develop a datadriven method for selecting the clipping threshold of an IPW estimator. (Section 4)

•
When unobserved confounders $U$ may be present, we extend these bounds using recent work in robust estimation and provide the first results that can characterize error in the presence of unobserved confounding. (Section 5)
3 Causal Inference as Representation Learning
As discussed above, the problem of estimating ACE can be considered as learning the target distribution $P$ given data from $Q$ and then estimating the observed conditional expectation ${E}_{P}[YT]$. $Q$ can be considered as the factual distribution, and $P$ the counterfactual distribution corresponding to the question—what would have happened if we intervened on $T$ without changing anything else? Our goal is to learn an intermediate distribution $R$ that approximates $P$. This setup is similar to domain adaptation, except that instead of learning a function $f$ as in Mansour et al. mansour2009domain , we learn a new representation of the data and estimate the same APE function.
3.1 Defining the weighting method
Given this formulation, a key question is how to generate a representation such that its APE will be close to ACE. We first define a consistent estimator for $APE$ under any distribution $R$, $h({x}_{R})$. Then, the estimator ($h$), and the APE under infinite samples (${h}^{\mathrm{\infty}}$) can be written as:
$h({x}_{R})={\widehat{E}}_{R}[YT=1]{\widehat{E}}_{R}[YT=0];$  ${h}^{\mathrm{\infty}}({x}_{R})={E}_{R}[YT=1]{E}_{R}[YT=0]$  (6) 
By the above definition of $h$, $ACE={h}^{\mathrm{\infty}}({x}_{P})$. Next, we define a class of distributions given by weighting of $Q$. Following Johansson et al. (johansson2018learning, ), we generate a weighted representation $R$ from our source distribution $Q$ such that $h({x}_{R})$ is an estimator for ACE.
Definition 3.1.
Let $Q(W,T,Y)$ be the source distribution. We define a weighting function $\beta (W,T)$ to generate a representation $R$ such that,
$$\beta (W,T)=\frac{R(WT)}{Q(WT)}=\frac{R(TW)}{Q(TW)}$$ 
and that $R$ is a valid probability distribution, $\forall W,TR(W,T)\ge 0$, ${\sum}_{W}{\sum}_{T}R(W,T)=1$.
3.2 IPW and stratification as weighting methods
We now show that the IPW estimator and backdoor methods such as stratification can be considered as a weighted $\beta $ estimator.
Theorem 3.2.
Consider the causal graphical model in Figure (c)c where the observed common causes $W$ are the only confounders. The IPW estimator can be written as a representation $R$ where $\beta \mathrm{(}W\mathrm{,}T\mathrm{=}t\mathrm{)}\mathrm{=}{\displaystyle \frac{R\mathrm{(}W\mathrm{}T\mathrm{=}t\mathrm{)}}{Q\mathrm{(}W\mathrm{}T\mathrm{=}t\mathrm{)}}}\mathrm{=}{\displaystyle \frac{Q\mathit{}\mathrm{(}W\mathrm{)}}{Q\mathrm{(}W\mathrm{}T\mathrm{=}t\mathrm{)}}}$.
Proof.
Here we consider only the $T=1$ part of IPW estimator from the RHS of Equation 5. The proof is symmetric for $T=0$.
$IP{W}_{T=1}$  $={\displaystyle \frac{1}{n}}\left({\displaystyle \sum _{i=1}^{n}}{\displaystyle \frac{{T}_{i}*{Y}_{i}}{Q({T}_{i}{W}_{i})}}\right)={E}_{Q}\left[{\displaystyle \frac{{1}_{T=1}Y}{Q(T=1W)}}\right]={\displaystyle \sum _{W}}{\displaystyle \frac{{E}_{Q}[YT=1,W]Q(T=1W)Q(W)}{Q(T=1W)}}$  (7)  
$={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}{\displaystyle \frac{YQ(YT=1,W)Q(T=1W)Q(W)}{Q(T=1W)}}={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}YQ(YT=1,W)Q(W)$  (8) 
where ${1}_{T=1}$ is an indicator function that is 1 whenever T is 1 and 0 otherwise. The second equality above utilized that $T$ is binary.
Similarly, we can write the the first part $(T=1)$ of the $APE$ under $R$ as:
$AP{E}_{T=1}^{R}={\displaystyle \sum _{Y}}YR(YT=1)={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}YR(YT=1,W)R(WT=1)={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}YQ(YT=1,W)R(WT=1)$ 
where the last equality is since $Q(YT=1,W)=R(YT=1,W)$ (ignorability assumption from Equation 4). Further, using $\beta (W,T)Q(WT=1)=R(WT=1)$ (by definition),
$AP{E}_{T=1}^{R}=={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}YQ(YT=1,W)\beta (W,T=1)Q(WT=1)$ 
Comparing the two terms for $IP{W}_{T=1}$ and $AP{E}_{T=1}^{R}$, if $\beta (W,T=1)={\displaystyle \frac{Q(W)}{Q(WT=1)}}$, then $IP{W}_{T=1}=AP{E}_{T=1}^{R}$. ∎
The above proof also shows the equivalence of IPW and backdoorbased stratification hernanbook . Under the conditions of Theorem 3.2, and using ${\sum}_{W}{E}_{Q}(YW,T=1)Q(W)={\sum}_{W}{\sum}_{Y}YQ(YT=1,W)Q(W)$, we have:
Corollary 3.2.1.
The stratification estimator from Equation 4, ${\mathrm{\sum}}_{W}{E}_{Q}\mathrm{(}Y\mathrm{}W\mathrm{,}T\mathrm{=}\mathrm{1}\mathrm{)}Q\mathrm{(}W\mathrm{)}$ is equivalent to Equation 8 and thus also a weighting method with $\beta \mathrm{(}W\mathrm{,}T\mathrm{=}\mathrm{1}\mathrm{)}\mathrm{=}{\displaystyle \frac{Q\mathit{}\mathrm{(}W\mathrm{)}}{Q\mathrm{(}W\mathrm{}T\mathrm{=}\mathrm{1}\mathrm{)}}}$.
4 Bounds for ACE without unobserved confounders
Let us first consider a setting where the latent confounder $U$ has no effect on $T$ or $Y$. That is, the treatment $T$ is assigned to a unit according to only observed covariates $W$ (shown in Figure (c)c).
Based on this assumption, we showed that a causal inference method can be characterized by a weighted distribution $R$ that it outputs. We now provide error bounds based on a given distribution $R$. We use a setup similar to that of Mansour et al. mansour2009domain , where the loss function $L$ is assumed to be symmetric and that it follows the triangle inequality. Common loss functions such as the $L1$ and $L2$ loss satisfy these properties. We are interested in the loss between an estimated effect $h({x}_{R})$ and the ACE, ${h}^{\mathrm{\infty}}({x}_{P})$. If the loss function is assumed to be $L1$, the loss can be defined as: $L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))\triangleq h({x}_{R}){h}^{\mathrm{\infty}}({x}_{P})$
4.1 Loss Bound: A tradeoff between bias and variance
Before we state the loss bounds, we define two terms that characterize the loss. Intuitively, if $R$ is chosen to be similar to Q ($\beta \approx 1$), then $h({x}_{R})$ will have low sample variance as the weights will be bounded, but high bias since ${h}^{\mathrm{\infty}}({x}_{R})$ may be very different from the ACE, ${h}^{\mathrm{\infty}}({x}_{P})$. Conversely, if we choose $R$ to be close to $P$, then $h({x}_{R})$ will have low bias error, but possibly high variance as the $\beta $ weights can be high. Thus, for any $R$, the error is a combination of these factors: bias in choosing $R$, and the variance in estimating $h({x}_{R})$.
To capture the error due to bias, we define a weighted L1 distance between $R$ and $P$.
Definition 4.1.
(Weighted L1 Distance) Assume $R$ and $P$ are distributions over $W,T,Y$. We define the weighted L1 distance(WLD), between $R,P$ as follows:
$$WL{D}_{T=t}(R,P)=\sum _{W}(R(WT=t)P(WT=t)){E}_{Q}[YT=t,W]$$  (9) 
We also define a VR term due to variance in estimation.${\text{\mathit{V}\mathit{R}}}_{T=t}={\alpha}_{T=t}(\widehat{Q},\widehat{\beta}){\alpha}_{T=t}(Q,\beta )$.
Definition 4.2.
(Sample Error Terms) Define
$${\alpha}_{T=t}(\widehat{Q},\widehat{\beta})\triangleq \sum _{W}\widehat{\beta}\widehat{Q}(WT=t)\sum _{Y}Y\widehat{R}(YT=t,W)$$  (10) 
Using the same notation, population $\alpha $ is defined as
$${\alpha}_{T=t}(Q,\beta )\triangleq \sum _{W}\beta Q(WT=t)\sum _{Y}YR(YT=t,W)$$  (11) 
Note 4.3.
The causal mechanism does not change across the distributions $P,Q,R$, which means, $P(YT,W)=Q(YT,W)=R(YT,W)$
For ease of exposition, we’ll assume the loss function is L1. We have the following result.
Theorem 4.4.
Assume that the loss function $L$ is symmetric and obeys the triangle inequality. $h$ is a function on a representation $R$ such that $h\mathrm{(}{x}_{R}\mathrm{)}\mathrm{=}{E}_{R}\mathrm{[}Y\mathrm{}T\mathrm{=}\mathrm{1}\mathrm{]}\mathrm{}{E}_{R}\mathrm{[}Y\mathrm{}T\mathrm{=}\mathrm{0}\mathrm{]}$. Then, for any valid weighted representation $R$, if there are no unobserved confounders and and $L\mathrm{=}L\mathit{}\mathrm{1}$, then:
$L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))\le $  ${\alpha}_{T=1}(\widehat{Q},\widehat{\beta}){\alpha}_{T=1}(Q,\beta )+{\alpha}_{T=0}(\widehat{Q},\widehat{\beta}){\alpha}_{T=0}(Q,\beta )$  
$+WL{D}_{T=1}(\beta Q,P)+WL{D}_{T=0}(\beta Q,P)$ 
The proof is in Supplementary Materials.
4.2 Estimating the loss bound from observed data
Given a causal inference algorithm (as defined by its weights $\beta $), we now describe how to estimate these bounds from data.
Estimating VR term
For VR term, we use McDiarmid’s inequality raginsky2013concentration . We can rewrite ${\alpha}_{T=t}$ as:
$\sum _{W}}\beta Q(WT=t){\displaystyle \sum _{Y}}YR(YT=t,W)={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}\beta YQ(Y,WT=t)={\mathbb{E}}_{Q(Y,WT=t)}\beta Y$  (12) 
where we used that $R(YT=t,W)=Q(YT=t,W)$. Thus, ${\text{\mathit{V}\mathit{R}}}_{T=t}$ can be written as an expected value. Then estimated ${\widehat{\alpha}}_{T=t}$ can be written as $\frac{1}{{N}_{T=t}}{\sum}_{i=0}^{{N}_{T=t}}\widehat{{\beta}_{i}}{Y}_{i}$. Since $g(X)=Y\beta $ is a function of i.i.d samples $X=(W,T,Y)$, we can apply the McDiarmid inequality,
$$\mathrm{Pr}[g({X}_{n})\mathbb{E}(g({X}_{n}))\le t]\ge 1exp(\frac{2{t}^{2}}{{\sum}_{i}^{n}{c}_{i}^{2}})$$ 
where ${c}_{i}$ is the maximum change in $g({X}_{n})$ after replacing ${X}_{i}$ with another value ${X}_{i}^{\prime}$. We compute a datadependent bound for each ${c}_{i}$ by considering all possible discrete values for ${X}_{i}^{\prime}$ and computing the resultant difference in $g$. We provide the code to estimate ${c}_{i}$ in github/anonymizedcode.
Fixing the RHS as $p$, we obtain $t=\sqrt{\frac{{\sum}_{i}^{n}{c}_{i}^{2}\mathrm{log}\frac{1}{1p}}{2}}$. Thus, we can estimate the difference ${\text{\mathit{V}\mathit{R}}}_{T=1}$ as
$\text{\U0001d686\U0001d692\U0001d69d\U0001d691}\mathrm{Pr}=p$  ${\alpha}_{T=1}{\widehat{\alpha}}_{T=1}\le \sqrt{{\displaystyle \frac{{\sum}_{i}^{n}{c}_{i}^{2}\mathrm{log}\frac{1}{1p}}{2}}}$  (13) 
Estimating WLD
For some estimators like IPW, we can prove that they are unbiased and hence $WL{D}_{T=t}=0$.
Lemma 4.5.
For the IPW estimator, if $P\mathit{}\mathrm{(}W\mathrm{)}\mathrm{=}Q\mathit{}\mathrm{(}W\mathrm{)}\mathrm{=}R\mathit{}\mathrm{(}W\mathrm{)}\mathrm{,}L\mathit{}\mathrm{(}{h}^{\mathrm{\infty}}\mathit{}\mathrm{(}{x}_{R}\mathrm{)}\mathrm{,}{h}^{\mathrm{\infty}}\mathit{}\mathrm{(}{x}_{P}\mathrm{)}\mathrm{)}\mathrm{=}\mathrm{0}$.
Proof is in Supplementary Materials. For others, our estimation depends on assuming that $Q(T=1W)$ is bounded between $[\rho ,1\rho ]$ for some sufficiently small $\rho $. The intuition is that assignment of $T$ depends on $W$, but for every $W=w$ there is a minimum probability that $T=1$ or $T=0$. This assumption can be stated as “no extreme selection based on W” and is a generalization of the overlap assumption shalit2017estimating , a requirement for IPW and other causal inference methods. Under this assumption, WLD can be written as:
$WL{D}_{T=t}(R,P)={\displaystyle \sum _{W}}(R(WT=t)P(WT=t)){E}_{Q}[YT=t,W]$  (14)  
$={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}(R(WT=t)P(W))YQ(YT=t,W)$  (15)  
$={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}YR(WT=t)Q(YT=t,W){\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}YQ(W)Q(YT=t,W)$  (16)  
$={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}Y\beta Q(Y,WT=t){\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}Y{\beta}^{*}Q(WT=t)Q(YT=t,W)$  (17) 
where the third equality is due to $P(WT=t)=P(W)=Q(W)$ and the fourth due to the definition of $\beta $ from above. Here $\beta $ corresponds to a causal inference method given by the representation R and ${\beta}^{*}$ corresponds to unbiased IPW weights, estimated by using IPW and then clipping propensity scores as $\mathrm{min}(\rho ,\widehat{Q}(T=1W))$ (assuming bounded $Q(T=1W)$). The first term of Equation 17 can be estimated as as ${\mathbb{E}}_{Q}(Y\beta T=1)$ and the second term as ${\mathbb{E}}_{Q}(Y{\beta}^{*}T=1)$. We show applications of estimating these bounds in Section 6.
5 Bounds for ACE with unobserved confounders
We now provide bounds for the general case of causal inference in the presence of unobserved confounders. Let $V=\{W,T,Y,U\}$, where $W,T,Y$ are the same as before, but $U$ is introduced.
Our insight is that principles of robust statistics can be used to bound the loss due confounding by $U$. Let us consider the example from Section 1 where $U$ are unobserved genes that affect the outcome $Y$ as well as the choice of treatment $T$. In many cases, it can be reasonable to assume that $U$ will affect the outcome $Y$ for only a subset of the population (especially so when the outcome has discrete levels). Specifically, we make an assumption that $U$ does not change the outcomes for all the units, instead only for a fraction of units $\eta $. This assumption can be written in terms of the Huber contamination model huber1992robust , where $U$’s effect is the contamination in observed $Y$. Formally, we can write,
$$Y\sim (1\eta )Q(YT,W)+\eta Q(YT,W,U)$$ 
where $\eta $ is the contaminated fraction of samples. Further, we assume $U$ to be adversarial in nature as described in lai2016agnostic , i.e. $U$ is allowed to observe values of $W,T$ and change the value of $Y$ accordingly.
Under these settings, we show that it is possible to bound $L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))$ by estimating ${E}_{W}{E}_{Y}[YT,W]$ robustly and plugging in the additional error due to contamination. In effect, this amounts to a twostep procedure: learn a new representation ${Q}_{B}$ robustly from distribution $Q$ and then learn $\beta (W,T)$ on this representation ${Q}_{B}$ (i.e., weight ${Q}_{B}$ to get $R$). In practice, since the bounds from Section 4 only depend on $E[YT,W]$, we do not need to estimate ${Q}_{B}$ but rather just a robust estimate of the conditional means for $YT,W$. Estimating ${E}_{{Q}_{B}}[YT,W]$ with a robust estimator implies removing the backdoor path as in Figure (b)b and thus, the error of the estimate can be bounded given a contamination fraction $\eta $. The proof proceeds in an analogous way to the previous Section; we next show an application of the bound by estimating error for the IPW estimator.
5.1 Bounds for IPW under unobserved confounding
Recall from Theorem 3.2, we have $\beta (W,T)={\displaystyle \frac{Q(W)}{Q(WT=1)}}$ for IPW. To provide a concrete bound, we use the robust mean estimator from Lai et al. lai2016agnostic for $Y$ and assume that the fourth moment of $Y$ is bounded, $E({(Y\mu )}^{4}T,W)\le C{\sigma}^{4}$ where $\sigma $ is the standard deviation and $C$ is some constant. We assume $\eta $ fraction contamination (confounding due to $U$) and $\u03f5$ is a parameter for the running time of the robust mean algorithm.
Note 5.1.
Define $\gamma \triangleq {\sum}_{W}Q({W}_{i})O({C}^{1}/4{(\eta +\u03f5)}^{3}/4\sigma )$
Theorem 5.2.
Assume that the loss function $L$ is symmetric and obeys the triangle inequality. $h$ is a function on a representation $R$ such that $h\mathrm{(}{x}_{R}\mathrm{)}\mathrm{=}E\mathrm{[}Y\mathrm{}T\mathrm{=}\mathrm{1}\mathrm{]}\mathrm{}E\mathrm{[}Y\mathrm{}T\mathrm{=}\mathrm{0}\mathrm{]}$. Then, for any valid weighted representation $R$,if $U\mathrm{\ne}\varphi $, the following holds with probability ${\mathrm{(}\mathrm{1}\mathrm{}\mathrm{1}\mathrm{/}p\mathit{}o\mathit{}l\mathit{}y\mathit{}\mathrm{(}n\mathrm{)}\mathrm{)}}^{\mathrm{2}\mathit{}\mathrm{}W\mathrm{}}$.
$L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))\le WL{D}_{T=1}^{W}({Q}_{B},P)+WL{D}_{T=0}^{W}({Q}_{B},P)+{\alpha}_{T=1}(\widehat{{Q}_{B}},\widehat{{\beta}_{B}}){\alpha}_{T=1}(Q,{\beta}_{B})\gamma +{\alpha}_{T=0}(\widehat{{Q}_{B}},\widehat{{\beta}_{B}}){\alpha}_{T=0}({Q}_{B},{\beta}_{B})\gamma $
where ${Q}_{B}$ is the “robust” version of the distribution $Q$. The proof is in Supplementary Materials.
Corollary 5.2.1.
For IPW estimator, if $P\mathit{}\mathrm{(}W\mathrm{)}\mathrm{=}Q\mathit{}\mathrm{(}W\mathrm{)}\mathrm{=}R\mathit{}\mathrm{(}W\mathrm{)}\mathrm{,}L\mathit{}\mathrm{(}{h}^{\mathrm{\infty}}\mathit{}\mathrm{(}{x}_{R}\mathrm{)}\mathrm{,}{h}^{\mathrm{\infty}}\mathit{}\mathrm{(}{x}_{P}\mathrm{)}\mathrm{)}\mathrm{=}\mathrm{2}\mathit{}\gamma $
The proof is in Supplementary Materials. Note that depending on the nature of corruption and the adversary model, different robust estimation methods can be used which may provide tighter bounds.
6 Evaluation: Applying the loss bounds
We now evaluate our bounds on simulated data and describe their utility for choosing hyperparameters for causal inference. When there are unobserved confounders, we also propose a new method, robust IPW that relies on a robust estimator.
When $U$ is ignorable ($\tau =\kappa =0$).
We generate data using the following structural equations:
${w}_{j}\sim Binomial(p=0.5)\forall j\in [1,W];u\sim Normal(\mu ,\sigma )$  
$t=Bernoulli(p=sigmoid(\psi \cdot w+\kappa u));y=Bernoulli(p=sigmoid(\nu \cdot w+\tau u+\lambda t))$ 
where $\psi ,\nu \in {\mathbb{R}}^{M}$ and $\lambda $, $\tau $, $\kappa $ are scalar. $T$ is always binary. We chose this formulation since generation of $T$ maps directly to logistic regression, which makes it easy to estimate propensity scores when computing the causal estimate. The true ATE can be obtained by simulating ${y}_{counterfactual}$ by setting $t=1t$ in the equation for $y$ above and computing the average difference. We present results for $W=5$.
In Figure 2, we show that the bounds correctly follow the IPW estimate over different levels of confounding by W (values of $\psi $), and different sample sizes. Since IPW is unbiased, the bounds effectively estimate the variance of the estimator: as $\psi $ increases, the error bound is expected to increase. The empirical error is the L1 distance between the actual IPW estimate and the true ATE. Across sample sizes and different values of $\psi $, we find that the proposed bound tracks the empirical error in the IPW estimate (Figure 2).
These bounds can have practical significance in choosing hyperparameters in causal inference methods. For instance, consider the popular technique of clipping extremely high propensity scores lee2011weight to reduce IPW variance. This introduces bias in the estimator, and an important question is how to select the clipping threshold. We estimate the loss bound for IPW under different values of the threshold (Figure 3). To estimate the WLD term, we generate treatment $T$ such that the true probability is bounded between $[\rho ,1\rho ]$ where $\rho =0.01$ as discussed in Section 4. We find that the optimal (one that minimizes the loss bound) clipping threshold varies with sample size, marked by the dotted vertical line. Optimal threshold decreases with sample size: a higher threshold reduces the variance in smaller sample sizes, which is less required as sample size increases.
When U is not ignorable.
Finally we consider the setting when there are unobserved confounds. Based on the bounds, we propose a robust version of IPW using the estimator from lai2016agnostic and evaluate for a continuous $Y$. For a fixed contamination ($\eta $), our proposed robust IPW recovers the true estimate up to an error, and its error increases as $\eta $ is increased. Critically, the variance in the estimator is substantially lower than the standard IPW estimator, but it is biased. At $\eta =0.05$, for a true causal effect of 1, we obtain an error of $\approx 0.2$. Details are in the Supplementary Materials.
7 Related Work
Our work is related to domain adaptation and representation learning for causal inference. In the domain adaptation problem, the goal is to learn a function that generalizes from a source distribution $Q$ to a target distribution $P$. Mansour et al. (mansour2009domain, ) provided bounds for generalization of a function between distributions and proposed weighting as a technique to minimize distance between source and target distributions. Gretton et al. gretton2009covariate and Kallus et al. kallus2016generalized have also proposed methods to learn weights from data samples so that the distance between the weighted source and the target is reduced. Weighting of the source distribution can be considered as learning a representation. Based on this idea, Johansson et al. (johansson2016learning, ) proposed a domain adaptation framework to learn a counterfactual distribution from the factual distribution. The estimated counterfactual distribution is then used to evaluate causal effect conditional on specific covariates, also known as the conditional average treatment effect (CATE).
For estimating ACE, there is a rich literature in statistics that proposes estimators based on the backdoor formula, including stratification, matching and propensity scorebased methods like IPW (shah2005propensity, ). In the absence of latent confounders, error in estimating causal effect has been well studied for estimators like IPW rosenbaum1983central . For instance, estimators like Horvitz Thompson and Hajeck estimators henderson2013estimating provide us with a unbiased variance estimate for IPW. However, all of the above methods for CATE and ACE do not focus on producing general error bounds and assume that $U$ is ignorable.
8 Conclusion
We have provided general error bounds for any causal estimator that can be written as a weighted representation learner. The error naturally decomposes into the sampling error in estimating $R$ and measure of distance between the weighted distribution and target distribution $P$. The error terms also yield important insights for developing new methods by minimizing the error bounds.
References
 (1) Gretton, A., Smola, A. J., Huang, J., Schmittfull, M., Borgwardt, K. M., and Schölkopf, B. Covariate shift by kernel mean matching.
 (2) Henderson, T., Anakotta, T., et al. Estimating the variance of the horvitzthompson estimator.
 (3) Hernán, M., and Robins, J. Causal inference book, 2015.
 (4) Huber, P. J. Robust estimation of a location parameter. In Breakthroughs in statistics. Springer, 1992, pp. 492–518.
 (5) Johansson, F., Shalit, U., and Sontag, D. Learning representations for counterfactual inference. In International Conference on Machine Learning (2016), pp. 3020–3029.
 (6) Johansson, F. D., Kallus, N., Shalit, U., and Sontag, D. Learning weighted representations for generalization across designs. arXiv preprint arXiv:1802.08598 (2018).
 (7) Kallus, N. Generalized optimal matching methods for causal inference. arXiv preprint arXiv:1612.08321 (2016).
 (8) Lai, K. A., Rao, A. B., and Vempala, S. Agnostic estimation of mean and covariance. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on (2016), IEEE, pp. 665–674.
 (9) Lee, B. K., Lessler, J., and Stuart, E. A. Weight trimming and propensity score weighting. PloS one 6, 3 (2011), e18174.
 (10) Lunceford, J. K., and Davidian, M. Stratification and weighting via the propensity score in estimation of causal treatment effects: a comparative study. Statistics in medicine 23, 19 (2004), 2937–2960.
 (11) Mansour, Y., Mohri, M., and Rostamizadeh, A. Domain adaptation: Learning bounds and algorithms. arXiv preprint arXiv:0902.3430 (2009).
 (12) Morgan, S. L., and Winship, C. Counterfactuals and causal inference. Cambridge University Press, 2015.
 (13) Pearl, J. Causality. Cambridge university press, 2009.
 (14) Raginsky, M., Sason, I., et al. Concentration of measure inequalities in information theory, communications, and coding. Foundations and Trends® in Communications and Information Theory 10, 12 (2013), 1–246.
 (15) Rosenbaum, P. R. Observational studies. In Observational studies. Springer, 2002, pp. 1–17.
 (16) Rosenbaum, P. R., and Rubin, D. B. The central role of the propensity score in observational studies for causal effects. Biometrika 70, 1 (1983), 41–55.
 (17) Rubin, D. B., and Thomas, N. Matching using estimated propensity scores: relating theory to practice. Biometrics (1996), 249–264.
 (18) Shah, B. R., Laupacis, A., Hux, J. E., and Austin, P. C. Propensity score methods gave similar results to traditional regression modeling in observational studies: a systematic review. Journal of clinical epidemiology 58, 6 (2005), 550–559.
 (19) Shalit, U., Johansson, F. D., and Sontag, D. Estimating individual treatment effect: generalization bounds and algorithms. In Proceedings of the 34th International Conference on Machine LearningVolume 70 (2017), JMLR. org, pp. 3076–3085.
9 Supplementary Materials
Appendix A Proof of Theorem 4.4
Definition A.1.
(Weighted L1 Distance) Assume $R$ and $P$ are distributions over $W,T,Y$. We define the weighted L1 distance (WLD), between $R,P$ as follows:
$$WL{D}_{T=t}(R,P)=\sum _{W}(R(WT=t)P(WT=t)){E}_{Q}[YT=t,W]$$  (18) 
And similarly, we define a VR term due to variance in estimation.$V{R}_{T=t}={\alpha}_{T=t}(\widehat{Q},\widehat{\beta}){\alpha}_{T=t}(Q,\beta )$.
Definition A.2.
(Sample Error Terms) Define
$${\alpha}_{T=t}(\widehat{Q},\widehat{\beta})\triangleq \sum _{W}\widehat{\beta}\widehat{Q}(WT=t)\sum _{Y}Y\widehat{R}(YT=t,W)$$  (19) 
Using the same notation, population $\alpha $ is defined as
$${\alpha}_{T=t}(Q,\beta )\triangleq \sum _{W}\beta Q(WT=t)\sum _{Y}YR(YT=t,W)$$  (20) 
Definition A.3.
Let $Q(W,T,Y)$ be the source distribution. We define a weighting function $\beta (W,T)$ to generate a representation $R$ such that,
$$\beta (W,T)=\frac{R(WT)}{Q(WT)}=\frac{R(TW)}{Q(TW)}$$ 
and that $R$ is a valid probability distribution, $\forall W,TR(W,T)\ge 0$, ${\sum}_{W}{\sum}_{T}R(W,T)=1$.
Note A.4.
The causal mechanism does not change in the distributions $P,Q,R$, which means, $P(YT,W)=Q(YT,W)=R(YT,W)$
For ease of exposition, we’ll assume the loss function is L1. We have the following result.
Theorem A.5.
Assume that the loss function $L$ is symmetric and obeys the triangle inequality. $h$ is a function on a representation $R$ such that $h\mathrm{(}{x}_{R}\mathrm{)}\mathrm{=}{E}_{R}\mathrm{[}Y\mathrm{}T\mathrm{=}\mathrm{1}\mathrm{]}\mathrm{}{E}_{R}\mathrm{[}Y\mathrm{}T\mathrm{=}\mathrm{0}\mathrm{]}$. Then, for any valid weighted representation $R$, if $U\mathrm{=}\varphi $ and $L\mathrm{=}L\mathit{}\mathrm{1}$, the following holds
$L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))\le $  ${\alpha}_{T=1}(\widehat{Q},\widehat{\beta}){\alpha}_{T=1}(Q,\beta )+{\alpha}_{T=0}(\widehat{Q},\widehat{\beta}){\alpha}_{T=0}(Q,\beta )$  
$+WL{D}_{T=1}(\beta Q,P)+WL{D}_{T=0}(\beta Q,P)$ 
Proof.
By Triangle Inequality,
$$L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))\le L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{R}))+L({h}^{\mathrm{\infty}}({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))$$  (21) 
PART I.
Consider the second term in the RHS, $L({h}^{\mathrm{\infty}}({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))$
$=L(({E}_{R}[YT=1]{E}_{R}[YT=0])({E}_{P}[YT=1]{E}_{P}[YT=0]))$  
$=L(({E}_{R}[YT=1]{E}_{P}[YT=1])+({E}_{P}[YT=0]{E}_{R}[YT=0]))$ 
Expanding on the first term, $({E}_{R}[YT=1]{E}_{P}[YT=1])$
$={\displaystyle \sum _{Y}}Y(R(YT=1)P(YT=1))$  
$={\displaystyle \sum _{Y}}Y{\displaystyle \sum _{W}}R(YT=1,W)R(WT=1)P(YT=1,W)P(WT=1)$  
$={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}YR(YT=1,W)(R(WT=1))(P(WT=1))\mathrm{\dots}\text{By}\mathit{\text{A.4}}$  
$={\displaystyle \sum _{W}}(R(WT=1)P(WT=1)){\displaystyle \sum _{Y}}YR(YT=1,W)\mathrm{\dots}\text{By}\mathit{\text{A.4}}$  
$={\displaystyle \sum _{W}}(R(WT=1)P(WT=1)){\displaystyle \sum _{Y}}YQ(YT=1,W)\mathrm{\dots}\text{By}\mathit{\text{A.4}}$ 
Now using the definition of Expectation and $\beta (W,T)$ (Definition A.3)
$={\displaystyle \sum _{W}}(R(WT=1)P(WT=1)){E}_{Q}[YT=1,W]$  
$={\displaystyle \sum _{W}}(\beta (W,T=1)Q(WT=1)P(WT=1)){E}_{Q}[YT=1,W]$  
$=WL{D}_{T=1}(\beta Q,P)$ 
Similarly expanding$({E}_{R}[YT=0]{E}_{P}[YT=0])$ (by symmetry)
$\sum _{W}}(\beta (W,T=0)Q(WT=0)P(WT=0)){E}_{Q}^{Y}[YT=0,W]$  
$=WL{D}_{T=0}(\beta Q,P)$ 
PART II
Now let us consider the first part of the RHS of Equation 21.
$L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{R}))$
$=L((\widehat{{E}_{R}}[YT=1]\widehat{{E}_{R}}[YT=0])({E}_{R}[YT=1]{E}_{R}[YT=0]))$  
$=L((\widehat{{E}_{R}}[YT=1]{E}_{R}[YT=1])+({E}_{R}[YT=0]{\widehat{E}}_{R}[YT=0]))$ 
Solving for $(\widehat{{E}_{R}}[YT=1]{E}_{R}[YT=1])$
$={\displaystyle \sum _{Y}}Y(\widehat{R}(YT=1)R(YT=1))$  
$={\displaystyle \sum _{Y}}{\displaystyle \sum _{W}}Y\widehat{R}(YT=1,W)\widehat{R}(WT=1)YR(YT=1,W)R(WT=1)$  
$={\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}Y\widehat{R}(YT=1,W)\widehat{R}(WT=1){\displaystyle \sum _{W}}{\displaystyle \sum _{Y}}YR(YT=1,W)R(WT=1)$  
$={\displaystyle \sum _{W}}\widehat{R}(WT=1){\displaystyle \sum _{Y}}Y\widehat{R}(YT=1,W){\displaystyle \sum _{W}}R(WT=1){\displaystyle \sum _{Y}}YR(YT=1,W)$  
$={\alpha}_{T=1}(\widehat{Q},\widehat{\beta}){\alpha}_{T=1}(Q,\beta )$ 
where the last equality follows from Definition A.2.
Similarly expanding ${\widehat{E}}_{R}[YT=0]{E}_{R}[YT=0]$ (by symmetry)
$={\sum}_{W}\widehat{R}(WT=0){\sum}_{Y}Y\widehat{R}(YT=0,W){\sum}_{W}R(WT=0){\sum}_{Y}YR(YT=0,W)$
$={\alpha}_{T=0}(\widehat{Q},\widehat{\beta}){\alpha}_{T=0}(Q,\beta )$
PART III
Finally, we derive the result assuming Loss Function is L1.
$L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{R}))$  $=L((\widehat{{E}_{R}}[YT=1]{E}_{R}[YT=1])+({E}_{R}[YT=0]{\widehat{E}}_{R}[YT=0]))$  
$=(\widehat{{E}_{R}}[YT=1]{E}_{R}[YT=1])+({E}_{R}[YT=0]{\widehat{E}}_{R}[YT=0])$  
$\le \widehat{{E}_{R}}[YT=1]{E}_{R}[YT=1]+{E}_{R}[YT=0]{\widehat{E}}_{R}[YT=0]$  
$\le {\alpha}_{T=1}(\widehat{Q},\widehat{\beta}){\alpha}_{T=1}(Q,\beta )+{\alpha}_{T=0}(\widehat{Q},\widehat{\beta}){\alpha}_{T=0}(Q,\beta )$ 
$L({h}^{\mathrm{\infty}}({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))$  $=L(({E}_{R}[YT=1]{E}_{P}[YT=1])+({E}_{P}[YT=0]{E}_{R}[YT=0]))$  
$=({E}_{R}[YT=1]{E}_{P}[YT=1])+({E}_{P}[YT=0]{E}_{R}[YT=0])$  
$\le {E}_{R}[YT=1]{E}_{P}[YT=1]+{E}_{P}[YT=0]{E}_{R}[YT=0]$  
$\le WL{D}_{T=1}(\beta Q,P)+WL{D}_{T=0}(\beta Q,P)$ 
Hence, we obtain the result:
$L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))\le $  ${\alpha}_{T=1}(\widehat{Q},\widehat{\beta}){\alpha}_{T=1}(Q,\beta )+{\alpha}_{T=0}(\widehat{Q},\widehat{\beta}){\alpha}_{T=0}(Q,\beta )$  
$+WL{D}_{T=1}(\beta Q,P)+WL{D}_{T=0}(\beta Q,P)$ 
∎
Appendix B Proof of Lemma 4.5
Lemma B.1.
For the IPW estimator, if $P\mathit{}\mathrm{(}W\mathrm{)}\mathrm{=}Q\mathit{}\mathrm{(}W\mathrm{)}\mathrm{=}R\mathit{}\mathrm{(}W\mathrm{)}\mathrm{,}L\mathit{}\mathrm{(}{h}^{\mathrm{\infty}}\mathit{}\mathrm{(}{x}_{R}\mathrm{)}\mathrm{,}{h}^{\mathrm{\infty}}\mathit{}\mathrm{(}{x}_{P}\mathrm{)}\mathrm{)}\mathrm{=}\mathrm{0}$.
Proof.
For the sake of proof, we’ll assume the loss function is L1. Since,
$L({h}_{R}^{\mathrm{\infty}},{h}_{P}^{\mathrm{\infty}}T=1)$  $=L(({E}_{R}[YT=1]{E}_{P}[YT=1])$  
$={E}_{R}[YT=1]{E}_{P}[YT=0]$  
$\le {\displaystyle \sum _{w}}R(WT=1){E}_{R}[YT=1,W]P(WT=1){E}_{P}[YT=1,W]$  
$={\displaystyle \sum _{w}}{\beta}_{ipw}(Q,W)Q(WT=1){E}_{Q}[YT=1,W]P(WT=1){E}_{P}[YT=1,W]$  
$\le {\displaystyle \sum _{w}}Q(W)({E}_{P}[YT=1,W]+)P(WT=1){E}_{P}[YT=1,W]$  
$={\displaystyle \sum _{w}}(Q(W)P(W)){E}_{P}[YT=1,W]$  
$=0$ 
A similar argument can be made for $T=0$ and hence, $L({h}^{\mathrm{\infty}}({x}_{R}),{L}^{\mathrm{\infty}}({x}_{P}))=0$ ∎
Appendix C Proof of Theorem 5.2
Theorem C.1.
Assume that the loss function $L$ is symmetric and obeys the triangle inequality. $h$ is a function on a representation $R$ such that $h\mathrm{(}{x}_{R}\mathrm{)}\mathrm{=}E\mathrm{[}Y\mathrm{}T\mathrm{=}\mathrm{1}\mathrm{]}\mathrm{}E\mathrm{[}Y\mathrm{}T\mathrm{=}\mathrm{0}\mathrm{]}$. Then, for any valid weighted representation $R$,if $U\mathrm{\ne}\varphi $, the following holds with probability ${\mathrm{(}\mathrm{1}\mathrm{}\mathrm{1}\mathrm{/}p\mathit{}o\mathit{}l\mathit{}y\mathit{}\mathrm{(}n\mathrm{)}\mathrm{)}}^{\mathrm{2}\mathit{}\mathrm{}W\mathrm{}}$.
$L(h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{P}))\le WL{D}_{T=1}^{W}({Q}_{B},P)+WL{D}_{T=0}^{W}({Q}_{B},P)+{\alpha}_{T=1}(\widehat{{Q}_{B}},\widehat{{\beta}_{B}}){\alpha}_{T=1}(Q,{\beta}_{B})\gamma +{\alpha}_{T=0}(\widehat{{Q}_{B}},\widehat{{\beta}_{B}}){\alpha}_{T=0}({Q}_{B},{\beta}_{B})\gamma $
Where, ${Q}_{B}$ represents the ‘robust’ version of the distribution ‘Q’.
Proof.
For the sake of proof, we’ll assume the loss function is a L1. For IPW, ${\beta}_{B}(Q,W)={\displaystyle \frac{{Q}_{B}(W)}{{Q}_{B}(WT=t)}}$ and $R(WT=t)={Q}_{B}(W)$
$L({h}_{R}^{\mathrm{\infty}},{h}_{P}^{\mathrm{\infty}})$  $\le WL{D}_{T=1}^{W}({Q}_{B},P)+WL{D}_{T=0}^{W}({Q}_{B},P)\mathrm{\dots}From\text{A}$ 
From lai2016agnostic , we know with probability $11/poly(n)$, $\widehat{\mu}\mu \le O({C}_{4}^{1}/4{(\eta +\u03f5)}^{3}/4\sigma )$. Consider, ${\sum}_{Y}Y{Q}_{B}(YT=1,W={w}_{i})$. This is evaluating conditional mean of $Y$ robustly for a fixed value of ${w}_{i}$.
For a fixed value of $W={w}_{i},T=t$, with probability $11/poly(n)$
$$\overline{Y}\le \widehat{\overline{Y}}+O({C}_{4}^{1}/4{(\eta +\u03f5)}^{3}/4\sigma )$$ 
Since, ${Q}_{B}({w}_{i})>0$,
$${Q}_{B}({w}_{i})\overline{Y}\le {Q}_{B}({w}_{i})\{\widehat{\overline{Y}}+O({C}_{4}^{1}/4{(\eta +\u03f5)}^{3}/4\sigma )\}$$ 
Since, all instances of conditional mean of $Y$ are independent, ${\sum}_{W}{Q}_{B}({w}_{i})\overline{Y}\le {\sum}_{W}{Q}_{B}({w}_{i})\{\widehat{\overline{Y}}+O({C}_{4}^{1}/4{(\eta +\u03f5)}^{3}/4\sigma )\}$ with probability at least, ${(11/poly(n))}^{W}$
$L({h}_{R},{h}_{R}^{\mathrm{\infty}}T=t)\le {\sum}_{W}(\widehat{\overline{Y}}W={w}_{i},T=t)({Q}_{B}({w}_{i}){\widehat{Q}}_{B}({w}_{i})){\sum}_{W}Q({W}_{i})O({C}_{4}^{1}/4{(\eta +\u03f5)}^{3}/4\sigma )$
$L({h}_{R},{h}_{R}^{\mathrm{\infty}})\le h({x}_{R}){h}_{R}^{\mathrm{\infty}}({x}_{R})T=1+h({x}_{R}),{h}^{\mathrm{\infty}}({x}_{R})T=0)$
$L({h}_{R},{h}_{R}^{\mathrm{\infty}})\le {\alpha}_{T=1}(\widehat{{Q}_{B}},\widehat{{\beta}_{B}}){\alpha}_{T=1}({Q}_{B},{\beta}_{R})\gamma +{\alpha}_{T=0}(\widehat{{Q}_{B}},\widehat{{\beta}_{B}}){\alpha}_{T=0}({Q}_{B},{\beta}_{B})\gamma $
∎
Appendix D Proof of Corollary 5.2.1
Corollary D.0.1.
For IPW estimator, if $P\mathit{}\mathrm{(}W\mathrm{)}\mathrm{=}Q\mathit{}\mathrm{(}W\mathrm{)}\mathrm{=}R\mathit{}\mathrm{(}W\mathrm{)}\mathrm{,}L\mathit{}\mathrm{(}{h}^{\mathrm{\infty}}\mathit{}\mathrm{(}{x}_{R}\mathrm{)}\mathrm{,}{h}^{\mathrm{\infty}}\mathit{}\mathrm{(}{x}_{P}\mathrm{)}\mathrm{)}\mathrm{=}\mathrm{2}\mathit{}\gamma $
Proof.
For the sake of proof, we’ll assume the loss function is L1. Since,
$L({h}_{R}^{\mathrm{\infty}},{h}_{P}^{\mathrm{\infty}}T=1)$  $=L(({E}_{R}[YT=1]{E}_{P}[YT=1])$  
$={E}_{R}[YT=1]{E}_{P}[YT=0]$  
$\le {\displaystyle \sum _{w}}R(WT=1){E}_{R}[YT=1,W]P(WT=1){E}_{P}[YT=1,W]$  
$={\displaystyle \sum _{w}}{\beta}_{ipw}({Q}_{B},W){Q}_{B}(WT=1){E}_{{Q}_{B}}[YT=1,W]P(WT=1){E}_{P}[YT=1,W]$  
$\le {\displaystyle \sum _{w}}{Q}_{B}(W)({E}_{P}[YT=1,W]+\gamma )P(WT=1){E}_{P}[YT=1,W]$  
$={\displaystyle \sum _{w}}\gamma {Q}_{B}(W)+({Q}_{B}(W)P(W)){E}_{P}[YT=1,W]$  
$={\displaystyle \sum _{w}}\gamma {Q}_{B}(W)$  
$=\gamma $ 
A similar argument can be made for $T=0$ and hence, $L({h}^{\mathrm{\infty}}({x}_{R}),{L}^{\mathrm{\infty}}({x}_{P}))=2\gamma $ ∎
Appendix E Results of Robust IPW
Setup.
We generate data using the following structural equations (assuming both W and U are unidimensional), and present results for the following set of parameters:
$n=10000,\alpha =0.0,\beta =0.01,\nu =0.3,\gamma =1.0,\delta =10.0$  (22)  
$nois{e}_{y}\sim Normal(0,0.5)w\sim Binomial(p=0.7)$  (23)  
$u\sim Normal(\mu =5.0,\sigma =1.0)$  (24)  
$t=Bernoulli(p=sigmoid(\alpha \cdot w+\beta \cdot u)))$  (25)  
$y=\nu \cdot w+\gamma t+\delta \cdot u+nois{e}_{y}$  (26) 
We simulate the Huber contamination due to $U$ as follows: with probability $\eta $, $\delta =\delta $, and with probability $1\eta $, $\delta =0$.
Since $\gamma =1$, the true ACE (Average Causal Effect) is 1.0. The following table shows the robust IPW and standard IPW estimates over 10 different runs.
$\eta $  Robust IPW (min,max)  Standard IPW(min,max) 

0.0  (0.979,1.011)  (0.979,1.011) 
0.05  (0.884,0.914)  (0.860,1.377) 
0.1  (0.793,0.831)  (0.820,1.737) 
0.15  (0.716,0.753)  (0.709,1.887) 
0.20  (0.646,0.692)  (0.227,1.640) 