Title: Causal Imitability Under Context-Specific Independence Relations
Venue: NeurIPS 2023
Accepted: yes
Keywords: causal inference

conditional independence

context-specific independence relations

imitability
Abstract: Drawbacks of ignoring the causal mechanisms when performing imitation learning have recently been acknowledged. Several approaches both to assess the feasibility of imitation and to circumvent causal confounding and causal misspecifications have been proposed in the literature.
However, the potential benefits of the incorporation of additional information about the underlying causal structure are left unexplored.
An example of such overlooked information is context-specific independence (CSI), i.e., independence that holds only in certain contexts.
We consider the problem of causal imitation learning when CSI relations are known.
We prove that the decision problem pertaining to the feasibility of imitation in this setting is NP-hard.
Further, we provide a necessary graphical criterion for imitation learning under CSI and show that under a structural assumption, this criterion is also sufficient.
Finally, we propose a sound algorithmic approach for causal imitation learning which takes both CSI relations and data into account.

Causal Imitability Under Context-Specific Independence Relations

Abstract

Drawbacks of ignoring the causal mechanisms when performing imitation learning have recently been acknowledged. Several approaches both to assess the feasibility of imitation and to circumvent causal confounding and causal misspecifications have been proposed in the literature. However, the potential benefits of the incorporation of additional information about the underlying causal structure are left unexplored. An example of such overlooked information is context-specific independence (CSI), i.e., independence that holds only in certain contexts. We consider the problem of causal imitation learning when CSI relations are known. We prove that the decision problem pertaining to the feasibility of imitation in this setting is NP-hard. Further, we provide a necessary graphical criterion for imitation learning under CSI and show that under a structural assumption, this criterion is also sufficient. Finally, we propose a sound algorithmic approach for causal imitation learning which takes both CSI relations and data into account.

1 Introduction

Imitation learning has been shown to significantly improve performance in learning complex tasks in a variety of applications, such as autonomous driving [27], electronic games [17, 41], and navigation [34]. Moreover, imitation learning allows for learning merely from observing expert demonstrations, therefore circumventing the need for designing reward functions or interactions with the environment. Instead, imitation learning works through identifying a policy that mimics the demonstrator's behavior which is assumed to be generated by an expert with near-optimal performance in terms of the reward. Imitation learning techniques are of two main flavors: behavioral cloning (BC) [42, 30, 24, 25], and inverse reinforcement learning 1 (IRL) [26, 1, 37, 44]. BC approaches often require extensive data to succeed. IRL methods have proved more successful in practice, albeit at the cost of an extremely high computational load. The celebrated generative adversarial imitation learning (GAIL) framework and its variants bypass the IRL step by occupancy measure matching to learn an optimal policy [15].

Despite recent achievements, still in practice applying imitation learning techniques can result in learning policies that are markedly different from that of the expert [9, 7, 22]. This phenomenon is for the most part the result of a distributional shift between the demonstrator and imitator environments [11, 31, 12]. All aforementioned imitation learning approaches rely on the assumption that the imitator has access to observations that match those of the expert. An assumption clearly violated when unobserved confounding effects are present, e.g., because the imitator has access only to partial observations of the system. For instance, consider the task of training an imitator to drive a car, the causal diagram of which is depicted in Figure 1a. X and Y in this graph represent the action taken by the driver and the latent reward, respectively. The expert driver controls her speed ( X ) based on the speed limit on the highway (denoted by S ), along with other covariates such as weather conditions,

X

Y

T

S

Z

(a) not imitable

X

Y

T

S

Z

(b) imitable

X

Y

T

S

Z

T

= 1

(c) contextually imitable

E

W

U

U>

0

.

1

(d) wage rate example

brake indicator of the car in front, traffic load, etc. We use two such covariates in our example: Z and T . An optimal imitator should mimic the expert by taking actions according to the expert policy P ( X | S, Z, T ) . However, if the collected demonstration data does not include the speed limit ( S ), the imitator would tend to learn a policy that averages the expert speed, taking only the other covariates ( Z and T ) into account. Such an imitator could end up crashing on serpentine roads or causing traffic jams on highways. As shown in Figure 1a, the speed limit acts as a latent confounder 2 .

One could argue that providing more complete context data to the imitator, e.g. including the speed limit in the driving example, would resolve such issues. While this solution is not applicable in most scenarios, the fundamental problem in imitation learning is not limited to causal confounding. As demonstrated by [12] and [43], having access to more data not only does not always result in improvement but also can contribute to further deterioration in performance. In other words, important issues can stem not merely from a lack of observations but from ignoring the underlying causal mechanisms. The drawback of utilizing imitation learning without considering the causal structure has been recently acknowledged, highlighting terms including causal confusion [12], sensor-shift [13], imitation learning with unobserved confounders [43], and temporally correlated noise [36].

Incorporating causal structure when designing imitation learning approaches has been studied in recent work. For instance, [12] proposed performing targeted interventions to avoid causal misspecification. [43] characterized a necessary and sufficient graphical criterion to decide the feasibility of an imitation task (aka imitability ). It also proposed a practical causal imitation framework that allowed for imitation in specific instances even when the general graphical criterion (the existence of a π -backdoor admissible set) did not necessarily hold. [36] proposed a method based on instrumental variable regression to circumvent the causal confounding when a valid instrument was available.

Despite recent progress, the potential benefits of further information pertaining to the causal mechanisms remain unexplored. An important type of such information is context-specific independence (CSI) relations, which are generalizations of conditional independence. Take, for instance, the labor market example shown in Figure 1d, where W , E , and U represent the wage rate, education level, and unemployment rate, respectively. The wage rate W is a function of E and U . However, when unemployment is greater than 10% , the education level does not have a significant effect on the wage rate, as there is more demand for the job than the openings. This is to say, W is independent of E given U , only when U > 10% . This independence is shown by a label U > 0 . 1 on the edge E → W . Analogously, in our driving example, the imitator would still match the expert's policy if there was heavy traffic on the route. This is because, in the context that there is heavy traffic, the policy of the expert would be independent of the speed limit. This context-specific independence between the speed limit S and the action X given T = 1 (heavy traffic) is indicated by a label ( T = 1 ) on the edge S → X in Figure 1c. This label indicates that the edge S → X is absent when T = 1 . The variables T in Figure 1c and U in Figure 1d are called context variables , i.e., variables which induce conditional independence relations in the system based on their realizations.

CSIs can be incorporated through a refined presentation of Bayesian networks to increase the power of inference algorithms [8]. The incorporation of CSI also has ramifications on causal inference. For instance, [39] showed that when accounting for CSIs, Pearl's do-calculus is no longer complete for causal identification. They proposed a sound algorithm for identification under CSIs. It is noteworthy

that unlike conditional Independence (CI) relations that can be learned from data and are widely used to infer the graphical representation of causal mechanisms [35, 6, 10, 4, 19, 18], not all CSI relations can be learned from mere observational data. However, several approaches exist for learning certain CSIs from data [21, 16, 32, 23]. In this paper, we investigate how CSIs allow for imitability in previously non-imitable instances.

After presenting the notation (Section 2), we first prove a hardness result, namely, that deciding the feasibility of imitation learning while accounting for CSIs is NP-hard. This is in contrast to the classic imitability problem [43], where deciding imitability is equivalent to a single d-separation test. We characterize a necessary and sufficient graphical criterion for imitability under CSIs under a structural assumption (Section 3) by leveraging a connection we establish between our problem and classic imitability. Next, we show that in certain instances, the dataset might allow for imitation, despite the fact that the graphical criterion is not satisfied (Section 4). Given the constructive nature of our achievability results, we propose algorithmic approaches for designing optimal imitation policies (Sections 3 and 4) and evaluate their performance in Section 5. The proofs of all our results appear in Appendix A.

2 Preliminaries

Throughout this work, we denote random variables and their realizations by capital and small letters, respectively. Likewise, we use boldface capital and small letters to represent sets of random variables and their realizations, respectively. For a variable X , D X denotes the domain of X and P X the space of probability distributions over D X . Given two subsets of variables T and S such that T ⊆ S , and a realization s ∈ D S , we use ( s ) T to denote the restriction of s to the variables in T .

We use structural causal models (SCMs) as the semantic framework of our work [28]. An SCM M is a tuple ⟨ U , V , P M ( U ) , F⟩ where U and V are the sets of exogenous and endogenous variables, respectively. Values of variables in U are determined by an exogenous distribution P M ( U ) , whereas the variables in V take values defined by the set of functions F = { f V M } V ∈ V . That is, V ← f V M ( Pa ( V ) ∪ U V ) where Pa ( V ) ⊆ V and U V ⊆ U . We also partition V into the observable and latent variables, denoted by O and L , respectively, such that V = O ∪ L . The SCM induces a probability distribution over V whose marginal distribution over observable variables, denoted by P M ( O ) , is called the observational distribution . Moreover, we use do ( X = x ) to denote an intervention on X ⊆ V where the values of X are set to a constant x in lieu of the functions { f M X : ∀ X ∈ X } . We use P M x ( y ) := P M ( Y = y | do ( X = x )) as a shorthand for the postinterventional distribution of Y after the intervention do ( X = x ) .

Let X , Y , W , and Z be pairwise disjoint subsets of variables. X and Y are called contextually independent given W in the context z ∈ D Z if P ( X | Y , W , z ) = P ( X | W , z ) , whenever P ( Y , W , z ) > 0 . We denote this context-specific independence (CSI) relation by X ⊥ ⊥ Y | W , z . Moreover, a CSI is called local if it is of the form X ⊥ ⊥ Y | z where { Y } ∪ Z ⊆ Pa ( X ) .

̸

A directed acyclic graph (DAG) is defined as a pair G = ( V , E ) , where V is the set of vertices, and E ⊆ V × V denotes the set of directed edges among the vertices. SCMs are associated with DAGs, where each variable is represented by a vertex of the DAG, and there is a directed edge from V i to V j if V i ∈ Pa ( V j ) [28]. Whenever a local CSI of the form V i ⊥ ⊥ V j | ℓ holds, we say ℓ is a label for the edge ( V i , V j ) and denote it by ℓ ∈ L ( V i ,V j ) . Recalling the example of Figure 1c, the realization T = 1 is a label for the edge ( S, X ) , which indicates that this edge is absent when T is equal to 1 . Analogous to [29], we define a labeled DAG (LDAG), denoted by G L , as a tuple G L = ( V , E , L ) , where L denotes the labels representing local independence relations. More precisely, L = {L ( V i ,V j ) : L ( V i ,V j ) = ∅ | ( V i , V j ) ∈ E } , where

Note that, when L = ∅ , G L reduces to a DAG. That is, every DAG is a special LDAG with no labels. For ease of notation, we drop the superscript L when L = ∅ . Given a label set L , we define the context variables of L , denoted by C ( L ) , as the subset of variables that at least one realization of them appears in the edge labels. More precisely,

̸

where V ′ is an arbitrary subset of nodes containing V i . The argument is that if there exists some arbitrary subset V ′ of nodes containing V i such that a realization l of this subset results in independence (e.g., of some V j and V k ), then V i is considered as a context variable. We mainly focus on the settings where context variables are discrete or categorical. This assumption can be relaxed under certain considerations (See Remark 3.11). We let M ⟨G L ⟩ denote the class of SCMs compatible with the causal graph G L . For a DAG G , we use G X and G X to represent the subgraphs of G obtained by removing edges incoming to and outgoing from vertices of X , respectively. We also use standard kin abbreviations to represent graphical relationships: the sets of parents, children, ancestors, and descendants of X in G are denoted by Pa ( X ) Ch ( X ) , An ( X ) , and De ( X ) , respectively. For disjoint subsets of variable X , Y and Z in G , X and Y are said to be d-separated by Z in G , denoted by X ⊥ Y | Z , if every path between vertices in X and Y is blocked by Z (See Definition 1.2.3. in 28). Finally, solid and dashed vertices in the figures represent the observable and latent variables, respectively.

3 Imitability

In this section, we address the decision problem, i.e., whether imitation learning is feasible, given a causal mechanism. We first review the imitation learning problem from a causal perspective, analogous to the framework developed by [43]. We will use this framework to formalize the causal imitability problem in the presence of CSIs. Recall that O and L represented the observed and unobserved variables, respectively. We denote the action and reward variables by X ∈ O and Y ∈ L , respectively. The reward variable is commonly assumed to be unobserved in imitation learning. Given a set of observable variables Pa Π ⊆ O \ De ( X ) , a policy π is then defined as a stochastic mapping, denoted by π ( X | Pa Π ) , mapping the values of Pa Π to a probability distribution over the action X . Given a policy π , we use do ( π ) to denote the intervention following the policy π , i.e., replacing the original function f X in the SCM by the stochastic mapping π . The distribution of variables under policy do ( π ) can be expressed in terms of post-interventional distributions ( P ( ·| do ( x )) ) as follows:

where v is a realization of an arbitrary subset V ′ ⊆ V . We refer to the collection of all possible policies as the policy space , denoted by Π = { π : D Pa Π →P X } . Imitation learning is concerned with learning an optimal policy π ∗ ∈ Π such that the reward distribution under policy π ∗ matches that of the expert policy, that is, P ( y | do ( π ∗ )) = P ( y ) [43]. Given a DAG G and the policy space Π , if such a policy exists, the instance is said to be imitable w.r.t. ⟨G L , Π ⟩ . The causal imitability problem is formally defined below.

Definition 3.1 (Classic imitability w.r.t. ⟨G , Π ⟩ 43) . Given a latent DAG G and a policy space Π , let Y be an arbitrary variable in G . P ( y ) is said to be imitable w.r.t. ⟨G , Π ⟩ if for any M ∈ M ⟨G⟩ , there exists a policy π ∈ Π uniquely computable from P ( O ) such that P M ( y | do ( π )) = P M ( y ) .

Note that if Y / ∈ De ( X ) , the third rule of Pearl's do calculus implies P ( y | do ( x ) , pa Π ) = P ( y | pa Π ) , and from Equation (2), P ( y | do ( π )) = P ( y ) for any arbitrary policy π . Intuitively, in such a case, action X has no effect on the reward Y , and regardless of the chosen policy, imitation is guaranteed. Therefore, throughout this work, we assume that X affects Y , i.e., Y ∈ De ( X ) ∩ L . Under this assumption, [43] proved that P ( y ) is imitable w.r.t. ⟨G , Π ⟩ if and only if there exists a π -backdoor admissible set Z w.r.t. ⟨G , Π ⟩ .

Definition 3.2 ( π -backdoor, 43) . Given a DAG G and a policy space Π , a set Z is called π -backdoor admissible set w.r.t. ⟨G , Π ⟩ if and only if Z ⊆ Pa Π and Y ⊥ X | Z in G X .

The following lemma further reduces the search space of π -backdoor admissible sets to a single set.

Lemma 3.3. Given a latent DAG G and a policy space Π , if there exists a π -backdoor admissible set w.r.t. ⟨G , Π ⟩ , then Z = An ( { X,Y } ) ∩ ( Pa Π ) is a π -backdoor admissible set w.r.t. ⟨G , Π ⟩ .

As a result, deciding the imitability reduces to testing a d-separation, i.e., whether Z defined in Lemma 3.3 d-separates X and Y in G X , for which efficient algorithms exist [14, 38]. If this d-separation holds, then π ( X | Z ) = P ( X | Z ) is an optimal imitating policy. Otherwise, the instance is not imitable.

}

X

Z

S

Y

T

U

Z

= 0

T

= 0

(a)

G

L

X

Z

S

Y

T

U

T

= 0

(b)

G

L

w

w

,

W

=

{

Z

}

,

w

=

{

1

}

X

Z

S

Y

T

U

(c)

G

L

w

w

,

W

=

{

T, Z

}

,

w

=

{

0

,

1

It is noteworthy that in practice, it is desirable to choose π -admissible sets with small cardinality for statistical efficiency. Polynomial-time algorithms for finding minimum(-cost) d-separators exist [2, 38].

3.1 Imitability with CSIs

Deciding the imitability when accounting for CSIs is not as straightforward as the classic case discussed earlier. In particular, as we shall see, the existence of π -backdoor admissible sets is not necessary to determine the imitability of P ( y ) anymore in the presence of CSIs. In this section, we establish a connection between the classic imitability problem and imitability under CSIs. We begin with a formal definition of imitability in our setting.

Definition 3.4 (Imitability w.r.t. ⟨G L , Π ⟩ ) . Given an LDAG G L and a policy space Π , let Y be an arbitrary variable in G L . P ( y ) is called imitable w.r.t. ⟨G L , Π ⟩ if for any M ∈ M ⟨G L ⟩ , there exists a policy π ∈ Π uniquely computable from P ( O ) such that P M ( y | do ( π )) = P M ( y ) .

For an LDAG G L , recall that we defined the set of context variables C ( L ) by Equation (1). The following definition is central in linking the imitability under CSIs to the classic case.

Definition 3.5 (Context-induced subgraph) . Given an LDAG G L = ( V , E , L ) , for a subset W ⊆ C ( L ) and its realization w ∈ D W , we define the context-induced subgraph of G L w.r.t. w , denoted by G L w w , as the LDAG obtained from G L by keeping only the labels that are compatible with w 3 , and deleting the edges that are absent given W = w , along with the edges incident to W .

Consider the example of Figure 2 for visualization. In the context Z = 1 , the label Z = 0 on the edge U → X is discarded, as Z = 0 is not compatible with the context (see Figure 2b.) Note that edges incident to the context variable Z are also omitted. On the other hand, in the context Z = 1 , T = 0 , the edge X → Y is absent and can be deleted from the corresponding graph (refer to Figure 2c.) Edges incident to both T and Z are removed in this case. Equipped with this definition, the following result, the proof of which appears in Appendix A, characterizes a necessary condition for imitability under CSIs.

Lemma 3.6. Given an LDAG G L and a policy space Π , let Y be an arbitrary variable in G L . P ( y ) is imitable w.r.t. ⟨G L , Π ⟩ only if P ( y ) is imitable w.r.t. ⟨G L w w , Π ⟩ for every realization w ∈ D w of every subset of variables W ⊆ C ( L ) .

For instance, a necessary condition for the imitability of P ( y ) in the graph of Figure 2a is that P ( y ) is imitable in both 2b and 2c. Consider the following special case of Lemma 3.6: if W = C ( L ) , then G L w w = G w is a DAG, as L w = ∅ for every w ∈ D W . In essence, a necessary condition of imitability under CSIs can be expressed in terms of several classic imitability instances:

Corollary 3.7. Given an LDAG G L and a policy space Π , let Y be an arbitrary variable in G L . P ( y ) is imitable w.r.t. ⟨G L , Π ⟩ only if P ( y ) is imitable w.r.t. ⟨G c , Π ⟩ , i.e., there exists a π -backdoor admissible set w.r.t. ⟨G c , Π ⟩ , for every c ∈ D C ( L ) .

It is noteworthy that although the subgraphs G c in Corollary 3.7 are defined in terms of realizations of C ( L ) , the number of such subgraphs does not exceed 2 | E | . This is due to the fact that G c s share the same set of vertices, and their edges are subsets of the edges of G L .

Although deciding the classic imitability is straightforward, the number of instances in Corollary 3.7 can grow exponentially in the worst case. However, in view of the following hardness result, a more efficient criterion in terms of computational complexity cannot be expected.

Theorem 3.8. Given an LDAG G L and a policy space Π , deciding the imitability of P ( y ) w.r.t. ⟨G L , Π ⟩ is NP-hard.

This result places the problem of causal imitability under CSI relations among the class of NPhard problems in the field of causality, alongside other challenges such as devising minimum-cost interventions for query identification [3] and discovering the most plausible graph for causal effect identifiability [5]. Although Theorem 3.8 indicates that determining imitability under CSIs might be intractable in general, as we shall see in the next section taking into account only a handful of CSI relations can render previously non-imitable instances imitable. Before concluding this section, we consider a special yet important case of the general problem. Specifically, for the remainder of this section, we assume that Pa ( C ( L )) ⊆ C ( L ) . That is, the context variables have parents only among the context variables. Under this assumption, the necessary criterion of Corollary 3.7 turns out to be sufficient for imitability as well. More precisely, we have the following characterization.

Proposition 3.9. Given an LDAG G L where Pa ( C ( L )) ⊆ C ( L ) and a policy space Π , let Y be an arbitrary variable in G L . P ( y ) is imitable w.r.t. ⟨G L , Π ⟩ if and only if P ( y ) is imitable w.r.t. ⟨G c , Π ⟩ , for every c ∈ D C ( L ) .

The proof of sufficiency, which is constructive, appears in Appendix A. The key insight here is that an optimal imitation policy is constructed based on the imitation policies corresponding to the instances ⟨G c , Π ⟩ . In view of proposition 3.9, we provide an algorithmic approach for finding an optimal imitation policy under CSIs, as described in Algorithm 1. This algorithm takes as input an LDAG G L , a policy space Π , an action variable X and a latent reward Y . It begins with identifying the context variables C ( = C ( L ) ), defined by Equation (1) (Line 2). Next, for each realization c ∈ D C , the corresponding context-induced subgraph (Def. 3.5) is built (which is a DAG). If P ( y ) is not imitable in any of these DAGs, the algorithm fails, i.e., declares P ( y ) is not imitable in G L . The imitability in each DAG is checked through a d-separation based on Lemma 3.3 (for further details of the function FindSep , see Algorithm 3 in Appendix B.) Otherwise, for each realization c ∈ D C , an optimal policy π c is learned through the application of the π -backdoor admissible set criterion (line 9). If such a policy exists for every realization of C , P ( y ) is imitable w.r.t. ⟨G L , Π ⟩ due to Proposition 3.9. An optimal imitating policy π ∗ is computed based on the previously identified policies π c . Specifically, π ∗ , the output of the algorithm, is defined as

Theorem 3.10. Algorithm 1 is sound and complete for determining the imitability of P ( y ) w.r.t. ⟨G L , Π ⟩ and finding the optimal imitating policy in the imitable case, under the assumption that Pa ( C ( L )) ⊆ C ( L ) .

Remark 3.11. Algorithm 1 requires assessing the d-separation of line 5 in the context-induced subgraphs G c . Even when the context variables C are continuous, the domain of these variables can

X

C

S

Y

U

C

= 0

(a)

H

L

with non-id surrogate

X

T

S

W

Y

U

1

C

U

2

U

3

C

= 1

T

= 0

C

= 0

(b)

G

L

with no surrogates

X

T

S

W

Y

U

1

C

U

2

U

3

(c)

G

L

(

C

= 0)

X

T

S

W

Y

U

1

C

U

2

U

3

(d)

G

L

(

C

= 1)

be partitioned into at most 2 m equivalence classes in terms of their corresponding context-induced subgraph, where m denotes the number of labeled edges. This holds since the number of contextinduced subgraphs cannot exceed 2 m . It is noteworthy, however, that solving the equation referred to in line 10 of Algorithm 2 for continuous variables may bring additional computational challenges.

Remark 3.12. Under certain assumptions, polynomial-time algorithms can be devised for deciding imitability. One such instance is when D C ( L ) = O ( log( | V | ) ) . Another analogous case is when the number of context-specific edges is O ( log( | V | ) ) . Both of these lead polynomially many contextinduced subgraphs in terms of | V | , which in turn implies that Alg. 1 runs in polynomial time.

4 Leveraging causal effect identifiability for causal imitation learning

Arguably, the main challenge in imitation learning stems from the latent reward. However, in certain cases, there exist observable variables S ⊆ O such that P ( S | do ( π )) = P ( S ) implies P ( y | do ( π )) = P ( y ) for any policy π ∈ Π . Such S is said to be an imitation surrogate for Y [43]. Consider, for instance, the graph of Figure 3a, where X represents the pricing strategy of a company, C is a binary variable indicating recession ( C = 0 ) or expansion ( C = 1 ) period, U denotes factors such as demand and competition in the market, S represents the sales and Y is the overall profit of the company. Due to Proposition 3.9, P ( y ) is not imitable in this graph. On the other hand, the sales figure ( S ) is an imitation surrogate for the profit ( Y ), as it can be shown that whenever P ( S | do ( π )) = P ( S ) for a given policy π , P ( y | do ( π )) = P ( y ) holds for the same policy. Yet, according to do-calculus, P ( S | do ( π )) itself is not identifiable due to the common confounding U . On the other hand, we note that the company's pricing strategy ( X ) becomes independent of demand ( U ) during a recession ( C = 0 ), as the company may not have enough customers regardless of the price it sets. This CSI relation amounts to the following identification formula for the effect of an arbitrary policy π on sales figures:

where all of the terms on the right-hand side are known given the observations. Note that even though S is a surrogate in Figure 3a, without the CSI C = 0 , we could not have written Equation (3). Given the identification result of this equation, if the set of equations P ( s | do ( π )) = P ( s ) has a solution π ∗ , then π ∗ becomes an imitation policy for P ( y ) as well [43]. It is noteworthy that solving the aforementioned linear system of equations for π ∗ is straightforward, for it boils down to a matrix inversion 4 . In the example discussed, although the graphical criterion of Proposition 3.9 does not hold, the data-specific parameters could yield imitability in the case that these equations are solvable. We therefore say P ( y ) is imitable w.r.t. ⟨G L , Π , P ( O ) ⟩ , as opposed to 'w.r.t. ⟨G L , Π ⟩ '. Precisely, we say P ( y ) is imitable w.r.t. ⟨G L , Π , P ( O ) ⟩ if for every M ∈ M ⟨G L ⟩ such that P M ( O ) = P ( O ) , there exists a policy π such that P M ( y | do ( π )) = P M ( y ) .

The idea of surrogates could turn out to be useful to circumvent the imitability problem when the graphical criterion does not hold. In Figure 3b, however, neither graphical criteria yields imitability nor any imitation surrogates exist. In what follows, we discuss how CSIs can help circumvent the problem of imitability in even in such instances. Given an LDAG G L and a context C = c , we denote the context-specific DAG w.r.t. ⟨G L , c ⟩ by G L ( c ) where G L ( c ) is the DAG obtained by deleting all the spurious edges, i.e., the edges that are absent given the context C = c , from G L .

Definition 4.1 (Context-specific surrogate) . Given an LDAG G L , a policy space Π , and a context c , a set of variables S ⊆ O is called context-specific surrogate w.r.t. ⟨G L ( c ) , Π ⟩ if X ⊥ Y |{ S , C } in G L ( c ) ∪ Π where G L ( c ) ∪ Π is a supergraph of G L ( c ) by adding edges from Pa Π to X .

Consider the LDAG of Figure 3b for visualization. The context-specific DAGs corresponding to contexts C = 0 and C = 1 are shown in Figures 3c and 3d, respectively. S is a context-specific surrogate with respect to ⟨G L ( C = 0) , Π ⟩ , while no context-specific surrogates exist with respect to ⟨G L ( C = 1) , Π ⟩ . The following result indicates that despite the absence of a general imitation surrogate, the existence of context-specific surrogates could suffice for imitation.

Proposition 4.2. Given an LDAG G L and a policy space Π , let C be a subset of Pa Π ∩ C ( L ) . If for every realization c ∈ D C at least one of the following holds, then P ( y ) is imitable w.r.t. ⟨G L , Π , P ( O ) ⟩ .

There exists a subset S c such that X ⊥ Y |{ S c , C } in G L ( c ) ∪ Π , and P ( S c | do ( π ) , C = c ) = P ( S c | C = c ) has a solution π c ∈ Π .

There exists Z c ⊆ Pa Π such that X ⊥ Y |{ Z c , C } in G L ( c ) X .

As a concrete example, defining Z 1 = ∅ , X ⊥ Y |{ Z 1 , C } holds in the graph of Figure 3d. Moreover, S 0 = { S } , is a context-specific surrogate w.r.t. ⟨G L ( C = 0) , Π ⟩ . As a consequence of Proposition 4.2, P ( y ) is imitable w.r.t. ⟨G L , Π , P ( O ) ⟩ , if a solution π 0 exists to the linear set of equations

where P ( s | do ( π ) , C = 0) = ∑ x,t P ( s | x, T = 0 , C = 0) π ( x | t, C = 0) P ( t | C = 0) , analogous to Equation (3).

To sum up, accounting for CSIs has a two-fold benefit: (a) context-specific surrogates can be leveraged to render previously non-imitable instances imitable, and (b) identification results can be derived for imitation surrogates that were previously non-identifiable.

In light of Proposition 4.2, an algorithmic approach for causal imitation learning is proposed, summarized as Algorithm 2. This algorithm calls a recursive subroutine, SubImitate , also called SI within the pseudo-code. It is noteworthy that Proposition 4.2 guarantees imitability if the two conditions are met for any arbitrary subset of C ( L ) ∩ Pa Π . As we shall see, Algorithm 2 utilizes a recursive approach for building such a subset so as to circumvent the need to test all of the possibly exponentially many subsets.

The subroutine SI is initiated with an empty set ( C = ∅ ) as the considered context variables at the first iteration. At each iteration, the realizations of C are treated separately. For each such realization c , if the second condition of Proposition 4.2 is met through a set Z c , then P ( X | Z c , C = c ) is returned as the context-specific imitating policy (lines 3-6). Otherwise, the search for a context-specific surrogate begins. We utilize the FindMinSep algorithm of [40] to identify a minimal separating set S c ∪ C for X and Y , among those that necessarily include C (lines 7-8). We then use the identification algorithm of [39] under CSI relations to identify the effect of an arbitrary policy on S c , conditioned on the context c . This algorithm is built upon CSI-calculus, which subsumes do-calculus 5 . Next, if the linear system of equations P ( S c | do ( π c ) , c ) = P ( S c | , c ) has a solution, then this solution is returned as the optimal policy (lines 9-12). Otherwise, an arbitrary variable V ∈ C ( L ) ∩ Pa Π \ C is added to the considered context variables, and the search for context-specific policies proceeds while taking the realizations of V into account (lines 17-24). If no variables are left to add to the set of context variables (i.e., C = C ( L ) ∩ Pa Π ) and neither of the conditions of Proposition 4.2 are met for a realization of C , then the algorithm stops with a failure (lines 14-15). Otherwise, an imitating policy π ∗ is returned. We finally note that if computational costs matter, the CSI-ID function of line 9 can be replaced by the ID algorithm of [33]. Further, the minimal separating sets of line 8 might not be unique, in which case all such sets can be used.

Theorem 4.3. Given an LDAG G L , a policy space Π and observational distribution P ( O ) , if Algorithm 2 returns a policy π ∗ , then π ∗ is an optimal imitating policy for P ( y ) w.r.t. ⟨G L , Π , P ( O ) ⟩ . That is, Algorithm 2 is sound 6 .

5 Experiments

Our experimental evaluation is organized into two parts. In the first part, we address the decision problem pertaining to imitability. We evaluate the gain resulting from accounting for CSIs in rendering previously non-imitable instances imitable. In particular, we assess the classic imitability v.s. imitability under CSIs for randomly generated graphs. In the second part, we compare the performance of Alg. 2 against baseline algorithms on synthetic datasets (see Sec. D for further details of our experimental setup). Python implementation are accessible at https://github.com/ SinaAkbarii/causal-imitation-learning/ .

5.1 Evaluating imitability

We sampled random graphs with n vertices and maximum degree ∆ = n 10 uniformly at random. Each variable was assumed to be latent with probability 1 6 . We chose 3 random context variables

20

40

60

80

100

120

140

160

Number of vertices

0.0

0.2

0.4

0.6

0.8

1.0

Fraction of imitable instances

Imitable

Imitable under CSIs

such that the graphical constraint Pa ( C ( L )) ⊆ C ( L ) is satisfied. Labels on the edges were sampled with probability 0 . 5 . We then evaluated the graphical criterion of classic imitability (existence of π -backdoor) and imitability with CSIs (Corollary 3.7). The results are depicted in Figure 4, where each point in the plot is an average of 100 sampled graphs. As seen in this figure, taking into account only a handful of CSI relations (in particular, 3 context variables among hundreds of variables) could significantly increase the fraction of imitable instances.

5.2 Performance evaluation

In this section, we considered the graph of Figure 3b as a generalization of the economic model of Figure 3a, where the reward variable Y can be a more complex function. As discussed earlier, this graph has neither a π -backdoor admissible set nor an imitation surrogate. However, given the identifiability of P ( S | do ( π ) , C = 0) , Algorithm 2 can achieve an optimal policy. We compared the performance of the policy returned by Algorithm 2 against two baseline algorithms: Naive algorithm 1, which mimics only the observed distribution of the action variable (by choosing π ( X ) = P ( X ) ), and Naive algorithm 2, which takes the causal ancestors of X into account, designing the policy π ( X | T ) = P ( X | T ) . Naive algorithm 2 can be thought of as a feature selection followed by a behavior cloning approach. The goal of this experiment was to demonstrate the infeasibility of imitation learning without taking CSIs into account. A model with binary observable variables and a ternary reward was generated. Let π ALG represent the policy that the algorithm would have learned with infinite number of samples, and ˆ π ALG the policy it learns with the given finite sample size. As can be seen in Table 1, Algorithm 2 was able to match the expert policy both in expected reward and KL divergence of the reward distribution. The naive algorithms, on the other hand, failed to get close to the reward distribution of the expert. Since the algorithms were fed with finite observational samples, the KL divergence of the estimated policies with the nominal policy is also reported. Notably, based on the reported measures, the undesirable performance of the Naive algorithms does not stem from estimation errors.

6 Concluding remarks

We considered the causal imitation learning problem when accounting for context-specific independence relations. We proved that in contrast to the classic problem, which is equivalent to a d-separation, the decision problem of imitability under CSIs is NP-hard. We established a link between these two problems. In particular, we proved that imitability under CSIs is equivalent to several instances of the classic imitability problem for a certain class of context variables. We showed that utilizing the overlooked notion of CSIs could be a worthwhile tool in causal imitation learning as an example of a fundamental AI problem from a causal perspective. We note that while taking a few CSI relations into account could result in significant achievable results, the theory of CSIs is not yet well-developed. In particular, there exists no complete algorithm for causal identification under CSIs. Further research on the theory of CSI relations could yield considerable benefits in various domains where such relations are present.

References

Pieter Abbeel and Andrew Y Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning , page 1, 2004.

Silvia Acid and Luis M. De Campos. An algorithm for finding minimum d-separating sets in belief networks. In Proceedings of the Twelfth International Conference on Uncertainty in Artificial Intelligence , UAI'96, page 3-10, San Francisco, CA, USA, 1996. Morgan Kaufmann Publishers Inc.

Sina Akbari, Jalal Etesami, and Negar Kiyavash. Minimum cost intervention design for causal effect identification. In Proceedings of the 39th International Conference on Machine Learning , volume 162 of Proceedings of Machine Learning Research , pages 258-289. PMLR, 2022.

Sina Akbari, Luca Ganassali, and Negar Kiyavash. Causal discovery via monotone triangular transport maps. In NeurIPS 2023 Workshop Optimal Transport and Machine Learning , 2023.

Sina Akbari, Fateme Jamshidi, Ehsan Mokhtarian, Matthew James Vowels, Jalal Etesami, and Negar Kiyavash. Causal effect identification in uncertain causal networks. In Thirty-seventh Conference on Neural Information Processing Systems , 2023.

Sina Akbari, Ehsan Mokhtarian, AmirEmad Ghassami, and Negar Kiyavash. Recursive causal structure learning in the presence of latent variables and selection bias. Advances in Neural Information Processing Systems , 34:10119-10130, 2021.

Mayank Bansal, Alex Krizhevsky, and Abhijit Ogale. Chauffeurnet: Learning to drive by imitating the best and synthesizing the worst. arXiv preprint arXiv:1812.03079 , 2018.

Craig Boutilier, Nir Friedman, Moises Goldszmidt, and Daphne Koller. Context-specific independence in bayesian networks. In Proceedings of the Twelfth International Conference on Uncertainty in Artificial Intelligence , UAI'96, page 115-123, San Francisco, CA, USA, 1996. Morgan Kaufmann Publishers Inc.

Felipe Codevilla, Eder Santana, Antonio M López, and Adrien Gaidon. Exploring the limitations of behavior cloning for autonomous driving. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 9329-9338, 2019.

Diego Colombo, Marloes H. Maathuis, Markus Kalisch, and Thomas S. Richardson. Learning high-dimensional directed acyclic graphs with latent and selection variables. The Annals of Statistics , pages 294-321, 2012.

Hal Daumé, John Langford, and Daniel Marcu. Search-based structured prediction. Machine learning , 75(3):297-325, 2009.

Pim De Haan, Dinesh Jayaraman, and Sergey Levine. Causal confusion in imitation learning. Advances in Neural Information Processing Systems , 32, 2019.

Jalal Etesami and Philipp Geiger. Causal transfer for imitation learning and decision making under sensor-shift. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 34, pages 10118-10125, 2020.

Dan Geiger, Thomas Verma, and Judea Pearl. d-separation: From theorems to algorithms. In Machine Intelligence and Pattern Recognition , volume 10, pages 139-148. Elsevier, 1990.

Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. Advances in neural information processing systems , 29, 2016.

Antti Hyttinen, Johan Pensar, Juha Kontinen, and Jukka Corander. Structure learning for bayesian networks over labeled dags. In International Conference on Probabilistic Graphical Models , pages 133-144. PMLR, 2018.

Borja Ibarz, Jan Leike, Tobias Pohlen, Geoffrey Irving, Shane Legg, and Dario Amodei. Reward learning from human preferences and demonstrations in atari. Advances in neural information processing systems , 31, 2018.

Fateme Jamshidi, Jalal Etesami, and Negar Kiyavash. Confounded budgeted causal bandits. 3rd Conference on Causal Learning and Reasoning , 2024.

Fateme Jamshidi, Luca Ganassali, and Negar Kiyavash. On sample complexity of conditional independence testing with von mises estimator with application to causal discovery. arXiv preprint arXiv:2310.13553 , 2023.

Richard M Karp. Reducibility among combinatorial problems. In Complexity of computer computations , pages 85-103. Springer, 1972.

Mikko Koivisto and Kismat Sood. Computational aspects of bayesian partition models. In Proceedings of the 22nd international conference on Machine learning , pages 433-440, 2005.

Alex Kuefler, Jeremy Morton, Tim Wheeler, and Mykel Kochenderfer. Imitating driver behavior with generative adversarial networks. In 2017 IEEE Intelligent Vehicles Symposium (IV) , pages 204-211. IEEE, 2017.

Ehsan Mokhtarian, Fateme Jamshidi, Jalal Etesami, and Negar Kiyavash. Causal effect identification with context-specific independence relations of control variables. In Proceedings of The 25th International Conference on Artificial Intelligence and Statistics , pages 11237-11246, 2022.

Urs Muller, Jan Ben, Eric Cosatto, Beat Flepp, and Yann Cun. Off-road obstacle avoidance through end-to-end learning. Advances in neural information processing systems , 18, 2005.

Katharina Mülling, Jens Kober, Oliver Kroemer, and Jan Peters. Learning to select and generalize striking movements in robot table tennis. The International Journal of Robotics Research , 32(3):263-279, 2013.

Andrew Y Ng, Stuart Russell, et al. Algorithms for inverse reinforcement learning. In Icml , volume 1, page 2, 2000.

Yunpeng Pan, Ching-An Cheng, Kamil Saigol, Keuntaek Lee, Xinyan Yan, Evangelos A Theodorou, and Byron Boots. Imitation learning for agile autonomous driving. The International Journal of Robotics Research , 39(2-3):286-302, 2020.

Judea Pearl. Causality . Cambridge university press, 2009.

Johan Pensar, Henrik Nyman, Timo Koski, and Jukka Corander. Labeled directed acyclic graphs: a generalization of context-specific independence in directed graphical models. Data mining and knowledge discovery , 29(2):503-533, 2015.

Dean A Pomerleau. Alvinn: An autonomous land vehicle in a neural network. Advances in neural information processing systems , 1, 1988.

Stéphane Ross and Drew Bagnell. Efficient reductions for imitation learning. In Proceedings of the thirteenth international conference on artificial intelligence and statistics , pages 661-668. JMLR Workshop and Conference Proceedings, 2010.

Yujia Shen, Arthur Choi, and Adnan Darwiche. A new perspective on learning context-specific independence. In International Conference on Probabilistic Graphical Models , pages 425-436. PMLR, 2020.

Ilya Shpitser and Judea Pearl. Identification of joint interventional distributions in recursive semi-Markovian causal models . eScholarship, University of California, 2006.

David Silver, James Bagnell, and Anthony Stentz. High performance outdoor navigation from overhead data using imitation learning. Robotics: Science and Systems IV, Zurich, Switzerland , 1, 2008.

Peter Spirtes, Clark N. Glymour, and D. Scheines, Richardand Heckerman. Causation, prediction, and search . MIT press, 2000.

Gokul Swamy, Sanjiban Choudhury, Drew Bagnell, and Steven Wu. Causal imitation learning under temporally correlated noise. In International Conference on Machine Learning , pages 20877-20890. PMLR, 2022.

Umar Syed and Robert E Schapire. A game-theoretic approach to apprenticeship learning. Advances in neural information processing systems , 20, 2007.

Jin Tian, Azaria Paz, and Judea Pearl. Finding minimal d-separators, 1998.

Santtu Tikka, Antti Hyttinen, and Juha Karvanen. Identifying causal effects via context-specific independence relations. Advances in neural information processing systems , 32, 2019.

Benito Van der Zander, Maciej Liskiewicz, and Johannes Textor. Constructing separators and adjustment sets in ancestral graphs. In CI@ UAI , pages 11-24, 2014.

Oriol Vinyals, Igor Babuschkin, Wojciech M Czarnecki, Michaël Mathieu, Andrew Dudzik, Junyoung Chung, David H Choi, Richard Powell, Timo Ewalds, Petko Georgiev, et al. Grandmaster level in starcraft ii using multi-agent reinforcement learning. Nature , 575(7782):350-354, 2019.

Bernard Widrow. Pattern-recognizing control systems. Compurter and Information Sciences , 1964.

Junzhe Zhang, Daniel Kumor, and Elias Bareinboim. Causal imitation learning with unobserved confounders. Advances in neural information processing systems , 33:12263-12274, 2020.

Brian D. Ziebart, Andrew Maas, J. Andrew Bagnell, and Anind K. Dey. Maximum entropy inverse reinforcement learning. In Proceedings of the 23rd National Conference on Artificial Intelligence - Volume 3 , AAAI'08, page 1433-1438. AAAI Press, 2008.

Also, define

Appendix

Proofs of the main results are given in Section A. The details of FindSep subroutine are presented in Section B. In Section C provides an example where Alg. 2 is not complete, and Section D includes the details of our experiment setup.

A Technical proofs

Lemma 3.3. Given a latent DAG G and a policy space Π , if there exists a π -backdoor admissible set w.r.t. ⟨G , Π ⟩ , then Z = An ( { X,Y } ) ∩ ( Pa Π ) is a π -backdoor admissible set w.r.t. ⟨G , Π ⟩ .

Proof. We first claim that for any set W ⊆ { X,Y } , the set of ancestors of W in G and G X coincide, i.e., An ( W ) G = An ( W ) G X . First, note that since G X is a subgraph of G , An ( W ) G X ⊆ An ( W ) G . For the other direction, let T ∈ An ( W ) G be an arbitrary vertex. If T ∈ An ( X ) , then T ∈ An ( W ) G X . Otherwise, there exists a directed path from T to Y that does not pass through X . The same directed path exists in G X , and as a result, T ∈ An ( W ) G X . Therefore, An ( W ) G ⊆ An ( W ) G X .

The rest of the proof follows from an application of Lemma 3.4 of [40] in G X , with I = ∅ and R = Pa Π .

Lemma 3.6. Given an LDAG G L and a policy space Π , let Y be an arbitrary variable in G L . P ( y ) is imitable w.r.t. ⟨G L , Π ⟩ only if P ( y ) is imitable w.r.t. ⟨G L w w , Π ⟩ for every realization w ∈ D w of every subset of variables W ⊆ C ( L ) .

̸

Proof. Assume the contrary, that there exists a subset of variables W ⊆ V \ Y such that for an assignment w 0 ∈ D W , P ( y ) is not imitable w.r.t. ⟨G L w 0 w 0 , Π ⟩ . It suffices to show that P ( y ) is not imitable w.r.t. ⟨G L , Π ⟩ . Since P ( y ) is not imitable w.r.t. ⟨G L w 0 w 0 , Π ⟩ , there exists an SCM M ′ ∈ M ⟨G L w 0 w 0 ⟩ such that P M ′ ( y | do ( π )) = P M ′ ( y ) for every π ∈ Π . Define

̸

Note that ϵ > 0 , and 0 < δ < 1 . Next, construct an SCM M over V compatible with G L w 0 w 0 as follows. For variables W , P M ( W = w 0 ) = 1 -δ , and the rest is uniformly distributed over other realizations (summing up to δ ), such that P M ( W = w 0 ) = δ . For variables V i ∈ V \ W , P M ( V i | Pa ( V i )) = P M ′ ( V i | Pa ( V i )) , i.e., they follow the same law as the model M ′ . Note that by construction, W are isolated vertices in G L w 0 w 0 , and therefore independent of every other variable in both M ′ and M . Therefore,

̸

Moreover, for any policy π 1 ∈ Π dependant on the values of Z ′ ⊆ Pa Π , define a policy π 2 ∈ Π dependant on Z = Z ′ \ W as π 2 ( X | Z ) = (1 -δ ) π 1 ( X | Z , W = w 0 ) + δπ 1 ( X | Z , W = w 0 ) . Note

that Z ∩ W = ∅ . That is, π 2 is independent of the values of W . We can write

̸

̸

That is, for any policy π 1 under model M , there is a policy π 2 that results in the same reward distribution under model M ′ . Therefore, combining Equations (6) and (7),

although this minimum might occur under different policies. Recalling Equation (4), we get that under Model M and for any policy π ∈ Π ,

Now we construct yet another SCM M δ over V as follows. Variables W are distributed as in model M , i.e., P M δ ( W ) = P M ( W ) . Moreover, for each variable V ∈ V \ W set V = V M if Pa ( V ) ∩ W = ( w 0 ) Pa ( V ) ∩ W where V M denotes the same variable V under SCM M . Otherwise, distribution of V is uniform in D V . Note that by definition of M δ , the values of W are assigned independently, and the values of all other variables ( V \ W ) only depend on their parents, maintaining all the CSI relations. As a result, M δ is compatible with G L . Also, by construction,

Next, we write

̸

The second term of the right-hand side above is a positive number not larger than δ . Moreover, by construction of M δ , we have P M δ ( y | W = w 0 ) = P M ( y ) . Therefore, we get

̸

̸

̸

̸

̸

X

Y

I

X

S

0

S

1

S

m

. . .

S

i

-

1

S

i

. . .

W

I

X

= 1

L

i

On the other hand, for an arbitrary policy π ∈ Π , depending on the values of Z ⊆ Pa Π ,

̸

̸

and as a result,

Combining Equations (10) and (11), we get

and consequently,

which combined with Equation (8) results in the following inequality:

To sum up, we showed that there exists model M δ ∈ M ⟨G L ⟩ , such that for every π ∈ Π , P M δ ( y | do ( π )) = P M δ ( y ) which is in contradiction with the imitability assumption. Hence, P ( y ) is imitable w.r.t. ⟨G L w w , Π ⟩ for every w ∈ D W of any arbitrary subset of variables W ⊆ V \ Y .

̸

Theorem 3.8. Given an LDAG G L and a policy space Π , deciding the imitability of P ( y ) w.r.t. ⟨G L , Π ⟩ is NP-hard.

̸

̸

̸

̸

̸

̸

̸

̸

̸

̸

̸

̸

Proof. Our proof exploits ideas similar to the proof of hardness of causal identification under CSIs by [39]. We show a polynomial-time reduction from the 3-SAT problem, which is a well-known NP-hard problem [20], to the imitability problem. Let an instance of 3-SAT be defined as follows. A formula F in the conjunctive normal form with clauses S 1 , . . . , S m is given, where each clause S i has 3 literals from the set of binary variables W 1 , . . . , W k and their negations, ¬ W 1 , . . . , ¬ W k . The decision problem of 3-SAT is to determine whether there is a realization of the binary variables W 1 , . . . , W k that satisfies the given formula F , i.e., makes F true. We reduce this problem to an instance of imitability problem with CSIs as follows. Define an LDAG with one vertex corresponding to each clause S i for 1 ≤ i ≤ m , one vertex W which corresponds to the set of binary variables { W 1 , . . . , W k } , and three auxiliary vertices S 0 , X , and Y . Vertex W is a parent of every S i for 1 ≤ i ≤ m . There is an edge from S i -1 to S i for 1 ≤ i ≤ m . Also, S 0 is a parent of X , and X and S m are parents of Y . As for the labels, the label on each edge S i -1 → S i is that this edge is absent if the assignment of W does not satisfy the clause S i . Constructing this LDAG is clearly polynomial-time, as it only requires time in the order of the number of variables { W 1 , . . . , W k } and the number of clauses { S 1 , . . . , S m } . We claim that P ( y ) is imitable in this LDAG if and only if the 3-SAT instance is unsatisfiable.

̸

Only if part. Suppose that the 3-SAT instance is satisfiable. There exists a realization w ∗ of the binary variables { W 1 , . . . , W k } that satisfies the formula F . Define a model M over the variables of the LDAG as follows. W has the value w ∗ with probability 0 . 6 ( P M ( W = w ∗ ) = 0 . 6 ), and the rest of the probability mass is uniformly distributed over other realizations of W (i.e., each with probability 0 . 4 2 k -1 ). S 0 is a Bernoulli random variable with parameter 1 2 . S i for 1 ≤ i ≤ m is equal to S i -1 if the edge S i -1 → S i is present (the clause S i is satisfied by the realization of W ), and S i = 0 otherwise. X is equal to S 0 , and Y is defined as Y = ¬ X ⊕ S m . Note that model M is compatible with the LDAG defined above. We claim that under this model, for every policy π ∈ Π , P M ( y | do ( π )) = P M ( y ) . That is, P ( y ) is not imitable.

Let D s W and D u W be the partitioning of the domain of W into two disjoint parts which satisfy and do not satisfy the formula F , respectively. Note that w ∗ ∈ D s W . For any realization w ∈ D s W , observed values of Y in M is always equal to 1 (because Y = ¬ S 0 ⊕ S 0 ), i.e., P M ( Y = 1 | w ) = 1 . On the other hand, for any realization w ∈ D u W , there exists a clause S i which is not satisfied, and therefore S m = 0 , and Y = ¬ X . Therefore, P M ( Y = 1 | w ) = P M ( X = 0) = 1 2 . From the total probability law,

where we dropped the superscript M for better readability. Now consider an arbitrary policy π ∈ Π . For any realization w ∈ D s W , Y = ¬ X ⊕ S 0 , where S 0 is a Bernoulli variable with parameter 1 2 independent of X . As a result, P M ( Y = 1 | do ( π ) , w ) = P M ( S = X ) = 1 2 . On the other hand, for any realization w ∈ D u W , there exists a clause S i which is not satisfied, and therefore S m = 0 , and Y = ¬ X . Therefore, P M ( Y = 1 | do ( π ) , w ) = P M ( X = 0 | do ( π )) = π ( X = 0) . Using the total probability law again, and noting that P M ( w | do ( π )) = P M ( w ) ,

where we dropped the superscript M for better readability. Now define q = ∑ w ∈D s W P M ( w ) = 1 -∑ w ∈D u W P ( w ) , where we know q ≥ 0 . 6 since w ∗ ∈ D s W . From the equation above we have

where 0 . 6 ≤ q ≤ 1 and 0 ≤ π ( X = 0) ≤ 1 . We claim that P ( Y = 1 | do ( π )) < 0 . 7 . Consider two cases: if π ( X = 0) ≤ 1 2 , then from Equation (13),

Otherwise, assume π ( X = 0) > 1 2 . Rewriting Equation (13),

We showed that for any arbitrary policy π ∈ Π ,

Comparing this to Equaiton (12) completes the proof.

If part. Let I X be the intervention vertex corresponding to X , i.e., I X = 0 and I X = 1 indicate that X is passively observed (determined by its parents) and actively intervened upon (independent of its parents), respectively (refer to Figure 5). Assume that the 3-SAT instance is unsatisfiable. We claim that π ( x ) = P ( x ) is an imitating policy for P ( y ) . Since the 3-SAT is unsatisfiable, for any context w ∈ D W , there exists 1 ≤ i ≤ m such that the edge S i -1 → S i is absent. Then, we have I X ⊥ Y | X, W = w in G for every w ∈ D W , then I X ⊥ Y | X, W in G . Moreover, since the d-separation I X ⊥ G W holds, by contraction, we have I X ⊥ Y, W | X in G . As a result, I X ⊥ Y | X in G . Therefore,

Proposition 3.9. Given an LDAG G L where Pa ( C ( L )) ⊆ C ( L ) and a policy space Π , let Y be an arbitrary variable in G L . P ( y ) is imitable w.r.t. ⟨G L , Π ⟩ if and only if P ( y ) is imitable w.r.t. ⟨G c , Π ⟩ , for every c ∈ D C ( L ) .

Proof. It suffices to show that for an arbitrary M ∈ M ⟨G L ⟩ , there exists a policy π ∈ Π uniquely computable from P ( O ) such that P M ( y | do ( π )) = P M ( y ) . For ease of notation, let C := C ( L ) . For every c ∈ D C , construct an SCM M c over V by setting C = c , and replacing every occurrence of variables C by the constant value c in the equations of M . Therefore, M c is compatible with G c and

By assumption, we know that for every c ∈ D C , there exists a policy π c ∈ Π uniquely computable from P ( O ) such that

Suppose π c relies on the values of Z c ⊆ Pa Π . We can write

where the first and third parts of (a) hold since Y ⊥ C | X, Z c in G X C and Pa ( C ) ⊆ C . For the second part, let M π c be the model obtained from substituting the model of X given its parents by π c in the equations of M . Then, we get

Combining Equations (16), (17) and (15) we get the following for every c ∈ D

C

Next, define a policy π ∗ ( x | Pa Π ) := ∑ c ∈D C 1 { ( Pa ) Π C = c } π c , where ✶ { ( Pa ) Π C = c } is an indicator function such that ✶ c = 1 when C = c , and is equal to zero otherwise. Now, we can write

where the last line holds due to Equation (18) and the fact that Pa ( C ) ⊆ C . We proved that there exists a policy π ∗ ∈ Π uniquely computable from P ( O ) such that P M ( y | do ( π ∗ )) = P M ( y ) . Hence, P ( y ) is imitable w.r.t. ⟨G L , Π , ⟩ .

Proposition 4.2. Given an LDAG G L and a policy space Π , let C be a subset of Pa Π ∩ C ( L ) . If for every realization c ∈ D C at least one of the following holds, then P ( y ) is imitable w.r.t. ⟨G L , Π , P ( O ) ⟩ .

There exists a subset S c such that X ⊥ Y |{ S c , C } in G L ( c ) ∪ Π , and P ( S c | do ( π ) , C = c ) = P ( S c | C = c ) has a solution π c ∈ Π .

There exists Z c ⊆ Pa Π such that X ⊥ Y |{ Z c , C } in G L ( c ) X .

Proof. Let M ∈ M ⟨G L ⟩ and P M ( O ) = P ( O ) , i.e., M induces the observational distribution P ( O ) , be an arbitrary model. It suffices to show that there is a policy π ∈ Π uniquely computable from P ( O ) such that P M ( y | do ( π )) = P M ( y ) . To do so, first, partition D C into two subsets D 1 C and D 2 C such that D C = D 1 C ∪ D 2 C and for every c ∈ D 1 C the first condition of the lemma holds, whereas for every c ∈ D 2 C the second condition does.

For each c ∈ D 1 C , construct model M π c by substituting the model of X given its parents by π c in M . Now, we get the following for each c ∈ D 1 C ,

Algorithm 3 Find Possible π -backdoor admissible set

where (a) and (b) hold since Y ⊥ X | S c , C in G L ( c ) ∪ Π and in G L ( c ) , respectively (or Y ⊥ ⊥ X | S c , c in M π c and M ). Moreover, (c) holds because P M ( S c | do ( π c ) , c ) = P M ( S c | c ) .

Next, for each c ∈ D 2 C , let π c ( x | Pa Π ) = P M ( x | Z c , c ) , then we get

where the second equation holds since X ⊥ Y | Z c , C in G L ( c ) X .

Weget the following where the second line follows from Equation (19) and the fact that C ∩ De ( X ) = ∅ .

The above equation implies that there is a policy π ∗ ∈ Π such that P M ( y | do ( π ∗ )) = P M ( y ) where M is an arbitrary model compatible with G L . Therefore, P ( y ) is imitable w.r.t. ⟨G L , Π ⟩ and π ∗ is an imitating policy for that.

B FindSep Algorithm

FindSep was used as a subroutine in Alg. 1. This function is summarized here as Algorithm 3, which takes a DAG G , variables X and Y , and a subset of variables C as inputs. It finds a separating set containing C , if exists, in G X between X and Y . To do so, it constructs Z in line 4. According to lemma 3.4 of [40] where I = C and R = Pa Π , if such separating set exists, Z is a separating set.

C Example for Algorithm 2

We present a simple counterexample to illustrate that Algorithm 2 is not complete, in the sense that it may happen that an instance is imitable w.r.t. ⟨G L , Π , P ( O ) ⟩ , but Algorithm 2 fails to find an imitating policy. To that end, take the instrumental variable graph depicted in Figure 6. It is evident that the set of equations

for both values of y = 0 and y = 1 is a set of linear equations with two equations in two parameters, namely π ( X = 0) and π ( X = 1) , which always has a solution. This indeed indicates that this

Moreover, we had

And finally,

X

C

U

Y

C

= 0

Figure 6: An example where Algorithm 2 fails to identify an imitating policy, despite the fact that there exists one such policy.

instance is imitable, i.e., there always exists at least one imitation policy. However, Algorithm 2 would not be able to find any such policy.

D Experimental setup

For the experiments of Section 5.2, we worked with an SCM in which

Peer reviews:
comments: SUMMARY:
The paper studies causal imitation learning. In particular, it extends traditional causal graphs with context specific independence. Although the original causal imitation learning problem can be reduced to d-seperation test, causal imitation learning with context specific independence is NP hard. But under other conditions, causal imitation learning with CSI can be solved more efficiently.

STRENGTHS:
The problem is well motivated and theoretical contributions seem solid.

WEAKNESSES:
1. Theoretical results rely heavily on (Zhang [et.al](http://et.al), 2020) and might appear derivative. It would be better if the authors can explain a bit more on the contributions in contrast to existing works, especially in terms of identifiability, because NP-hardness is not surprising. 
2. Experiments are relatively weak as they are only tested on synthetic datasets.

QUESTIONS:
1. Context-specific independence seems like a specific form of structural equations? For instance, in the wage example, CSI can be incorporated into how the function w = f(e, u) is defined. I guess it does not work with Pearl’s do-calculus because of a violation of faithfulness? My point is that it does not seem like causal graphs need refinement to incorporate CSI?
2. In line 134, replacing fx with stochastic mapping \pi in mentioned as soft interventions. But as far as I know, soft interventions do not allow adding edges between intervened variable and its non-parent? 
3. In definition 3.5, what’s intuition that the edges incident to W are deleted?

LIMITATIONS:
Not applicable.
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2023-07-03

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies the problem of causal imitation learning, where the goal is to construct a policy that replicates the outcomes of an expert.  The challenge is that the expert may e.g., make decisions based on unobserved variables.  Prior work (e.g., [36] as cited in this paper) has established graphical conditions under which imitation can still be achieved.  This paper shows that context-specific independence relations (or \"CSIs\"), if known, can expand the space of scenarios where imitation can be achieved, and give algorithms for performing imitation learning in this setting.  In addition, this paper gives an algorithm for potential identification when the graphical criterion fails (see Proposition 4.2, Alg 2, Theorem 4.3), although this algorithm is not necessarily complete, a limitation acknowledged in the conclusion\n\nSTRENGTHS:\nThe contribution of this paper is quite clear, technically interesting, and novel.  Context-specific independence relations have been studied before in the causal inference literature (see e.g., citation [32]) in the context of causal identification, and so has the problem of causal imitation learning (see e.g., [36]). However, from my reading, this paper does more than simply put these concepts together (CSIs and causal imitation learning) in an obvious way. As it happens, this paper shows that incorporating CSIs renders the problem of imitation learning NP-hard \n\nWhile there is a substantial amount of technical detail to parse, which perhaps makes the paper a bit difficult to skim, I found the paper to be reasonable clear in the technical presentation given a close read. Likewise, the authors clearly outline some of the limitations of their proposed approach, e.g., the fact that they provide a sound (but not necessarily complete) algorithm in Section 4.\n\nThe synthetic experiments are somewhat minimal, but I would not expect extensive experiments in a more theoretically-oriented paper like this one, and I found the setup of the synthetic experiments to be well-motivated, exploring the benefits of their approach over random graphs.\n\nWEAKNESSES:\nFirst, in order to be practically applicable, this method requires some knowledge of context-specific independence relations, where there is a hard independence between certain variables in certain contexts.\n\nHowever, the motivating examples given in this paper for context-specific independence seem somewhat unrealistic.  The examples given in the paper are\n* Lines 60-65: No impact of education on wages when unemployment is high\n* Lines 66-70: In heavy traffic, no impact of speed limit on driving\n* Lines 250-252: Company pricing is independent of demand during a recession\n\nOf these, the second example seems most realistic.  In the others, complete independence between variables in those contexts seems unrealistic.\n\nSecond, I would not overstate the \"straightforward\" nature of solving for $\\pi^*$ in Section 4 (see e.g., lines 257-259, \"solving the aforementioned linear system of equations for $\\pi^*$ is straightforward, for it boils down to a matrix inversion\").  As mentioned in the footnote, this is only generally true in discrete settings, and even then may not be very practical with large numbers of variables, or variables with large cardinality.  Moreover, moving from the discrete to continuous setting introduces some substantial technical difficulties with e.g., ill-posed inverse problems.  This aspect is not the main focus of the paper, so I consider it a somewhat minor piece of feedback.\n\nAs an additional minor point, there is some lack of clarity in the experiments;  E.g., clarifying what is $\\pi_{ALG}$ versus $\\hat{\\pi}_{ALG}$ in Table 1.  There are also some minor typos \n* Line 25 \"bypass IRL step\" -> \"bypass the IRL step\"\n* Line 28 \"is for the most part result of\" -> \"is for the most part the result of\"\n* Line 75, missing space \"For instance,[32]\"\n\nQUESTIONS:\nThe main weakness of this paper, in my view, is the plausibility of finding context-specific independences in real-world problems.\n\nAre there other motivating examples, beyond those discussed already in the paper, that the authors would consider particularly compelling?\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-05"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper explores the potential benefits of incorporating context-specific independence (CSI) information into causal imitation learning, where CSI relations are known. The authors prove that the decision problem for the feasibility of imitation in this setting is NP-hard, provide a necessary graphical criterion for imitation learning under CSI, and propose an algorithmic approach for causal imitation learning that takes both CSI relations and data into account.\n\nSTRENGTHS:\n**Clarity**\n\n1. This paper is well-written and self-contained. It covers previous literature thoroughly.\n2. The introduction section does an excellent job of motivating the research problem, and the problem statement is clear.\n\n**Significance**\n\n1. The research problem is interesting and significant in practice.\n\n**Literature**\n\n1. This paper covers related literature extensively.\n\n**Soundness**\n\n1. All results appear to be sound.\n\nWEAKNESSES:\n**Clarity in Assumptions**  \n\n1. I believe that the assumption used in Proposition 3.9 requires justification. Without an explanation, it is difficult to assess the generality of the assumption. It would be interesting if the simulation described in Section 5.1 provided the fraction of instances in which the assumption was satisfied.\n\n**Lack of real-world dataset analysis.**\n\n1. I believe the significance of the paper lies in its practical benefits of considering the Channel State Information (CSI), which is prevalent in the real world. Therefore, it would be beneficial to have a simulation scenario that incorporates a real-world dataset.\n\nQUESTIONS:\n- Q1. How strong is the assumption that \"the context variables have parents only among the context variables\"? It is difficult to discern the insights from which this assumption was generated without reasoning on it.\n- Q2. Equation (1) is difficult to parse. What is V’ here? Could you simplify it or provide a verbal explanation?\n- Q3. \"The labels compatible with w\" should be formally defined.\n- Q4. Is \"G_{w}\" defined? Does it refer to the context-induced subgraph of G^{L} with respect to w?\n- Q5. What is the computational cost for evaluating pi^{*} in Theorem 3.10? Isn't it still exponential in evaluating the equation?\n- Q6. Is the result valid for continuous variables? It seems that the paper assumes discreteness throughout.\n\nLIMITATIONS:\n1. There is a lack of justification for the assumption, making it difficult to assess the clarity and significance of the statement.\n2. I believe the significance of the paper lies in its practical benefits of considering the Channel State Information (CSI), which is prevalent in the real world. Therefore, it would be beneficial to have a simulation scenario that incorporates a real-world dataset.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-05"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper extends studies on causal imitation learning to settings in which additional information can be provided in the form of context-specific independences (CSIs). Causal imitation learning seeks to maximize some unobserved reward $Y$ by finding a policy $\\pi^*$ from the space of policies $\\Pi$ such that the reward distribution under that policy, $P(Y \\mid do(\\pi))$ matches that of the expert policy, $P(Y)$, thereby mimicking the expert. However, mimicking $P(Y)$ is not always possible in settings with unobserved confounding, so additional knowledge in the form of causal constraints is necessary to decide whether $P(Y)$ is imitable. In prior works where such constraints are assumed in the form of a causal diagram $\\mathcal{G}$, it has been proven that $P(Y)$ is imitable if and only if there exists a $\\pi$-backdoor admissible set $\\mathbf{Z}$ w.r.t. $\\langle \\mathcal{G}, \\Pi \\rangle$. However, completeness no longer holds when CSIs are provided, in which further independence information about the distributions may be provided, conditioned on specific settings of the variables. The paper first proves that deciding imitability in this more general setting is NP-hard (Thm. 3.8). Given this limitation, they provide a sound algorithm that checks imitability within each context-induced subgraph, which they prove is also complete under a further assumption (Alg. 1). In settings where this assumption does not hold, they show that imitability can still be achieved if a policy on a set of surrogate variables is identifiable under a specific setting of CSIs. This provides a more general algorithm (Alg. 2), evaluated experimentally.\n\nSTRENGTHS:\nTo be fully transparent, I have reviewed this paper in the past, so the following list of strengths and weaknesses reflect my existing impressions of this paper, which I have updated following another read of the latest manuscript. However, my points are largely the same, since I do not see many notable changes in the latest version. Please correct me if I am wrong.\n\n**Strengths:**\n1. Problem is well-motivated. LDAGs arise in practice and provide more information than standard causal diagrams, which should be leveraged to allow more imitable cases. This would add more positive results to the causal imitation learning literature.\n\n\n2. Assumptions are clearly stated. LDAGs are well defined, and the paper does a good job of explaining specifically how the additional constraints are incorporated. The authors are very transparent with the limitations of their approach.\n\n\n3. The solution is nontrivial and interesting. The paper clearly shows non-imitable cases that are rendered imitable when accounting for CSIs. The obvious solution of checking for backdoor sets in each context-induced subgraph is only complete under a strict assumption.\n\nWEAKNESSES:\nI reiterate that these points are similar to the points I made in my previous read of the paper. I have an overall positive opinion of the paper, and my goal is to help improve the paper, so I hope the authors will take this feedback into consideration.\n\n**Weaknesses:**\n1. There is nothing done to address the NP-hardness claimed by Thm. 3.8. Alg. 1 and 2 still take exponential time in the worst case. It may be insightful to provide some alternative settings in which assumptions are strict enough that polynomial time solutions can be developed. Alternatively, algorithms that sacrifice completeness for speed could be provided. While I understand that this may be out of the scope of the paper, it is otherwise not clear to me why Thm. 3.8 is relevant to the paper in the first place.\n\n\n2. Unfortunately, even Alg. 2 is not complete in the general case. Completeness is not a requirement for it to serve as a real contribution, but it would help to have some insights in this paper on why Alg. 2 is incomplete (e.g. some counterexamples) and some ideas on what could be done to move towards completeness.\n\n\n3. The motivation for Alg. 2 could be improved in terms of clarity. Notably, it could be emphasized why Alg. 1 fails in a more general setting. Eq. 3 could be explained better as well to motivate the idea of context-specific surrogates (I did not really understand Eq. 3 until I derived it myself by hand).\n\n\n4. The experiments illustrate the point as intended, but the tested scenarios are very limited in scope. The first experiment only studies a specific family of graphs, and the second experiment is performed on one specific SCM. Neither of these choices are justified. While a more extensive empirical study would boost the strength of this work, it would help immensely just to be transparent about the data generating process to ensure that there was no cherry picking. For example, for Sec. 5.1, why were those choices of delta and probability of latent variables chosen? And for Sec. 5.2, why were the parameters for that specific SCM chosen (as described in Appendix C)? \n\n\n5. Many of the ideas in this paper (including the interesting point about surrogates) incrementally improve existing ideas from Zhang et al. (2020). This reduces some of the novelty.\n\n\n6. This is a minor point and did not affect my judgment of the score, but on line 261, the authors describe the imitability problem under CSIs using the inputs of $\\langle \\mathcal{G}^{\\mathcal{L}}, \\Pi, P(\\mathbf{O}) \\rangle$ as opposed to $\\langle \\mathcal{G}^{\\mathcal{L}}, \\Pi \\rangle$. I understand that this is due to the CSI setting requiring additional information in the form of constraints over $P(\\mathbf{O})$, but I think this could be better framed. Both the original imitability problem and the new version with CSIs uses $P(\\mathbf{O})$, since it must be clear that only observational data is available, as opposed to additional interventional data such as $P(\\mathbf{O} \\mid do(\\mathbf{x}))$, collected from experimentation. In addition to this however, the CSI setting should include a set of independences.\n\n\nOverall, my impression is that this paper is worth publishing, since everything is well-defined, the proofs make sense, the assumptions are clear, and the claims are sufficiently backed. I believe that a score of 6 is appropriate given the level of contribution of the paper, which is solid but somewhat limited.\n\nQUESTIONS:\nNo questions, but would be interested in hearing author responses in case I missed something.\n\nLIMITATIONS:\nLimitations are clearly stated.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-06"}