# Formal Solution to the Inner Alignment Problem

We've written a [paper](https://arxiv.org/abs/2102.08686) on online imitation learning, and our construction allows us to bound the extent to which mesa-optimizers could accomplish anything. This is not to say it will definitely be easy to eliminate mesa-optimizers in practice, but investigations into how to do so could look here as a starting point. The way to avoid outputting predictions that may have been corrupted by a mesa-optimizer is to ask for help when plausible stochastic models disagree about probabilities.

Here is the abstract:

> In imitation learning, imitators and demonstrators are policies for picking actions given past interactions with the environment. If we run an imitator, we probably want events to unfold similarly to the way they would have if the demonstrator had been acting the whole time. No existing work provides formal guidance in how this might be accomplished, instead restricting focus to environments that restart, making learning unusually easy, and conveniently limiting the significance of any mistake. We address a fully general setting, in which the (stochastic) environment and demonstrator never reset, not even for training purposes. Our new conservative Bayesian imitation learner underestimates the probabilities of each available action, and queries for more data with the remaining probability. Our main result: if an event would have been unlikely had the demonstrator acted the whole time, that event's likelihood can be bounded above when running the (initially totally ignorant) imitator instead. Meanwhile, queries to the demonstrator rapidly diminish in frequency.

The second-last sentence refers to the bound on what a mesa-optimizer could accomplish. We assume a realizable setting (positive prior weight on the true demonstrator-model). There are none of the usual embedding problems here—the imitator can just be bigger than the demonstrator that it's modeling.

(As a side note, even if the imitator had to model the whole world, it wouldn't be a big problem theoretically. If the walls of the computer don't in fact break during the operation of the agent, then "the actual world" and "the actual world outside the computer conditioned on the walls of the computer not breaking" both have equal claim to being "the true world-model", in the formal sense that is relevant to a Bayesian agent. And the latter formulation doesn't require the agent to fit inside world that it's modeling).

Almost no mathematical background is required to follow \[Edit: most of \] the proofs. \[Edit: But there is a bit of jargon. "Measure" means "probability distribution", and "semimeasure" is a probability distribution that sums to less than one.\] We feel our bounds could be made much tighter, and we'd love help investigating that. 

These slides (pdf [here](https://mkcohen-hosted-files.s3-us-west-1.amazonaws.com/OIL_slides.pdf)) are fairly self-contained and a quicker read than the paper itself.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/8ae69913ecf3f9c98412586b87f09ae5170df7427d631242.jpg)

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/6c6e9e849d8063a90a6484f4412a3c9c262ce4be260b084a.jpg)

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

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/42f1fc43637b550a8accde466a48b7859c954112c8db72c7.jpg)

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

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/31c7c05528c0a7eaf2ec35d40b32b1f88570115e1a5d5f7b.jpg)

Below, $\textrm{P}_{\textrm{dem}}$ and $\textrm{P}_{\textrm{im}}$ refer to the probability of the event supposing the demonstrator or imitator were acting the entire time. The limit below refers to successively more unlikely events $B$; it's not a limit over time. Imagine a sequence of events $B_i$ such that $\lim_{i \to \infty} \mathrm{P}_{\mathrm{dem}}(B_i) = 0$.$$

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

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

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