# Proof Explained for "Robust Agents Learn Causal World Model"

*This post was written during* [*Alex Altair's agent foundations fellowship program*](https://www.lesswrong.com/posts/WiMnhMXu9CM5ytu3t/work-with-me-on-agent-foundations-independent-fellowship)*, funded by* [*LTFF*](https://funds.effectivealtruism.org/funds/far-future)*. Thank you* [*Alex Altair*](https://www.lesswrong.com/users/alex_altair)*,* [*Alfred Harwood*](https://www.lesswrong.com/users/alfred-harwood)*,* [*Daniel C*](https://www.lesswrong.com/users/daniel-c) *for feedback and comments.*

This is a post explaining the proof of the paper [Robust Agents Learn Causal World Model](https://arxiv.org/abs/2402.10877) in detail. Check the [previous post](https://www.lesswrong.com/posts/Rwjrrmn6LBzHrfen7/an-illustrated-summary-of-robust-agents-learn-causal-world) in the sequence for a higher-level summary and discussion of the paper, including an explanation of the [basic setup](https://www.lesswrong.com/posts/Rwjrrmn6LBzHrfen7/an-illustrated-summary-of-robust-agents-learn-causal-world#Basic_Setup) (like terminologies and assumptions) which this post will assume from now on.

Recalling the Basic Setup
=========================

Let's recall the basic setup (again, check the [previous post](https://www.lesswrong.com/posts/Rwjrrmn6LBzHrfen7/an-illustrated-summary-of-robust-agents-learn-causal-world) for more explanation):

1.  \[[World](https://www.lesswrong.com/posts/Rwjrrmn6LBzHrfen7/an-illustrated-summary-of-robust-agents-learn-causal-world#World)\] The world is a Causal Bayesian Network $G$ over the set of variables corresponding to the environment $\mathbf{C}$, utility node $U$, and decision node $D$. The differences from a normal Causal Bayesian Network is that (1) $U$ is a deterministic function of its parents $U(\mathbf{Pa}_U)$, and (2) $P\left(D \mid \mathbf{Pa}_D\right)$, the conditional probability distribution for $D$, is undetermined—it's something that our agent will select.
2.  \[[Agent as a Policy Oracle](https://www.lesswrong.com/posts/Rwjrrmn6LBzHrfen7/an-illustrated-summary-of-robust-agents-learn-causal-world#Agent_as_a_Policy_Oracle)\] An agent is a policy oracle $\Pi_{\Sigma}$ which is a function that takes in an intervention $\sigma \in \Sigma$ (where $\Sigma$ represents the set of all allowed interventions over $\mathbf{C}$) and returns a policy $\pi_{\sigma}\left(D \mid \mathbf{Pa}_D\right)$.
3.  \[[Robustness as ](https://www.lesswrong.com/posts/Rwjrrmn6LBzHrfen7/an-illustrated-summary-of-robust-agents-learn-causal-world#_Robustness__as___optimality_under_interventions)$\delta$[-optimality under interventions](https://www.lesswrong.com/posts/Rwjrrmn6LBzHrfen7/an-illustrated-summary-of-robust-agents-learn-causal-world#_Robustness__as___optimality_under_interventions)\] We define a "robust" agent as a policy oracle whose regret is bounded by $\delta$ under some class of interventions over the environment $\Sigma$.

Assumptions
-----------

Also recall the following [assumptions](https://www.lesswrong.com/posts/Rwjrrmn6LBzHrfen7/an-illustrated-summary-of-robust-agents-learn-causal-world#Assumptions):

**1) Unmediated Decision Task** states that $\mathbf{Des}_D \cap \mathbf{Anc}_U=\emptyset$. This is pretty major.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/99450b7b3211f7b8e77913c029b63f4ae9c268fe72969099.png)

The left diagram doesn't satisfy the Unmediated Decision Task assumption, the right one does.

**2) Domain dependence** states that there exists distributions over the chance variables $P(\mathbf{C})$ and $P'(\mathbf{C})$ (compatible with $M$) such that $\arg \max _\pi \mathbb{E}_P^\pi[U] \neq \arg \max _\pi \mathbb{E}_{P'}^\pi[U]$.

*   This is very reasonable. If domain dependence does not hold, then the optimal policy is just a constant function.

These together imply:

1.  There does not exist a decision $d \in \operatorname{dom}(D)$ that is optimal, i.e. $\arg \max_d U(d, \mathbf{x})$ across all $\mathbf{x} \in \mathbf{X} = \mathbf{Pa}_U \setminus \{D\}$.
2.  $D \in \mathbf{Pa}_U$, i.e. there can't be any intermediate nodes between $D$ and $U$, and all causal effects from $D$ to $U$ must be direct.

Now, with the basic setup of the paper recalled, let's prove the main theorems.

Proof of the Exact Case
=======================

We will first prove Theorem 1:

> *For almost all worlds *$(G, P)$* satisfying assumption 1 and 2, we can identify the directed acyclic graph *$G$* and the joint distribution *$P$* over all variables upstream of *$U$*, given that we have access to a *$0$*-optimal policy oracle.*

I will attempt to present the proof in a way that focuses on how one could've *discovered* the paper's results by themselves, emphasizing intuitions and how trying to formalize them naturally constrains the solutions or assumptions we must use.

Load-Bearing part of Oracle Use
-------------------------------

Somehow we're going to have to elicit information out of the policy oracle.

Recall that the oracle is a function that maps an intervention to a policy, which is a conditional probability distribution $\pi_\sigma\left(D \mid \mathbf{P a}_D\right)$. It can be shown that if the oracle is optimal, this distribution is (almost always) a deterministic map. The argument goes like:

*   Suppose that given a context $\mathbf{Pa}_D=\mathbf{pa}_D$, two decisions $d$ and $d'$ have the same expected utility.
*   Then, we can argue that this is extremely unlikely:
    *   Intuitively because *exact* equality is very unlikely for real number things.
    *   More rigorously because expressing this equality results in a polynomial constraint over the parameters, which has Lebesgue measure 0 over the parameterization of the conditional probability distribution).
*   Therefore it is extremely likely (probability 1) that there is a strict ordering of decisions (according to their expected utility) given a context, i.e. almost always a unique maximum EU decision given a context. Therefore an optimal policy must only choose that decision in that given context, i.e. deterministic.

Then, somehow our information-eliciting procedure is going to have to exploit the fact that, given a $\mathbf{Pa}_D=\mathbf{pa}_D$, as we change the intervention $\sigma$, the optimal decision prescribed changes from $d$ to $d'$.

To make this possible, we want to rule out the existence of a decision that is universally optimal across all inputs to the utility node, because then no intervention would yield a change in the output of the oracle.

*   In math, a $d \in \operatorname{dom}(D)$ such that for all possible inputs $\mathbf{x}$ to the utility (other than the decision), $d$ is always the $\operatorname{argmax}$ of $U(d, x)$, i.e. $d \in \operatorname{argmax}_d U(d,\mathbf{x}) \; \forall \mathbf{\mathbf{x}} \in \operatorname{dom}(\mathbf{X})$ where $\mathbf{X}=\mathbf{Pa}_U \setminus\{D\}$

Recall the first consequence of the two assumptions we had: There does not exist a decision $d \in \operatorname{dom}(D)$ that is optimal, i.e. $\arg \max_d U(d, \mathbf{x})$ across all $\mathbf{x} \in \mathbf{X} = \mathbf{Pa}_U \setminus \{D\}$.

This implies that there is at least one $\mathbf{x'}$ where the optimal decision $d'$ differs from $d$!

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/03f60ce36136fe7f5a168c82032a934f4c4c6ebefd042a2e.png)

But the worry is that such $\mathbf{x'}$ will be incompatible with $\mathbf{Pa}_D=\mathbf{pa}_D$.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/91b7fdd8d96096bbda9e3d47e5ce0174d36ad458e035fdb6.png)

So, we will restricted to only considering $\sigma$ that masks the inputs of $D$ by only letting $D$ depend on $\mathbf{Pa'}_D \subseteq \mathbf{Pa}_D$ such that $\mathbf{Pa'}_D \cap \mathbf{Pa}_U = \emptyset$.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/1b5d80868746d2f4ccbb32484a8b1c1eda506e3e1b27b202.png)

Then, given $\sigma$, let $d_1$ denote the optimal decision associated with some $\mathbf{Pa'}_D=\mathbf{pa'}_D$. Then, by the earlier argument, if we consider any intervention $\sigma'$ that does $do(\mathbf{X}=\mathbf{x'})$, then it would have a different optimal decision, call it $d_2$.

And to operationalize "as we change the intervention," we define a mixed local intervention $\tilde{\sigma}(q)=q \sigma+(1-q) \sigma^{\prime}$.

When $q=0$, the policy oracle (under $\mathbf{Pa'}_D=\mathbf{pa'}_D$) would prescribe $d_1$, and for $q=1$, it would prescribe $d_4$. There may of course be other intermediate optimal decisions along the way as you slowly increase $q$ from $0$ to $1$ \- say, $d_2$ and $d_3$ for the current example.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/4e78657eeba779a7cf05311c4786f3c6606bd2c7ef787c82.png)

Note that once you switch your decision from $d$ to $d'$ as you increase $q$, you will never encounter $d$ again because of linearity of $\mathbb{E}\left[U \mid \mathbf{p} \mathbf{a}_D, \operatorname{do}(D=d) ; \tilde{\sigma}(q)\right]$. Namely:  
  
$\begin{align*}\mathbb{E}[U \mid \mathbf{pa}_D, \operatorname{do}(D = d), \tilde\sigma(q)] &= q \, \mathbb{E}[U \mid \mathbf{pa}_D, \operatorname{do}(D = d), \sigma] \&\quad\quad + (1 - q) \, \mathbb{E}[U \mid \mathbf{pa}_D, \operatorname{do}(D = d), \tilde\sigma] \&= q U_1 + (1 - q) U_2 \&= U_2 + q (U_1 - U_2).\end{align*}$

The diagram below makes it more clear why linearity implies the same decision never gets chosen twice. The oracle can be thought of as attaining the upper envelope, as denoted in dotted line.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/3ea4664bbe586d5353ca02a57c69923aa9f4c624668f4aff.png)

Let $q_\text{crit}$ represent the value of $q$ at which the optimal decision switches from some $d_3$ (may or may not be $d_1$) to $d_4$.

**Insight**: $q_\text{crit}$ is interesting. It's a behavioral property of our oracle, meaning we can estimate it by repeatedly sampling it (across random samples of $q\in [0, 1]$). But it can also probably be expressed in closed-form in terms of some parameters of the environment (by just expanding out the definition of expected utility). **So **$q_\text{crit}$** is a bridge that lets us infer properties about the environment from the oracle.**

Let's derive a closed-form expression of $q_\text{crit}$. Let $\mathbf{R} = \mathbf{C} \setminus \mathbf{Pa'}_D$.

+++ Detailed Proof

$q_\text{crit}$ is a value that satisfies$\begin{align*}\mathbb{E}[U|\mathbf{pa'}_D, \operatorname{do}(D=d_3); \tilde{\sigma}(q_\text{crit})] &= \mathbb{E}[U|\mathbf{pa'}_D, \operatorname{do}(D=d_4); \tilde{\sigma}(q_\text{crit})]\end{align*}$

Expanding out the left-hand side:$$$\begin{align*}\mathbb{E}[U|\mathbf{pa'}_D, \operatorname{do}(D=d_3); \tilde{\sigma}(q_\text{crit})] &= \frac{1}{P(\mathbf{pa'}_D ; \tilde{\sigma}(q_\text{crit}))} \sum_{\mathbf{r}} U(d_3, \mathbf{x}) P(\mathbf{r}, \mathbf{pa'}_D ; \tilde{\sigma}(q_\text{crit})) \&= \frac{1}{P(\mathbf{pa'}_D ; \tilde{\sigma}(q_\text{crit}))} \sum_{\mathbf{r}} U(d_3, \mathbf{x}) \left[ q_\text{crit} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) + (1-q_\text{crit}) P(\mathbf{r}, \mathbf{pa'}_D ; \sigma') \right]\end{align*}$

Expanding out the difference of both sides and setting it to zero:

$$$\mathbb{E}[U|\mathbf{pa'}_D, \operatorname{do}(D=d_3); \tilde{\sigma}(q_\text{crit})] - \mathbb{E}[U|\mathbf{pa'}_D, \operatorname{do}(D=d_4); \tilde{\sigma}(q_\text{crit})]$  
$\begin{align*}&= \frac{1}{P(\mathbf{pa'}_D ; \tilde{\sigma}(q_\text{crit}))} \sum_{\mathbf{r}}\begin{aligned}[t] &q_\text{crit} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d_3, x) - U(d_4, x) \right] \       &+ (1-q_\text{crit}) P(\mathbf{r}, \mathbf{pa'}_D ; \sigma') \left[ U(d_3, x) - U(d_4, x) \right]    \end{aligned} \&= 0\end{align*}$

Now we solve for $q_\text{crit}$:$$$\begin{align*}\sum_{\mathbf{r}} q_\text{crit} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d_3, x) - U(d_4, x) \right] &= -(1-q_\text{crit}) \sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma') \left[ U(d_3, x) - U(d_4, x) \right] \&= -(1 - q_\text{crit}) \left[ U(d_3, x') - U(d_4, x') \right]\end{align*}$

$\begin{align*}\frac{q_\text{crit}}{1 - q_\text{crit}} &= \frac{-[U(d_3, x') - U(d_4, x')]}{\sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d_3, x) - U(d_4, x) \right]}\end{align*}$

$\begin{align*}q_\text{crit} &= \left( 1 - \frac{\sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d_3, x) - U(d_4, x) \right]}{U(d_3, x') - U(d_4, x')} \right)^{-1}\end{align*}$




+++

$\begin{align*}q_\text{crit} &= \left( 1 - \frac{\sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d_3, x) - U(d_4, x) \right]}{U(d_3, x') - U(d_4, x')} \right)^{-1}\end{align*}$

Again, $q_\text{crit}$ can be estimated from sampling the oracle. We know the denominator because we assume the knowledge of $U$.

Therefore, the oracle lets us calculate $\sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d_3, x) - U(d_4, x) \right]$, the difference in expected utility of some two decisions given some context.

Restating our chain of inquiry as a lemma:

> *(Lemma 4)* Given $\sigma$ that masks the inputs such that $\mathbf{Pa'}_D \cap \mathbf{Pa}_U = \emptyset$, $\forall \mathbf{pa'}_D$ $\exists d, d'$ such that we can approximate $\sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d, x) - U(d', x) \right]$, where $\mathbf{R} = \mathbf{C} \setminus \mathbf{Pa'}_D$ and $\mathbf{X} = \mathbf{Pa}_U \setminus \{D\}$.

Identification via Induction
----------------------------

By the Unmediated Decision Task assumption, we see that the ancestors of U look like the following. We notice that there are two types of paths to consider in our induction argument.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/d1b6526aae2eb736abdfbf366d08508d5304cb47a8bf30dc.png)

Let's first consider the first type, $C_k \to C_{k-1} \to \dots \to C_1$, where $C_1 \in \mathbf{Pa}_U$, $C_1 \neq D$.

We first define the following variables:

*   $\mathbf{X} = \mathbf{Pa}_U \setminus \{D\}$
*   $\mathbf{Z} = \mathbf{Anc}_U \setminus \mathbf{Pa}_D$
*   $\mathbf{R} = \mathbf{C} \setminus \mathbf{Pa'}_D$
*   $\mathbf{Y} = \mathbf{C} \setminus\left\{C_1, \ldots, C_k\right\}$

Assume $\mathbf{Pa}_{k - 1}, \ldots, \mathbf{Pa}_1$ are known, and $P(C_i | \mathbf{Pa}_i)$ are known.

The claim to prove is that, given these are known, we can identify the conditional probability distribution $P(C_k | \mathbf{Pa}_k)$.

Assume we have some $\sigma$. We want to identify $P(C_k | \mathbf{Pa}_k)$, and we have to somehow use the policy oracle for that.

Recall from Lemma 4 that given an intervention $\sigma$ such that $\mathbf{Pa'}_D \cap \mathbf{Pa}_U = \emptyset$, for all values of $\mathbf{pa'}_D$, there exists two different decisions $d$ and $d'$ such that $\sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d, \mathbf{x}) - U(d', \mathbf{x}) \right]$ can be identified.

The trick is in setting $\sigma$ such that it makes this sum contain $P(C_i=c_i | \mathbf{Pa}_i=\mathbf{pa}_i)$ terms for all $1 \leq i \leq k$, for arbitrary choices of $c_i$ and $\mathbf{pa}_i$.

Let's think through how we might discover the right constraints on $\sigma$.

### Constraint 1: $\sigma$ will remove $D$'s parents

Since we want $\mathbf{Pa'}_D \cap \mathbf{Pa}_U = \emptyset$, let's just choose $\sigma$ such that $\mathbf{Pa'}_D=\emptyset$ hence $\mathbf{R}=\mathbf{C} \setminus \mathbf{Pa'}_D=\mathbf{C}$).

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/a75ada8daeafa2b58e0055588d60d641aacf3be98b6cfc53.png)

### Constraint 2: $\sigma$ fixes the environment variables other than those in the path.

Note the following: Since $\sum_{\mathbf{c}} P(\mathbf{c} ; \sigma) \left[ U(d, \mathbf{x}) - U(d', \mathbf{x}) \right]$'s value can be computed, if it can be expressed in terms of $P\left(c_1 \mid \mathbf{p} \mathbf{a}_1 \right) \ldots P\left(c_{k-1} \mid \mathbf{p} \mathbf{a}_{k-1} \right), P\left(c_k \mid \mathbf{pa}_k\right)$ that would let us solve for $P(c_k \mid \mathbf{pa}_k)$, since by the induction hypothesis all the terms except it are known. Note that we also somehow have to figure out what the set $\mathbf{Pa}_k$ is, too.

Expanding out the above sum will give us some clue as to what further constraints we must impose on $\sigma$ in order for the sum to be expressed that simply:

  
$\begin{align*}P(\mathbf{C}=\mathbf{c};\sigma) &= \prod_{C_j \in \mathbf{C}}P(C_j=c_j | \mathbf{Pa}_j=\mathbf{pa}_j;\sigma)\&= P(c_1 | \mathbf{pa}_1;\sigma)\ldots P(c_k | \mathbf{pa}_k;\sigma)\prod_{C_j \in \mathbf{Y}}P(c_j | \mathbf{pa}_j;\sigma)\end{align*}$

How do we choose $\sigma$ such that  
$\begin{align*}\sum_{c} P(\mathbf{C}=\mathbf{c};\sigma)[\;*\;] &= \sum_{c}\left(P(c_1 | \mathbf{pa}_1;\sigma)\ldots P(c_k | \mathbf{pa}_k;\sigma)\prod_{C_j \in \mathbf{Y}}P(c_j | \mathbf{pa}_j;\sigma)\right)[\;*\;]\end{align*}$

becomes

$\begin{align*}\sum_{c_1}\ldots\sum_{c_k}P(c_1 | \mathbf{pa}_1;\sigma)\ldots P(c_k | \mathbf{pa}_k;\sigma)[\;*\;]\end{align*}$

for arbitrary choices of $\mathbf{pa}_1, \ldots, \mathbf{pa}_{k-1}, \mathbf{pa}_k$?

Note that setting $\mathbf{Y}$ to a constant will:

*   make $\prod_{C_j \in \mathbf{Y}} P\left(c_j \mid \mathbf{p} \mathbf{a}_j ; \sigma\right)$ always have values of zero in all settings of $\mathbf{c}$ except one, in which it will evaluate to $1$.
*   also set the values of $\mathbf{Pa}_k$ to a constant, among others - even though we don't yet know exactly which variables belong to $\mathbf{Pa}_k$.

Thus such intervention immediately gets rid of the $\prod_{C_j \in \mathbf{Y}}$ terms as we sum across $c$, while being able to arbitrarily control the values of $\mathbf{Pa}_1 \setminus \{C_2\}, \ldots, \mathbf{Pa}_{k-1} \setminus \{C_{k}\}$, and $\mathbf{Pa}_k$ (among other variables in $\mathbf{Y}$).

So constraint 2: $\sigma$ contains $\operatorname{do}(\mathbf{Y}=\mathbf{y})$ (such that values of $\mathbf{Y}$ should be compatible with the values of $\mathbf{Pa}_D \setminus \mathbf{Pa'}_D$ that are set earlier in constraint $1$.)

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/a72134d40c863021521c6e6664e4b2df91052fd807d9b546.png)

Then, we have the following expression:

$\begin{align*}\sum_c P(\mathbf{c} ; \sigma)[U(d, \mathbf{x}) - U(d', \mathbf{x})] &= \sum_{c_1, \ldots, c_k}P(c_1 | \mathbf{pa}_1;\sigma)\ldots P(c_k | \mathbf{pa}_k;\sigma)[U(d, \mathbf{x}) - U(d', \mathbf{x})]\end{align*}$

So far, we haven't intervened in $\{C_1, \ldots, C_k\}$. So, $P(c_i|\mathbf{pa}_i;\sigma) = P(c_i|\mathbf{pa}_i)$ for $\mathbf{pa}_i$ compatible with the value $c_{i+1}$ (if applicable) and $\sigma$, further simplifying the expression:

$\begin{align*}\sum_c P(\mathbf{c} ; \sigma)[U(d, \mathbf{x}) - U(d', \mathbf{x})] &= \sum_{c_1, \ldots, c_k}P(c_1 | \mathbf{pa}_1)\ldots P(c_k | \mathbf{pa}_k)[U(d, \mathbf{x}) - U(d', \mathbf{x})]\end{align*}$

But this isn't yet solvable. By induction hypothesis we know $P(c_i|\mathbf{pa}_i)$ for all values of $c_i$ and $\mathbf{pa}_i$, and we know the value of the left-hand side. This equation then involves $\mathbf{Val}(\mathbf{C}_k)-1$ unknowns.

A fix then, is obvious an intervention that effectively sets $\mathbf{Val}(\mathbf{C}_k)$ to $2$, which brings us to the third constraint:

### Constraint 3: Let $\sigma$ contain a local intervention making $C_k$ a binary variable

Specifically, let $\sigma$ contain $\operatorname{do}(C_k=f(c_k))$, where $f(C_k) = \begin{cases} c_k' & \text{if } C_k = c_k \\c_k'' & \text{otherwise} \end{cases}$

This effectively makes $C_k$ a binary variable. Precisely:

$\begin{align*} P(C_k = c_k \mid \mathbf{Pa}_k = \mathbf{pa}_k ; \sigma) &= \sum_{c_k' \mid f(c_k') = c_k} P(C_k = c_k' \mid \mathbf{Pa}_k = \mathbf{pa}_k) \ &= \begin{cases} P(C_k = c_k' \mid \mathbf{Pa}_k = \mathbf{pa}_k) & \text{if } C_k = c_k', \ 1 - P(C_k = c_k' \mid \mathbf{Pa}_k = \mathbf{pa}_k) & \text{if } C_k = c_k''. \end{cases} \end{align*}$

and now the equation can be solved.

Let $\begin{align*}Q_k = \sum_c P(\mathbf{c} ; \sigma)[U(d, \mathbf{x}) - U(d', \mathbf{x})]\end{align*}$, which can be written $\begin{align*}\sum_{c_k}P(c_k|\mathbf{pa}_k;\sigma)\beta(c_k)\end{align*}$, where $\beta(c_k) = \sum_{c_1, \ldots, c_{k-1}}P(c_1 | \mathbf{pa}_1)\ldots P(c_{k-1} | \mathbf{pa}_k)[U(d, \mathbf{x}) - U(d', \mathbf{x})]$.

The earlier $\sigma$ lets us simplify $Q_k$ as $P(c_k'|\mathbf{pa}_k;\sigma)\beta(c_k') + (1 - P(c_k'|\mathbf{pa}_k;\sigma))\beta(c_k'')$. Thus $P(c_k'|\mathbf{pa}_k)=\frac{Q_k - \beta(c_k'')}{\beta(c_k')-\beta(c_k'')}$. We know $Q_k$ (via the policy oracle), we know values of $\beta$ (via the induction hypothesis).

But important subtlety here: remember that we don't actually know $\mathbf{Pa}_k$ yet. The $\mathbf{pa}_k$ in the above expression $P(c_k'|\mathbf{pa}_k)$ is meant to be understood as the implicit assignment of values to the (yet unknown to us) $\mathbf{Pa}_k$ by the means of $\operatorname{do}(\mathbf{Y}=\mathbf{y})$ in $\sigma$.

So, by performing a set of interventions that fixes all but one of the variables of $\mathbf{Y}$, one can discover to which variables $C_k$ responds to (the values of $P(c_k'|\mathbf{pa}_k)$ changes), and hence figure out the $\mathbf{Pa}_k$ set.

Then, by varying the choices of $\mathbf{pa}_k, c_k'$, and $c_k''$, we can identify $P(C_k \mid \mathbf{Pa}_k)$ completely.

The base case of $k=1$ is clear, since $P(c_1'|\mathbf{y})=\frac{Q_1 - \beta(c_1'')}{\beta(c_1')-\beta(c_1'')}$ where $\beta(c_1')$ and $\beta(c_1'')$ are of the form $U(d, \mathbf{x})-U(d', \mathbf{x})$, which is known, and so is $Q_1$ using the oracle.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/9d79967aca2774d7d5c205ae0a189523b75f0c9d7b7f3b73.png)

To recap, our choice of $\sigma$ is a local intervention such that:

1.  masks all input to $D$, i.e. $\mathbf{Pa'}_D = \emptyset$
2.  fixes rest of the nodes in $\mathbf{Y}$ to a constant
3.  does a local intervention $\operatorname{do}(C_k=f(c_k))$ making $C_k$ into a binary variable

and we have showed that this intervention lets us identify $P(C_k|\mathbf{Pa}_k)$ for all $C_k$ along the path $C_k \to C_{k-1} \to \dots \to C_1$, where $C_1 \in \mathbf{Pa}_U$, $C_1 \neq D$.

Similar arguments can be used to prove the same for paths of the second type, $C_k \to C_{k-1} \to \dots \to C_1$, where $C_1 \in \mathbf{Pa}_D$.

Proof of the Approximate Case
=============================

Now, we will extend the proof to the approximate case (Theorem 2):

> *For almost all worlds *$(G, P)$* satisfying assumption 1 and 2 and some other new assumptions (explained below), we can identify the directed acyclic graph *$G$* and the joint distribution *$P$* over some subset of variables upstream of *$U$, and the quality of estimation for each of the conditional distributions scale linearly with $\delta$.

New Assumptions
---------------

Unless I'm mistaken here and these can actually be derived from the earlier two assumptions (Unmediated Decision Task, Domain Dependence), here are the three new conditions that the paper implicitly assumes:

**3) **$\delta$**-optimal policies are (still) almost always deterministic**

The earlier proof of determinism doesn't go through in the approximate case, but the paper implicitly assumes the policy oracle still (almost always) returns an output deterministically.

**4) Uniform **$\delta$** regret**

We say $\pi_{\sigma}$ is $\delta$-optimal if $\mathbb{E}^{\pi^*}[U] - \mathbb{E}^{\pi_\sigma}[U] \leq \delta$.

We say $\pi_{\sigma}$ is uniformly $\delta$-optimal if $\delta(\mathbf{pa}_D) \leq \delta$ for all $\mathbf{pa}_D$, where we define$\delta(\mathbf{pa}_D) := \mathbb{E}^{\pi^*}[U|\mathbf{pa}_D]-\mathbb{E}^{\pi_\sigma}[U|\mathbf{pa}_D]$.

Note that uniformly $\delta$-optimal is a stronger condition than \\delta-optimal in the sense that the former implies the latter.

**5) Shape of the **$\delta$**-optimal decision boundary**

The left diagram is the ground truth for how the expected utility (under context $\mathbf{pa}_D$) of various decisions change as you increase $q$ from $0$ to $1$. Then, the right diagram shows the decision boundary for the $0$-optimal oracle, whose decision boundaries must exactly follow the intersection points of the left diagram's lines.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/1b9fd4ef6f4e833e3dc7e6fa1d7397af43ec64ccfd7b5d03.png)

The paper then assumes that the $\delta$-optimal oracle's decision boundaries must be simply a slightly shifted version of the 0-optimal oracle's decision boundaries, like the right diagram. A priori, there's no reason for the boundaries to look like this, e.g., it can look very complicated, like the left diagram. But the paper implicitly assumes this.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/d0e31c77d92132277db3fd7383d4970ea06453a8f8cf5519.png)

Let's now proceed to the proof. The subsections parallel that of the optimal oracle case.

Load-Bearing part of Oracle Use
-------------------------------

Our goal is to derive $\sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d_3, x) - U(d_4, x) \right]$, which we call $Q$.

Recall from earlier that in the optimal oracle case:

$\begin{align*}q_\text{crit} &= \left( 1 - \frac{\sum_{\mathbf{r}} P(\mathbf{r}, \mathbf{pa'}_D ; \sigma) \left[ U(d_3, x) - U(d_4, x) \right]}{U(d_3, x') - U(d_4, x')} \right)^{-1}=\left(1-\frac{Q}{\Delta_0}\right)^{-1}\end{align*}$

where we define $\Delta(q)$ as follows:

$\begin{align*} \Delta_q &:= \mathbb{E}[U | \mathbf{pa}_D, \operatorname{do}(D = d_3); \tilde{\sigma}(q)] - \mathbb{E}[U | \mathbf{pa}_D, \operatorname{do}(D = d_4); \tilde{\sigma}(q)] \ &= q \Delta_1 + (1-q) \Delta_0 \ &= \Delta_0 + q \left( \Delta_1 - \Delta_0 \right) \end{align*}$

Notice that $q_{\text{crit}}$ is the unique solution to $\Delta_q=0$.

Also note that $Q = \Delta_0\left(1-\frac{1}{q_{\text{crit}}}\right)$. We know the value of $\Delta_0=U(d_2, \mathbf{x}')-U(d_3, \mathbf{x}')$. In the optimal oracle case, recall that $q_\text{crit}$ can be estimated via MCMC.

But the problem with $\delta$-oracle is that this only yields a biased estimate, which we call $\tilde{q}$.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/5bb9a46e4d7e1776b19c4c815ccf0f547645b0c16b18d622.png)

Using $Q = \Delta_0\left(1-\frac{1}{q_{\text{crit}}}\right)$ but naively substituting $q_{\text{crit}}$ with the biased estimate, we get a biased estimate for $Q$ that we call $\tilde{Q} = \Delta_0\left(1-\frac{1}{\tilde{q}}\right)$.

Our aim, then, is to bound the quality of the estimate $\left|Q-\tilde{Q}\right|$ with the bound only involving non-estimate terms, like $\delta, Q, q_\text{crit}$, and $\Delta_0$.

Expanding out, $Q - \tilde{Q} = \Delta_0 \left(\left(1-\frac{1}{q_{\text{crit}}}\right)-\left(1-\frac{1}{\tilde{q}}\right)\right)$. That $\tilde{q}$ is an estimate term, which we want to remove by bounding it via a term involving non-estimate terms. How?

First, we have yet to exploit any behavioral properties of the oracle that is related to $\tilde{q}$. What are those? By definition, the oracle chooses $d_3$ for $\tilde{q}-\epsilon$ and $d_4$ for $\tilde{q}+\epsilon$ for very small $\epsilon$. Then, the uniform $\delta$ regret condition says:

*   $\max_{d \in D}\mathbb{E}[U|\mathbf{pa}_D, \operatorname{do}(D=d);\tilde{\sigma}(\tilde{q}-\epsilon)] - \mathbb{E}[U|\mathbf{pa}_D, \operatorname{do}(D=d_3);\tilde{\sigma}(\tilde{q}-\epsilon)] \leq \delta$
*   $\max_{d \in D}\mathbb{E}[U|\mathbf{pa}_D, \operatorname{do}(D=d);\tilde{\sigma}(\tilde{q}+\epsilon)] - \mathbb{E}[U|\mathbf{pa}_D, \operatorname{do}(D=d_4);\tilde{\sigma}(\tilde{q}+\epsilon)] \leq \delta$

Take $\epsilon$ to $0$, and assuming continuity, we can subtract the two to get

$-\delta \leq \mathbb{E}[U|\mathbf{pa}_D, \operatorname{do}(D=d_3);\tilde{\sigma}(\tilde{q})] -  \mathbb{E}[U|\mathbf{pa}_D, \operatorname{do}(D=d_4);\tilde{\sigma}(\tilde{q})] \leq \delta$.

In other words, $-\delta \leq \Delta_\tilde{q} \leq \delta$, or $-\delta \leq \Delta_0 + \tilde{q}(\Delta_1 - \Delta_0) \leq \delta$.

Because $\Delta_{q_{\text{crit}}} = \Delta_0 + q_{\text{crit}}(\Delta_1 - \Delta_0) = 0$, we can rewrite the inequality as $-\delta \leq \Delta_0\left(1-\frac{\tilde{q}}{q_{\text{crit}}}\right) \leq \delta$. Expanding out and rearranging the inequalities, we find out that $\Delta_0 - \left(\frac{\Delta_0 - \delta}{\tilde{q}}\right) \leq \Delta_0 \left(1 - \frac{1}{q_{\text{crit}}}\right) \leq \Delta_0 - \left(\frac{\Delta_0 + \delta}{\tilde{q}}\right)$.

Substituting this in to the expansion of Q-\\tilde{Q}, we obtain the following simple bound: $\left|Q-\tilde{Q}\right| \leq \frac{\delta}{\tilde{q}}$.

Finally, $\tilde{q}$ in the denominator can be eliminated as follows:

$\begin{align*} |Q - \tilde{Q}| &\leq \frac{\delta}{\tilde{q}} \ &= \delta \left( 1 - \frac{\tilde{Q}}{\Delta_0} \right) \ &\leq \delta \left( 1 - \frac{1}{\Delta_0} \left(Q + \frac{\delta}{\tilde{q}} \right) \right) \ &= \delta \left( 1 - \frac{Q}{\Delta_0} \right) + \delta^2 \left( \frac{-1}{\tilde{q} \Delta_0} \right) \ &\leq \delta \left( 1 - \frac{Q}{\Delta_0} \right) - \delta^2 \left( \frac{1}{q_{\text{crit}} (\Delta_0 - \delta)} \right) \ &=\delta \left( 1 - \frac{Q}{\Delta_0} \right) - \delta^2 \left( \frac{1}{q_{\text{crit}} \Delta_0} \right) - \delta^3 \left( \frac{1}{q_{\text{crit}} \Delta_0^2}\right) + O(\delta^4) \end{align*}$

where the last line is via Taylor expanding $\frac{1}{\Delta_0 - \delta}$ around $\delta = 0$ (arbitrarily truncated at fourth order), valid for $\delta \leq |\Delta_0|$.

Or more simply, $|Q-\tilde{Q}| \leq \delta\left(1-\frac{Q}{\Delta_0}\right)+O(\delta^2)$. The error term is linear with respect to $\delta$ for small values of $\delta$.

Identification via Induction
----------------------------

The argument is basically the same as that of the optimal case, except needing to incorporate error terms.

The exact case's induction hypothesis was that $\mathbf{Pa}_i$ and $P(C_i | \mathbf{Pa}_i)$ are known for $i \in \{1, \ldots, k-1\}$. Then, we showed that using a specific choice of $\sigma$, we can derive the relation $P(c_k'|\mathbf{y})=\frac{Q_k - \beta(c_k'')}{\beta(c_k')-\beta(c_k'')}$ all the terms in the right-hand are known.

*   $\beta(c_k) = \sum_{c_1, \ldots, c_{k-1}}P(c_1 | \mathbf{pa}_1)\ldots P(c_{k-1} | \mathbf{pa}_{k-1})[U(d, \mathbf{x}) - U(d', \mathbf{x})]$
*   $\begin{align*}Q_k = \sum_c P(\mathbf{c} ; \sigma)[U(d, \mathbf{x}) - U(d', \mathbf{x})]=\sum_{c_k}P(c_k|\mathbf{pa}_k;\sigma)\beta(c_k)\end{align*}$

Then, for the approximate case's induction hypothesis, instead assume that $P(C_i|\mathbf{Pa}_i)$ are known for $i \in \{1, \ldots, k-1\}$, up to $O(\delta)$. We will show that this implies the knowledge of $P(C_k|\mathbf{Y})$ up to $O(\delta)$. Let's denote the approximation we have $\hat{P}$, so $\hat{P}(C_i|\mathbf{Y}) = P(C_i|\mathbf{Y}) + O(\delta)$.

*   Important subtlety here: we don't assume we know $\mathbf{Pa}_i$. "Knowing $P(C_i|\mathbf{Pa}_i)$" is meant to be understood as knowing the values of $P(C_i;\sigma)$ \- where $\sigma$ contains $\operatorname{do}(\mathbf{Y}=\mathbf{y})$ hence implicitly intervening on $\mathbf{Pa}_i$ \- for all values of $C_i$ and $\mathbf{Y}$.

Let $\hat{\beta}(c_k) := \sum_{c_1, \ldots, c_{k-1}}\hat{P}(c_1 | \mathbf{y})\ldots \hat{P}(c_{k-1} | \mathbf{y})[U(d, \mathbf{x}) - U(d', \mathbf{x})]$. Because it is the sum of product of $O(\delta)$, overall it differs from $\beta(c_k)$ by $O(\delta)$.

Hence $\hat{P}(c_k'|\mathbf{y}):=\frac{\hat{Q}_k - \hat{\beta}(c_k'')}{\hat{\beta}(c_k')-\hat{\beta}(c_k'')}$. Because $\hat{\beta}(c_k) = \beta(c_k) + O(\delta)$ and $\hat{Q}_k = Q_k + O(\delta)$ by the earlier section, we see that $\hat{P}(c_k'|\mathbf{y}):=\frac{Q_k - \beta(c_k'') + O(\delta)}{\beta(c_k')-\beta(c_k'') + O(\delta)}$.

Using the big-$O$ fact that $\frac{A+O(\delta)}{B+O(\delta)}=\frac{A}{B}+O\left(\delta\right)$, we thus prove $\hat{P}(c_k'|\mathbf{y}):=\frac{Q_k - \beta(c_k'')}{\beta(c_k')-\beta(c_k'')} + O(\delta) = P(c_k|\mathbf{y})+O(\delta)$.

More simply, $\hat{P}\left(c_k^{\prime} \mid \mathbf{y}\right)=P\left(c_k^{\prime} \mid \mathbf{y}\right)+O(\delta)$ as $\delta$ goes to $0$. That proves the induction step.

The base case of $k=1$ is once again clear, since $\hat{P}(c_1'|\mathbf{y})=\frac{\hat{Q}_1 - \hat{\beta}(c_1'')}{\hat{\beta}(c_1')-\hat{\beta}(c_1'')}$ where $\hat{\beta}(c_1')$ and $\hat{\beta}(c_1'')$ are of the form $U(d, \mathbf{x})-U(d', \mathbf{x})$, which is known, and so is $\hat{Q}_1$ using the oracle. This shows that it can be computed, and the earlier paragraphs show that it is accurate up to $O(\delta)$.

Identifying the Approximate Graph Structure
-------------------------------------------

The above showed that we can identify $P(C_i|\mathbf{Pa}_i)$ up to $O(\delta)$, or more precisely, $P(C_i;\sigma)$ up to $O(\delta)$, for all values of $C_i$ and $\mathbf{Y}$. In the optimal oracle case, this was sufficient for perfectly identifying $\mathbf{Pa}_i$, by holding all but one variables of $\mathbf{Y}$ fixed and observing which changes in those variables cause a change in the values of $P(C_i;\sigma)$.

What is the issue with the approximate case?

First of all, we'll have to use $\hat{P}(C_i;\sigma)$ instead of $P(C_i;\sigma)$.

Say we want to test whether $C_j$ is a parent of $C_k$. So we have $\sigma$ fix everything in $\mathbf{Y}$ and vary the value of $C_j$ across the elements in its domain. Let's denote the value of $\hat{P}(C_k=c_k;\sigma)$ where $C_j$ is set to $c_j$ as $\hat{P}(c_k|\mathbf{pa}_k;\operatorname{do}(C_j=c_j))$.

So the process is: Set $c_k$, vary $c_j$ and see if there is a change, set a new $c_k$, repeat.

The problem is that, because $\hat{P}$ is only accurate up to $O(\delta)$, we can't tell if the change is due to actual differences in the underlying $P$ or due to the error in approximation.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/aa4d3eb11ceb8ddc3e127218a1540c3f5852712180358ce6.png)

The solution is to use one of the earlier explicit bounds on $|Q-\tilde{Q}|$ in terms of quantities that the algorithm has access to, i.e. $|Q-\tilde{Q}| \leq \frac{\delta}{\tilde{q}}$. We can then use this bound to derive an explicit upper and lower bound for the values of $\hat{P}(c_k|\mathbf{pa}_k;\operatorname{do}(C_j=c_j))$, which we'll call $\theta_{c_k, c_j}^+$ and $\theta_{c_k, c_j}^-$.

And if it's the case that there exists $c_k$ such that there exists $c_j$ and $c_j'$ whose intervals $[\theta_{c_k, c_j}^-, \theta_{c_k, c_j}^+]$ and $[\theta_{c_k, c_j'}^-, \theta_{c_k, c_j'}^+]$ don't overlap, then we can guarantee that the change is due to actual differences in the underlying $P$.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/808ea88e47dd7a6ce1083e2283c05221237d7575d36b7513.png)

This procedure lets us identify a subset of $\mathbf{Pa}_k$, hence a subgraph of $G$.

+++ Detailed Proof

Suppose given a context, two decisions had the same expected utility.$$$\mathbb{E}[U|\mathbf{Pa}_D = \mathbf{pa}_D, \operatorname{do}(D=d);\sigma] = \mathbb{E}[U|\mathbf{Pa}_D = \mathbf{pa}_D, \operatorname{do}(D=d');\sigma]$

$$Recall the definition: literally taking expectation over all the values that the ancestor of $U$ could take.Let $\mathbf{Z} = \mathbf{Anc}_U \setminus \mathbf{Pa}_D$ and $\mathbf{X} = \mathbf{Pa}_U \setminus \{D\}$.

$\begin{align*}\mathbb{E}[U|\mathbf{Pa}_D = \mathbf{pa}_D, \operatorname{do}(D=d);\sigma] &= \sum_{\mathbf{z}} U(d, \mathbf{x}) P(\mathbf{z}|\mathbf{pa}_D, \operatorname{do}(D=d);\sigma) \&= \sum_{\mathbf{z}} U(d, \mathbf{x}) \frac{P(\mathbf{z}, \mathbf{pa}_D | \operatorname{do}(D=d'); \sigma)}{P(\mathbf{pa}_D | \operatorname{do}(D=d'); \sigma)}\end{align*}$

where $P(\mathbf{z}|\mathbf{pa}_D, \operatorname{do}(D=d);\sigma)$ goes $0$ if $\mathbf{z}$ is incompatible with $\sigma$.

Note $P(\mathbf{pa}_D | \operatorname{do}(D=d); \sigma) = P(\mathbf{pa}_D | \sigma)$ and $P(\mathbf{z}, \mathbf{pa}_D | \operatorname{do}(D=d) ; \sigma) = P(\mathbf{z}, \mathbf{pa}_D ; \sigma)$, because $\operatorname{do}(D=d)$ only has an effect on its descendants, which $\mathbf{Pa}_D$ isn't part of, and neither is $Z \cup \mathbf{Pa}_D = \mathbf{Anc}_U$.

Therefore, $$$\begin{align*}\mathbb{E}[U|\mathbf{Pa}_D = \mathbf{pa}_D, \operatorname{do}(D=d);\sigma] &= \sum_{\mathbf{z}} U(d, \mathbf{x}) \frac{P(\mathbf{z}, \mathbf{pa}_D ; \sigma)}{P(\mathbf{pa}_D ; \sigma)}\end{align*}$

And we're curious about the case when the difference in expected utility is zero:  
$\begin{align*}\mathbb{E}[U | \mathbf{Pa}_D &= \mathbf{pa}_D, \operatorname{do}(D=d); \sigma] - \mathbb{E}[U | \mathbf{Pa}_D = \mathbf{pa}_D, \operatorname{do}(D=d'); \sigma] \&= \sum_{\mathbf{z}} U(d, \mathbf{x}) \frac{P(\mathbf{z}, \mathbf{pa}_D ; \sigma)}{P(\mathbf{pa}_D ; \sigma)} - U(d', \mathbf{x}) \frac{P(\mathbf{z}, \mathbf{pa}_D ; \sigma)}{P(\mathbf{pa}_D ; \sigma)} \&= \sum_{\mathbf{z}} \left( U(d, \mathbf{x}) - U(d', \mathbf{x}) \right) \frac{P(\mathbf{z}, \mathbf{pa}_D ; \sigma)}{P(\mathbf{pa}_D ; \sigma)} \&=0\end{align*}$  
Suppose that $\sigma = \operatorname{do}(C_1 = f_1(c_1), \ldots, C_n = f_n(c_n))$ without loss of generality. Then the terms can be written as such:

$\begin{align*}P(\mathbf{z}, \mathbf{pa}_D ; \sigma) &= \prod_{i=1}^{N} P(C_i = c_i | \mathbf{Pa}_i = \mathbf{pa}_i ; \sigma) \&= \prod_{i=1}^{N} \sum_{c_i' | f_i(c_i') = c_i} P(C_i = c_i | \mathbf{Pa}_i = \mathbf{pa}_i)\end{align*}$

Long story short, this is a polynomial constraint on the parameters $P(C_i = c_i | \mathbf{Pa}_i = \mathbf{pa}_i)$ of the network, and solution sets of a polynomial equation have measure zero (intuitively because for a polynomial equation to be precisely equal to zero, then the values should precisely be aligned, which is rare).

*   Specifically: given a Bayesian Network G over $N$ nodes, its CPDs are as follows: $\theta_P = \{P\left(v_i \mid \mathbf{pa}_i\right) \; \mid \; i \in \{1, \ldots, N\}, v_i \in \{0, \ldots, dim_i-2\}, \mathbf{pa}_i \in \mathbf{Pa}_i\}$. And since we're assuming all variables are discrete, these are a finite number of values that parameterize $G$, each of which takes a value between 0 and 1.
*   Suppose we find that they should satisfy some polynomial constraint: $f(\theta_P)=0$.

Then we can reasonably claim that this is extremely unlikely to happen, because in the space of all possible parameterizations $[0, 1]^{|\theta_P|}$, solutions to a polynomial constraint happen in a measure zero set.




+++