Why DRL doesn't work for arbitrary environments
discussion post by Vanessa Kosoy 597 days ago | discuss

Previously, I presented the theory of DRL for finite MDPs. Now, although I believe this theory can be generalized much beyond finite MDPs (at least to finite POMDPs and infinite POMDPs that satisfy some geometric and/or dynamical systems theoretic assumptions), it cannot work for arbitrary environments (without requiring the advisor to be more than “merely sane”). Constructing a counterexample is not difficult, but it seemed worthwhile to write it down.

Let $${\mathcal{A}}:= \{a,b,c\}$$ be the set of actions and $${\mathcal{O}}:= \{o_-,o_+\}$$ the set of observations. Define $$\tau: {({\mathcal{A}}\times {\mathcal{O}})^*}\rightarrow {\mathbb{N}}\sqcup \{\infty\}$$ s.t. for any $$n \in {\mathbb{N}}$$ and $$h \in ({\mathcal{A}}\times {\mathcal{O}})^n$$

$\tau(h):=\begin{cases} \infty \text{ if } \forall m \in [n]:h_m \not\in c \times {\mathcal{O}}\\ \min\{m \in [n] \mid h_m \in c \times {\mathcal{O}}\} \text{ otherwise} \end{cases}$

That is, $$\tau(h)$$ is the first time action $$c$$ (stands for “commit”) appears in the history $$h$$. Now, consider the following environments $$\mu_a$$, $$\mu_b$$.

$\mu_a{\left(o_+ \mid h\right)}:=\begin{cases} 0 \text{ if } \tau(h)=\infty \\ 0 \text{ if } \tau(h) \leq \frac{n}{2} \\ \frac{1}{\tau(h)}{\left\vert {\left\{m \in {\left[\tau(h)\right]} \mid h_m \in a \times {\mathcal{O}}\right\}} \right\vert} \text{ otherwise} \end{cases}$

$\mu_b{\left(o_+ \mid h\right)}:=\begin{cases} 0 \text{ if } \tau(h)=\infty \\ 0 \text{ if } \tau(h) \leq \frac{n}{2} \\ \frac{1}{\tau(h)}{\left\vert {\left\{m \in {\left[\tau(h)\right]} \mid h_m \in b \times {\mathcal{O}}\right\}} \right\vert} \text{ otherwise} \end{cases}$

Also, define the reward function $$r$$ by setting $$r(h)=1$$ for any history $$h$$ that ends with $$o_+$$ and $$r(h) = 0$$ for any other history. Denote $$\upsilon_{a,b} := {\left(\mu_{a,b},r\right)}$$. That is, both universes count the number of actions $$a$$ and $$b$$ until time $$\tau$$ (the first time action $$c$$ is taken). At times between $$\tau$$ and $$2\tau$$, they produce rewards with frequency that equals the relative fraction of the corresponding action in the count. Before $$\tau$$ and after $$2\tau$$, they produce no rewards.

Now, we haven’t defined sane policies for arbitrary environments, but the spirit of the definition is that a sane policy is unlikely to take actions with major irreversible long-term negative consequences and has to have some non-negligible probability of taking an optimal (or at least nearly optimal) action. For example, we might define it as follows

# Definition

Consider $$\beta\in(0,\infty)$$, $$\gamma,\epsilon\in(0,1)$$ and a universe $$\upsilon=(\mu,r)$$. A policy $$\sigma$$ is called $$(\epsilon,\beta)$$-sane for $$(\upsilon,\gamma)$$ when for any $$h\in\operatorname{hdom}{\mu}$$

1. $\exists a^* \in {\underset{a \in {\mathcal{A}}}{\operatorname{arg\,max}}\,}{{\operatorname{Q}}^\upsilon_\gamma(h,a)} : \sigma{\left(a^* \mid h\right)} \geq \epsilon$

2. $\forall a \in {\mathcal{A}}: \sigma{\left(a \mid h\right)} \leq \exp {\left[\beta{\left({\operatorname{Q}}^\upsilon_\gamma(h,a) - {\operatorname{V}}^\upsilon_\gamma(h)\right)}\right]}$

Here, we consider the asymptotics $$\gamma \rightarrow 1$$, $$\beta \rightarrow \infty$$ but should include the scenario $$\beta = o{\left(\frac{1}{1-\gamma}\right)}$$ so that actions with short-term negative consequences are allowed (otherwise this would be some sort of “rationality” requirement, similar to what’s needed for DIRL, rather than a mere “sanity” requirement).

The optimal policy for $$\upsilon_{a}$$ (respectively $$\upsilon_b$$) is taking action $$a$$ (resp. $$b$$) until some time $$\tau^*(\gamma) = \Theta{\left(\frac{1}{1-\gamma}\right)}$$ and taking action $$c$$ at this time (obviously, the following actions don’t affect anything). Let $$\pi^*_{a,b}$$ be policies that are optimal even off-policy (so that their decision when to take action $$c$$ depends on the history of actions before). It is easy to see that the following policies $$\sigma_{a,b}$$ are $${\left(\frac{1}{2},\beta\right)}$$-sane for the respective universes and some “legitimate” choice of $$\beta$$:

$\sigma_a(a \mid h) := \sigma_a(b \mid h) := \frac{1}{2}\pi^*_a(a \mid h)$

$\sigma_b(a \mid h) := \sigma_b(b \mid h) := \frac{1}{2}\pi^*_b(b \mid h)$

That is, whenever $$\pi^*$$ suggests taking action $$c$$, $$\sigma$$ complies with it, and whenever $$\pi^*$$ suggests taking action $$a$$ or $$b$$, $$\sigma$$ flips a coin to decide which one to take. Indeed, in expectation, taking the wrong action out of $$\{a,b\}$$ loses one time moment of reward and is therefore equivalent to a “short-term” loss.

It is thus impossible for the agent to distinguish between the universes $$\upsilon_a$$ and $$\upsilon_b$$ until action $$c$$ is taken: both the environment and the advisor behave identically until this point. On the other hand, after action $$c$$ is taken it is too late to do anything. Evidently, the hypothesis class $${\mathcal{H}}:= \{\bar{\upsilon}_a{\left[\sigma_a\right]},\bar{\upsilon}_b{\left[\sigma_b\right]}\}$$ is not learnable.

In principle, it might be possible to get around this obstacle by formulating a condition on the advisor in which losses that are minor in size but far away in time are also ruled out. However, such a condition might prove too stringent. Mostly, I hope to ultimately extend the formalism to incomplete models in which case certain restrictions on the type of incomplete model might be acceptable. For example, the incomplete equivalent of an MDP might be a stochastic game against some arbitrary “opponent.”

### NEW DISCUSSION POSTS

[Note: This comment is three
 by Ryan Carey on A brief note on factoring out certain variables | 0 likes

There should be a chat icon
 by Alex Mennen on Meta: IAFF vs LessWrong | 0 likes

Apparently "You must be
 by Jessica Taylor on Meta: IAFF vs LessWrong | 1 like

There is a replacement for
 by Alex Mennen on Meta: IAFF vs LessWrong | 1 like

Regarding the physical
 by Vanessa Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

I think that we should expect
 by Vanessa Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

I think I understand your
 by Jessica Taylor on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

This seems like a hack. The
 by Jessica Taylor on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

After thinking some more,
 by Vanessa Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

Yes, I think that we're
 by Vanessa Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

My intuition is that it must
 by Vanessa Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

To first approximation, a
 by Vanessa Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

Actually, I *am* including
 by Vanessa Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

Yeah, when I went back and
 by Alex Appel on Optimal and Causal Counterfactual Worlds | 0 likes

> Well, we could give up on
 by Jessica Taylor on The Learning-Theoretic AI Alignment Research Agend... | 0 likes