Causal Imitation Learning with Unobserved Confounders

Junzhe Zhang, Daniel Kumor, Elias Bareinboim

Introduction

A unifying theme of Artificial Intelligence is to learn a policy from observations in an unknown environment such that a suitable level of performance is achieved [33, Ch. 1.1]. Operationally, a policy is a decision rule that determines an action based on a certain set of covariates; observations are possibly generated by a human demonstrator following a different behavior policy. The task of evaluating policies from a combination of observational data and assumptions about the underlying environment has been studied in the literature of causal inference and reinforcement learning . Several criteria, algorithms, and estimation methods have been developed to solve this problem . In many applications, it is not clear which performance measure the demonstrator is (possibly subconsciously) optimizing. That is, the reward signal is not labeled and accessible in the observed expert’s trajectories. In such settings, the performance of candidate policies is not uniquely discernible from the observational data due to latent outcomes, even when infinitely many samples are gathered, complicating efforts to learn policy with satisfactory performance.

An alternative approach used to circumvent this issue is to find a policy that mimics a demonstrator’s behavior, which leads to the imitation learning paradigm . The expectation (or rather hope) is that if the demonstrations are generated by an expert with near-optimal reward, the performance of the imitator would also be satisfactory. Current methods of imitation learning can be categorized into behavior cloning and inverse reinforcement learning . The former focuses on learning a nominal expert policy that approximates the conditional distribution mapping observed input covariates of the behavior policy to the action domain. The latter attempts to learn a reward function that prioritizes observed behaviors of the expert; reinforcement learning methods are then applied using the learned reward function to obtain a nominal policy. However, both families of methods rely on the assumption that the expert’s input observations match those available to the imitator. When unobserved covariates exist, however, naively imitating the nominal expert policy does not necessarily lead to a satisfactory performance, even when the expert him or herself behaves optimally.

This example shows that even when one is able to perfectly mimic an optimal demonstrator, the learned policy can still be suboptimal. In this paper, we try to explicate this phenomenon and, more broadly, understand imitability through a causal lens Some recent progress in the field of causal imitation has been reported, albeit oblivious to the phenomenon described above and our contributions. Some work considered settings in which the input to the expert policy is fully observed , while another assumed that the primary outcome is observed (e.g., YY in Figure 1(a)) . . Our task is to learn an imitating policy that achieves the expert’s performance from demonstration data in a structural causal model [29, Ch. 7], allowing for unobserved confounders (UCs) affecting both action and outcome variables. Specifically, our contributions are summarized as follows. (1) We introduce a complete graphical criterion for determining the feasibility of imitation from demonstration data and qualitative knowledge about the data-generating process represented as a causal graph. (2) We develop a sufficient algorithm for identifying an imitating policy when the given criterion does not hold, by leveraging the quantitative knowledge in the observational distribution. (3) We provide an efficient and practical procedure for finding an imitating policy through explicit parametrization of the causal model, and use it to validate our results on high-dimensional, synthetic datasets. For the sake of space constraints, we provide all proofs in the complete technical report [15, Appendix A].

In this section, we introduce the basic notations and definitions used throughout the paper. We use capital letters to denote random variables (XX) and small letters for their values (xx). DX\mathscr{D}_{X} represents the domain of XX and PX\mathscr{P}_{X} the space of probability distributions over DX\mathscr{D}_{X}. For a set X\bm{X}, ∣X∣|\bm{X}| denotes its dimension. We consistently use the abbreviation P(x)P(x) to represent the probabilities P(X=x)P(X=x). Finally, I{Z=z}I_{\{\bm{Z}=\bm{z}\}} is an indicator function that returns 11 if Z=z\bm{Z}=\bm{z} holds true; otherwise 00.

Calligraphic letters, e.g., G\mathcal{G}, will be used to represent directed acyclic graphs (DAGs) (e.g., Figure 1). We denote by GX‾\mathcal{G}_{\overline{\bm{X}}} the subgraph obtained from G\mathcal{G} by removing arrows coming into nodes in X\bm{X}; GX‾\mathcal{G}_{\underline{\bm{X}}} is a subgraph of G\mathcal{G} by removing arrows going out of X\bm{X}. We will use standard family conventions for graphical relationships such as parents, children, descendants, and ancestors. For example, the set of parents of X\bm{X} in G\mathcal{G} is denoted by pa(X)G=∪X∈Xpa(X)G\mathit{pa}(\bm{X})_{\mathcal{G}}=\cup_{X\in\bm{X}}\mathit{pa}(X)_{\mathcal{G}}. ch\mathit{ch}, de\mathit{de} and an\mathit{an} are similarly defined, We write Pa,Ch,De,An\mathit{Pa},\mathit{Ch},\mathit{De},\mathit{An} if arguments are included as well, e.g. De(X)G=de(X)G∪X\mathit{De}(\bm{X})_{\mathcal{G}}=\mathit{de}(\bm{X})_{\mathcal{G}}\cup\bm{X}. A path from a node XX to a node YY in G\mathcal{G} is a sequence of edges which does not include a particular node more than once. Two sets of nodes X,Y\bm{X},\bm{Y} are said to be d-separated by a third set Z\bm{Z} in a DAG G\mathcal{G}, denoted by (X⊥ ⁣ ⁣ ⁣ ⁣⊥Y∣Z)G(\bm{X}\perp\!\!\!\!\perp\bm{Y}|\bm{Z})_{\mathcal{G}}, if every edge path from nodes in one set to nodes in another are “blocked”. The criterion of blockage follows [29, Def. 1.2.3].

The basic semantic framework of our analysis rests on structural causal models (SCMs) [29, Ch. 7]. An SCM MM is a tuple ⟨U,V,F,P(u)⟩\langle\bm{U},\bm{V},\mathcal{F},P(\bm{u})\rangle where V\bm{V} is a set of endogenous variables and U\bm{U} is a set of exogenous variables. F\mathcal{F} is a set of structural functions where fV∈Ff_{V}\in\mathcal{F} decides values of an endogenous variable V∈VV\in\bm{V} taking as argument a combination of other variables. That is, V←fV(PaV,UV),PaV⊆V,UV⊆UV\leftarrow f_{V}(\mathit{Pa}_{V},U_{V}),\mathit{Pa}_{V}\subseteq\bm{V},U_{V}\subseteq\bm{U}. Values of U\bm{U} are drawn from an exogenous distribution P(u)P(\bm{u}). Each SCM MM induces a distribution P(v)P(\bm{v}) over endogenous variables V\bm{V}. An intervention on a subset X⊆V\bm{X}\subseteq\bm{V}, denoted by do(x)\text{do}(\bm{x}), is an operation where values of X\bm{X} are set to constants x\bm{x}, replacing the functions {fX:∀X∈X}\{f_{X}:\forall X\in\bm{X}\} that would normally determine their values. For an SCM MM, let MxM_{\bm{x}} be a submodel of MM induced by intervention do(x)\text{do}(\bm{x}). For a set S⊆V\bm{S}\subseteq\bm{V}, the interventional distribution P(s∣do(x))P(\bm{s}|\text{do}(\bm{x})) induced by do(x)\text{do}(\bm{x}) is defined as the distribution over S\bm{S} in the submodel MxM_{\bm{x}}, i.e., P(s∣do(x);M)≜P(s;Mx)P(\bm{s}|\text{do}(\bm{x});M)\triangleq P(\bm{s};M_{\bm{x}}). We leave MM implicit when it is obvious from the context. For a detailed survey on SCMs, we refer readers to [29, Ch. 7].

Imitation Learning in Structural Causal Models

In this section, we formalize and study the imitation learning problem in causal language. We first define a special type of SCM that explicitly allows one to model the unobserved nature of some endogenous variables, which is called the partially observable structural causal model (POSCM). This definition will facilitate the more explicitly articulation of which endogenous variables are available to the demonstrator and corresponding policy at each point in time.

A POSCM is a tuple ⟨M,O,L⟩\langle M,\bm{O},\bm{L}\rangle, where MM is a SCM ⟨U,V,F,P(u)⟩\langle\bm{U},\bm{V},\mathcal{F},P(\bm{u})\rangle and ⟨O,L⟩\langle\bm{O},\bm{L}\rangle is a pair of subsets forming a partition over V\bm{V} (i.e., V=O∪L\bm{V}=\bm{O}\cup\bm{L} and O∩L=∅\bm{O}\cap\bm{L}=\emptyset); O\bm{O} and L\bm{L} are called observed and latent endogenous variables, respectively.

Each POSCM MM induces a probability distribution over VV, of which one can measure the observed variables O\bm{O}. P(o)P(\bm{o}) is usually called the observational distribution. MM is associated with a causal diagram G\mathcal{G} (e.g., see Figure 1) where solid nodes represent observed variables O\bm{O}, dashed nodes represent latent variables L\bm{L}, and arrows represent the arguments PaV\mathit{Pa}_{V} of each functional relationship fVf_{V}. Exogenous variables U\bm{U} are not explicitly shown; a bi-directed arrow between nodes ViV_{i} and VjV_{j} indicates the presence of an unobserved confounder (UC) affecting both ViV_{i} and VjV_{j}, i.e., UVi∩UVj≠∅U_{V_{i}}\cap U_{V_{j}}\neq\emptyset.

Consider a POSCM ⟨M,O,L⟩\langle M,\bm{O},\bm{L}\rangle with M=⟨U,V,F,P(u)⟩M=\langle\bm{U},\bm{V},\mathcal{F},P(\bm{u})\rangle. Our goal is to learn an efficient policy to decide the value of an action variable X∈OX\in\bm{O}. The performance of the policy is evaluated using the expected value of a reward variable YY. Throughout this paper, we assume that reward YY is latent and XX affects YY (i.e., Y∈L∩De(X)GY\in\bm{L}\cap\mathit{De}(X)_{\mathcal{G}}). A policy π\pi is a function mapping from values of covariates Pa∗⊆O∖De(X)GX‾\mathit{Pa}^{*}\subseteq\bm{O}\setminus\mathit{De}(X)_{\mathcal{G}_{\overline{X}}} GX‾\mathcal{G}_{\overline{X}} is a causal diagram associated with the submodel MxM_{x} induced by intervention do(x)do(x). to a probability distribution over XX, which we denote by π(x∣pa∗)\pi(x|\mathit{pa}^{*}). An intervention following a policy π\pi, denoted by do(π)\text{do}(\pi), is an operation that draws values of X independently following π\pi, regardless of its original (natural) function fXf_{X}. Let MπM_{\pi} denote the manipulated SCM of MM induced by do(π)\text{do}(\pi). Similar to atomic settings, the interventional distribution P(v∣do(π))P(\bm{v}|\text{do}(\pi)) is defined as the distribution over V\bm{V} in the manipulated model MπM_{\pi}, given by,

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let Y\bm{Y} be an arbitrary subset of V\bm{V}. P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is said to be identifiable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle if P(y∣do(π);M)P\left(\bm{y}|\text{do}(\pi);M\right) is uniquely computable from P(o;M)P(\bm{o};M) and π\pi for any POSCM M∈M⟨G⟩M\in\mathscr{M}_{\langle\mathcal{G}\rangle} and any π∈Π\pi\in\Pi.

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let Y\bm{Y} be an arbitrary subset of V\bm{V}. If not all variables in Y\bm{Y} are observed (i.e., Y∩L≠∅\bm{Y}\cap\bm{L}\neq\emptyset), P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is not identifiable.

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let Y\bm{Y} be an arbitrary subset of V\bm{V}. P(y)P(\bm{y}) is said to be imitable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle if there exists a policy π∈Π\pi\in\Pi uniquely computable from P(o)P(\bm{o}) such that P(y∣do(π);M)=P(y;M)P(\bm{y}|\text{do}(\pi);M)=P(\bm{y};M) for any POSCM M∈M⟨G⟩M\in\mathscr{M}_{\langle\mathcal{G}\rangle}.

Our task is to determine the imitability of the expert performance. More specifically, we want to learn an imitating policy π∈Π\pi\in\Pi from P(o)P(\bm{o}) such that P(y∣do(π))=P(y)P(y|\text{do}(\pi))=P(y) The imitation is trivial if Y∉De(X)GY\not\in\mathit{De}(X)_{\mathcal{G}}: by Rule 3 of [29, Thm. 3.4.1] (or [6, Thm. 1]), P(y∣do(π))=P(y)P(y|\text{do}(\pi))=P(y) for any policy π\pi. This paper aims to find a specific π\pi satisfying P(y∣do(π))=P(y)P(y|\text{do}(\pi))=P(y) even when Y∈De(X)GY\in\mathit{De}(X)_{\mathcal{G}}., in any POSCM MM associated with the causal diagram G\mathcal{G}. Consider Figure 3(a) as an example. P(y)P(y) is imitable with policy π(x)=P(x)\pi(x)=P(x) since by Equation 1 and marginalization, P(y∣do(π))=∑x,wP(y∣w)P(w∣x)π(x)=∑x,wP(y∣w)P(w∣x)P(x)=P(y)P(y|\text{do}(\pi))=\sum_{x,w}P(y|w)P(w|x)\pi(x)=\sum_{x,w}P(y|w)P(w|x)P(x)=P(y). In practice, unfortunately, the expert’s performance cannot always be imitated. To understand this setting, we first write, more explicitly, the conditions under which this is not the case:

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let Y\bm{Y} be an arbitrary subset of V\bm{V}. P(y)P(\bm{y}) is not imitable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle if there exists two POSCMs M1,M2∈M⟨G⟩M_{1},M_{2}\in\mathscr{M}_{\langle\mathcal{G}\rangle} satisfying P(o;M1)=P(o;M2)P(\bm{o};M_{1})=P(\bm{o};M_{2}) while there exists no policy π∈Π\pi\in\Pi such that for i=1,2i=1,2, P(y∣do(π);Mi)=P(y;Mi)P(\bm{y}|\text{do}(\pi);M_{i})=P(\bm{y};M_{i}).

It follows as a corollary that P(y)P(\bm{y}) is not imitable if there exists a POSCM MM compatible with G\mathcal{G} such that no policy π∈Π\pi\in\Pi could ensure P(y∣do(π);M)=P(y;M)P(\bm{y}|\text{do}(\pi);M)=P(\bm{y};M). For instance, consider the causal diagram G\mathcal{G} and policy space Π\Pi in Figure 3(b). Here, the expert’s reward P(y)P(y) is not imitable: consider a POSCM with functions X←U,W←X,Y←U⊕¬WX\leftarrow U,W\leftarrow X,Y\leftarrow U\oplus\neg W; values UU are drawn uniformly over {0,1}\{0,1\}. In this model, P(Y=1∣do(π))=0.5P(Y=1|\text{do}(\pi))=0.5 for any policy π\pi, which is far from the optimal expert reward, P(Y=1)=1P(Y=1)=1.

An interesting observation from the above example of Figure 3(b) is that the effect P(y∣do(π))P(y|\text{do}(\pi)) is identifiable, following the front-door criterion in [29, Thm. 3.3.4], but no policy imitates the corresponding P(y)P(y). However, in some settings, the expert’s reward P(y)P(y) is imitable but the imitator’s reward P(y∣do(π))P(y|\text{do}(\pi)) cannot be uniquely determined. To witness, consider again the example in Figure 3(a). The imitability of P(y)P(y) has been previously shown; while P(y∣do(π))P(y|\text{do}(\pi)) is not identifiable due to latent reward YY (Corollary 1).

In general, the problem of imitability is orthogonal to identifiability, and, therefore, requires separate consideration. Since imitability does not always hold, we introduce a useful graphical criterion for determining whether imitating an expert’s performance is feasible, and if so, how.

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, P(y)P(y) is imitable w.t.r. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle if pa(X)G⊆Pa(Π)\mathit{pa}(X)_{\mathcal{G}}\subseteq\mathit{Pa}(\Pi) and there is no bi-directed arrow pointing to XX in G\mathcal{G}. Moreoever, the imitating policy π∈Π\pi\in\Pi is given by π(x∣pa(Π))=P(x∣pa(X)G)\pi\left(x|\mathit{pa}(\Pi)\right)=P\left(x|\mathit{pa}(X)_{\mathcal{G}}\right).

In words, Theorem 1 says that if the expert and learner share the same policy space, then the policy is always imitable. In fact, this result can be seen as a causal justification for when the method of “behavior cloning”, widely used in practice, is valid, leading to proper imitation. When the original behavior policy fXf_{X} is contained in the policy space Π\Pi, the leaner could imitate the expert’s reward P(y)P(y) by learning a policy π∈Π\pi\in\Pi that matches the distribution P(x∣pa(Π))P(x|\mathit{pa}(\Pi)) . Next, we consider the more challenging setting when policy spaces of the expert and learner disagree (i.e., the learner and expert have different views of the world, fX∉Πf_{X}\not\in\Pi). We will leverage a graphical condition adopted from the celebrated backdoor criterion [29, Def. 3.3.1].

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, a set Z\bm{Z} is said to satisfy the π\pi-backdoor criterion w.r.t. ⟨G.Π⟩\langle\mathcal{G}.\Pi\rangle if and only if Z⊆Pa(Π)\bm{Z}\subseteq\mathit{Pa}(\Pi) and (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X∣Z)GX‾(Y\perp\!\!\!\!\perp X|\bm{Z})_{\mathcal{G}_{\underline{X}}}, which is called the π\pi-backdoor admissible set w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle.

For concreteness, consider again the highway driving example in Figure 1(a). There exists no π\pi-backdoor admissible set due to the path X←L→YX\leftarrow L\rightarrow Y. Now consider a modified graph in Figure 1(b) where edge L→YL\rightarrow Y is removed. {Z}\{Z\} is π\pi-backdoor admissible since Z∈Pa(Π)Z\in\mathit{Pa}(\Pi) and (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X∣Z)GX‾\left(Y\perp\!\!\!\!\perp X|Z\right)_{\mathcal{G}_{\underline{X}}}. Leveraging the imitation backdoor condition, our next theorem provides a full characterization for when imitating expert’s performance is achievable, despite the fact that the reward YY is latent.

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, P(y)P(y) is imitable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle if and only if there exists an π\pi-backdoor admissible set Z\bm{Z} w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. Moreover, the imitating policy π∈Π\pi\in\Pi is given by π(x∣pa(Π))=P(x∣z)\pi\left(x|\mathit{pa}(\Pi)\right)=P\left(x|\bm{z}\right).

That is, one can learn an imitating policy from a policy space Π′={π:DZ↦PX}\Pi^{\prime}=\{\pi:\mathscr{D}_{\bm{Z}}\mapsto\mathscr{P}_{X}\} that mimics the conditional probabilities P(x∣z)P(x|\bm{z}) if and only if Z\bm{Z} is π\pi-backdoor admissible. If that is the case, such a policy can be learned from data through standard density estimation methods. For instance, Theorem 2 ascertains that P(y)P(y) in Figure 1(a) is indeed non-imitable. On the other hand, P(y)P(y) in Figure 1(b) is imitable, guaranteed by the π\pi-backdoor admissible set {Z}\{Z\}; the imitating policy is given by π(x∣z)=P(x∣z)\pi(x|z)=P(x|z).

Causal Imitation Learning with Data Dependency

One may surmise that the imitation boundary established by Theorem 2 suggests that when there exists no π\pi-backdoor admissible set, it is infeasible to imitate the expert performance from observed trajectories of demonstrations. In this section, we will circumvent this issue by exploiting actual parameters of the observational distribution P(o)P(\bm{o}). In particular, we denote by M⟨G,P⟩\mathscr{M}_{\langle\mathcal{G},P\rangle} a subfamily of candidate models in M⟨G⟩\mathscr{M}_{\langle\mathcal{G}\rangle} that induce both the causal diagram G\mathcal{G} and the observational distribution P(o)P(\bm{o}), i.e., M⟨G,P⟩={∀M∈M⟨G⟩:P(o;M)=P(o)}\mathscr{M}_{\langle\mathcal{G},P\rangle}=\left\{\forall M\in\mathscr{M}_{\langle\mathcal{G}\rangle}:P(\bm{o};M)=P(\bm{o})\right\}. We introduce a refined notion of imitability that will explore the quantitative knowledge of observations P(o)P(\bm{o}) (to be exemplified). Formally,

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, and an observational distribution P(o)P(\bm{o}), let Y\bm{Y} be an arbitrary subset of V\bm{V}. P(y)P(\bm{y}) is said to be practically imitable (for short, p-imitable) w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle if there exists a policy π∈Π\pi\in\Pi uniquely computable from P(o)P(\bm{o}) such that P(y∣do(π);M)=P(y;M)P(\bm{y}|\text{do}(\pi);M)=P(\bm{y};M) for any POSCM M∈M⟨G,P⟩M\in\mathscr{M}_{\langle\mathcal{G},P\rangle}.

The following corollary can be derived based on the definition of practical imitability.

Given a causal diagram G\mathcal{G}, a policy space Π\Pi and an observational distribution P(o)P(\bm{o}), let a subset Y⊆V\bm{Y}\subseteq\bm{V}. If P(y)P(\bm{y}) is imitable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle, P(y)P(\bm{y}) is p-imitable w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle.

Compared to Definition 3, the practical imitability of Definition 5 aims to find an imitating policy for a subset of candidate POSCMs M⟨G,P⟩\mathscr{M}_{\langle\mathcal{G},P\rangle} restricted to match a specific observational distribution P(o)P(\bm{o}). Definition 3, on the other hand, requires only the causal diagram G\mathcal{G}. In other words, for an expert’s performance P(y)P(y) that is non-imitable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle, it could still be p-imitable after analyzing actual probabilities of the observational distribution P(o)P(\bm{o}).

For concreteness, consider again P(y)P(y) in Figure 3(b) which is not imitable due to the bi-directed arrow X↔YX\leftrightarrow Y. However, new imitation opportunities arise when actual parameters of the observational distribution P(x,w,y)P(x,w,y) are provided. Suppose the underlying POSCM is given by: X←UX⊕UYX\leftarrow U_{X}\oplus U_{Y}, W←X⊕UWW\leftarrow X\oplus U_{W}, Y←W⊕UYY\leftarrow W\oplus U_{Y} where UX,UY,UWU_{X},U_{Y},U_{W} are independent binary variables drawn from P(UX=1)=P(UY=1)=P(UW=0)=0.9P(U_{X}=1)=P(U_{Y}=1)=P(U_{W}=0)=0.9. Here, the causal effect P(y∣do(x))P(y|\text{do}(x)) is identifiable from P(x,w,y)P(x,w,y) following the front-door formula P(y∣do(x))=∑wP(w∣x)∑x′P(y∣w,x′)P(x′)P(y|\text{do}(x))=\sum_{w}P(w|x)\sum_{x^{\prime}}P(y|w,x^{\prime})P(x^{\prime}) [29, Thm. 3.3.4]. We thus have P(Y=1∣do(X=0))=0.82P(Y=1|\text{do}(X=0))=0.82 which coincides with P(Y=1)=0.82P(Y=1)=0.82, i.e., P(y)P(y) is p-imitable with atomic intervention do(X=0)\text{do}(X=0). In the most practical settings, the expert reward P(y)P(y) rarely equates to P(y∣do(x))P(y|\text{do}(x)); stochastic policies π(x)\pi(x) are then applicable to imitate P(y)P(y) by re-weighting P(y∣do(x))P(y|\text{do}(x)) induced by the corresponding atomic interventions Consider a variation of the model where P(UW=1)=0.7P(U_{W}=1)=0.7. P(y)P(y) is p-imitable with π(X=0)=0.75\pi(X=0)=0.75.. To tackle p-imitability in a general way, we proceed by defining a set of observed variables that serve as a surrogate of the unobserved YY with respect to interventions on XX. Formally,

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, let S\bm{S} be an arbitrary subset of O\bm{O}. S\bm{S} is an imitation surrogate (for short, surrogate) w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle if (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X^∣S)G∪Π(Y\perp\!\!\!\!\perp\hat{X}|\bm{S})_{\mathcal{G}\cup\Pi} where G∪Π\mathcal{G}\cup\Pi is a supergraph of G\mathcal{G} by adding arrows from Pa(Π)\mathit{Pa}(\Pi) to XX; X^\hat{X} is a new parent to XX.

An surrogate S\bm{S} is said to be minimal if there exists no subset S′⊂S\bm{S}^{\prime}\subset\bm{S} such that S′\bm{S}^{\prime} is also a surrogate w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. Consider as an example Figure 1(c) where the supergraph G∪Π\mathcal{G}\cup\Pi coincides with the causal diagram G\mathcal{G}. By Definition 6, both {W,S}\{W,S\} and {S}\{S\} are valid surrogate relative to ⟨X,Y⟩\langle X,Y\rangle with {S}\{S\} being the minimal one. By conditioning on SS, the decomposition of Equation 1 implies P(y∣do(π))=∑s,w,uP(y∣s)P(s∣w,u)P(w∣x)π(x)P(u)=∑sP(y∣s)P(s∣do(π))P(y|\text{do}(\pi))=\sum_{s,w,u}P(y|s)P(s|w,u)P(w|x)\pi(x)P(u)=\sum_{s}P(y|s)P(s|\text{do}(\pi)). That is, the surrogate SS mediates all influence of interventions on action XX to reward YY. It is thus sufficient to find an imitating policy π\pi such that P(s∣do(π))=P(s)P(s|\text{do}(\pi))=P(s) for any POSCM MM associated with Figure 1(c). The resultant policy is guaranteed to imitate the expert’s reward P(y)P(y).

When a surrogate S\bm{S} is found and P(s∣do(π))P(\bm{s}|\text{do}(\pi)) is identifiable, one could compute P(s∣do(π))P(\bm{s}|\text{do}(\pi)) for each policy π\pi and check if it matches P(s)P(\bm{s}). In many settings, however, P(s∣do(π))P(\bm{s}|\text{do}(\pi)) is not identifiable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. For example, in Figure 1(d), SS is a surrogate w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle, but P(s∣do(π))P(s|\text{do}(\pi)) is not identifiable due to collider ZZ (π\pi uses non-descendants as input by default). Fortunately, identifying P(s∣do(π))P(\bm{s}|\text{do}(\pi)) may still be feasible in some subspaces of Π\Pi:

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, and a subset S⊆O\bm{S}\subseteq\bm{O}, let Π′\Pi^{\prime} be a policy subspace of Π\Pi. Π′\Pi^{\prime} is said to be an identifiable subspace (for short, id-subspace) w.r.t. ⟨G,Π,S⟩\langle\mathcal{G},\Pi,\bm{S}\rangle if P(s∣do(π))P(\bm{s}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle.

Consider a policy subspace Π′={π:PX}\Pi^{\prime}=\{\pi:\mathscr{P}_{X}\} described in Figure 1(d) (i.e. π\pi that does not exploit information from covariates ZZ). P(s∣do(π))P(s|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle following the front-door adjustment on WW [29, Thm. 3.3.4]. We could then evaluate interventional probabilities P(s∣do(π))P(s|\text{do}(\pi)) for each policy π∈Π′\pi\in\Pi^{\prime} from the observational distribution P(x,w,s,z)P(x,w,s,z); the imitating policy is obtainable by solving the equation P(s∣do(π))=P(s)P(s|\text{do}(\pi))=P(s). In other words, {S}\{S\} and Π′\Pi^{\prime} forms an instrument that allows one to solve the imitation learning problem in Figure 1(d).

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let S\bm{S} be a subset of O\bm{O} and Π′\Pi^{\prime} be a subspace of Π\Pi. ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle is said to be an imitation instrument (for short, instrument) if S\bm{S} is a surrogate w.r.t. ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle and Π′\Pi^{\prime} is an id-subspace w.r.t. ⟨G,Π,S⟩\langle\mathcal{G},\Pi,\bm{S}\rangle.

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, and an observational distribution P(o)P(\bm{o}), let ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle be an instrument w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. If P(s)P(\bm{s}) is p-imitable w.r.t. ⟨G,Π′,P(o)⟩\langle\mathcal{G},\Pi^{\prime},P(\bm{o})\rangle, then P(y)P(y) is p-imitable w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle. Moreover, an imitating policy π\pi for P(s)P(\bm{s}) w.r.t. ⟨G,Π′,P(o)⟩\langle\mathcal{G},\Pi^{\prime},P(\bm{o})\rangle is also imitating policy for P(y)P(y) w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle.

In words, Lemma 2 shows that when an imitation instrument ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle is present, we could reduce the original imitation learning on a latent reward YY to a p-imitability problem over observed surrogate variables S\bm{S} using policies in an identifiable subspace Π′\Pi^{\prime}. The imitating policy π\pi is obtainable by solving the equation P(s∣do(π))=P(s)P(\bm{s}|\text{do}(\pi))=P(\bm{s}).

Our task in this section is to introduce a general algorithm that finds instruments, and learns a p-imitating policy given ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle. A naïve approach is to enumerate all pairs of subset S\bm{S} and subspace Π′\Pi^{\prime} and check whether they form an instrument; if so, we can compute an imitating policy for P(s)P(\bm{s}) w.r.t. ⟨G,Π′,P(o)⟩\langle\mathcal{G},\Pi^{\prime},P(\bm{o})\rangle. However, the challenge is that the number of all possible subspaces Π′\Pi^{\prime} (or subsets S\bm{S}) can be exponentially large. Fortunately, we can greatly restrict this search space. Let G∪{Y}\mathcal{G}\cup\{Y\} denote a causal diagram obtained from G\mathcal{G} by making reward YY observed. The following proposition suggests that it suffices to consider only identifiable subspaces w.r.t. ⟨G∪{Y},Π,Y⟩\langle\mathcal{G}\cup\{Y\},\Pi,Y\rangle.

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, let a subspace Π′⊆Π\Pi^{\prime}\subseteq\Pi. If there exists S⊆O\bm{S}\subseteq\bm{O} such that ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle is an instrument w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle, Π′\Pi^{\prime} is an id-subspace w.r.t. ⟨G∪{Y},Π,Y⟩\langle\mathcal{G}\cup\{Y\},\Pi,Y\rangle.

Our algorithm Imitate is described in Algorithm 1. We assume access to an Identify oracle that takes as input a causal diagram G\mathcal{G}, a policy space Π\Pi and a set of observed variables S\bm{S}. If P(s∣do(π))P(\bm{s}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle, Identify returns “Yes”; otherwise, it returns “No”. For details about the Identify oracle, we refer readers to [15, Appendix B]. More specifically, Imitate takes as input a causal diagram G\mathcal{G}, a policy space Π\Pi and an observational distribution P(o)P(\bm{o}). At Step 2, Imitate applies a subroutine ListIdSpace to list identifiable subspaces Π′\Pi^{\prime} w.r.t. ⟨G∪{Y},Π,Y⟩\langle\mathcal{G}\cup\{Y\},\Pi,Y\rangle, following the observation made in Lemma 3. The implementation details of ListIdSpace are provided in [15, Appendix C]. When an identifiable subspace Π′\Pi^{\prime} is found, Imitate tries to obtain a surrogate S\bm{S} w.r.t the diagram G\mathcal{G} and subspace Π′\Pi^{\prime}. While there could exist multiple such surrogates, the following proposition shows that it is sufficient to consider only minimal ones.

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, an observational distribution P(o)P(\bm{o}) and a subset S⊆O\bm{S}\subseteq\bm{O}. P(s)P(\bm{s}) is p-imitable only if for any S′⊆S\bm{S}^{\prime}\subseteq\bm{S}, P(s′)P(\bm{s}^{\prime}) is p-imitable w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle.

We apply a subroutine ListMinSep in to enumerate minimal surrogates in O\bm{O} that d-separate X^\hat{X} and YY in the supergraph G∪Π′\mathcal{G}\cup\Pi^{\prime}. When a minimal surrogate S\bm{S} is found, Imitate uses the Identify oracle to validate if P(s∣do(π))P(\bm{s}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle, i.e., ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle form an instrument. Consider Figure 1(d) as an example. While P(y∣do(π))P(y|\text{do}(\pi)) is not identifiable for every policy in Π\Pi had YY been observed, Π\Pi contains an id-subspace {π:PX}\{\pi:\mathscr{P}_{X}\} w.r.t. ⟨G∪{Y},Π,Y⟩\langle\mathcal{G}\cup\{Y\},\Pi,Y\rangle, which is associated with a minimal surrogate {S}\{S\}. Applying Identify confirms that ⟨{S},{π:PX}⟩\langle\{S\},\{\pi:\mathscr{P}_{X}\}\rangle is an instrument.

At Step 5, Imitate solves for a policy π\pi in the subspace Π′\Pi^{\prime} that imitates P(s)P(\bm{s}) for all instances in the hypothesis class M⟨G,P⟩\mathscr{M}_{\langle\mathcal{G},P\rangle}. If such a policy exists, Imitate returns π\pi; otherwise, the algorithm continues. Since ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle is an instrument, Lemma 2 implies that the learned policy π\pi, if it exists, is ensured to imitate the expert reward P(y)P(y) for any POSCM M∈M⟨G,P⟩M\in\mathscr{M}_{\langle\mathcal{G},P\rangle}.

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, and an observational distribution P(o)P(\bm{o}), if Imitate returns a policy π∈Π\pi\in\Pi, P(y)P(y) is p-imitable w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle. Moreover, π\pi is an imitating policy for P(y)P(y) w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle.

2 Optimizing Imitating Policies

We now introduce optimization procedures to solve for an imitating policy at Step 5 of Imitate algorithm. Since the pair ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle forms a valid instrument (ensured by Step 4), the interventional distribution P(s∣do(π);M)P(\bm{s}|\text{do}(\pi);M) remains invariant among all models in M⟨G⟩\mathscr{M}_{\langle\mathcal{G}\rangle}, i.e., P(s∣do(π))P(\bm{s}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. We could thus express P(s∣do(π);M)P(\bm{s}|\text{do}(\pi);M) for any M∈M⟨G,P⟩M\in\mathscr{M}_{\langle\mathcal{G},P\rangle} as a function of the observational distribution P(o)P(\bm{o}); for simplicity, we write P(s∣do(π))=P(s∣do(π);M)P(\bm{s}|\text{do}(\pi))=P(\bm{s}|\text{do}(\pi);M). The imitating policy π\pi is obtainable by solving the equation P(s∣do(π))=P(s)P(\bm{s}|\text{do}(\pi))=P(\bm{s}). We could derive a closed-form formula for P(s∣do(π))P(\bm{s}|\text{do}(\pi)) following standard causal identification algorithms in . As an example, consider again the setting of Figure 1(c) with binary X,W,S,ZX,W,S,Z; parameters of P(x,w,s,z)P(x,w,s,z) could be summarized using an 88-entry probability table. The imitating policy π(x)\pi(x) is thus a solution of a series of linear equations ∑xπ(x)P(s∣do(x))=P(s)\sum_{x}\pi(x)P(s|\text{do}(x))=P(s) and ∑xπ(x)=1\sum_{x}\pi(x)=1, given by:

Among quantities in the above equation, xi,sjx_{i},s_{j} represent assignments X=i,S=jX=i,S=j for i,j∈{0,1}i,j\in\{0,1\}. The interventional distribution P(s∣do(x))P(s|\text{do}(x)) could be identified from P(x,w,s,z)P(x,w,s,z) using the front-door adjustment formula P(s∣do(x))=∑wP(w∣x)∑x′P(s∣x′,w)P(x′)P(s|\text{do}(x))=\sum_{w}P(w|x)\sum_{x^{\prime}}P(s|x^{\prime},w)P(x^{\prime}) [29, Thm. 3.3.4].

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, and an observational distribution P(o)P(\bm{o}), let ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle be an instrument w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. If there exists a POSCM M∈M⟨G,P⟩M\in\mathscr{M}_{\langle\mathcal{G},P\rangle} and a policy π∈Π′\pi\in\Pi^{\prime} such that P(s∣do(π);M)=P(s)P(\bm{s}|\text{do}(\pi);M)=P(\bm{s}), then P(y)P(y) is p-imitable w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle. Moreover, π\pi is an imitating policy for P(y)P(y) w.r.t. ⟨G,Π,P(o)⟩\langle\mathcal{G},\Pi,P(\bm{o})\rangle.

Experiments

We demonstrate our algorithms on several synthetic datasets, including highD consisting of natural trajectories of human driven vehicles, and on MNIST digits. In all experiments, we test our causal imitation method (ci): we apply Theorem 2 when there exists an π\pi-backdoor admissible set; otherwise, Algorithm 1 is used to leverage the observational distribution. As a baseline, we also include naïve behavior cloning (bc) that mimics the observed conditional distribution P(x∣pa(Π))P(x|\mathit{pa}(\Pi)), as well as the actual reward distribution generated by an expert (opt). We found that our algorithms consistently imitate distributions over the expert’s reward in imitable (p-imitable) cases; and p-imitable instances commonly exist. We refer readers to [15, Appendix D] for more experiments, details, and analysis.

We consider a modified example of the drone recordings of human-driven cars in Section 1 where the driver’s braking action WW of the left-side car is also observed. Figure 4(a) shows the causal diagram of this environment; ZZ represent the velocity of the front-car; action XX represents the velocity of the driving car; WW and the reward signal YY are both affected by an unobserved confounder UU, representing the weather condition. In Figure 4(a), {Z}\{Z\} is π\pi-backdoor admissible while {Z,W}\{Z,W\} is not due to active path X←L→W↔YX\leftarrow L\rightarrow W\leftrightarrow Y. We obtain policies for the causal and naive imitators training two separate GANs. Distributions P(y∣do(π))P(y|\text{do}(\pi)) induced by all algorithms are reported in Figure 4(b). We also measure the L1 distance between P(y∣do(π))P(y|\text{do}(\pi)) and the expert’s reward P(y)P(y). We find that the causal approach (ci), using input set {Z}\{Z\}, successfully imitates P(y)P(y) (L1 =0.0018=0.0018). As expected, the naive approach (bc) utilizing all covariates {Z,W}\{Z,W\} is unable to imitate the expert (L1 = 0.29370.2937).

We consider an instance of Figure 1(c) where X,S,YX,S,Y are binary variables; binary values of WW are replaced with corresponding images of MNIST digits (pictures of 1 or 0), determined based on the action XX. For the causal imitator (ci), we learn a POSCM M^\hat{M} such that P(x,w,s;M^)=P(x,w,s)P(x,w,s;\hat{M})=P(x,w,s). To obtain M^\hat{M}, we train a GAN to imitate the observational distribution P(x,w,s)P(x,w,s), with a separate generator for each X,W,SX,W,S. We then train a separate discriminator measuring the distance between observed trajectories P(s)P(s) and interventional distribution P(s∣do(π);M^)P(s|\text{do}(\pi);\hat{M}) over the surrogate {S}\{S\}. The imitating policy is obtained by minimizing such a distance. Distributions P(y∣do(π))P(y|\text{do}(\pi)) induced by all algorithms are reported in Figure 4(c). We find that the causal approach (ci) successfully imitates P(y)P(y) (L1 =0.0634=0.0634). As expected, the naive approach (bc) mimicking distribution P(x)P(x) is unable to imitate the expert (L1 = 0.19000.1900).

Conclusion

We investigate the imitation learning in the semantics of structural causal models. The goal is to find an imitating policy that mimics the expert behaviors from combinations of demonstration data and qualitative knowledge about the data-generating process represented as a causal diagram. We provide a graphical criterion that is complete (i.e., sufficient and necessary) for determining the feasibility of learning an imitating policy that mimics the expert’s performance. We also study a data-dependent notion of imitability depending on the observational distribution. An efficient algorithm is introduced which finds an imitating policy, by exploiting quantitative knowledge contained in the observational data and the presence of surrogate endpoints. Finally, we propose a practical procedure for estimating such an imitating policy from observed trajectories of the expert’s demonstrations.

Broader Impact

This paper investigates the theoretical framework of learning a policy that imitates the distribution over a primary outcome from natural trajectories of an expert demonstrator, even when the primary outcome itself is unobserved and input covariates used by the expert determining original values of the action are unknown. Since in practice, the actual reward is often unspecified and the learner and the demonstrator rarely observe the environment in the same fashion, our methods are likely to increase the progress of automated decision systems. Such systems may be applicable to various fields, including the development of autonomous vehicle, industrial automation and the management of chronic disease. These applications may have a broad spectrum of societal implications. The adoption of autonomous driving and industrial automation systems could save cost and reduce risks such as occupational injuries; while it could also create unemployment. Treatment recommendation in the clinical decision support system could certainly alleviate the stress on the healthcare workers. However, this also raise questions concerning with the accountability in case of medical malpractice; collection of private personal information could also make the hospital database valuable targets for malicious hackers. Overall, we would encourage research to understand the risks arising from automated decision systems and mitigations for its negative impact.

Recently, there is a growing amount of dataset of natural vehicle trajectories like highD being licensed for commercial use. An immediate positive impact of this work is that we discuss potential risk of training decision-making policy from the observational data due to the presence of unobserved confounding, as shown in Sections 1 and 4. More broadly, since our method is based on the semantics of structural causal models [29, Ch. 7], its adoption could cultivate machine learning practitioners with proper training in causal reasoning. A favorable characteristic of causal inference methods is that they are inherently robust: for example, the definition of imitability Definition 3 requires the imitating policy to perfectly mimics the expert performance in any model compatible to the causal diagram. Automated decision systems using the causal inference methods prioritize the safety and robustness in decision-making, which is increasingly essential since the use of black-box AI systems is prevalent and our understandings of their potential implications are still limited.

Acknowledge

The authors were partially supported by grants from NSF IIS-1704352 and IIS-1750807 (CAREER).

References

Appendix A Proofs

Let Y∈Y∩LY\in\bm{Y}\cap\bm{L}. For any SCM M1M_{1} that induces G\mathcal{G}, we could obtain an SCM M2M_{2} by replacing fYf_{Y} and P(uY)P(u_{Y}) associated with YY. Since there is no restriction on the parametrization of fYf_{Y} and P(uY)P(u_{Y}), we could always ensure P(y∣do(π);M1)≠P(y∣do(π);M2)P(y|\text{do}(\pi);M_{1})\neq P(y|\text{do}(\pi);M_{2}). For example, in both M1,M2M_{1},M_{2}, let Y←UYY\leftarrow U_{Y}; we define P(UY=0;M1)=0.1P(U_{Y}=0;M_{1})=0.1 and P(UY=0;M2)=0.9P(U_{Y}=0;M_{2})=0.9. It is immediate to see that P(y∣do(π);M1)≠P(y∣do(π);M2)P(\bm{y}|\text{do}(\pi);M_{1})\neq P(\bm{y}|\text{do}(\pi);M_{2}), i.e., P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is not identifiable. ∎

The lack of existence of a shared imitating policy between M1,M2M_{1},M_{2} eliminates the possibility of the existence of a function from P(o)P(\bm{o}) to a policy π\pi that imitates P(y)P(\bm{y}) in any POSCM compatible with the causal diagram G\mathcal{G}. ∎

Since there is not bi-directed arrow pointing into XX, it is variables that pa(X)G\mathit{pa}(X)_{\mathcal{G}} is π\pi-backdoor admissible relative to ⟨X,Y⟩\langle X,Y\rangle in G\mathcal{G}. By Rule 2 of do-calculus, we have

Since pa(X)G⊆Pa(Π)\mathit{pa}(X)_{\mathcal{G}}\subseteq\mathit{Pa}(\Pi), the conditional distribution P(x∣pa(X)G)P(x|\mathit{pa}(X)_{\mathcal{G}}) can be represented as a policy in Π\Pi. Let π(x∣Pa(Π))=π(x∣pa(X)G)=P(x∣pa(X)G)\pi(x|\mathit{Pa}(\Pi))=\pi(x|\mathit{pa}(X)_{\mathcal{G}})=P(x|\mathit{pa}(X)_{\mathcal{G}}). We must have

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let Z=An(Y)G∩Pa(Π)\bm{Z}=\mathit{An}(Y)_{\mathcal{G}}\cap\mathit{Pa}(\Pi). If P(y)P(y) is imitable relative to ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle, then (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X∣Z)GX‾\left(Y\perp\!\!\!\!\perp X|\bm{Z}\right)_{\mathcal{G}_{\underline{X}}}.

We consider first a simplified causal diagram H\mathcal{H} where all endogenous variables are observed, i.e., V=O\bm{V}=\bm{O}; and Pa(Π)=O∖{X,Y}\mathit{Pa}(\Pi)=\bm{O}\setminus\{X,Y\}. In this diagram G\mathcal{G}, (Y⊥̸ ⁣ ⁣ ⁣ ⁣⊥X∣Z)GX‾\left(Y\not\perp\!\!\!\!\perp X|\bm{Z}\right)_{\mathcal{G}_{\underline{X}}} implies that there exists a bi-directed path ll of the form X↔Z1↔Z2↔⋯↔Zn↔YX\leftrightarrow Z_{1}\leftrightarrow Z_{2}\leftrightarrow\cdots\leftrightarrow Z_{n}\leftrightarrow Y such that Zi∈ZZ_{i}\in\bm{Z} for any i=1,…,ni=1,\dots,n. We denote by Z∗={Z1,…,Zn}\bm{Z}^{*}=\{Z_{1},\dots,Z_{n}\}. Recall that X∈An(Y)HX\in\mathit{An}(Y)_{\mathcal{H}}. We could thus obtain a subgraph H′\mathcal{H}^{\prime} of H\mathcal{H} that satisfies the following condition:

H′\mathcal{H}^{\prime} contains the bi-directed path ll.

All nodes in H′\mathcal{H}^{\prime} are descendants of Z∗∪{X}\bm{Z}^{*}\cup\{X\}.

YY is a descendant for all nodes in H′\mathcal{H}^{\prime}.

Every endogenous node VV in H′\mathcal{H}^{\prime} has at most one child.

All bi-directed arrows in H′\mathcal{H}^{\prime} are contained in ll.

A mental image for depicting H′\mathcal{H}^{\prime} is to think of a tree rooted in node YY; X,Z1,…,ZnX,Z_{1},\dots,Z_{n} are leaf nodes; nodes X,Z1,…,Z2,YX,Z_{1},\dots,Z_{2},Y are connected by the bi-directed path ll; H′\mathcal{H}^{\prime} contain no bi-directed arrow except path ll. We now construct a POSCM M′M^{\prime} compatible with G′\mathcal{G}^{\prime}. More specifically, values of each exogenous confounder UiU_{i} residing on ll are drawn uniformly over a binary domain {0,1}\{0,1\}. For each endogenous variable ViV_{i} in H′\mathcal{H}^{\prime}, its values is equal to the parity sum of its parents in H′\mathcal{H}^{\prime}, i.e., Vi←⊕Vj∈pa(Vi)H′VjV_{i}\leftarrow\oplus_{V_{j}\in\mathit{pa}(V_{i})_{\mathcal{H}^{\prime}}}V_{j}. By construction, in the subgraph H′\mathcal{H}^{\prime}, each exogenous UiU_{i} has exactly two directed paths going to YY. This means that in the constructed model M′M^{\prime}, observed values of YY is always equal to 00, i.e., the reward distribution P(Y=0;M′)=1P(Y=0;M^{\prime})=1.

Consider a policy space Π′\Pi^{\prime} of the form {π:DZ∗↦PX}\{\pi:\mathscr{D}_{\bm{Z}^{*}}\mapsto\mathscr{P}_{X}\}. Let UnU_{n} denote the exogenous confounder residing on ll that is closest to YY, i.e., X↔Z1↔Z2↔⋯↔Zn←Un→YX\leftrightarrow Z_{1}\leftrightarrow Z_{2}\leftrightarrow\cdots\leftrightarrow Z_{n}\leftarrow U_{n}\rightarrow Y. By the definition of M′M^{\prime}, values of each variable Zi∈Z∗Z_{i}\in\bm{Z}^{*} is the parity sum of at least two exogenous variables Uj,UkU_{j},U_{k}. Since values of each UiU_{i} are drawn uniformly over {0,1}\{0,1\}, we must have P(un,z∗)=P(un)P(z∗)P(u_{n},\bm{z}^{*})=P(u_{n})P(\bm{z}^{*}), or equivalently, P(un∣z∗)=P(un)P(u_{n}|\bm{z}^{*})=P(u_{n}). By definition, we could obtain from ll a directed path going from UnU_{n} to YY that is not intercepted by Z∗\bm{Z}^{*}. That is, given any value Z∗=z∗\bm{Z}^{*}=\bm{z}^{*}, values of YY is decided by a parity function taking UnU_{n} as an input. Since P(un∣z∗)=P(un)P(u_{n}|\bm{z}^{*})=P(u_{n}) and UnU_{n} is drawn uniformly over {0,1}\{0,1\}, it is verifiable that in M′M^{\prime}, given any Z∗=z∗\bm{Z}^{*}=\bm{z}^{*}, the conditional distribution P(Y=0∣do(x),z∗;M′)=0.5P(Y=0|\text{do}(x),\bm{z}^{*};M^{\prime})=0.5. This means that for any policy π∈Π′\pi\in\Pi^{\prime}, the interventional distribution P(Y=0∣do(π);M′)=0.5P(Y=0|\text{do}(\pi);M^{\prime})=0.5, which is far from the observational distribution P(Y=0;M′)=1P(Y=0;M^{\prime})=1. That is, P(y)P(y) is not imitable w.r.t. ⟨H′,Π′⟩\langle\mathcal{H}^{\prime},\Pi^{\prime}\rangle.

We will next show the non-imitability of P(y)P(y) w.r.t. ⟨H,Π⟩\langle\mathcal{H},\Pi\rangle. For any node VV that is not included in H′\mathcal{H}^{\prime}, let its values be decided by an independent noise UVU_{V} drawn uniformly over {0,1}\{0,1\}. We denote this extended POSCM by MM. Obviously, MM is compatible with the causal diagram H\mathcal{H}. In this model, for any covariate V∈Pa(Π)∖Z∗V\in\mathit{Pa}(\Pi)\setminus\bm{Z}^{*}, it is either (1) a random variable disconnected to any other endogenous variable in MM; or (2) decided by a function taking Z∗\bm{Z}^{*} as input. That is, V∈Pa(Π)∖Z∗V\in\mathit{Pa}(\Pi)\setminus\bm{Z}^{*} contains no value of information with regard to the reward YY when intervening on action XX. By [17, Ch. 23.6], this means that for any policy π∈Π\pi\in\Pi, there exists a policy π′\pi^{\prime} in the subspace Π′\Pi^{\prime} such that P(y∣do(π);M)=P(y∣do(π′);M)P(y|\text{do}(\pi);M)=P(y|\text{do}(\pi^{\prime});M). Recall that there exists no policy π\pi in Π′\Pi^{\prime} that could ensure P(y∣do(π);M′)=P(y;M′)P(y|\text{do}(\pi);M^{\prime})=P(y;M^{\prime}) in POSCM M′M^{\prime}. By definition of MM and M′M^{\prime}, we must have P(y;M)=P(y;M′)P(y;M)=P(y;M^{\prime}) and for any policy π∈Π\pi\in\Pi, P(y∣do(π);M)=P(y∣do(π);M′)P(y|\text{do}(\pi);M)=P(y|\text{do}(\pi);M^{\prime}). It is immediate to see that there exists no policy π∈Π\pi\in\Pi that could induce P(y∣do(π);M)=P(y;M)P(y|\text{do}(\pi);M)=P(y;M) in the extended POSCM MM, i.e., P(y)P(y) is not imitable w.r.t. ⟨H,Π⟩\langle\mathcal{H},\Pi\rangle.

We now consider a general causal diagram G\mathcal{G} where arbitrary latent endogenous variables L\bm{L} exist and Pa(Π)⊂O∖{X,Y}\mathit{Pa}(\Pi)\subset\bm{O}\setminus\{X,Y\}. We will apply the latent projection [39, Def. 5] to transforms G\mathcal{G} into a simplified causal diagram H\mathcal{H} discussed above. More specifically, we construct a causal diagram G′\mathcal{G}^{\prime} from G\mathcal{G} by marking each V∈V∖(Pa(Π)∪{X,Y})V\in\bm{V}\setminus(Pa(\Pi)\cup\{X,Y\}) latent. We then apply Algorithm 2 and obtain a simplified diagram H=\textscProject(G′)\mathcal{H}=\textsc{Project}(\mathcal{G}^{\prime}) where V=O=Pa(Π)∪{X,Y}\bm{V}=\bm{O}=\mathit{Pa}(\Pi)\cup\{X,Y\}. Since Project preserves topological relationships among observed nodes [39, Lem. 5], (Y⊥̸ ⁣ ⁣ ⁣ ⁣⊥X∣Z)GX‾(Y\not\perp\!\!\!\!\perp X|\bm{Z})_{\mathcal{G}_{\underline{X}}} implies (Y⊥̸ ⁣ ⁣ ⁣ ⁣⊥X∣Z)HX‾(Y\not\perp\!\!\!\!\perp X|\bm{Z})_{\mathcal{H}_{\underline{X}}}. Following our previous argument, there exists a POSCM M′M^{\prime} associated with H\mathcal{H} such that for any policy π∈Π\pi\in\Pi, P(y∣do(π);M′)≠P(y;M′)P(y|\text{do}(\pi);M^{\prime})\neq P(y;M^{\prime}). By Lemma 8, we could construct a POSCM MM associated with G\mathcal{G} such that for any π∈Π\pi\in\Pi, P(y∣do(π);M)=P(y∣do(π);M′)P(y|\text{do}(\pi);M)=P(y|\text{do}(\pi);M^{\prime}) and P(y;M)=P(y;M′)P(y;M)=P(y;M^{\prime}). It follows immediately that for any policy π∈Π\pi\in\Pi, P(y∣do(π);M)≠P(y;M)P(y|\text{do}(\pi);M)\neq P(y;M), i.e., P(y)P(y) is not imitable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. ∎

We first prove the the “if” direction. Given an π\pi-backdoor admissible set Z\bm{Z} relative to ⟨X,Y⟩\langle X,Y\rangle in G\mathcal{G}. By Rule 2 of do-calculus, we have,

Since Z⊆Pa(Π)\bm{Z}\subseteq\mathit{Pa}(\Pi), the conditional distribution P(x∣z)P(x|\bm{z}) can be represented as a policy in Π\Pi. Let π(x∣Pa(Π))=π(x∣z)=P(x∣z)\pi(x|\mathit{Pa}(\Pi))=\pi(x|\bm{z})=P(x|\bm{z}). We must have

We now consider the “only if” direction. Suppose there exists no π\pi-backdoor admissible set Z\bm{Z} relative to ⟨X,Y⟩\langle X,Y\rangle in G\mathcal{G}. We must have that Z=An(Y)G∩Pa(Π)\bm{Z}=\mathit{An}(Y)_{\mathcal{G}}\cap\mathit{Pa}(\Pi) is not π\pi-backdoor admissible, i.e., the independent relationship (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X∣Z)GX‾\left(Y\perp\!\!\!\!\perp X|\bm{Z}\right)_{\mathcal{G}_{\underline{X}}} does not hold. It follows immediately from Lemma 5 that P(y)P(y) is not imitable relative to ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. ∎

Since S\bm{S} is a surrogate relative to ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle, by definition, we have (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X^∣S)G∪Π′(Y\perp\!\!\!\!\perp\hat{X}|\bm{S})_{\mathcal{G}\cup\Pi^{\prime}}. For any causal diagram G\mathcal{G} and policy space Π\Pi, let GΠ\mathcal{G}_{\Pi} denote a manipulated diagram obtained from G\mathcal{G} by adding arrows from nodes in Pa(Π)\mathit{Pa}(\Pi) to XX in the subgraph GX‾\mathcal{G}_{\overline{X}}. By definition, it is obvious that G∪Π′\mathcal{G}\cup\Pi^{\prime} is a supergraph containing both G\mathcal{G} and GΠ′\mathcal{G}_{\Pi^{\prime}}. By definition of d-separation, we must have (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X^∣S)G(Y\perp\!\!\!\!\perp\hat{X}|\bm{S})_{\mathcal{G}} and (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X^∣S)GΠ′(Y\perp\!\!\!\!\perp\hat{X}|\bm{S})_{\mathcal{G}_{\Pi^{\prime}}}. The basic operations of distribution marginalization implies, for any POSCM M∈M⟨G,P⟩M\in\mathscr{M}_{\langle\mathcal{G},P\rangle},

The last two steps hold since (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X^∣S)GΠ′(Y\perp\!\!\!\!\perp\hat{X}|\bm{S})_{\mathcal{G}_{\Pi^{\prime}}} and (Y⊥ ⁣ ⁣ ⁣ ⁣⊥X^∣S)G(Y\perp\!\!\!\!\perp\hat{X}|\bm{S})_{\mathcal{G}}. Fix an arbitrary POSCM M∈M⟨G,P⟩M\in\mathscr{M}_{\langle\mathcal{G},P\rangle}. Suppose there exists an imitating policy π∈Π′\pi\in\Pi^{\prime} in MM such that P(s∣do(π);M)=P(s;M)P(\bm{s}|\text{do}(\pi);M)=P(\bm{s};M). We must have

Since ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle is an instrument w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle, P(s∣do(π))P(\bm{s}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle. This means that P(s∣do(π);M)P(\bm{s}|\text{do}(\pi);M) is uniquely computable from P(o;M)P(\bm{o};M) in any POSCM M∈M⟨G⟩M\in\mathscr{M}_{\langle\mathcal{G}\rangle}. That is, for any POSCM M∈M⟨G,P⟩M\in\mathscr{M}_{\langle\mathcal{G},P\rangle} where its observational distribution P(o;M)=P(o)P(\bm{o};M)=P(\bm{o}), the interventional distribution P(s∣do(π);M)P(\bm{s}|\text{do}(\pi);M) for any policy π∈Π′\pi\in\Pi^{\prime} remains as an invariant. This implies that the derivation in Equation 2 is applicable for any POSCM M∈M⟨G,P⟩M\in\mathscr{M}_{\langle\mathcal{G},P\rangle}, i.e., P(y)P(y) is p-imitable w.r.t. ⟨G,Π,θ⟩\langle\mathcal{G},\Pi,\theta\rangle. ∎

Let S\bm{S} be a surrogate w.r.t. ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle. Following the proof of Lemma 2,

Suppose ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle form an instrument w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle, i.e., P(s∣do(π))P(\bm{s}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle. The above equation implies that P(y∣do(π))P(y|\text{do}(\pi)) can be uniquely determined from P(o,y)P(\bm{o},y) in any POSCM that induces G\mathcal{G}. That is, P(y∣do(π))P(y|\text{do}(\pi)) is identifiable w.r.t. ⟨G∪{Y},Π⟩\langle\mathcal{G}\cup\{Y\},\Pi\rangle, which completes the proof. ∎

For any POSCM MM in M⟨G,P⟩\mathscr{M}_{\langle\mathcal{G},P\rangle}, if there exists a policy π∈Π\pi\in\Pi such that P(s∣do(π);M)=P(s;M)P(\bm{s}|\text{do}(\pi);M)=P(\bm{s};M), we must have for any S′⊆S\bm{S}^{\prime}\subseteq\bm{S},

For a policy subspace Π′\Pi^{\prime}, Step 3 outputs a surrogate S\bm{S} w.r.t. ⟨G,Π′⟩\langle\mathcal{G},\Pi^{\prime}\rangle. Step 4 ensures that Π′\Pi^{\prime} is an id-subspace w.r.t. ⟨G,Π,S⟩\langle\mathcal{G},\Pi,\bm{S}\rangle. That is, ⟨S,Π′⟩\langle\bm{S},\Pi^{\prime}\rangle forms an instrument w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle. Since Imitate only outputs a policy π\pi when P(s)P(\bm{s}) is p-imitable w.r.t. ⟨G,Π′,P(o)⟩\langle\mathcal{G},\Pi^{\prime},P(\bm{o})\rangle, the statement follows from Lemma 2. ∎

Appendix B Causal Identification in POSCMs

In this section, we introduce algorithms for identifying causal effects in Partially Observable Structural Causal Models (POSCMs), which are sufficient and complete. We will consistently assume that Y⊆O\bm{Y}\subseteq\bm{O}, i.e., the primary outcomes Y\bm{Y} are all observed. For settings where Y⊈O\bm{Y}\not\subseteq\bm{O}, Corollary 1 implies that P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is always non-identifiable w.r.t. the causal diagram G\mathcal{G}. For convenience, we focus on the problem of determining whether the target effect is identifiable w.r.t. G\mathcal{G}. However, our algorithms could be easily extended to derive identification formulas of the causal effect.

We start with the identificaiton of causal effects induced by atomic interventions do(x)\text{do}(x). Formally,

Given a causal diagram G\mathcal{G}, let Y\bm{Y} be an arbitrary subset of O\bm{O}. P(y∣do(x))P(\bm{y}|\text{do}(x)) is said to be identifiable w.r.t. G\mathcal{G} if P(y∣do(x);M)P\left(\bm{y}|\text{do}(x);M\right) is uniquely computable from P(o;M)P(\bm{o};M) and π\pi for any POSCM M∈M⟨G⟩M\in\mathscr{M}_{\langle\mathcal{G}\rangle}.

A causal diagram G\mathcal{G} is said to be semi-Markovian if it does not contain any latent endogenous variables L\bm{L}; or equivalently, V=O\bm{V}=\bm{O}. [39, Alg. 5] is an algorithm that identify causal effects, say P(y∣do(x))P(\bm{y}|\text{do}(\bm{x})), from the observational distribution P(o)P(\bm{o}) in a semi-Markovian diagram G\mathcal{G}, which we consistently refer to as IdentifyHelper. More specifically, IdentifyHelper takes as input a set of action variables X⊆O\bm{X}\subseteq\bm{O}, a set of outcome variables Y⊆O\bm{Y}\subseteq\bm{O} and a semi-Markovian causal diagram G\mathcal{G} In the original text, the semi-Markovian causal diagram G\mathcal{G} is implicitly assumed; [39, Alg. 5] only takes X,Y\bm{X},\bm{Y} as input. We rephrase the algorithm and explicitly represent the dependency on the causal diagram G\mathcal{G}.. If P(y∣do(x))P(\bm{y}|\text{do}(\bm{x})) is identifiable w.r.t. G\mathcal{G}, IdentifyHelper returns an identificaiton formula that represents P(y∣do(x))P(\bm{y}|\text{do}(\bm{x})) as an algebraic expression of the observational distribution P(o)P(\bm{o}); otherwise, IdentifyHelper returns “Fail”. showed that IdentifyHelper is complete from identifying effects from observational data with respect to semi-Markovian causal diagrams.

We will utilize IdentifyHelper to identifying causal effects in POSCMs where latent endogenous variables are allowed. The key to this reduction is an algorithm Project [39, Def. 5] that transforms an arbitrary causal diagram G\mathcal{G} with observed endogenous variables O\bm{O} into a semi-Markovian causal diagram H\mathcal{H} such that its endogenous variables V=O\bm{V}=\bm{O}. For completeness, we rephrase Project and describe it in Algorithm 2.

The following lemma, introduced in [19, Props. 2-3], shows that the parameter space of observational distributions P(o)P(\bm{o}) and interventional distributions P(y∣do(x))P(\bm{y}|\text{do}(x)) induced by POSCMs associated with a causal diagram G\mathcal{G} is always equivalent to that induced by the corresponding semi-Markovian causal diagram H=\textscProject(G)\mathcal{H}=\textsc{Project}(\mathcal{G}).

Given a causal diagram G\mathcal{G}, let H=\textscProject(G)\mathcal{H}=\textsc{Project}(\mathcal{G}). For any POSCM M1M_{1} associated with G\mathcal{G}, there exists a POSCM M2M_{2} associated with H\mathcal{H} such that P(y∣do(x);M1)=P(y∣do(x);M2)P(\bm{y}|\text{do}(\bm{x});M_{1})=P(\bm{y}|\text{do}(\bm{x});M_{2}) for any X,Y⊆O\bm{X},\bm{Y}\subseteq\bm{O}, and vice versa.

The statement follows from [19, Props. 2-3]. ∎

Lemma 6 implies a general algorithm for identifying P(y∣do(x))P(\bm{y}|\text{do}(x)) in a causal diagram G\mathcal{G} with latent endogenous variables: it is sufficient to consider the identifiability of P(y∣do(x))P(\bm{y}|\text{do}(x)) in the projection H=\textscProject(G)\mathcal{H}=\textsc{Project}(\mathcal{G}). We describe such an algorithm in Algorithm 3.

Given a causal diagram G\mathcal{G}, let Y\bm{Y} be an arbitrary subset of O\bm{O}. \textscIdentify(G,Y)=‘‘\textscYes′′\textsc{Identify}(\mathcal{G},\bm{Y})=``\textsc{Yes}^{\prime\prime} if and only if P(y∣do(x))P(\bm{y}|\text{do}(x)) is identifiable w.r.t. G\mathcal{G}.

Lemma 6 implies that P(y∣do(x))P(\bm{y}|\text{do}(x)) is identifiable w.r.t. a causal diagram G\mathcal{G} if and only if P(y∣do(x))P(\bm{y}|\text{do}(x)) is identifiable w.r.t. the projection H=\textscProject(G)\mathcal{H}=\textsc{Project}(\mathcal{G}). To see this, suppose P(y∣do(x))P(\bm{y}|\text{do}(x)) is not identifiable w.r.t. G\mathcal{G}. That is, there exist two POSCMs M1,M2M_{1},M_{2} associated with G\mathcal{G} such that P(o;M1)=P(o;M2)P(\bm{o};M_{1})=P(\bm{o};M_{2}) while P(y∣do(x);M1)≠P(y∣do(x);M2)P(\bm{y}|\text{do}(x);M_{1})\neq P(\bm{y}|\text{do}(x);M_{2}). By Lemma 6, for any MiM_{i} and i=1,2i=1,2, we could find a POSCM Mi′M^{\prime}_{i} associated with H\mathcal{H} such that P(o;Mi)=P(o;Mi′)P(\bm{o};M_{i})=P(\bm{o};M^{\prime}_{i}) and P(y∣do(x);Mi)=P(y∣do(x);Mi′)P(\bm{y}|\text{do}(x);M_{i})=P(\bm{y}|\text{do}(x);M^{\prime}_{i}). This implies that we could obtain two POSCMs M1′,M2′M^{\prime}_{1},M^{\prime}_{2} associated with H\mathcal{H} such that P(o;M1′)=P(o;M2′)P(\bm{o};M^{\prime}_{1})=P(\bm{o};M^{\prime}_{2}) while P(y∣do(x);M1′)≠P(y∣do(x);M2′)P(\bm{y}|\text{do}(x);M^{\prime}_{1})\neq P(\bm{y}|\text{do}(x);M^{\prime}_{2}), i.e., P(y∣do(x))P(\bm{y}|\text{do}(x)) is identifiable w.r.t. H\mathcal{H}. Similarly, we could prove the “only if” direction.

Since Identify returns “Yes” if and only if IdentifyHelper finds an identification formula of P(y∣do(x))P(\bm{y}|\text{do}(x)) and IdentifyHelper is sound and complete, the statement is entailed. ∎

We will next study the general problem of identifying causal effects P(y∣do(π))P(\bm{y}|\text{do}(\pi)) induced by interventions do(π)\text{do}(\pi) following conditional plans in a policy space Π\Pi. The formal definition of such identifiability is given in Definition 2. Similar to atomic interventions, we consider first a simpler setting where the causal diagram G\mathcal{G} is semi-Markovian, without latent endogenous variables. Given a causal diagram G\mathcal{G}, we denote by GΠ\mathcal{G}_{\Pi} a manipulated diagram obtained from a subgraph GX‾\mathcal{G}_{\overline{X}} by adding arrows from nodes in Pa(Π)\mathit{Pa}(\Pi) to the action node XX. Let a set Z=an(Y)GΠ∖{X}\bm{Z}=\mathit{an}(\bm{Y})_{\mathcal{G}_{\Pi}}\setminus\{X\}. Following [40, Eq. 15], the interventional distribution P(y∣do(π))P(\bm{y}|\text{do}(\pi)) could be written as follows:

Among the above equations, the last step follows from Rule 3 of do-calculus [29, Thm. 3.4.1]. More specifically, if there is a directed path from a node Vi∈V∖(Y∪Z∪{X})V_{i}\in\bm{V}\setminus(\bm{Y}\cup\bm{Z}\cup\{X\}) to a node in Y,Z\bm{Y},\bm{Z} in the subgraph GX‾\mathcal{G}_{\overline{X}}, ViV_{i} must also be included in set Z\bm{Z}. That is, (Y,Z⊥ ⁣ ⁣ ⁣ ⁣⊥V∖(Y∪Z∪{X}))GX‾,V∖(Y∪Z∪{X})‾\left(\bm{Y},\bm{Z}\perp\!\!\!\!\perp\bm{V}\setminus(\bm{Y}\cup\bm{Z}\cup\{X\})\right)_{\mathcal{G}_{\overline{X},\overline{\bm{V}\setminus(\bm{Y}\cup\bm{Z}\cup\{X\})}}}, which implies P(y,z∣do(x),do(v∖(y∪z∪{x})))=P(y,z∣do(x))P(\bm{y},\bm{z}|\text{do}(x),\text{do}(\bm{v}\setminus(\bm{y}\cup\bm{z}\cup\{x\})))=P(\bm{y},\bm{z}|\text{do}(x)). It is thus sufficient to identify the causal effect P(y,z∣do(x))P(\bm{y},\bm{z}|\text{do}(x)) induced by atomic intervention do(x)\text{do}(x) w.r.t. G\mathcal{G}. showed that such an algorithm is complete for identifying P(y∣do(π))P(\bm{y}|\text{do}(\pi)) in a semi-Markovian causal diagram G\mathcal{G} where all endogenous variables are observed.

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let Y\bm{Y} be an arbitrary subset of O\bm{O}. Assume that G\mathcal{G} is semi-Markovian, i.e., V=O\bm{V}=\bm{O}. Let Z=an(Y)GΠ∖{X}\bm{Z}=\mathit{an}(\bm{Y})_{\mathcal{G}_{\Pi}}\setminus\{X\}. P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle if and only if P(y,z∣do(x))P(\bm{y},\bm{z}|\text{do}(x)) is identifiable w.r.t. G\mathcal{G}.

The statement follows immediately from [5, Corol. 2]. ∎

We are now ready to consider the identificaiton of P(y∣do(π))P(\bm{y}|\text{do}(\pi)) w.r.t. a policy space Π\Pi and a general causal diagram G\mathcal{G} where latent endogenous variables L\bm{L} are present. Our next result shows that it is sufficient to identify P(y∣do(π))P(\bm{y}|\text{do}(\pi)) in the corresponding semi-Markovian projection H=\textscProject(G)\mathcal{H}=\textsc{Project}(\mathcal{G}).

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let H=\textscProject(G)\mathcal{H}=\textsc{Project}(\mathcal{G}). For any POSCM M1M_{1} associated with G\mathcal{G}, there exists a POSCM M2M_{2} associated with H\mathcal{H} such that P(y∣do(π);M1)=P(y∣do(π);M2)P(\bm{y}|\text{do}(\pi);M_{1})=P(\bm{y}|\text{do}(\pi);M_{2}) for any π∈Π\pi\in\Pi, any Y⊆O\bm{Y}\subseteq\bm{O}, and vice versa.

For any policy π∈Π\pi\in\Pi, P(y∣do(π))P(\bm{y}|\text{do}(\pi)) could be written as a function of P(y,z∣do(x))P(\bm{y},\bm{z}|\text{do}(x)) and π\pi following Equation 3. Therefore, the statement is implied by Lemma 6. ∎

Details of our algorithm Identify is described in Algorithm 4. It takes as input a causal diagram G\mathcal{G}, a policy space Π\Pi and a set of observed outcomes Y\bm{Y}. At Step 1, it obtains a projection H\mathcal{H} of G\mathcal{G} such that all endogenous variables V\bm{V} in H\mathcal{H} are observed. It then constructs the covariates Z\bm{Z} following Lemma 7 (Step 3). Finally, Identify calls IdentifyHelper to identify P(y,z∣do(x))P(\bm{y},\bm{z}|\text{do}(x)) in the projection H\mathcal{H}. It outputs “No” if IdentifyHelper fails to find an identification formula of P(y,z∣do(x))P(\bm{y},\bm{z}|\text{do}(x)); otherwise, it outputs “Yes”. Since Lemma 8 shows that the parameter space of P(y∣do(π))P(\bm{y}|\text{do}(\pi)) and P(o)P(\bm{o}) induced by POSCMs M∈M⟨G⟩M\in\mathscr{M}_{\langle\mathcal{G}\rangle} is equivalent to that induced by instances in the family M(H)\mathscr{M}(\mathcal{H}) of projection H\mathcal{H}, the soundness and completeness of Identify is entailed.

Given a causal diagram G\mathcal{G} and a policy space Π\Pi, let Y\bm{Y} be an arbitrary subset of O\bm{O}. \textscIdentify(G,Π,Y)=\textscYes\textsc{Identify}(\mathcal{G},\Pi,\bm{Y})=\textsc{Yes} if and only if P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle.

Lemma 8 implies that P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is identifiable w.r.t. ⟨G,Π⟩\langle\mathcal{G},\Pi\rangle if and only if P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is identifiable w.r.t. ⟨H,Π⟩\langle\mathcal{H},\Pi\rangle where H=\textscProject(G)\mathcal{H}=\textsc{Project}(\mathcal{G}). The proof is similar to Corollary 4. It follows from Equation 3 and Lemma 7 that IdentifyHelper does not fail if and only if P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is identifiable w.r.t. ⟨H,Π⟩\langle\mathcal{H},\Pi\rangle. The soundness and completeness of Identify is thus entailed. ∎

Appendix C ListIdSpace

In this section, we describe Algorithm ListIdSpace that finds all identifiable subspaces with respect to a causal diagram G\mathcal{G}, a policy space Π\Pi and a set of observed variables Y⊆O\bm{Y}\subseteq\bm{O}. The details of ListIdSpace are shown in Algorithm 5.

It calls a subroutine ListIdSpaceHelper which takes as input the diagram G\mathcal{G}, variables Y\bm{Y} and two policy subspace ΠL,ΠR\Pi_{L},\Pi_{R} of Π\Pi such that ΠL⊆ΠR\Pi_{L}\subseteq\Pi_{R}. More specifically, ListIdSpaceHelper performs backtrack search to enumerate identifiable subspaces Π′\Pi^{\prime} w.r.t. ⟨G,Π,Y⟩\langle\mathcal{G},\Pi,\bm{Y}\rangle such that ΠL⊆Π′⊆ΠR\Pi_{L}\subseteq\Pi^{\prime}\subseteq\Pi_{R}. It aborts branches that will not lead to such identifiable subspaces. The aborting criterion (Step 2 of Algorithm 6) follows the observation that P(y∣do(π))P(\bm{y}|\text{do}(\pi)) is identifiable w.r.t. a policy space Π\Pi only if it is identifiable w.r.t. any subspace Π′⊆Π\Pi^{\prime}\subseteq\Pi. At Step 5, it picks an arbitrary variable VV that is included in the input covariates of ΠR\Pi_{R} but not in ΠL\Pi_{L}. Let Π∪{V}\Pi\cup\{V\} denote a policy space obtained from Π\Pi by including VV as part of the input covariates, i.e., Π∪{V}={π:DPa(Π),V↦PX}\Pi\cup\{V\}=\{\pi:\mathscr{D}_{\mathit{Pa}(\Pi),V}\mapsto\mathscr{P}_{X}\}. Similarly, we define Π∪{V}={π:DPa(Π)∖{V}↦PX}\Pi\cup\{V\}=\{\pi:\mathscr{D}_{\mathit{Pa}(\Pi)\setminus\{V\}}\mapsto\mathscr{P}_{X}\}. ListIdSpaceHelper then recursively returns all identifiable subspaces Π′\Pi^{\prime} w.r.t. ⟨G,Π,Y⟩\langle\mathcal{G},\Pi,\bm{Y}\rangle: the first recursive call returns i-subspaces taking VV as an input and the second call return all i-subspaces that does not consider VV.

Given a causal diagram G\mathcal{G}, a policy space Π\Pi, and an oracle access to Identify, let Y\bm{Y} be an arbitrary subset of O\bm{O}. \textscListIdSpace(G,X,Y,∅,Pa(Π))\textsc{ListIdSpace}(\mathcal{G},X,\bm{Y},\emptyset,\mathit{Pa}(\Pi)) enumerates identifiable subspaces w.r.t. ⟨G,Π,Y⟩\langle G,\Pi,\bm{Y}\rangle with polynomial delay O(∣Pa(Π)∣)\mathcal{O}(|\mathit{Pa}(\Pi)|).

The recursive calls at Steps 6 and 7 guarantees that ListIdSpaceHelper generates every i-subspaces Π′\Pi^{\prime} exactly once. Since every leaf will output an i-subspace, the tree height is at most ∣Pa(Π)∣|\mathit{Pa}(\Pi)| and the existence check is performed by Identify oracle, the delay time is O(∣Pa(Π)∣)\mathcal{O}(|\mathit{Pa}(\Pi)|). ∎

Appendix D Experiments

We perform 4 experiments, each designed to test different aspects of causal imitation learning. The basic results of the last two experiments are summarized in the paper’s main text.

Data-Dependent Binary Imitability - given a binary model, we show that by sampling uniformly from binary distributions satisfying the graph in figure Fig. 1(c) (called the “frontdoor"), naïve imitation results in a biased answer. We also observe that in binary frontdoor models, 50% of distributions exhibit data-dependent imitability, despite not being imitable in generality.

GAN-Based Binary Imitability - Generative Adversarial Networks allow explicit parameterization of a model, and can therefore be used to imitate causal mechanisms in the presence of confounding. We show in various binary models that a GAN-based approach to imitation leads to positive results, both with standard and data-dependent imitation.

Highway Driving - The binary models in experiment 2 show that GANs function in the causal imitation setting, however, one can simply use the corresponding formulae to efficiently get answers. In this experiment, we use the HighD dataset to make two variables continuous, and to show that naïvely choosing information to use for imitation can lead to bias.

MNIST Digits - The final experiment shows that the GAN-based approach is capable of handling complex, high-dimensional probability distributions. To show this, we perform data-dependent imitation on a frontdoor graph, replacing a node with pictures of MNIST digits, to represent a complex, high-dimensional probability distribution.

Experiments 3 and 4 are reported in the main text. However, each experiment builds upon the ideas introduced in the preceding experiment, so it is recommended that readers go in order. Details of each experiment are described in its own subsection. For an discrete variable XX, we will consistently use xix_{i} to represent an assignment X=iX=i; therefore, we write P(y1∣do(x0))=P(Y=1∣do(X=0))P(y_{1}|\text{do}(x_{0}))=P(Y=1|\text{do}(X=0)).

If all variables in a causal model are discrete, one can find the imitating policy through the solution of a series of linear systems. As an example, in the front-door graph (Fig. 1(c), and shown below), with all variables binary, and given an observational distribution P(x,w,s)P(x,w,s) that is amenable to data-dependent imitation, the imitating policy π\pi for XX has probability of π(x1)=α\pi(x_{1})=\alpha:

In this experiment, we show the bias of cloning π(x)=P(x)\pi(x)=P(x) as compared to imitation using Eq. 4 in binary models. It is important to note that we limited this experiment to binary models to permit the computation of optimal policies explicitly - higher dimensional/continuous models are likely to show different average bias due to their extra degrees of freedom.

We generate 1×1051\times 10^{5} random instances where X,W,SX,W,S are binary variables. Probability distributions consistent with the graph decompose as P(x,w,s,y)=P(x)P(w∣x)P(s∣x,w)P(y∣s)P(x,w,s,y)=P(x)P(w|x)P(s|x,w)P(y|s), so we draw uniformly over $foreachconditionalprobability(i.e.for each conditional probability (i.e.P(x),P(w|x),P(s|x,w),P(y|s)\sim U(0,1))WereportinFigure6theL1distancebetweentheinterventionaldistribution) We report in Figure 6 the L1 distance between the interventional distributionP(y|\text{do}(\pi))inducedbytheimitator(ciandbc)andtheactualexpert’srewarddistributioninduced by the imitator (ci and bc) and the actual expert’s reward distributionP(s)overover1\times 10^{5}generatedinstances.ThecausalimitiationlearningapproachusesEq.4,whilenaı¨vecloningdirectlyimitatesgenerated instances. The causal imitiation learning approach uses Eq. 4, while naïve cloning directly imitatesP(X),bothusingsampleaverages.Wefindthatthecausalimitation(ci,averageL1=, both using sample averages. We find that the causal imitation (ci, average L1 =0.0016)dominatesthenaı¨vecloningapproach(bc,averageL1=) dominates the naïve cloning approach (bc, average L1 =0.0147).Moreinterestingly,wefind). More interestingly, we find50\%$ of generated instances are p-imitable; this suggests that leveraging the observational distribution is beneficial in many imitation learning settings.

D.2 GAN-Based Binary Imitability

Given an identification formula for the causal effect of a target variable XX on SS, with XX conditioned on a mediator WW, there is a separate system of equations for each instantiation of the set WW, akin to the one shown in Eq. 4. This means that the number of systems of equations to solve is exponential in the size of WW, and can’t easily be approached when the model contains continuous or high-dimensional variables.

To avoid reliance on these adjustment formulae, we solve for imitating policies through direct modeling of the SCM . In particular, we follow a similar procedure to , by training a generative adversarial network (GAN) to imitate the observational distribution, with a separate generator for each observable variable in the causal graph.

The advantage of this approach is that once a model is trained that faithfully reproduces the observational distribution on a given causal graph, any identifiable quantity will be identical in the trained model as in the original distribution, no matter the form of the underlying mechanisms and latent variables [29, Definition 3.2.4]. This means that so long as you have an instrument for XX, one can use the trained generator to optimize for a conditional policy by directly implementing it in the model, as shown in Lemma 2.

In this experiment, we show that such an approach is, in fact, practical. To maintain the ability to compare our results with the ground truth, we use binary variables for each node in a tested graph. This restriction is loosened in the final two experiments - our goal here is to show that it is possible to get very accurate model reconstruction and imitation (with accurate intervention effects) with a GAN, even when there are latent variables.

Like in the previous experiment, for “ground-truth" data, our models are sampled uniformly from the space of factorized distributions. For example, for graph 1 in Table 1, one can factorize P(x,y,z)=P(x)P(z∣x)P(y∣x,z)P(x,y,z)=P(x)P(z|x)P(y|x,z), and can choose ground-truth probabilities P(x),P(z∣x′),P(y∣x′,z′)∼U(0,1),∀x,y,z,x′,z′P(x),P(z|x^{\prime}),P(y|x^{\prime},z^{\prime})\sim U(0,1),\forall x,y,z,x^{\prime},z^{\prime}.

For the GANs, we adapt discrete BGAN to arbitrary SCM. The advantage of f-divergence-based approaches (such as BGAN) is that the f-GAN discriminators explicitly optimize a lower bound on the value of the chosen f-divergence. In particular, defining an f-divergence over two distributions PP and QQ as Df(P∣∣Q)=∫Xq(x)f(p(x)q(x))dxD_{f}(P||Q)=\int_{X}q(x)f\left(\frac{p(x)}{q(x)}\right)dx The KL divergence is an example of an f-divergence with f(x)=xlog⁡(x)f(x)=x\log(x), with f∗f^{*} as the convex conjugate of ff, and using T\mathcal{T} as the set of functions that a neural network can implement, the f-GAN discriminator optimizes the following :

with a tight bound for T∗(x)=f′(p(x)q(x))T^{*}(x)=f^{\prime}\left(\frac{p(x)}{q(x)}\right). This means that by choosing an appropriate function ff and the class of functions TT, one can estimate the divergence through optimization over TT . With this trained discriminator T(x)T(x), one can update generator QθQ_{\theta} to be more similar to PP with a update similar to a policy-gradient .

To adapt these GANs to work with causal models, we create a separate generator for each variable V∈VV\in\bm{V}, which is given as input samples from PaV\mathit{Pa}_{V}, and outputs multinomial probabilities. Each latent variable is explicitly sampled from N(0,1)k\mathcal{N}(0,1)^{k} (with k=3k=3 in these experiments), and given as input to its children. Finally, instead of a single discriminator for the entire model, we exploit independence relations in the graph to localize optimization. In particular, in a Markovian causal model (without latent variables), one can create a separate discriminator for each variable, to directly learn the conditional distribution for each node. However, once there are latent variables, this variable-focused approach no longer captures all dependencies. Instead, we construct a separate conditional discriminator for each set of nodes that have a path made up of entirely bi-directed edges (c-components ), which allows each discriminator to specialize to a part of the model.

As an example, for the graph 1 in Table 1, the generator for XX gets as input a sample u∼N(0,1)3u\sim\mathcal{N}(0,1)^{3}, and outputs a probability of 11. The generator for ZZ gets as input a sample according to the probability of XX, and outputs a conditional probability of ZZ. Finally, YY gets as input uu and the sampled value of ZZ. This graph has 2 c-components ({X,Y}\{X,Y\} and {Z}\{Z\}), which corresponds to discriminators P(z∣x)P(z|x) and P(x,y∣z)P(x,y|z).

Similarly, once the model is optimized, the policy π\pi is trained by manually replacing the generator for XX with a new, untrained generator for π\pi, and training it as a GAN with a discriminator comparing samples of YY in the original model (i.e., Y∼P(y)Y\sim P(y)) with samples of YY in the intervened model (i.e., Y∼P(y∣do(π);M^)Y\sim P(y|\text{do}(\pi);\hat{M}) where M^\hat{M} is the parametrized model learned by generators.)

The graphs in Table 1 were each chosen to demonstrate a different aspect of imitability. The first graph is imitable by direct parents (Theorem 1), and corresponds to existing approaches to imitation, where an agent gets observations identical to the expert. The second graph demonstrates an example where an expert has additional information from a latent variable, but the agent can still successfully imitate P(y)P(y) by using information that is not used by the expert, i.e., the π\pi-backdoor admissible set {W}\{W\} (Theorem 2). Finally, Graphs 3 and 4 demonstrate data-dependent imitability (Definition 5). Graph 3 focuses on distributions that are amenable to imitation, meaning that imitation of P(y)P(y) is possible without knowledge of the latent variable. Graph 4 uses only non-imitable distributions. Sampled uniformly, half of these instances are p-imitable, and half are not, so the expected performance of an unknown distribution is the average of Row 3 and 4.

The table columns show the average L1 distance between the computed interventional distributions, the predicted & optimal policy, as well as the effect P(y∣do(π))P(y|\text{do}(\pi)) of the learned policy vs the observed P(y)P(y). Each element of the table shows an average value of its corresponding distance from ground-truth over 100 runs (with each run sampling a different ground-truth probability distribution over the graph), overlaid over the histogram of distances over the 100 distributions/trained GANs.

The first two columns allow determining the error in reconstructing the interventional distribution of atomic intervention do(x)\text{do}(x). The ∣yx−y^x∣|y_{x}-\hat{y}_{x}| represents the differences between the ground-truth E[y∣do(x)]E[y|\text{do}(x)] and the imitated E[y∣do(x);M^]E[y|\text{do}(x);\hat{M}] in the parametrized model M^\hat{M}. Notice that the policies are often conditioned, which is not reflected in these values.

The ∣y−y^∣|y-\hat{y}| value represents the difference in the ground-truth expert’s reward E[y]E[y] with the distribution E[y∣do(π)]E[y|\text{do}(\pi)] induced by the learned policy π\pi in the ground-truth model, meaning that the policy is trained in the imitated model, but is tested by replacing the true mechanism, as if the learned mechanism was tried in real life.

The main point of possible confusion could be ∣α−α^∣|\alpha-\hat{\alpha}| in the graphs where the policy is conditional. In the frontdoor cases, when the policy has no conditioning (Rows 3 and 4), the optimal value can be cleanly found, using Eq. 4. However, in the backdoor case (as seen in Row 1 and in Row 2), there can be multiple possible valid solutions. Here we show the precise procedure used to compute ∣α−α^∣|\alpha-\hat{\alpha}| in these two cases.

In Row 1, which is commonly called the “backdoor" graph, we have defining α1=π(x1∣z1)\alpha_{1}=\pi(x_{1}|z_{1}) and α0=π(x1∣z0)\alpha_{0}=\pi(x_{1}|z_{0}):

This means that multiple possible α0,α1\alpha_{0},\alpha_{1} satisfy the given constraint. In such situations, given α^1\hat{\alpha}_{1} and α^0\hat{\alpha}_{0} found by GAN, we find the “closest correct comparison" by minimizing

subject to the constraint in Eq. 5, and with α1,α0∈\alpha_{1},\alpha_{0}\in. We then report this minimized value in the column labeled ∣α−α^∣|\alpha-\hat{\alpha}|.

Row 2 has more complex relations, since the policy has as inputs both values from ZZ and WW. However, the values of WW are irrelevant to imitating yy, since WW is in a different c-component of the graph than YY. This means that we can use the same approach as for Row 1, considering only ZZ (and averaging the policy over WW values).

The results in Table 1 suggest that GANs are capable of training accurate imitating policies in the presence of latent variables. Of particular note is the relatively large error in α\alpha can sometimes be present in the policies, despite the policies yielding very accurate samples of yy. This happens when the imitable policy has P(y∣do(x0))P(y|\text{do}(x_{0})) and P(y∣do(x1))P(y|\text{do}(x_{1})) with very similar values, meaning that the policy has little effect on the probability of YY.

D.3 Highway Driving

The purpose of this experiment is to demonstrate that when imitating P(y)P(y), it is important to choose a set of covariates that is π\pi-backdoor admissible (Definition 4). To witness, in Fig. 7(a), using knowledge of WW to imitate XX effectively adds confounding between XX and YY, possibly affecting the imitated distribution of YY. That is, {W}\{W\} is not π\pi-backdoor admissible. Similarly, in Fig. 7(b), one must use knowledge of ZZ when imitating P(y)P(y), but using either only WW or both ZZ and WW can lead to bias and inferior performance on reward measure YY. In other words, set {Z}\{Z\} is π\pi-backdoor admissible while {W,Z}\{W,Z\} is not due to the active path X←L→W↔YX\leftarrow L\rightarrow W\leftrightarrow Y.

This means that under “correct" imitation (not using knowledge of WW), we have:

Under “incorrect" imitation (using WW) we get:

Therefore, using the mechanisms above in Fig. 7(a) with binary variables, using WW leads to a bias of 18%18\%:

Indeed, by sampling 10,000 data points, and using the empirical P(x)P(x) for one “imitator", and P(x∣w)P(x|w) for the other, we get 0.17930.1793 difference between the two, corroborating this result.

We next show that this same issue can show up when variables are continuous. To achieve this, we adapted car velocity data from the highD dataset to a model similar to the binary version. In this model, one must use ZZ (velocity of the front car) to predict XX (velocity of the driving car), but WW would bias the prediction (with the same error as in previous section). The full model specification is as follows:

P(L=1)=P(U=1)=0.62P(L=1)=P(U=1)=0.62 (with values of LL constructed from values of XX)

ZZ is velocity of preceding car from highD dataset.

XX is velocity of current car from highD dataset. LL was constructed such that XX satisfies the relation L=I{X−Z>−0.4}L=I_{\{X-Z>-0.4\}} (this was achieved by choosing the threshold −0.4-0.4 to give the correct distribution over LL).

Y←U∧I{X−Z≤−0.4}∨¬U∧I{X−Z>−0.4}Y\leftarrow U\land I_{\{X-Z\leq-0.4\}}\vee\lnot U\land I_{\{X-Z>-0.4\}}

The values and mechanisms here were specifically chosen to have similar outputs to the previous model (Fig. 7(a)), despite using continuous car velocity data in place of boolean for node values. Fig. 7(b) shows a faithful graphical representation of the model. However, during the experiment, all algorithms are provided with only the causal diagram in Figure 4(a). That is, only independence relationships encoded in Figure 4(a) are exploited.

The outputs of a supervised learning algorithm are single values - they do not represent a distribution over possible values. This can affect imitation, since it is possible that the full range of the distribution is necessary for optimal imitation. We next trained two GANs to imitate the distribution over X, in the same way as done with the supervised models - one using only ZZ, and one using both WW and ZZ. Due to the sampling needs of GANs, however, they had access to the full dataset over X,Z,WX,Z,W. This experiment was also repeated 100 times, giving the performance shown in Fig. 8(c). Once again, the GAN using only ZZ has clearly superior performance. This difference exists despite both trained GANs seemingly recovering a good approximation over the distribution of XX, as seen in Fig. 8(b).

D.4 MNIST Digits

The purpose of this experiment is to show how Algorithm Algorithm 1 using GANs for policy estimation could obtain reasonable imitation results in the p-imitable setting, even when the probability distribution of some observed endogenous variables is high-dimensional.

Specifically, we use the frontdoor graph, same as in the first experiment. There, when XX and SS are binary, we can compute the value α\alpha using Eq. 5. However, in this case, the formula for the interventional distribution is :

Critically, computing the effect of an intervention here requires a sum (or integral if continuous) over WW. If WW is a complex distribution or is high-dimensional, this quantity can be difficult to estimate.

Once again, to allow us the ability to compare results to a ground-truth value, we repeat the procedure performed in the previous experiment, by first constructing a binary model with known characteristics, and then by replacing the binary value of WW with a high-dimensional distribution with a property that follows the same underlying mechanism as the original binary value. Specifically, we use the MNIST digits for 00 and 11, which are a 28×28=78428\times 28=784 dimensional vector representing a complex probability distribution. The pictures of 0s replace “False” values of WW, while pictures of 11s replace “True” values. This allows a direct translation between a binary variable and the desired complex distribution. The underlying binary distribution had the following mechanisms:

This leads to P(s1)=0.245P(s_{1})=0.245, but with naïve cloning of P(x)P(x), the resulting P(s1∣do(π))=0.334P(s_{1}|\text{do}(\pi))=0.334, a difference of 0.08880.0888. We chose the reward signal Y←¬SY\leftarrow\lnot S, since the assumption is that the original values of XX were decided by an expert.

The GAN for the c-component {W}\{W\} is much larger than that of the other variables, since WW is an image, so we pre-trained this component, and inserted the trained version into the full graph for optimization. We repeated experiment 16 times, of which 3 runs were discarded due to collapse in the GANs associated with P(w∣x)P(w|x). The results are visible in Fig. 10. These results show that despite the high-dimensional nature of the distribution over WW, the GAN was consistently able to perform better than naïve imitation, approaching the optimal value.