Why DRL doesn't work for arbitrary environments
discussion post by Vadim Kosoy 16 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

This is exactly the sort of
 by Stuart Armstrong on Being legible to other agents by committing to usi... | 0 likes

When considering an embedder
 by Jack Gallagher on Where does ADT Go Wrong? | 0 likes

The differences between this
 by Abram Demski on Policy Selection Solves Most Problems | 0 likes

Looking "at the very
 by Abram Demski on Policy Selection Solves Most Problems | 0 likes

 by Paul Christiano on Policy Selection Solves Most Problems | 1 like

>policy selection converges
 by Stuart Armstrong on Policy Selection Solves Most Problems | 0 likes

Indeed there is some kind of
 by Vadim Kosoy on Catastrophe Mitigation Using DRL | 0 likes

Very nice. I wonder whether
 by Vadim Kosoy on Hyperreal Brouwer | 0 likes

Freezing the reward seems
 by Vadim Kosoy on Resolving human inconsistency in a simple model | 0 likes

Unfortunately, it's not just
 by Vadim Kosoy on Catastrophe Mitigation Using DRL | 0 likes

>We can solve the problem in
 by Wei Dai on The Happy Dance Problem | 1 like

Maybe it's just my browser,
 by Gordon Worley III on Catastrophe Mitigation Using DRL | 2 likes

At present, I think the main
 by Abram Demski on Looking for Recommendations RE UDT vs. bounded com... | 0 likes

In the first round I'm
 by Paul Christiano on Funding opportunity for AI alignment research | 0 likes

Fine with it being shared
 by Paul Christiano on Funding opportunity for AI alignment research | 0 likes