Accounting for Unobserved Confounding in Domain Generalization
Authors: Alexis Bellot
Mihaela van der Schaar
Venue:  (2021)
Keywords: Causality
Robust Optimization
Domain Generalization

Abstract: The ability to extrapolate, or generalize, from observed to new related environments is central to any form of reliable machine learning, yet most methods fail when moving beyond i.i.d data. In some cases, the reason lies in a misappreciation of the causal structure that governs the data, and in particular as a consequence of the influence of unobserved confounders that drive changes in observed distributions and distort correlations. In this paper, we argue for defining generalization with respect to a broader class of distribution shifts (defined as arising from interventions in the underlying causal model), including changes in observed, unobserved and target variable distributions. We propose a new robust learning principle that may be paired with any gradient-based learning algorithm. This learning principle has explicit generalization guarantees, and relates robustness with certain invariances in the causal model, clarifying why, in some cases, test performance lags training performance. We demonstrate the empirical performance of our approach on healthcare data from different modalities, including image and speech data.

Under review as a conference paper at ICLR 2021
ACCOUNTING FOR UNOBSERVED CONFOUNDING IN DOMAIN GENERALIZATION
Anonymous authors Paper under double-blind review
ABSTRACT
The ability to extrapolate, or generalize, from observed to new related environments is central to any form of reliable machine learning, yet most methods fail when moving beyond i.i.d data. In some cases, the reason lies in misappreciation of the causal structure that governs the data, and in particular as a consequence of the influence of unobserved confounders that drive changes in observed distributions and distort correlations. In this paper, we argue for defining generalization with respect to broader class of distribution shifts (defined arising from interventions in the underlying causal model), including changes in observed, unobserved and target variable distributions. We propose new robust learning principle that may be paired with any gradient-based learning algorithm. This learning principle has explicit generalization guarantees, and relates robustness with certain invariances in the causal model, clarifying why, in some cases, test performance lags training performance. We demonstrate the empirical performance of our approach on healthcare data from different modalities, including image and speech data.
INTRODUCTION
Prediction algorithms data, necessarily sampled under specific conditions, learn correlations that extrapolate to new or related data. If succesfful, the performance gap between these two domains small, and say that algorithms generalize beyond their training data. Doing so is difficult however, some form of uncertainty about the distribution of new data is unavoidable. The set of potential distributional changes that we may encounter is mostly unknown and in many cases may be large and varied. Some examples include covariate shifts (Bickel et al., 2009), interventions in the underlying causal system (Pearl, 2009), varying levels of noise (Fuller, 2009) and confounding (Pearl, 1998). All of these feature in modern applications, and while learning systems are increasingly deployed in practice, generalization of predictions and their reliability broad sense remains an open question.
common approach to formalize learning with uncertain data is, instead of optimizing for correlations in fixed distribution, do so simultaneously for range of different distributions in uncertainty set P (Ben-Tal et al., 2009).
minimize sup ((s.))))(C(((()..))) v)1 f PEP
for some measure of error L of the function that relates input and output examples (x, P. Choosing different sets P leads to estimators with different properties. It includes as special cases, for instance, many approaches domain adaptation, covariate shift, robust statistics and optimization (Kuhn et al., 2019; Bickel et al., 2009; Duchi et al., 2016; 2019; Sinha et al., 2017; Wozabal, 2012; Abadeh et al., 2015; Duchi & Namkoong, 2018). Robust solutions to problem (1) are said to generalize if potential shifted, test distributions contained in P. but also larger sets P result in conservative solutions (i.c. with sub-optimal performance) on data sampled from distribution away from worst-case scenarios, in general.
One formulation causality is in fact also version of this problem, for P defined as any distribution arising from arbitrary interventions observed covariates leading to shifts in their distribution P, (see e.g. sections 3.2 and 3.3 in (Meinshausen, 2018)). The invariance to changes in covariate distributions of causal solutions is powerful for generalization, but implicitly assumes that all

---

Under review as a conference paper at ICLR 2021
Mean squared error on bast data
OLS Causal DRD
20-
Moun squared
15-
40
squared
X₂
23
10
X
1.0
3.5
2.0
25
30
Variance of in best data
Variance o in test data with unobserved confounding
Mean of undbserved confounder H in test data
without unobserved confounding
Figure 1: The challenges of generalization. In the presence of unobserved confounders, there is inherent trade-off in performance causal and correlation- based solutions are both optimal different regimes, depending on the shift from which new data is generated. The proposed approach, DIRM, is a relaxation of the causal solution that naturally interpolates between the causal solution and Ordinary Least Squares (OLS), and is deseribed in Section 3. The data generating mechanism, methods, and discussion of the results are given in the paragraphs above our contributions.
covariates or other drivers of the outcome subject to change at test time are observed. Often shifts occur elsewhere, for example in the distribution of unobserved confounders, in which case also conditional distributions Pale may shift. Perhaps surprisingly, in the presence of unobserved confounders, the goals of achieving robustness and learning causal model can be different (and similar behaviour also occurs with varying measurement noise). There is general an inherent trade-off in generalization performance. In the presence of unobserved confounders, causal and correlation-bast based solutions are both optimal in different regimes, depending on the shift in the underlying generating mechanism from which new data is generated.
Consider a simple example, illustrated in Figure I, to show this explicitly. We assume access to observations of variables (X1, X2, Y) in two training datasets, each dataset sampled with differing variances (o² 2 = 1 and 0² = 2) from the following structural model F.
X2 : Exg, Y X2 3H Fy, X1 x
EX,
Ex, Ex, ~ ~N(0, ~ N( 1) are exogenous variables. In a first scenario (leftmost panel) we consider all data (training and testing) be generated without unobserved confounders, H 0: and, in a second scenario (remaining panels) all data with unobserved confounders, H := E ~ ( 1). Each panel of Figure 1 shows performance on new data obtained after manipulating the underlying data generating system; the magnitude and type of intervention appears in the horizontal axis. We consider the following learning paradigms: Ordinary Least Squares (OI.S) learns the linear mapping that minimizes average training risk, Domain Robust Optimization (DRO) minimizes the maximum training risk among the two available datasets, and the causal solution, assumed known, has fixed coefficients (0, 1) for (X1, X2). Two important observations motivate this paper.
First, observe that Ordinary Least Squares (OLS) and Domain Robust Optimization (DRO) absorb spurious correlations (due to H. and the fact that X, is caused by Y) with unstable performance under shifts in p(X1, X2) but as a consequence good performance under shifts in p(H). Causal solutions, by contrast, robust shifts in p(X1, X2), even new data with large shifts, but underperform substantially under changes in the distribution of unobserved confounders p( H). Second, the presence of unobserved confounding hurts generalization performance in general with higher errors for all methods, e.g. contrast the middle and leftmost panel. To the best of our knowledge, the influence of unobserved confounders has been minimally explored in the context of generalization of learning algorithms, even though, as Figure 1 shows, in this context different shifts in distribution may have important consequences for predictive performance.
Our Contributions. In this paper we provide new choice of P and learning problem (1) that we show to be justified by certain statistical invariances across training and testing data, to be expected in the presence of unobserved confounders. This leads us to define new differentiable, regularized objective for representation learning. Our proposal defines P as an affine combination of available training data distributions, and we show that solutions to this problem are robust more general shifts in distribution than previously considered, spanning robustness to shifts in observed, unobserved, and target variables, depending on the properties of the available training data distributions. This approach has benefits for performance out- sample but also for tasks involving variable selection, where important features consistently replicated across experiments with our objective.
2

---

Under review as a conference paper at ICLR 2021
2 INVARIANCES IN THE PRESENCE OF UNOBSERVED CONFOUNDERS
This section formally introduces the problem of out-of-distrbution generalization. We describe in greater detail the reasons that popular learning principles, such as Empirical Risk Minimization (ERM), underperform in general, and define certain invariances to recover solutions that generalize.
We take the perspective that all potential distributions that may be observed variables arise from a causal model M = (F, V, U), characterized by endogenous variables, V E V, representing all variables determined by the system, either observed or not; exogenous variables, U E U. in contrast imposed upon the model, and sequence of structural equations F. : 2 + V. describing how endogenous variables can be (deterministically) obtained from the exogenous variables (Pearl, 2009). An example is given in Figure 1, V = (X1, X2. H,Y) Y) are endogenous and U= (Ex, Ex,, EH, Ey) are exogenous variables.
system of
Unseen data is generated from such a system M after manipulating the distribution of exogenous variables U, which propagates across the system shifting the joint distribution of all variables V, whether observed unobserved, but keeping the causal mechanisms IF unchanged. Representative examples include changes in data collection conditions, such as due to different measurement devices, or new data sources, such patients in different hospitals or countries, among many others.
Our goal is to learn a representation Z = (xX) acting on a set observed variables X C V with the ability to extrapolate to new unseen data, and doing so acknowledging that all relevant variables in V are likely not observed. Unobserved confounders (for the task at hand, say predicting Y E V) simultaneously cause X and Y, confounding biasing the causal association between X and Y giving rise to spurious correlations that do not reproduce in general (Pearl, 1998; 2009). We present a brief argument below highlighting the systematic bias due unobserved confounders in ERM.
2.1
THE BIASES OF UNOBSERVED CONFOUNDING
Consider the following structural equation for observed variables (X, Y),
Y := f ((X) +
(2)
where f := f(: Bo) is a predictor acting on representation 2 := o(X) and stands for potential
sources of mispecification and unexplained sources of variability. For a given sample of data (x, v) and 2 ((x). the optimal prediction rule 3 is often taken minimize squared residuals, with B the solution to the normal equations: Vaf B)y (zf(z; f); B), where V V (z; B) denotes the column vector of gradients of f with respect to parameters evaluated at B. Consider the Taylor expansion of (2; (0) around an estimate 3 sufficiently close to fo. f(2; 3o) = f(z; B) + Vz5(=; (Bo .). Using this approximation in our first order optimality condition we find,
Vef(2; () (=; 3) + (=;
where v is scaled disturbance term that includes the rest of the linear approximation of f and is small asymptotically; e := y f(z B) is the residual. 3 is consistent for the true 30 if and only [af(z; ) - in probability. This assumption is satisfied E (all sources of variation Y not captured by X) are independent of X (i.e. exogenous) in other words if all common causes or confounders to both X and Y have been observed. Conventional regression may assign significant associations variables that are neither directly nor indirectly related to the outcome, and in this case, we have no performance guarantees on new data with changes in the distribution of these variables. Omitted variables are common source of unobserved confounding but we note in Appendix B that similar biases also arise from other prevalent model mispecifications, such as measurement error (Carroll al., 2006).
2.2 INVARIANCES WITH MULTIPLE ENVIRONMENTS
The underlying structural mechanism F, that also relates unobserved with observed variables, even unknown, is stable irrespective of manipulations exogenous variables that may give rise to heterogeneous data sources. Under certain conditions, statistical footprints emerge from this structural invariance across different data sources, properties testable from data that have been exploited recently, for example (Peters al., 2016; Ghassami et al., 2017; Rothenhäusler al., 2019).
3

---

Under review as a conference paper at ICLR 2021
We assume that such heterogeneous data scenario applies, input and output pairs (X,Y) are observed across heterogeneous data sources or environments e, defined as a probability distribution P. over observation space X' x y that arises, just like new unseen data, from manipulations in the distribution of exogenous variables in an underlying model .M.
For the remainder of this section, consider restricting ourselves data sources emerging from manipulations in exogenous Ex. appearing in the structural equations of X only in an underlying additive noise model (see Appendix C.1 for the precise statement of assumptions and more context), may be shown by considering the distributions of error terms Y fo and its correlation with any function of X, that the inner product V f Su)c, even if non-zero due unobserved confounding. converges to fixed unknown value equal across training environments (see Appendix C. 1 for the derivation). With a similar decomposition to the one given equation (3), in the population case, holds that up to disturbance terms,
(LE (1N))R
Vafle:)")Va((t))) (B0 3*)
E (..N)~
E VaS(z; (ANN)
E (zg))p3
Val(2;8*)} =
(4)
where 3* is a solution to,
E (r.U)~
(e = (x.))~1;
E
(5)
and is consistent for the causal parameters 30 unique. i.j E are the indices of any two observed environments in an index set E. This invariance across environments must hold for causal parameters (under certain conditions) even in the presence of unobserved confounders.
A few remarks are necessary concerning this relationship and its extrapolation properties.
The first is based on the observation that, up to constant, each inner product in (5) is the gradient of the squared error with respect to 3. This reveals that the optimal predictor, in the presence of unobserved confounding, is not one that produces minimum loss but one that produces a non-zero loss gradient equal across environments. Seeking minimum error solutions, even in the population case, produces estimators with necessarily unstable correlations because the variability due to unobserved confounders is not explainable from observed data. Forcing gradients to be zero then forces models to utilize artifacts of the specific data collection process that are not related to the input-output relationship; and, for this reason, will not general perform outside training data.
From (5) we may pose sequence of moment conditions for each pair of available environments. We may then seek solutions 3 that make all of them small simultaneously. Solutions are unique if the set of moments is sufficient to identify 3 exactly (and given our model assumptions may be interpreted as causal and robust to certain interventions). We revisit our introductory example to show Appendix that, in contrast to ERM and Invariant Risk Minimization (IRM) (a related approach proposed in (Arjovsky et al., 2019) we discuss in more detail in later sections), this procedure does recover the underlying causal model correctly in the presence of unobserved confounding.
In practice however, only a set of solutions may be identified with no performance guarantees for any individual solutions, and no guarantees assumptions fail to hold. Moreover, even accessible, causal solutions, robust certain distribution shifts, may not always be desirable under more general shifts (recall for instance the experiments in the rightmost panel of Figure 1).
GENERALIZATION FROM A ROBUST OPTIMIZATION PERSPECTIVE
While certain invariances may hold in the presence of unobserved confounding, we have in general guarantees performance under more general manipulations. In this section motivate relaxation of the ideas presented above by considering bounds on the worst-case performance on data arising from distribution shifts informed by the structure of available environments.
Optimizing for the worst case loss in a set domains has been shown to ensure accurate prediction on any convex mixture of training environments (Ben-Tal et al., 2009). The space of convex mixtures,
4

---

Under review as a conference paper at ICLR 2021
however, is restrictive. Systems of variables are in general high-dimensional and new manipulations likely occur at a new vertex not represented as a linear combination of training environments. By extrapolation we desire performance guarantees outside this convex hull. The extension we consider optimizes instead over an affine combination of training losses, similarly to (Krueger et al., 2020).
Let A, ((Ee) ae 2 -1 Eees Ote 1 be collection of scalars and consider the set of distributions defined by P : -[Eree OgP.. {axe) E A,). all affine combinations of distributions defined by the available environments. 7) E R defines the strength of the extrapolation, = corresponds to convex hull of distributions but above that value the space of distributions is richer, going beyond what has been observed: affine combinations amplify the strength of manipulations that generated the observed training environments. The following theorem presents upperhound to the robust problem (1) with affine combinations of errors.
Theorem
Let (Pelese, be set available environments. Further let the parameter space of B be open and bounded, such that the expected loss function L as function of 3 belongs to Sobolev space. Then, the following inequality holds,
sup Σ
E
Cff o o(x),)) S
E (x.))~P.e~E
C(f o o(z),)))
{a (a,) aEE
+ (1+ CC
sup E ( eEE (2.8)~-P
E (x.g)~
V&C (f d(x),))
La
where ||. 11e, demotes the L2-norm, C depends on the domain of B, |8| the number of available environments and e ~ & loosely denotes sampling indeces with equal probability from E.
The proof is given in Appendix C.2. This bound illustrates the trade-off between invariances (of the type explored under unobserved confounding, that appear in the second term of the RHS of the inequality above) and prediction in-sample (the first term). A combination of them upper-bounds a robust optimization problem over affine combinations of training env environments, and depending how much we weight each objective (prediction versus invariance) we can expect solutions to be more or less robust. Specifically, for -1/n the objective reduces to empirical risk minimization, otherwise the upperbound increasingly weights differences in loss derivatives (violations of the invariances of section 2.2), and in the limit (17 - oc) can be interpreted to be robust at least to any affine combination of training losses.
Note that the requirement that FF be fixed, or interventions occur on observed variables, is not necessary for generalization guarantees. As long as new data distributions can be represented as expected performance to be as least good as
affine combinations of training distributions, that observed for the robust problem in Theorem I.
3.1 PROPOSED OBJECTIVE
Our proposal is to guide the optimization of and 3 towards solutions that minimize the upperbound in Theorem 1, satisfying approximately the moment conditions (5) and simultaneously optimizing for minimum average error. Using Lagrange multipliers define the general objective,
minimize 3,0
E
C(f (( + Var endE
|l THEE VeC o o()) Ilea) (a.N)~P.
(6)
(x.g)~
where 22 O. We call this problem Derivative Invariant Risk Minimization (DIRM). This objective shares similarities with the objective proposed in (Krueger et al., 2020). The authors considered enforcing equality in anviroment--specin also be related to a robust optimization problem over an affine combination of errors. We have seen in section 2.2 however that equality in losses not expected to hold in the presence of unobserved confounders (e.g. due changes in the irreducible error across environments, which may occur also after interventions on target variables).
losses, rather than derivatives. as regularization. which can
The L2 norm in the regularizer is integral over the domain of values of 3 and is in general intractable. We approximate this objective in practice with norms on functional evaluations at each step of the optimization. Theorem I is used guide for optimization, encourage the values of the regularizer to be zero and thus only indirectly the regularizer function itself. We give more details in Appendix D.I.1.
5

---

Under review as a conference paper at ICLR 2021
3.2 ROBUSTNESS IN TERMS OF INTERVENTIONS
As is apparent in Theorem I, performance guarantees on data from new environment depend on the relationship of new distributions with those observed during training.
Let Φx-20 minimize &. among all functions that satisfy all pairs of moment conditions defined in (5); that is, a solution to our proposed objective in (6) with X + oo. At optimality, it holds that gradients evaluated at this solution are equal across environments, As consequence of Theorem 1, the loss evaluated at this solution with respect to any affine combination of environments bounded by the average loss computed in-sample (denoted L, say),
Σ ae E AEE (z.g))Pe
C(f ((x).)) L,
for any set of de E A,
From the perspective of interventions in the underlying causal mechanism, this can be seen as a form of data-driven predictive stability across a range of distributions whose perturbations occur in the same direction as those observed during training. As minimal example for intuition, consider system of three variables (X, Y, H)), with differing interventions on only. Assume we have access to data sampled under two environments defined by joint distributions pı (X, Y, H) == p(Y.
and p2 (X, Y, H) := p(,, H (xx)). Errors are bounded with respect to any (valid) distribution of the form p(Y, H[X)(11p))) (ex)((()) (X) + aaap((X)) For instance, particular shift in the mean variance of X observed during training can be extrapolated the extreme to any shift the mean or variance of new data. With this reasoning, if enwironment-speeee sppecfffit distributions arise from differing interventions on all observed covariates X. then solutions are robust to arbitrary shifts in these variables. If, in addition, solutions are unique we may interpret them as causal, irrespective of the presence not of unobserved confounders.
The generalization properties, however, go further. Interventions unobserved variables and also target variables are accommodated for in Φx-100 if observed through shifted distributions in different available environments.
Using our simple example in Figure to verify this intuition em- pirically, we consider 3 scenarios corresponding interventions on exogenous variables of X, H and Y. In each, training data from two enviromments generated with means the distribution of the concerned variables set to a value of 0 and 1 respectively,
10
Mean squared on test data
On Ex
everything else being equal (o² := 1, H == FHr (0, 1)).
On EH
Performance is evaluated on out-of-sample data generated by in- creasing the shift in the variable being studied up to a mean of 5. In all cases, we see in Figure 2 that performance is stable to increasing perturbations in the system as long as the heterogeneity in the data allows us to capture the direction of the unseen shift.
Magnitude of the intervention
Figure 2: Stability to general shifts.
3.3 STABILITY OF CERTAIN OPTIMAL SOLUTIONS
A special case may also be considered when the underlying system of variables and the available environments allow for optimal solutions f o ox and f Φx=0 to coincide. In this case, the learned representation (xx) results in a predictor ff optimal on average and simultaneously with equal gradient in each environment, thus,
VJ (()) lke 0, for all E E (a..))~P.
E
For this representation øi it follows that optimal solutions f learned on any new dataset sampled from an affine combination of training distributions coincides with this special solution. This gives us a sense of reproducibility of learning. In other words, if a specific feature is significant for predictions on the whole range of À with the available data then it will likely be significant on new (related) data.
The above special case where all solutions in our hyperparameter range agree has important parallels with IRM (Arjovsky et al., 2019). The authors proposed a learning objective enforcing represen- tations of data with minimum error average and across environments, such that at optimum Ep, ol (X) = Ep (X) for any pair (i.j) E E. With unobserved confounding, both learning paradigms agree but, with unobserved confounding, minimum error solutions of IRM by design

---

Under review as a conference paper at ICLR 2021
converge spurious associations (see the discussion after equation (5)) and are not guaranteed to generalize to more general environments. For example, in the presence of additive unobserved con- founding H, irrespective of o, we may have Ep, Y o (X) + Ep H # (X) + Er, H Ery V|Ø (X) if the means of H differ. The sought invariance then does not hold.
4 RELATED WORK
Causality. There has been growing interest in interpreting shifts in distribution fundamentally arise from interventions in the causal mechanisms of data. Peters et al. (Peters et al., 2016) exploited this link for causal inference: causal relationships by definition being invariant to the observational regime. Invariant solutions, as result of this connection, may be interpreted also as robust to certain interventions (Meinshausen, 2018), and recent work has explored learning invariances various problem settings (Arjovsky et al., 2019; Rothenhäusler et al., 2019; Krueger et al., 2020; Gimenez & Zou, 2020). Among those, we note the invariance proposed in (Rothenhäusler et al., 2019), the authors seek to recover causal solutions with unobserved confounding. Generalization properties of these solutions were rarely studied, with one exception being Anchor regression (Rothenhäusler et al., 2018). The authors proposed interpolate between empirical risk minimization and causal solutions with explicit robustness to certain interventions in a linear model. The present work may be interpreted non-linear formulation of this principle with more general study of generalization.
Domain generalization represent one direction of out-of-sample generalization by explicitly learning representations projecting out superficial environment--pecifee information. Recent work domain generalization has included the use data augmentation (Volpi et al., 2018; Shankar et al., 2018 8),, meta-learning to simulate domain shift (Li et al., 2018) and adversarially learning representations that are environment invariant (Ganin et al., 2016), even though explicitly aligning representations has important caveats when label distributions differ, articulated for instance (Arjovsky et al., 2019).
Distributionally robust optimization explicitly solves a worst-case optimization problem (1). A popular approach is to define P as a ball around the empirical distribution P. for example using f-divergences or Wasserstein balls of defined radius (Kuhn al., 2019; Duchi et al., 2016; 2019; Sinha al., 2017; Wozabal, 2012; Abadeh et al., 2015; Duchi & Namkoong, 2018). These general and multiple environments are not required, but this also means that sets are defined agnostic to the geometry of plausible shifted distributions, and may therefore lead to solutions, when tractable, that are overly conservative or do not satisfy generalization requirements (Duchi et al., 2019).
EXPERIMENTS
Data linkages, electronic health records, and bio-repositories, are increasingly being collected to inform medical practice. As result, also prediction models derived from healthcare data are being put forward as potentially revolutionizing prcision-making
hospitals. Recent studies (Cabitza et al., 2017; Venugopalan et al., 2019), however, suggest that their performance may reflect not only their ability to identify disease-specific features, but also their ability to exploit spurious correlations due to unobserved confounding (such as varying data collection practices): a major challenge for the reliability of decision support systems. In this section, we explore this pattern conducting a wide analysis of domain generalization on image, speech and tabular data from the medical domain.
We consider the following baseline algorithms for performance comparisons.
Empirical Risk Minimization (ERM) that optimizes for minimum loss agnostic of data source.
Domain Robust Optimization (DRO) (Sagawa et al., 2019) that optimizes for minimum loss across the worst convex mixture of training environments.
Domain Adversarial ENural Netowrks (DANN) (Ganin et al., 2016) that use domain adversarial training to facilitate transfer by augmenting the neural network architecture with an additional domain classifier to enforce the distribution of d(X) to be the same across training environments.
Invariant Risk Minimization (IRM) (Arjovsky et al., 2019) that regularizes ERM ensuring repre- sentations ((X) be optimal in every observed environment.
Risk Extrapolation (REx) (Krueger et al., 2020) that regularizes for equality in environment losses instead of considering their derivatives.
7

---

Under review as a conference paper at ICLR 2021
Pneumonia Prediction Testing
Parkinson Prediction
Survival Prediction
Training
Training
Testing
Training
Testing
ERM
91.4 (:: .7)
52.4 (#: 1)
95.7 (# .5)
62.9 (#: 1)
93.2 (# 4)
75.3 .9)
DRO
91.2 (# .5)
53.1 .6)
94.0 (+ .3)
69.8 (+
90.5 (# A)
75.5 .8)
DANN
92.3 (+ 1)
57.1 (+
91.6 (+ 2)
51.4 (+
89.3 (+ 88)
73.9 .9)
IRM
89.5 (+ 1)
58.6 (+
93.6 (+ 1)
71.4 (+:
91.9 (+ .6)
75.7 .8)
REX
87.7 (1 1)
57.9 (1:
92.0 (+ 1)
72.4 (1:
91.3 (4: .5)
75.0 (#: .9)
DIRM
84.3 (1 1)
63.7 (4: 93.1 (1
72.8 (1:
91.4 (1: .6)
77.9 (# 1)
Table I:
Accuracy of predictions in percentages (%). Uncertainty intervals are standard deviations. All datasets are approximately balanced, 50% performance good as random guessing.
All trained models the same convolutional fully-connected architecture, where appropriate. Performance results are given in Table 1. Further experimental details and pseudo-code for DIRM can be found in Appendix D.
5.1 DIAGNOSIS OF PNEUMONIA WITH CHEST X-RAY DATA
In this section, we attempt replicate the study in (Zech al., 2018). The authors observed tendency of image models towards exploiting spurious correlations for the diagnosis on pneumonia from patient Chest X-rays that do not reproduce outside of training data. We use publicly available data from the National Institutes of Health (NIH) (Wang et al., 2017) and the Guangzhou Women and Children's Medical Center (GMC) (Kermany et al., 2018). Differences in distribution are manifest, and can be seen for example in the top edge of mean pmeumonia-diagnene X-rays shown in Figure 3.
In this experiment, exploit this (spurious) pathology correlation to demonstrate the need for solutions robust to changes in site- specific features. We construct two training sets, in each case 90% and 80% of pneumonia-diagnosed patients were drawn from the
GMC
NIH
NIH dataset and the remaining 10% and 20% of the pneumonia- diagnosed patients were drawn from the GMC dataset; the reverse logic (10% /90% split) was followed for the test set.
100
50
300
Figure 3: Average pneumonia X-ray.
Our results show that DIRM outperforms, suggesting that the proposed invariances guides solutions changes due to unobserved factors.
better towards robustness
5.2 DIAGNOSIS OF PARKINSON'S 'S DISEASE WITH VOICE RECORDINGS
Parkinson's disease is progressive nervous system disorder that affects movement. Symptoms start gradually, sometimes starting with a barely noticeable tremor in a patient's voice. This section investigates the performance of predictive models for the detection of Parskinson's disease, trained on voice recordings of vowels, numbers and individual words and tested on vowel recordings of unseen patients.
We used the UCI Parkinson Speech Dataset with given training and testing splits (Sakar et al., 2013). Even though the distributions features will differ in different types of recordings and patients, we would expect the underlying patterns in speech to reproduce across different samples. However, this not the case for correlations learned with baseline training paradigms (Table 1). This suggests that spurious correlations due to the specific type of recording (e.g. different vowels or numbers), even chance associations emphasized due to low sample sizes (120 examples), may be responsible for poor generalization performance. Our results show that correcting for spurious differences between recording types (DIRM, IRM, REx) can improve performance substantially.
5.3 SURVIVAL PREDICTION WITH ELECTRONIC HEALTH RECORDS
This section investigates whether predictive models transfer across data from different medical studies (the MAGGIC, 2012, studies), all containing patients that experienced heart failure. The problem is to predict survival within years of experiencing heart failure from a total 33 demographic variables. We introduce twist however, explicitly introducing unobserved confounding by omitting certain
8

---

Under review as a conference paper at ICLR 2021
predictive variables. The objective is test performance new studies with shifted distributions, while knowing that these occur predominantly due to variability in unobserved variables.
Confounded data is constructed by omitting patient's ' age from the data, found in preliminary correlation analysis to be associated with the outcome as well as other significant predictors such as blood pressure and body mass index. This example is constructed be able to control for how unobserved variables shift but note that we can expect similar phenomena in many other scenarios, where for instance prediction model is taken patients in different hospital or country with fundamental shifts in the distribution of very relevant variables (e.g. socio-economic status, ethnicity, diet, etc.) even though this information is not reported in the data. Performance is tested on all studies of over 500 patients with balanced death rates, each having slightly different age distributions. (We give more details in Appendix D). We found DIRM, robust to changes unobserved variables, to outperform all other methods.
Inftuential variables that reproduce across datasets. In the following, we tackle the problem of reproducibility of learned influential features across different experiments. Reproducing conclusions of influential features in different studies with potential shifts in the distribution an important challenge, especially in healthcare where heterogeneity between patient populations is high. We showed in section 3.3 that in the event that the optimal predictor is invariant as a function À E [0, oc), optimal predictors estimated in every new dataset in the span of observed distributions, should be stable.
We consider here form of diluted stability for feature selection. For single layer network, we consider significant those covari- ates with estimated parameters bounded away from zero in all solutions in the range À E [0, 1]. Comparisons are made with ERM (conventional logistic regression), both methods trained separately on 100 random pairs of studies. Figure 4 shows how many features (in the top 10 of predictive features) from each
DIRM
Number of reproducito features
model intersect across pairs of studies. In constrast to ERM, our objective recovers significant features much more consistently serves to demonstrate the improved reproducibility we can expect from DIRM.
100
studies
100 random
Figure 4: Reproducible features.
CONCLUSIONS
We have studied the problem of out-of-sample generalization from a new perspective, grounded in the underlying causal mechanism generating new data that may arise from shifts in observed, unobserved or target variables. Our proposal is new objective that provably robust to certain shifts in distribution, and is informed by certain statistical invariances in the presence of unobserved confounders. Our experiments show that we may expect better generalization performance and also better reproducibility of influential features in problems of variable selection.
limitation of our approach is that robustness guarantees crucially depend on the (unobserved) properties of available data. Using the proposed approach, Derivative Invariant Risk Minimization for prediction generally does not guarantee protection against unsuspected events. More specifically, we can not expect robust prediction when the heterogeneity in test data sets is different from the restricted set of shift interventions that have been observed on the training data sets. For example, in Theorem 1, the supremum contains distributions that lie in the affine combination of training environments, as opposed to arbitrary distributions.
REFERENCES
Soroosh Shafieezadeh Abadeh, Peyman Mohajerin Mohajerin Esfahani, and Daniel Kuhn. Distri- butionally robust logistic regression. In Advances in Neural Information Processing Systems, pp. 1576-1584, 2015.
Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paze Invariant risk minimization. arXiv preprint arXiv: 1907.00907.000 002993, 2019.

---

Under review as a conference paper at ICLR 2021
Aharon Ben-Tal, Laurent El Ghaoui, and Arkadi Nemirovski. Robust optimization, volume 28. Princeton University Press, 2009.
Steffen Bickel, Michael Brückner, and Tobias Scheffer. Discriminative learning under covariate shift. Journal of Machine Learning Research, 10(Sep):2137-2155. 2009.
Federico Cabitza, Raffaele Rasoini, and Gian Franco Gensini. Unintended consequences machine learning in medicine. Jama, 31866):11--518, 2017.
Raymond J Carroll, David Ruppert, Leonard A Stefanski, and Ciprian M Crainiceanu, Measurement error in nonlinear models: modern perspective. CRC press, 2006.
John Duchi and Hongseok Namkoong. Learning models with uniform performance via distributionally robust optimization. arXiv preprint 17Xiv:8810008700 2018.
John Duchi, Peter Glynn, and Hongseok Namkoong. Statistics of robust optimization: A generalized empirical likelihood approach. arXiv preprint urXiv:1610.03425, 2016.
John C Duchi, Tatsunori Hashimoto, and Hongseok Namkoong. Distributionally robust losses against mixture covariate shifts. Under review, 2019.
Wayne A Fuller. Measurement error models, volume 305. John Wiley & Sons, 2009.
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Dowain-adversarial training of neural networks. The Journal of Machine Learning Research, 17(1):2096- 2030, 2016.
AmirEmad Ghassami, Saber Salehkaleybar, Negar Kiyavash, and Kun Zhang. Learning causal structures using regression invariance. In Advances in Neural Information Processing Systems, pp. 3011-3021, 2017.
Jaime Roquero Gimenez and James Zou. Identifying invariant factors across multiple environments with kl regression. arXiv preprint 1:Xxv:2002.08341,, 2020.
Daniel S Kermany, Michael Goldbaum, Wenjia Cai, Carolina CS Valentim, Huiying Liang, Sally Baxter, Alex McKeown, Ge Yang, Xiaokang Wu, Fangbing Yan, al. Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell, 172(5): 122-1131111 131, 2018.
David Krueger, Ethan Caballero,
Jacobsen, Amy Zhang, Jonathan Binas, Remi Le Priol, and Aaron Courville. -ut-o--distributtin generalization via risk extrapolation (rex). arXiv preprint arXiv:2003.00688 2020.
Daniel Kuhn, Peyman Mohajerin Esfahani, Viet Anh Nguyen, and Soroosh Shafiezzadel-Abadeh. Wasserstein distributionally robust optimization: Theory and applications in machine learning. In Operations Research & Management Science in the Age Analytics, pp. 130-166. INFORMS, 2019.
Giovanni Leoni. A first course in Sobolev spaces. American Mathematical Soc., 2017.
Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Learning to generalize: Meta- learning for domain generalization. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
MAGGIC. The survival of patients with heart failure with preserved or reduced left ventricular ejection fraction: individual patient data meta-analysis. European heart journal, 33(14): 1750-1757, 2012.
Nicolai Meinshausen. Causality from distributional robustness point of view. In 2018 IEEE Data Science Workshop (DSW), pp. 6-10. IEBE, 2018.
Judea Pearl. Why there no statistical test for confounding, why many think there is, and why they are almost right. 1998.
Judea Pearl. Causality Cambridge university press, 2009.
10

---

Under review as a conference paper at ICLR 2021
Jonas Peters, Peter Bühlmann, and Nicolai Meinshausen. Causal inference by using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 78(5):947-1012, 2016.
Dominik Rothenhäusler, Nicolai Meinshausen, Peter Bühlmann, and Jonas Peters. Anchor regression: 06229, 2018.
heterogeneous data meets causality. arXiv preprint
Dominik Rothenhäusler, Peter Bühlmann, Nicolai Meinshausen, et al. Causal dantzig: fast inference in linear structural equation models with hidden variables under additive interventions. The Annals of Statistics, (18)):668--1222 2019.
Shiori Sagawa, Pang Wei Koh, Tatsunori Hashimoto, and Percy Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. arXiv preprint arXiv: 1911 190731,,, 2019.
Betul Erdogdu Sakar, M Erdem Isenkul, Okan Sakar, Ahmet Sertbas, Fikret Gurgen, Sakir Delil, Hulya Apaydin, and Olcay Kursun. Collection and analysis of parkinson speech dataset with multiple types of sound recordings. IEEE Journal of Biomedical and Health Informatics, 17(4): 828 834, 2013.
Shiv Shankar, Vihari Piratla, Soumen Chakrabarti, Siddhartha Chaudhuri, Preethi Jyothi, and Sunita Sarawagi. Generalizing across domains via cross- goosiegradeett training. arXiv preprint arXiv:1804. 10745, 2018.
Aman Sinha, Hongseok Namkoong, and John Duchi. Certifying some distributional robustness with principled adversarial training. arXiv preprint 1rXiv:1710.10571 2017.
Amal Rannen Triki, Maxim Berman, and Matthew B Blaschko. Function norms and regularization in deep networks. arXiv preprint arXiv: 1710006000 2017.
Subhashini Venugopalan, Arunachalam Narayanaswamy, Samuel Yang, Anton Gerashcenko, Scott Lipnick. Nina Makhortova, James Hawrot, Christine Marques, Joao Pereira, Michael Brenner, et al. It's easy to fool yourself: Case studies on identifying bias and confounding in dio-medical datasets. arXiv preprint arXiv: 19 2019.
Riccardo Volpi, Hongseok Namkoong, Ozan Sener, John C Duchi, Vittorio Murino, and Silvio Savarese. Generalizing to unseen domains via adversarial data augmentation. In Advances in Neural Information Processing Systems, pp. 5334-5344 2018.
Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri, and Ronald M Summers. Chestx-ray8: Hospital-scale chest x-ray database and benchmarks weakly-supervised classi- fication and localization of common thorax diseases. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2097-2106 2017.
David Wozabal. A framework for optimization under ambiguity. Annals of Operations Research, 193 (1):21-47, 2012.
John R Zech, Marcus A Badgeley, Manway Liu, Anthony B Costa, Joseph J Titano, and Eric K Oermann. Confounding variables can degrade generalization performance of radiological deep learning models. arXiv preprint 1xXiv:18077004311 2018.

---

Under review as a conference paper at ICLR 2021
Appendix
This Appendix contains 4 sections.
Section A presents additional experiments designed to demonstrate the causal interpretation one may give to DIRM all conditions for causality are satisfied (i.c. are available interventions on all observed variables). We also include sensitivity analysis show the impact performance of changing the regularization parameter X.
Section B shows how measurement error may be interpreted as an instance of unosebrved con- founding.
Section C provides proofs for the statements made in the main body of this paper.
Section D gives additional experimental details, including on the implementation of DIRM and on the datasets used.
A ADDITIONAL EXPERIMENTS
So far, we have considered predictive performance under different data distributions with selected hyper-parameter configurations of all algorithms illustrate heterogeneous behaviour of algorithms trained with different learning principles the presence of unobserved confounders. this section we revisit our introductory example to investigate in more details learned prediction rules and any sensitivities of interest, especially to hyper-paramette configuratioss.
We will use the same data generating mechanism presented in the introductory example in Figure of the main body of this paper. Recall that we assume access to observations of variables (X1, X2, Y) in two training datasets, each dataset sampled with differing interventions (X1, X2) (in this differing variances x² = and x² = 2) from the following structural model,
x= = - + Ex2T Y = X2 + 3H Ey,
X x Y + X₂ Ex, : En
where Ex, Ex2 N(0, Ey NO 1), Eg NO 1) are exogenous variables. H is unobserved confounder, not observed during training but that influences the observed association between X2 and Y.
A.1 RECOVERY OF CAUSAL CORFFICIENTS
In this section, given the above two training datasets, we inspect the weights learned in a simple one layer feed-forward neural network to determine exactly whether unobserved confounding induces given learning paradigm to exploit spurious correlations and to what extent.
By way of preface, we have mentioned that causal, in contrast with spurious, solutions to prediction problem may be defined as the argument solving,
minimize sup [(e.))P([(((()) v)1 PEP
for P defined as any distribution arising from arbitrary interventions on observed covariates leading shifts in their distribution Pa (see sections 3.2 and 3.3 (Meinshausen, 2018) for detailed discussion of this result). This objective is a special case of the proposed optimization problem (6), specifically
an affine combination (with À + oc) of distributions with different shifts in Pa in all observed variables
We demonstrate this fact empirically in Table In principle, causal solutions are recoverable with the proposed approach because do observe during training environments with shifts in X2), irrespective of the presence or not of unobserved confounders. We see that this holds approximately for the proposed objective with estimated coefficients (0.01, 0.95) for (X,, X2) close to the true causal coefficients (0, 1). In contrast, ERM returns biased coefficients and so does IRM.
This empirical observation is important because it highlights the fact that enforcing minimum gradients on average (ERM) or simultaneously across environments (the regularization proposed by IRM) is appropriate to recover causal coefficients in the presence of unobserved confounders.
12

---

Under review as a conference paper at ICLR 2021
OLS
Causal
A
DRO
A-4
A-8
Mean squared error on best data
Mean squared error
Mean squared 68 itest data
10
on 30
20
10
2
3
Variance
Variance with unobserved confounding
of hidden confounder in test data
without unobserved confounding
Figure 5: Sensitivity of solutions to hyperparameter A. Ordinary Least Squares (OLS) and the causal solution, with coefficients (0, 1) for (X1, X2) are two extremes (A 0 and À -> respectively) of the spectrum of solutions that be attained with the proposed approach. Positive values of interpolate in sense between OLS and causal solutions this case. Here DRO corresponds to DIRM with À 2, approximately.
however, no unobserved confounders exist in the system being modelled (H the data generating mechanism) our objective and IRM are equivalent in the limit, and estimated parameters coincide with the causal solution approximately. This experiment given Table
Truth
ERM
IRM (A - oo) [0.75, -0.76]
DIRM (A - oo)
Estimated parameters
[0, 1]
[0.91, -1022
[0.01. 0.95]
Table 2: Bias in estimation with unobserved confounders.
Truth [0,
ERM
IRM (A oo)
DIRM (A oo)
Estimated parameters
[0.5, -0.6]
[0.01, 0.98]
[0.02, 0.96]
Table 3: Bias in estimation without unobserved confounders.
A.2 SENSITIVITY HYPER-PARRE PARAMETERS
The robustness guarantees any particular solution depends on the extent the extrapolation desired (as function of X). For larger values of this parameter we can expect solutions to be robust in larger of distributions, spanning empirical risk minimization for À 0, convex combinations, to training environments to arbitrary affine combinations of training environments for increasing X.
In this section, we analysed performance in data with the exact same data generating mechanism as considered in the introduction of the main body of this paper as a function of X. Figure 5 gives our performance results that empirically verifies that the proposed approach interpolates between empirical risk minimization and causality in this case. We solutions converge to ERM, for À = the solutions was equivalent to DRO, and for increasing À the solutions approximate the causal one in the limit.
that for approaching zero
B OTHER EXAMPLES OF UNOBSERVED CONFOUNDING
Measurement error. The data generating processes described in the main body this paper for instance, as well as most of machine learning, assume that all nuisance variability enters the causal mechanisms the data; that is, observed data reflects only causal drivers. this is not the case, for example because of independent measurement noise observed in data but that does not propagate to across causal children, regression is known to be inconsistent in general (Carroll et al., 2006) and its bias analogous form of unobserved confounding.
13

---

Under review as a conference paper at ICLR 2021
Consider simple model for illustration. Suppose Y) observed subject measurement noise, X = X + Eg and Y Y + Ey. which are not causally related to one another but rather = 3X + E. Let E, P H and E, = H be the structure of measurement error independent of X and Y. Then substituting our observed data (X*, Y*) into the underlying (X, Y) relationship the observed model is,
= 3X + (B, - 3,3)H +B, -
(10)
A special case of regression with unobserved confounders H.
C TECHNICAL RESULTS
This section provides a more complete discussion of the assumptions and justification statements relating causality in section 2.2, and the proof of Theorem 1.
C.I INVARIANCES IN THE PRESENCE OF UNOBSERVED CONFOUNDING
In section 2.2 justified exploiting certain invariance of causal coefficients in the inner product of functions of the data X and residuals E, to occur even in the presence of unobserved confounders as long interventions that define different environments do not involve unobserved confounders H.
Here we show this invariance to hold in the special case of an additive model. The general data gener- ation mechanism is follows. Data sources, different environments, emerge from manipulations in exogenous Ex, related to X only, in an underlying additive model F with also additive functions fi, f2, Ja. f4.
Y = fi()+ f2(1I + Ey,
x fa(X) + f4(H) Ex,
: EH
(1I)
Exogenous variables (Ex, Ey, EH) may have arbitrary distributions but only Ex or Ey vary across environments. Then it holds that,
X -I- + -I- -
-[I-1a)- fa) Ex
and that,
((2(En) + Ey)
which is a product of functions involving Fr in one term, EBs and FLy in another term, Ex and ES in another term, and Fxx and Fy in the last term. Since (Ex, Ey, FH) are mutually independent taking expectations of product functions involving Ex and Eg, Ex and Eg, and, Ex and Ey equals assuming f(EE) 0 for ,,...,4 and j {X, H...
So concluding, the expectation of the inner product (x)((X)(Y- - does not depend on Ex Ey and is thus stable across environments that have changing distributions for Ex Ey. Now note that other functions than fi may have this property well, i.c. predictors that satisfy this invariance are not necessarily unique and will depend on the differences between available environments. If however, only one predictor exist that satisfies this invariance we may say that this predictor is causal. We summarize this claim in the following statement.
Proposition 1 Let Y and X be related by non-linear additive model with unobserved confounding as (11), Then,
ER (X) Ep, (Y)(
(12)
under the assumption that distributions (X,Y) P: and P3 are given by data generating mecha- nism (11) subject to interventions on Ex or Ey only. Moreover, a function f satisfying the above equality, if unique is equal f1.
14

---

Under review as a conference paper at ICLR 2021
C.2 PROOF OF THEOREM 1
We restate the Theorem for convenience.
Theorem 1 Let (Pe) be of available environments. Further let the parameter space of be open and bounded, such that the expected loss function L as function of B belongs to a Sobolev space. Then, the following inequality holds,
sup act
Eae
E (a.u)muPe
C C(f 6(x), I
E
(ffo)(z).))
(a
CEE
+ (1 + mn)
sup
E CEE (2.0)~..
V (fo
E (x.g)~Pe.enE V
L2
where C depends on the domain of 3, n : |ε| is the number of available environments and loosely denotes sampling indeces with equal probability from
Proof. Let Ω denote the parameter space of 3. The following derivation shows the claim,
sup a.EA,
Σa
ac E
L ((x),))
(a.
EEE
nn) sup EEE (a.)>~P
L(f ((fo)(z).v)
R.. Ep. ((x))))))))))
aNE
(( + mn)
sup E
L o ((x),))
cEE (z.j)-e
(11 1/n) Σ (a.y)~P
C( ((fo((z).))
C( o ((z)())))))
(aie)~Pa
+ nm)
sup E ((Soo(r),)) (e.)>P ((fo(())
E (a.)
L(J C( o (()))))))))))))))))))
EEE
E (a.
+ +1+ M
sup E L(fo EEE (a.u)~PP
E (x.))
C(f o(x),
L.2
where the inequality is given by the property that the evaluation functional is a bounded linear operator in certain Sobolev spaces W, for example with Ω Rd and L2 norm. In particular this means that lf(()) - Ml for all E W. It follows then also that the above is.
C(f o v)x),))
(x.
(1+mm) P- M
sup E REE (a.0)~P.
(f
E (a.
(f v)
L2
by Poincaré's inequality for Sobolev functions defined open, bounded parameter space, e.g. (Leoni, 2017). The assumption we make here for this last inequality to hold is that the region where the difference in loss functions is zero large enough such that the integral of the gradient is also large enough to control the integral of the function. This holds however for functions defined on many "reasonable" parameter spaces (Lipschitz suffices).
15

---

Under review as a conference paper at ICLR 2021
D EXPERIMENTAL DETAILS
This section gives implementation details of DIRM, additional experiments to test sensitivities relating optimization choices, and complete description of the data and experiments performed in the main body of this paper.
D.1 IMPLEMENTATION DETAILS
The regularizer in DIRM's objective in equation (6) controls the regularity or variation of the prediction function and encourages to learn representation é that results in prediction function with similar derivatives in all training domains. The L2 norm integrates out the influence of / in the regularizer and thus most of the optimization involves though 3 still plays role in the first term of the objective.
In all experiments, thth R as well F + R implemented as fully connected neural networks (ń with optional hidden layers). B can thus be interpreted as the weights and biases of f. The I-2 norm must be approximated in practice, which do by evaluating the vector norm of the derivative of f with respect to 3 on a batch of training examples of each environment. The variance the computed norms between environments a proxy for the maximum deviation between environments with smoother gradient vector field. Each step of the optimization then alternates between an update on & and update on f. as detailed in the algorithm below.
DIRM is sensitive to initialization and to the choice of hyperparameterss specifically its optimization schedule. In our experiments, we found best performance by increasing the relative weight of the penalty term À after fixed number of iterations (and similar implementations are used for IRM and REx that suffer from similar challenges). This we believe could be significant limitation for its use in practice since this choice must be made a priori. We investigated the sensitivity of DIRM to this optimization schedule in Table 4 that shows test accuracy as function of the iteration which penalty term weight À is increased.
2 epochs
4 epochs
6 epochs
epochs
10 epochs
12 epochs
IRM
56.4 (1 6)
58.1 (1 3)
59.2 (1: 3)
59.1 ( 2)
58.1 (1 3)
57.8 (+ 1)
55.3 (+ 8)
57.9 (+ 4)
60.6 (+ 3)
60.5 (+ 2)
57.7 (+ 3)
54.7 (+ 2)
DIRM
54.1 (+ 7)
61.7 (+: 4)
63.8 (+: 3)
63.5 (#
62.6 (+ 2)
58.2 (+ I)
Table 4: Test set performance (accuracy in %) on X-ray data as function of the number of epochs used to increase penalty A.
Choosing this number accurately is important for generalization performance. If À is increased too early, different initialization values (and the complex loss landscape) lead different solutions with unreliable performance and large variance. This happens for all methods. An initial number of iterations minimizing loss in-sample improves estimates for all methods which then converge to solutions that exhibit lower variance.
16

---

Under review as a conference paper at ICLR 2021
Algorithm 1 DIRM
Input: datasets D1,.... Dg in different environments, parameter X, batch size K
Initialize: neural network model parameters Ø, B while convergence criteria not satisfied do
for e I...., E do
Estimate loss (,( 3) empirically using a batch K examples from De. Estimate derivatives V&Le(d, B) empirically using a batch of K examples from De.
end for
Update by stochastic gradient descent with,
E Ecc0))))
V E e=1
Update by stochastic gradient descent with,
E Lo(d, Var(IV VVgl,,,,,VV
end while
D.1.1 APPROXIMATION OF THE L2 NORM PRACTICE
The bound given in Theorem quantifies the discrepancy between function derivatives using the L2 norm, defined as an intregal over possible parameter values B. For neural networks, computation of the L2 norm largely intractable and specifically, for networks of depth greater equal to it is an NP-hard problem (see Proposition in (Triki et al., 2017)). Some approximation is thus unavoidable. One option is recognise the L2 norm as an expectation over functional evaluations,
[lfll, (z-z(()) [=] 1/2 for continuous function taking values sampled uniformly from its domain θ. Empirical means are tractable yet they induce a much higher computational burden these must be computed in every step of the optimization. Our approach is to take this approximation to its limit, making single function evaluation at each step of the optimization using the current estimate 3, written in Algorithm
This approximation loosens the connection between the bound given in Theorem and the proposed algorithm. remains justified however from a conceptual perspective the objective of controlling an L2 type of norm is to encourage the regularizer function towards O, and thus the values of the regularizer (which we do explicitly). For empirical comparisons with the empirical mean approach, we implemented empirical means using all combinations of parameter values chosen from a grid of parameter values around the current estimate 3, (0.25,3, 0.5,3, B8, 2,3,44 4,3). Table shows similar performance across the real data experiments considered in the main body of this paper. A single evaluation practice enough to monitor invariance of representations to environment-speccft loss derivatives.
Pneumonia Prediction
Parkinson Prediction
Survival Prediction
DIRM-meamd DiRM-single
63.5 3)
73.0 (+: 1.5)
78.0 .9)
63.7 (+: 3)
72.8 (+: 2)
77.9 (+: 1)
Table 5: Test set performance (accuracy in %) real datasets for different regularizer approximations the La norm.
17

---

Under review as a conference paper at ICLR 2021
D.2 DATA DETAILS
D.2.1 X-RAY DATA
We create training environments with different proportions of X X-rays from our two hospital sources to induce a correlation between the hospital (and its specific data collection procedure) and the pneu- monia label. The objective is to encourage learning principles to exploit spurious correlation, data collection mechanisms should not be related to the probability of being diagnosed with pneumonia. The reason for creating two training data sets with slightly different spurious correlation patterns is to nevertheless leave a statistical footprint in the distributions to disentangle stable (likely causal) and unstable (likely spurious). In each of the training and testing datasets we ensured positive and negative labels remained balanced. The training datasets contained 2002 samples each and the testing dataset contained 1144 samples.
All learning paradigms trained a convolutional neural network, 2 layers deep, with each layer consisting of convolution (kernel size of 3 and a stride of 1). All predictions were made off of the deepest layer of the network. The number of input channels was 64, doubled for each subsequent layer, and dropout was applied after each layer. We optimize the binary cross-entropy loss using Adam (learning rate 0.001) without further regularization on parameters and use Xavier initialization. While learning with IRM and the proposed approach, the respective penalty À = 1 is added to the loss after 5 epochs of learning with À = O. Experiments are run for maximum of 20 epochs with early stopping based on validation performance. All results are averaged over 10 trials with different random splits of the data, and the reported uncertainty intervals standard deviations of these 10 performance results.
D.2.2 PARKINSON'S 'S DISEASE SPEECH DATA
The data includes a total of 26 features recorded on each sample of speech and set training and testing splits which we use in our experiments. For each patient 26 different voice samples including sustained vowels, numbers, words and short sentences where recorded, which we considered to be different but related data sources. We created three training environments by concatenating features from three number recordings, concatenating features from three word recording and concatenating features from three sentences; for a total of 120 samples in each of the three training environment. The available testing split contained 168 recordings of vowels, which expect to differ from training environments because these are different patients and do not contain numbers or words. Positive and negative samples were balanced in both training and testing environments.
On this data, for all learning paradigms we train a multi-layer perceptron with two hidden layers of size 64 with tanh activations and dropout (p = 0.5) after each layer. As in the image experiments, we optimize the binary cross-entropy loss using Adam (learning rate 0.001), ), L2 regularization on parameters and use Xavier initialization. While learning with IRM and the proposed approach, the respective penalty is added to the loss À = 1 after 200 epochs of learning with X = 0 to ensure stable optimization. Experiments validation performance. All results are averaged over 10 trials with different random seeds of our algorithm. This is give sense of algorithm stability rather than performance stability.
for maximum of 1000 epochs with early stopping based on the
D.2.3 MAGGIC ELECTRONIC HEALTH RECORDS
MAGGIC stands for Meta-Analysis Global Group in Chronic Heart Failure. The MAGGIC meta- analysis includes individual data on 39, 372 patients with heart failure (both reduced and preserved left-ventricular ejection fraction), from 30 cohort studies, six of which were clinical trials. 40.2% of patients died during a median follow-up of 2.5 years. For our purposes, we removed patients that were censored or lost to follow-up to ensure well-defined outcomes after 3 years after being discharged from their respective hospitals. A total of 33 variables describe each patient including demographic variables: age, gender, race, etc; biomarkers: blood pressure, haemoglobin levels, smoking status, ejection fraction, etc; and details of their medical history: diabetes, stroke, angina, etc.
To curate our training and testing datasets, we proceeded as follows. On all patients follow-up up over years, estimated feature influence of survival status after three years. A number of variables were significantly associated with survival out of which we chose Age, also found correlated with BMI and number of medical history features, confounder for the effect of these variables on survival. We
18

---

Under review as a conference paper at ICLR 2021
used three criteria select studies: having more than 500 patients enrolled and balanced death rates (circa 50%). 5 studies fitted these constraints: 'DIAMO', 'ECHOS', 'HOLA', 'Richa', "Tribo', Each was chosen in turn target environment with models trained on the other training environments.
Feature reproducibility experiments. A natural objective for the consistency of health care and such that may reproduce the experiments and their results in different scenarios is find relevant features that are not specifie to an individual medical study, but can also be found (replicated) on other studies with different patients. Heterogeneous patients and studies, along with different national guidelines and standards of care make this challenging. In our experiments we made comparisons of reproducibility in parameter estimates for models trained using Empirical Risk Minimization (ERM) and DIRM. We chose networks with single layer with logistic activation and focused on the estimation of parameter to understand the variability in training among different data sources. Naturally, feature importance measured by parameter magnitudes makes sense only after normalization of the covariates to the same (empirical) variance (equal to 1) in each study separately, After this preprocessing step, for both ERM and the proposed approach trained separate networks on 100 random pairs of studies (each pair concatenated for ERM) and returned the top 10 significant features (by the magnitude of parameters). Over all sets of significant parameters then identified how many intersected across a fixed number of the 100 runs.
The same architecture and hyperparameters in Parkinson's 's discase speech data experiments was used for MAGGIC data except that we increase the maximum training epochs to 5000.
19


Reviews:
[{"review_id": "wYVk6lmaT_h", "reviewer": "AnonReviewer3", "summary": "", "questions": "", "limitations": "", "rating": 7, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "The authors propose an optimization objective for out-of-sample generalization that aims to exploit statistical structure that emerges from underlying causal mechanisms and is hence transferable across domains. Effectiveness of the approach is demonstrated on several real-world datasets.\nThe problem is thoroughly motivated and relevant literature reviewed. Experiments support the authors claims, although real-world examples seems somewhat contrived.\nThe paper lacks an investigation of where and how the proposed methodology fails. It would have been helpful to provide more intuition around the formal explanations in section 2 and 3.\n\n\n## Detailed Comments\n- \"new or related data\" -> what does \"related data\" mean?\n- \"Doing so is difficult however, some form of uncertainty about the distribution of new data is unavoidable.\" -> Please check grammar\n- (eq1): why are we taking the *supremum* of the expected loss over distributions?\n- \"to problem (9)\" -> I think you mean (1). Prolly the eqs (1) and (9) have the same latex equation label.\n- acronym DRO is not defined in text (only in figure caption)\n\n", "extra_scores": {}, "extra_text": {}}, {"review_id": "pnH-awcXILV", "reviewer": "AnonReviewer1", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "summary:\nThis paper proposes a new domain generalization (DG) method, which enjoys certain statistical invariance property in the presence of unobserved confounders. The method is motivated by causal understanding of the underlying generating distribution and it assumes that the distribution generating the unseen data is obtained by manipulating the distribution of exogenous variables in the causal model.\n\n\npros:\n- this work views the distribution family of training data as generated from manipulating a causal model $M$, which is novel in DG methods and of pracitical significance.\n\n- the idea is well motivated (section 2) and clearly presented (section 3)\n\n- related works are properly mentioned and discussed\n\n\ncons:\n- the considered distribution family seems a bit restrictive as it requires manipulation only on exogeneous variables in additive structural equations.\n\n- the algorithm is not available in both the main text and appendix.\n\n- the proposed DG method is not empirically studied on widely used benchmark data sets. \n\n\ndetailed comments:\n- It seems the method can only handle confounder of two variables with an additive structureal euqation relating them. If that is the case, it would be better to elaborate corresponding requirements in numbered assumptions.\n\n- The derivation of the last inequality in the proof of theorem 1 is not very straightforward. It would be better to elaborate its derivation in the appendix.\n\n- Since the analysis throughout the main text assumes a given $\\phi(x)$ but one has to learn both $f$ and $\\phi$ in practice, it would be better to give the algorithm used in experimental section in the main text.\n\n- Experiments on popular DG data sets (e.g., VLCS) are missing in this work. It would be better to show the performance of the proposed method on benchmark data set. If possible, it would  be great to also consider comparing with REx [1].\n\nminor:\n- typo under Eq. (5), *indeces*\n\n[1] David Krueger, Ethan Caballero, Joern-Henrik Jacobsen, Amy Zhang, Jonathan Binas, Remi Le Priol, and Aaron Courville. Out", "extra_scores": {}, "extra_text": {}}, {"review_id": "jl4khaMy6NZ", "reviewer": "AnonReviewer4", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "Summary: This paper proposes a new regularizer that can be plugged in gradient-based learning algorithms, which aims at solving the problems induced by unobserved confounders. And the authors provide the upper bound for one specific kind of distributionally robust optimization problem, whose uncertainty set is defined as the affine combinations of training distributions. And based on this the algorithm is proposed to deal with the problem of unobserved confounders. Experiments on three medical datasets validate the effectiveness of the method. \n\nStrengths: \n1.\tThe authors provide the upper bound of a group-DRO-like problem whose uncertainty set is the affine combination of training environments. \n2.\tThe authors provide the moment conditions for each pair of environments under linear settings with unobserved confounders and show that the gradients should not be forced to be zero. \n3.\tThree medical experiments validate the effectiveness of the proposed method. \n\n\nWeaknesses:\nIn spite of the strengths mentioned above, there are a few questions that are confusing. \n1.\tAs for the simulated experiment: What is the purpose of the third figure in Figure 1? It shows that the perfect causal model performs bad under unobserved, while the other three methods performs almost the same. Further, the performance of the proposed DIRM and DRO is quite similar in this setting, which does not account for the effectiveness of the method. Besides, the result of IRM for this experiment is missed. \n2.\tAs for the theoretical analysis: \na)\tFor Theorem 1, the right hand equation uses L_2 norm of a function of beta. I read the prove and I think this norm is defined as an integral which has nothing do with beta any more. Therefore, I wonder what does the regularizer proposed in equation(6) means since beta has already been integrated. \nb)\tFor Theorem 1, the core assumption is ‘the expected loss function as a function of beta belongs to a Sobolev space’, which is confusing. Could you provide some explanations of this assumption or give some examples of it?\nc)\tTheorem 1 provides an upper bound for one specific kind of DRO problem whose uncertainty set is formulated as an affine combination of training distributions. However, in this article, the authors do not state what is the definition of the invariance here and why solve such DRO problem could achieve the invariance. \n3.\tAs for the proposed objective function:\na)\tAs mentioned above, the L_2 norm is taken over a function of beta, which I think is not the Euclidean norm of the vector. Beta has already been integrated and this regularizer has nothing do with beta. I wonder how to compute this when optimizing?\nb)\tI wonder how this objective function can be optimized efficiently? The first concern is mentioned above as the computation of L_2 norm. The second concern is how to optimize the variance which is non-convex and hard to optimize. Namkoong et al. [1] convert the optimization of a variance-regularized problem to a f-divergence DRO for better optimization, while in this paper the authors take the opposite way. I wonder is there any theoretical guarantee of the optimization of the objective function(6). \n4.\tAs for the experiments:\na)\tThe experimental results on the last two datasets are not convincing enough to validate the effectiveness of the proposed method, since the performance is similar to IRM, which I wonder if it is caused by the problems mentioned above(in 3).\n\n[1] Duchi, J. , & Namkoong, H. . (2016). Variance-based regularization with convex objectives.", "extra_scores": {}, "extra_text": {}}, {"review_id": "KBe24KZKuCr", "reviewer": "AnonReviewer2", "summary": "", "questions": "", "limitations": "", "rating": 9, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "--- Update after discussion ---\n\nAfter looking at the concerns raised by the other reviewers and the author responses, I have the following comments:\n\n1. I think the that authors have more than adequately addressed the concerns raised by reviewer 4. With that said, I agree with reviewer 4 in that the link between theorem 1 and the proposed objective and its approximation is not made sufficiently clear in the text. \n\n2. I whole-heartedly agree with reviewer 1 that a clear and concise list of the assumptions made would improve the paper.\n\nOverall, however, I think the paper should still be accepted and will keep my original rating.\n\n--- Original review ---\n\nOverall, I found this to be an excellent paper. The topic of generalizing to new environments is clearly important and the authors do a good job motivating this problem. I found the paper well written and clear, with many intuitive examples. I found the method compelling and the theory appears correct. The experiments were well designed and convincing. Insofar as I have concerns with the paper, they relate to clearly communicating the specific setting considered by the authors and contrasting their work with others (details below).\n\n--- Comments --- \n\n1. One piece that was unclear to me was why if was necessary to assume that $\\mathbb{F}$ remains fixed. Shifts in $\\mathbb{F}$ are certainly possible in real applications (e.g., consider a change in a treatment policy relating observed lab measurements to observed treatments at a particular hospital). Is this a constraint on the method? That is, if the observed environments contain shifts in $\\mathbb{F}$, would the proposed method fail to produce a model that is robust to those shifts?\n\n2. More generally, I didn't think the assumptions were clearly communicated. I think paragraph 2 of A.3.1 should probably be moved into the main paper.\n\n3. I found the example in the intro a bit unclear. I would try to communicate earlier what you are hoping to show with the example. Additionally, at this point in the paper, it is not really clear what a \"causal solution\" is or how it differs from the proposed solution. \n\n4. I thought the remarks following Equation (5) were very helpful and would recommend adding a similar high-level discussion after Theorem 1. Something like: The first term on the RHS is the expected loss and the second term is zero if the constraints discussed above are satisfied, thus by minimizing the constrained expected loss, we are minimizing an upper bound on the LHS.\n\n5. By the time I got to Equation (6) I found myself wondering why *this* robust objective is better than all the others. This was then addressed, in part, by the last parts of 3.1 and 3.3, but I would consider including a more explicit contrast between these various objectives earlier in the paper. I think something like Section 2 of Kreuger et al. (2020) would help contextualize your contribution a bit better.\n\n6. Links to Equation (9) should be swapped for Equation (1) (e.g., page 1, par 2).\n\n7. I would recommend swapping $\\alpha$ for another symbol since $\\alpha_e$ is also used.", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Meta-review: This paper deals with domain generalization with causal modeling. Specifically, it considers a broader class of distribution shifts, arising from the system intervention perspective, and proposes some robust learning principle to achieve domain generalization. The paper is well written and has some interesting ideas. However, as pointed by Reviewers #1 and #4, the exact problem setting should be made more explicit, the theory and algorithm should be more consistent, and some very relevant contributions in the literature should be discussed or compared with. 
Decision: Reject