TLDR: We define a variant of reinforcement learning in which the reward is not perceived directly, but can be estimated at any given moment by some (possibly costly) experiment. The reward function is no longer a function of the observation history, but a different object that we call "instrumental reward function". We give two definitions of instrumental reward function and prove their equivalence. We also derive a regret bound for this setting.

Background

In "classical" reinforcement learning the agent perceives the reward signal on every round of its interaction with the environment, whether through a distinct input channel or through some given way to compute the reward from the interaction history so far. On the other hand, we can rather easily imagine agents that optimize properties of their environment that they do not directly perceive. For example, if Alice, who lives in Dominica, donates money to the Against Malaria Foundation in order to save someone in Africa, then the result is usually not visible to Alice at the time it occurs, if ever. Similarly, Clippy the paperclip maximizer doesn't always perceive all the paperclips in the universe. Moreover, we might want to design agents that, in order to estimate the reward, direct queries to humans (which is costly and cannot be done continuously non-stop).

Now, it is possible to define the perceived reward as the subjective expected value of the "true" imperceptible reward (see the Results section for details). Although this transformation preserves expected utility, it does not preserve Bayesian regret. Indeed, Bayesian regret is the difference between the expected utility attained by the agent and the expected utility attained by a "reference" agent that knows the true environment from the onset. However, after the transformation, the reference agent will behave as if it knows the observable dynamics of the true environment but still pretends not to know the true environment for the purpose of computing the reward. Therefore, regret analysis requires us to consider the imperceptible reward honestly. In fact, as we will see, certain assumptions about the imperceptible reward function are needed even to make the problem learnable at all. Finally, this transformation makes the reward function more complex and hence applying a "generic" reinforcement learning algorithm after the transformation (instead of exploiting the special form of the resulting reward function) might carry a significant computational complexity penalty.

Related Work: De Blanc 2011 studies so called "ontological crises". That is, de Blanc examines the problem of translating a reward function from one ontology into another. Here, we avoid this problem by considering reward functions that are automatically defined in all ontologies. That said, it might still be interesting to think about how to specify our type of reward function starting from a reward function that is only defined in one particular ontology. We will return to this in the Discussion section.

Krueger et al 2016 consider a setting where querying the reward is instantaneous and has a fixed cost. This is a special case of our setting, but we allow a much more general type of query and cost. Also, Krueger et al don't derive any theoretical regret bound (but they do present some experimental results).

Finally, multi-armed bandits with partial monitoring are closely related, see for example Bartok et al 2013. However, bandits by definition assume a stateless environment, and also our approach is rather different than what is usually studied in partial monitoring.

The literature study was very cursory and I will be glad to know about prior work I missed!

Results

Partially Observable MDPs with Imperceptible Rewards

Partially Observable Markov Decision Processes (POMDPs) serve as a natural starting point for thinking about imperceptible rewards. Indeed, it might seem like all we have to do is consider RL in a POMDP environment and let the reward to be a function of the (imperceptible) state. However, this setting is in general unlearnable even given assumptions that rule out traps.

A (finite) POMDP is defined by non-empty finite sets (states), (actions) and (observations), the transition kernel and the reward function . As opposed to the "classical" definition of POMDP, we allow the value of is to be imperceptible. The perceptible setting is a special case of the imperceptible setting: we can always encode the reward into the observation.

To formulate a learning problem, we assume , and to be fixed and an initial state to be given, while and are unknown and belong to some hypothesis class :

Such a problem can be unlearnable even if is known and there are no irreversible events that can happen:

Example 1

Suppose that , , , , and where for any

Since , there is no way to gain any information about which hypothesis is correct. Moreover, the optimal policies for the two hypotheses are different. Namely, for we should always take action and for we should always take action .

To formalize and illustrate the discussion in the Background section, suppose is Borel and is the prior. We can then define the "perceived effective reward" by

It is then easy to see that the operator preserves expected utility: given any policy and

and therefore, for any geometric time discount parameter

On the other hand, Bayesian regret is not preserved since, in general

Here is shorthand notation for the same probability distribution as before.

Indeed, in Example 1 the LHS of the above is since , whereas the RHS is .

The pathology of Example 1 comes about because reward is not only imperceptible but entirely unobservable. That is, no experiment can produce any information about whether the reward on a given round was 0 or 1. More specifically, the states and are assigned different rewards, but there is no observable difference between them. It is as if Alice would assign value, not to people in Africa (whose existence and well-being can be measured) but to some Flying Spaghetti Monster s.t. the world behaves exactly the same regardless of its existence or condition.

This observation suggests that, instead of assigning rewards to states which are just abstract labels in a model, we should assign rewards to states that are defined in terms of the observable consequences of the interaction of the agent with the environment. This leads us to the notion of "instrumental state", which we will now define formally.

Instrumental States and Reward Functions

First, we introduce some technical definitions for notational convenience.

Definition 1

is the category whose objects are pairs where is a real vector space and is a convex subset of , and whose morphisms are

We omit describing identity and composition of morphisms since they are obvious.

It is easy to see that has arbitrary limits. In particular, has a final object that we denote by (the one point set), products () and inverse limits of sequences. For any finite set , is an object in . Also, we will sometimes abuse notation by regarding as an object of instead of (i.e. making implicit).

Definition 2

The functor is defined by

Definition 3

For any , we define by

Note that is a natural transformation from to the constant functor with value .

Given and s.t. for , we denote .

Now, we are ready to define instrumental states. We fix the sets and .

Definition 4

For any , we define , the space of time step instrumental states, recursively by

Here, is a mapping from to . The inverse image of a convex set (in this case ) under an affine mapping (in this case ) is also a convex set.

The semantics of Definition 4 is as follows. Any can be regarded as a pair consisting of some (the image of under ) and a mapping defined by . Given , is the probability distribution over observations resulting from taking action in state , whereas is the state resulting from taking action a in state conditional on observing . This semantics can be made more formal as follows:

Definition 5

Given , we define recursively as follows:

  1. For all , and : iff , and .

Definition 6

Given , and , and assuming that , we recursively define by

  1. For :

  2. For with some , and :

The point of defining in this manner is that (i) different points in correspond to states that are truly not equivalent, i.e. can be empirically distinguished (statistically) and (ii) convex combinations of points in correspond precisely to probabilistic mixtures. Formally, we have:

Definition 7

Given and (a policy), we define (probability distribution over histories resulting from following policy in state ) by

Proposition 1

Consider some and assume that for any , . Then, .

Proposition 2

Consider some , and . Then

is a bounded polytope but in general it is *not} a simplex: we cannot regard it as just probability distributions over some set. For example, if , then it's easy to see that is a square (one axis is the probability to get a given observation when taking one action, the other axis is the probability for the other action). On the other hand, if then is a simplex: it is canonically isomorphic to .

There are a natural morphisms whose semantics is forgetting about the behavior of the state at time step :

Definition 8

We define for any recursively. is the unique morphism from to . For any , is given by

We thereby get a sequence

Definition 9

We define , the space of (infinite time step) instrumental states by

We denote the canonical projections by .

Of course, can also be regarded as the space of all possible stochastic environments. Specifically, we have:

Definition 10

For any we define by

Definition 11

Given , and , we define by

Like in the finite time case, we have

Definition 12

Given and , we define by

Proposition 3

Consider some and assume that for any , . Then, .

Proposition 4

Consider some , and . Then

For each , is finite-dimensional and therefore has a natural topology. also becomes a topological space by equipping it with the inverse limit topology. Since the are closed and bounded they are compact, and therefore is also compact by Tychonoff's theorem. In the special case , and the inverse limit topology is the weak topology for probability measures, defined w.r.t. the product topology on .

We can now give the first definition of an instrumental reward function: a continuous affine function . Why affine? A convex linear combination of instrumental states is empirically indistinguishable from a probabilistic lottery. If we assign expected values to probabilistic lotteries (as we should by the VNM theorem), then we must also assign them to convex linear combinations of instrumental states: otherwise our reward again depends on entirely unobservable parameters of our model.

An alternative approach is to consider the notion of "experiment" explicitly.

We will use the notation . Given a logical condition , the symbol will denote 1 when is true and 0 when is false.

Definition 13

Given and , we define by

is said to be a terminable policy when for any

That is, a terminable policy is allowed to produce a special token which terminates the "experiment" (instead of choosing an action), and we require that, for any environment, this token will be eventually produced with probability 1.

Definition 14

Given a terminable policy and a bounded function , we define the function by

This gives us a second definition of instrumental reward functions. In fact, the two definitions are equivalent:

Theorem 1

For any terminable policy and bounded function , is continuous and affine. Conversely, for any continuous affine , there exists a terminable policy and s.t. .

Putting the second part of the theorem into words, for any instrumental reward function (in the sense of the first definition) there is some experiment the agent can do which yields an unbiased estimate of the reward for the instrumental state that existed at the beginning of the experiment.

The range is not optimal, but for the regret bound in the next subsection, it's only important that it is bounded by some fixed constant.

To illustrate this concept of instrumental reward function, imagine that Clippy has access to a black box with a collection of levers on its outside. Pulling the levers produces some sounds that hint at what happens inside the box, but are not enough to determine it with certainty. The box has a shuttered glass window, whose shutter can be opened from the outside. Through the window, Clippy can see a jumble of scrap metal, mechanical manipulators that are controlled by the levers (and can be used to shape the scrap metal), and also a few mice running around the box and wreaking havoc. However, it is not possible to control the manipulators while the shutter is open. Worse, while opening the shutter allows seeing a snapshot of the shape of the metal, it also causes the manipulators to move chaotically, ruining this shape. So, Clippy can experiment with the levers and occasionally open the shutter to test the result. However, in order to produce and maintain paperclips inside the box, the shutter has to be kept closed (and the paperclips hidden) most of the time.

It is also possible to consider reward functions of the more general form , required to be continuous and affine in the second argument. Such a reward function depends both on the current (unknown) instrumental state of the environment and the observable history so far. By Theorem 1, such a reward can be equivalently described in terms of a family of terminable policies and a family of bounded functions s.t.

This means that, the value of reward can be estimated empirically, but only if the agent remembers the entire observation history. If the history is forgotten at some point, it might never be able to estimate the reward again. We will such reward functions "semi-instrumental".

Although semi-instrumental reward functions are more general than instrumental reward functions, I think that there is some interest in studying the narrower class. Arguably, instrumental reward functions are a better model of what counts as "consequentialist" or "goal-directed" behavior, since they depend only on the state of the environment. Indeed, it is easy to construct a semi-instrumental reward function that makes any given policy Bayes-optimal for any given prior, so semi-instrumental reward functions are incapable (without further assumptions) to distinguish between "intelligent" and "unintelligent" behavior. On the other hand, optimality w.r.t. some instrumental reward function seems like a stronger condition.

In order to derive a regret bound, we will restrict attention to those reward functions for which the terminable policy can be made to terminate within time that has some finite and bounded expected value. I don't know an elegant way to characterize those reward functions in general, but we will describe one class of such functions.

Definition 15

Consider any . Then, we can define the total variation distance by

In general, is a pseudometric. Moreover, when is finite-dimensional and bounded, it is a metrization of the natural topology. For a finite set and , is just the usual total variation metric. For a ball of unit diameter in Euclidean space, is the Euclidean metric.

Definition 16

Consider any . We define the metric on by

For any , is a metrization of the inverse limit topology on .

Proposition 5

Consider any and affine and Lipschitz with respect to . Then there is a terminable policy and a bounded function s.t. and

Note that is a parameter reminiscent of geometric time discount that constraints the shape of the reward function. However, in the regret analysis that follows, it is not the same as the actual geometric time discount parameter . In particular, we consider the asymptotics in which the latter approaches 1, while the reward function is assumed to be fixed. It might be interesting to study regimes in which both approach 1, but we will not attempt it at present.

A Regret Bound for RL with Instrumental Rewards

Fix and . For any finite set and , there is a unique mapping s.t.

That is, is just the instrumental state corresponding to the POMDP state .

Given continuous affine, we get for any and the POMDP reward function . Hence, one natural setting for regret analysis is fixing and and considering a hypothesis class of transition kernels

However, regret analysis for POMDPs involves some technical complexity, and we prefer to start with a simpler setting. Hopefully, we will address the POMDP case in a followup essay.

Suppose that . Then, given any MPD transition kernel , we can define the POMDP transition kernel by

Fix continuous affine in the second argument (a type of semi-instrumental reward function). For any as above, we get the induced reward function given by . We can now consider the learning problem corresponding to a hypothesis class of MDP transition kernels

It might seem odd to consider a setting with fully observable states in the context of imperceptible rewards. However, we can think about it as follows: what we observe is only a label whose physical meaning is unknown. Only given the (unknown) transition kernel, such a label can be interpreted as assigned a reward.

For example, imagine a robot tasked with sorting balls into bins according to their weight. Some of the balls are solid gold and some of them are solid silver, so it's in principle possible to know their weight just by looking at them. However, the robot doesn't know a priori whether silver or gold is heavier. On the other hand, the robot can perform some experiment with a ball to determine its weight. In this situation, the reward is imperceptible even if the state (e.g. the locations, colors and sizes of the balls, the locations and shapes of the bins and the location of the robot and the state of its manipulators) is fully observable.

Using the concepts of MB dimension and RVO dimension we defined in a previous essay, we can formulate the regret bound.

Theorem 2

There is some s.t. the following holds.

Consider any finite non-empty sets and , function continuous affine in the second argument , closed set and Borel probability measure on (prior). Suppose is s.t. for any , is terminable, and is a bounded function s.t.

Define the maximal expected reward estimation time by

Define the maximal bias span by

Define by

Denote and . Define the Bayesian regret by

Then, there is a family of policies s.t.

Discussion

More on the Regret Bound

It might appear odd that the regret bound in Theorem 2 depends on the dimensions of the class of reward functions, but not on the dimensions on the class of transition kernels, like in the perceptible case. The reason for this is that we only give the asymptotic form. Asymptotically, the leading term is and its coefficient depends only on those parameters that appear in Theorem 2. However, examining the proof reveals that there is also an term that has the same form as the regret bound in the perceptible case. For the sake of brevity and simplicity we will not attempt to write down a more precise regret bound that reflects the role of the dimensions of the class of transition kernels, but in principle it is not difficult. We must keep in mind, however, that in practice the other term might be significant: a priori the dimensions of the class of transition kernels are only bounded by a polynomial in and and the latter might be exponentially big for realistic models.

The Death of the Agent and Kamikaze Strategies

There is one potential application of defining rewards that are not a direct function of observations which seems not supported by instrumental rewards as we defined them. Namely, one can imagine agents that are motivated to follow a certain strategy that is designed to destroy the agent but produce some desirable results in the external world ("kamikaze strategy"). In other words, although survival is a convergent instrumental goal, it seems entirely reasonable for it to be sacrificed in certain specific scenarios. To give an example, imagine a bodyguard robot whose primary goal is keeping a certain person alive. If assassins shoot at the person, and the only wait to stop them is for the robot to block the bullets with its body, then it can be the optimal strategy, even if it will destroy the robot and prevent it from continuing its function as bodyguard (assuming that e.g. it will give the person a chance to escape or someone else a chance to stop the assassins).

Our formalism doesn't directly address the possibility of the agent's death, because the sequence of actions and observations is assumed to be infinite. One simple way to accommodate death is postulating a special observation s.t. it is never received before death and always received after death. If we do this, then death corresponds to a specific instrumental state and therefore its reward is a fixed constant. This seems incompatible with kamikaze strategies where the decision of self-sacrifice is contingent on conditions in the external world after death.

Another approach is assuming the agent becomes a "ghost": it keeps receiving observations which reflect the actual physical world but its actions have no effect. Such ghosts might theoretically be produced by a simplicity prior: for example, if the agent is an AI connected to a camera that monitors a room, then we can imagine a virtual video of the same room continuing beyond the AI's shutdown. This allows for different instrumental states after death and can potentially justify kamikaze strategies, but it seems like a very fragile construct and is unlikely to guarantee reasonable behavior.

The problem with death can be viewed from another perspective: our regret analysis assumes a no-traps condition () whereas death is usually a trap. Therefore, to guarantee rational behavior while accounting for death, we need to operate within a framework that allows for traps.

One such framework is requiring Bayes-optimality and giving up on learnability. This seems both too weak (because nothing is guaranteed for specific environments) and too strong (because it's computationally intractable). That said, I think this approach can be salvaged by requiring something somewhat weaker than Bayes-optimality and proving something somewhat weaker than learnability (hopefully I will write on that in a future essay). In any case, once we give up on learnability we can allow unobservable rewards (the general POMDP setting in the beginning of the Results section) which allow handling death and kamikaze strategies easily. Specifically, we can have a plethora of "dead" states that produce only the observation and whose transitions do no depend on the action, but which have different rewards. So, this approach "solves" the problem but at a high cost: no learnability or regret analysis.

Another framework for dealing with traps is Delegative Reinforcement Learning (DRL). In DRL the agent interacts with an external advisor, and is thereby able to successfully navigate all traps that the advisor knows about. In other words, it converges to a policy that is Bayes-optimal with respect to the belief state of the advisor (while the advisor is not able to produce such a policy by itself). Combining DRL with the instrumental rewards formalism should allow accounting for death. Specifically, in any given POMDP hypothesis, the state space will be decomposed as , with the following assumptions:

  • The transition kernel on states in doesn't depend on the action.

  • is invariant under the dynamics (death is irreversible).

  • The reward function on can be arbitrary.

  • The reward function on has to factor through (i.e. depend only on the instrumental state), and moreover the policy for estimating the reward function is known to be safe (alternatively, we might let the agent learn a safe estimation policy from some space of candidate policies).

Under these assumptions (or some variant thereof), it seems plausible that we should be able to prove learnability and derive a reasonable regret bound. Formalizing this line of thought is a task for future work.

The DRL approach to kamikaze strategies also has implications on corrigibility. Indeed, if the external advice is compatible with an admissible reward function that recommends shutting down the agent (i.e. upon delegation, the advisor acts to shut down the agent) then a DRL agent will assist with its own shutdown. This property is preserved by subagents, since creating a subagent is another potentially irreversible action (and therefore must be vetted by the advisor).

Also, it is tempting to speculate about DRL as a model of human self-sacrifice. We have already speculated before that we can view DRL as model of human learning, where the human's social environment or humanity as a whole is regarded as playing the role of the advisor. Similarly, humans that sacrifice their lives for the sake of their loved ones or the "greater good" can be regarded as heeding that "advise" regarding the rewards of states in which the human doesn't exist. Under this model, we can make sense of self-sacrifices by individual humans but not of hypothetical self-sacrifice by humanity as a whole (potentially augmented by other minds with which we could communicate and find common ground), but, the latter restriction seems compatible with intuition.

Specifying Instrumental Reward Functions

It might be useful to find natural ways to specify instrumental reward functions. In particular, it is interesting to start with a reward function defined on a specific ontology (POMDP) and somehow extend it to a full instrumental reward function (which, like we said before, induces a reward function on any ontology via the mapping).

De Blanc suggests one way to extend reward functions from one POMDP to another, but I don't know whether this operation leads to an instrumental reward function, i.e. whether it is compatible with the constraints imposed by affine dependencies between the states (and I don't see any reason why it should).

Essentially, what we're looking for is a way to extend an affine function from an affine subspace to the entire affine space (the affine subspace is the affine span of the instrumental states corresponding to the states of the initial ontology; note that, if these instrumental states are not affine independent, then we have some constraint on this initial reward function). One natural way to do it is looking for an affine function whose differential (the linear function part) has minimal norm, or choosing some privileged projection operator from the entire space to the affine subspace. However, since the natural norms we have here are not inner product norms, these choices are usually non-unique, and it's possible we can't get much out of it.

A different natural approach is using Occam's razor, i.e. looking for an extension of minimal description length or the expected value of a random extension sampled from a conditional simplicity prior. This requires a natural way to describe instrumental reward functions. We do have such a way: assuming that the and guaranteed to exist by Theorem 1 can be chosen to be computable, the description is the program for those objects with respect to a fixed universal Turing machine (we consider a single program that computes both and to exploit possible mutual information between the two).

These questions are left for future research.

Proofs

Proof of Proposition 1

We proceed by induction on . For there is nothing to prove since so a priori. Now, suppose .

We need to show that for any and , . To show it for given and , we consider some s.t. . Since , we have

By Definition 7, we get,

By Definition 6, we get,

If this value vanishes then . Otherwise, consider any and define by

Definitions 6 and 7 imply that

and similarly for . We have and , which implies . By the induction hypothesis, we get . Combining this with , we get .

Proposition A.1

Consider any , and . Assume that

Then

Here, is understood to mean when and the same for .

Proof of Proposition A.1

Obvious from the definitions.

Proof of Proposition 2

Given and some , to show that it is sufficient to show that

  1. For any and ,

  1. For any and , if then for any

We will use this to prove the claim by induction on . For , there is nothing to prove. For , by Definition 7

By Definition 6

Furthermore, Definitions 6 and 7 imply that

Here, is defined by .

Denote

By Proposition A.1

We get

By the induction hypothesis, we get

Decomposing the right hand side and applying the same reasoning in reverse,

By Definition 6, can be written as

Multiplying the numerator and denominator by , we get

Combining this with the previous identity, we get

Given and defined by , we will denote .

Proposition A.2

Consider any and . Then,

Proof of Proposition A.2

Obvious from the definitions.

Proposition A.3

Consider any , and . Then,

Proof of Proposition A.3

Obvious from the definitions.

Proposition A.4

Consider any , , and s.t. . Then,

Proof of Proposition A.4

We prove the claim by induction on . For , there is nothing to prove. Assume . For , we have

By Proposition A.2

Now suppose that . We get

By Proposition A.3

Using the induction hypothesis

Proof of Proposition 3

Proposition A.4 implies that, in Definition 11, we can replace by any . Therefore, for any , . Hence, implies that . By Proposition 1, we get , and therefore .

Proof of Proposition 4

For any , Proposition 2 implies that

is an affine mapping, therefore

Using Proposition A.4

Since this holds for any , we must have that

Proposition A.5

For any terminable policy

Proof of Proposition A.5

Assume to the contrary that there is and sequences and s.t. and, for any

is compact, therefore has a convergent subsequence. Without loss of generality, we can assume that itself converges and denote . For any and , we have and therefore

Using Proposition A.4, it follows that

The right hand side is clearly continuous in , and the latter converges to as goes to . We get

Since this holds for any , it follows that

This contradicts the assumption that is terminable.

Proposition A.6

Consider a sequence of compact Polish spaces, and continuous mappings. Denote

Denote the canonical mapping. Let be continuous. Then,

Proof of Proposition A.6

Assume to the contrary that there is , and sequences , s.t. , and . Without loss of generality, we assume that and the limits exist (the latter using the fact is compact by Tychonoff's theorem). It follows that , and in particular and therefore there is s.t. . On the other hand, , implying that, for , and therefore , a contradiction.

Proposition A.7

Let be a finite-dimensional normed vector space and a linear subspace. Suppose and are s.t. for any , . Then, there is s.t. .

In the above, refers to the standard dual norm on , induced by the norm on . refers to the set .

Proof of Proposition A.7

Consider defined by . By the assumption about , . By the Hahn-Banach theorem, there is s.t. and . Using the canonical isomorphism , corresponds to some , and it follows that and for any , . We now take .

Proposition A.8

Let , and . Assume is a bounded closed finite-dimensional polytope, and is onto (as a mapping). Suppose s.t. for any , if then . Then, there exists s.t. for any

Proof of Proposition A.8

Let be the vector space correspond to , let be the vector space corresponding to (so that and ) and let be the (finite) set of vertices of . Since is onto, we can choose some s.t. for any , . Define by . Let be the linear subspace of given by

Define the linear operators and by

Consider any . In particular, and therefore

Also

Combining the last two identities, we conclude

Using the assumption , this allows us to define by

We have . Also, and therefore .

Now, for any , we have

Moreover,

It follows that

By our previous reasoning, . Therefore, we can use the assumption on to conclude that

By Proposition A.7, it follows that there is some s.t. and (the norm is dual to the norm).

Now, consider some . There is some s.t. . We define . To see this definition is unambiguous, consider some s.t. also . In particular, and therefore . Moreover, since . Using that and , we get

It is easy to see that is affine.

Finally, consider any . Choose s.t. . We have

Since , we can use the assumption on to bound the first term on the right hand side:

For the second term, we have

Combining the two, we conclude

Proposition A.9

Let be a finite set, and . Assume attains its infimum at some point . Then, there exist and s.t. for any

Here, we used implicit currying: .

Proof of Proposition A.9

For each , define by

Denote and . If vanishes for every , then is constant, so we can set to the same constant and take arbitrary . Otherwise, we define and by

We need to show that takes values in . It is non-negative since is minimal at , so both terms in are non-negative. To see it is not greater than , observe that

Clearly and therefore . It is also easy to see that, since is affine, . We get

It remains to show that . We have

Using the fact is affine, the desired conclusion follows.

Proposition A.10

Consider any and . Then, there exist and s.t. for any

Proof of Proposition A.10

We proceed by induction on . For , is constant and we set to the same constant. Now, suppose .

Define by

Using Proposition A.9, we get and s.t. for any

For every , we define by

For every and , we apply the induction hypothesis to , and get and s.t. for any

We now define and by

Now, observe that, for any

Using the fact that is affine in the second argument, we get

Moreover, using Definition 6 and the definition of , we get

Combining this with the previous identity, we get

Proposition A.11

Consider some and sequences

Assume is a terminable policy for every . Then, there is a terminable policy and s.t.

Proof of Proposition A.11

Define and by setting, for any and

When the denominator vanishes, we can make an arbitrary choice.

Essentially, what we do is sample from and then run the "experiment" defined by . We have

For any s.t. , we will denote by the canonical projection. That is

Proof of Theorem 1

Direction 1: is affine by Proposition 4. To verify it is continuous, consider a sequence s.t. exists. Denote , and . For any , we can decompose the expected value into the contribution of histories at length at most and the contribution of longer histories.

converges to as goes to , therefore converges to 0 and we get

Since this holds for any , we get

By Proposition A.5, the right hand side vanishes.

Direction 2: Define by

By Proposition A.6, . By Proposition A.8, there is a sequence s.t. for any

It follows that there is a sequence s.t. and

Define by

Denote . We can assume without loss of generality that for every (this can be arranged by choosing appropriate , unless for some , ; but in the latter case, the theorem follows directly from Proposition A.10). By Proposition A.10, for every , there is and s.t.

Also by Proposition A.10, there is and s.t.

By the construction, , and moreover, denoting

By Proposition A.11, there is a terminable policy and (the range of is and ) s.t. .

Proposition A.12

Consider any , , and . Then,

Proof of Proposition A.12

By Definition 16,

For , , and therefore . For , by Definition 15. We get

Proof of Proposition 5

Define by

Let be the Lipschitz constant of . We have

By Proposition A.12, we get

Without loss of generality, assume the range of is contained in . By Proposition A.8, it follows that there is a sequence s.t. for any

It follows that

Define by

Denote . By Proposition A.10, for every s.t. , there is and s.t.

is a constant. Define by

We have

Here, the terms with are understood to vanish. By Proposition A.11, there is a terminable policy and s.t. . Moreover, looking at the construction in the proof of Proposition A.11, we can see that

In order to prove Theorem 2, we will consider the policy implemented by an algorithm which is PSRL with two modifications:

  1. Each episode has random duration, uniformly distributed from to , for some fixed .
  2. Between any two regular episodes, there is an "interlude" which consists of, performing the reward estimation experiment ().

The PSRL algorithm assumes choosing , a Borel measurable mapping s.t. is an optimal policy, i.e.

As usual, we will consider , a probability space governing both the uncertainty about the true hypothesis, the stochastic behavior of the environment and the random sampling inside the algorithm. Let be a random variable representing the true hypothesis, be random variables s.t. represents the hypothesis sampled at episode , be s.t. represents the state at time , be s.t. represents the action taken at time , be s.t. represents the time when the -th episode starts and be s.t. represents the time when the -the interlude starts.

This probability space can be formally defined via recursive equations on the random variables, but this is straightforward and we will omit it.

Proposition A.13

In the setting of Theorem 2, fix and .

Denote , , , , , , , and . Then,

Proof of Proposition A.13

For any , define as follows.

That is, is a policy that follows for time and afterwards.

In the following, we use the shorthand notation

It is easy to see that

Here, the first term represents the regret incurred during the episodes, whereas the second and third term represent the regret incurred during the interludes (the lost reward and lost value respectively). We will denote the first term in the following.

By definition, and have the same distribution even when conditioned by the history up to . Therefore

It follows that

Denote and . We now prove by induction on that, with probability 1

For this is a tautology. For any , the Bellman equation says that

Denote . We will also use the notation . Substituting and subtracting the two identities, we get that, in the subspace of defined by

Denote . Since is exactly the policy followed by PSRL at time , we get

We now subtract and add , and use the fact that is the conditional distribution of .

Applying this identity to the last term on the right hand side of the induction hypothesis, we prove the induction step. For , we get

Clearly

Using the definition of PSRL, we can exchange and true and sampled hypothesis and get

It follows that

Applying this to each term in the earlier expression for , we get the desired result.

Proposition A.14

Consider a probability space, random variables and . Assume that and the are all independent and uniformly distributed between and . Define the random variable by

Then,

Proof of Proposition A.14

Define . Obviously, . For any and

Apply Hoeffding's inequality to the RHS,

Taking , we get

Moreover, by definition of , we have, for any

It follows that

Take . We get

Proposition A.15

Consider be a measurable space, a probability space, a filtration, a stochastic process adapted to , stopping times and measurable functions. Consider also and and assume that with probability 1

In addition, consider some , and assume that for all

Here, is understood to identically equal .

Finally, assume that, conditional on , and are independent. Define the -measurable random variable by

Then,

Proof of Proposition A.15

We have, with probability 1

Taking expected value

Denote by the joint random variables and . Our assumptions imply that, conditional on , the factor is independent of the rest of the expression inside the expected value. It follows that

Clearly

We get

Using Proposition A.14, we get

Proposition A.16

Consider a probability space, and random variables s.t. and the are all independent and uniformly distributed between and . Consider also . Then, for any

In particular,

Proof of Proposition A.16

For any , we have

Therefore, since is uniformly distributed between and ,

Also, for any

Here, we used that the are independent and equally distributed. Substituting the expression for , we get the desired result.

Proposition A.17

In the setting of Proposition A.16, consider some . Denote

Assume . Then,

Proof of Proposition A.17

By Proposition A.16

In the second term, we have

We get

We've already seen that , and therefore

We will use the notations of Definitions B.1 and B.2 (see Appendix).

The following is a simple generalization of "Lemma 1" in Osband and Van Roy 2014 and the proof is essentially the same.

Proposition A.18

Consider a set , a finite-dimensional inner product space and some . Consider also some , , , , an increasing sequence and a nondecreasing sequence . Suppose that for any , . For any , define by

Denote . Then, for any

Here, is understood to mean .

Proof of Proposition A.18

Let be the set

Let be the set

For each , we define recursively by

Denote and let . Given any , the notation will refer to the element of s.t. and for any , . We define and by recursion over .

For , we set . For any , we consider whether there is s.t. is -independent of . If there is such , we set and for any , . If there is no such , we set . The latter situation must occur for some , since otherwise we would get

That would imply that there is s.t.

This is impossible since, by construction, each element of the sequence is -independent of the preceding subsequence, whereas, by definition of , it is the maximal length of such a sequence.

Since , . Therefore, there are s.t.

By construction of and , For each , is -dependent of . Therefore,

Define by

By construction, the sequences for all values of together are a collection of distinct elements of . Therefore, . It follows that

Denote .

Since , by the definition of each of the two terms on the RHS is at most and we get

Proposition A.19

Consider and non-decreasing. Define by , and assume is Lipschitz continuous with constant . In other words, for any and , we have . Let denote the Laplace transform operator. Then,

Proof of Proposition A.19

For the first term, we will use that is non-decreasing, and for the second term, we will use that is Lipschitz continuous with constant .

Proposition A.20

There is some s.t. the following holds.

Consider a set , an inner product space and some . Consider also some , , , , , , and an increasing sequence . Suppose that , for any , , and . Denote

For any , define by

Denote . Then,

Proof of Proposition A.20

By Proposition A.18, for any

Here, is understood to mean . Observing that , we get

Multiplying the inequality by and summing over , we get

On the left hand side, we sum the geometric series. On the right hand side, we use the observation that

Here, we used that is an increasing function for . We get

It is easy to see that Proposition A.19 is applicable to the RHS for . We get,

Using the condition and absorbing factors into the definition of , we get

Proposition A.21

There is some s.t. the following holds. In the setting of Proposition A.20, assume that for any and , . Then,

Proof of Proposition A.21

Due to the assumption , we have . For any , we have

Applying Proposition A.20 to integrand on the RHS

Evaluating the integral and dropping some negative terms on the right hand side, we get

We now set to be

For an appropriate choice of , and using the assumption , it follows that

Proof of Theorem 2

We take where will be specified later. By Proposition A.13

We will use the notation

We will also use the notation .

It follows that

Denote the first term on the RHS and the sum of the others terms. We have

First, we analyze . In the second term, we have , leading to

We get

Applying Proposition A.16 to each term, we get

Now, we analyze . Define by

That is, is the history of reward estimation experiments. For any , let be the stopping time defined recursively by

That is, are time indices that traverse the "interior" of the episodes only. Define by

We apply Proposition B.1 (see Appendix) with and , to each of the two terms in :

Here, and correspond to in Proposition B.1.

We also define by the condition . Since the hypotheses is sampled from the posterior, for any we also have

Denote

Define and by

We have

We split into the and contributions

For the second term, we have

Applying Proposition A.17 to the RHS, we get

Here, is as defined in Proposition A.17. Since we are interested in the asymptotics , and our ultimate choice of will ensure that , we will henceforth make the assumption that .

Denote the expression on the RHS. We get

Denote

Clearly

Using this inequality, dropping the (since it can only the right hand side smaller) and moving the sum inside the expected value, we get

Extending the sum on the RHS to (that can only increase it), and using the fact that the width is ,

By Proposition A.16,

We define the random variable by

We can now rewrite the previous inequality as

Obviously and hence

On the other hand, by Proposition A.21 (for the , case, applied to the subsequence , with playing the role of )

Denote the expression on the RHS. Applying Proposition A.15, we conclude

It follows

Now, we analyze . By the same reasoning as for , we have

Denote

It is easy to see that for

It follows

Since , By Proposition A.14

Denote

We get, using that

On the other hand, and by Proposition A.21

Denote the expression on the RHS. It follows that

We set

Now, we analyze the limit. In this limit, the expression for justifies our assumption that . Indeed, we have

We now analyze the separate contributions of , and to the limit of interest. We will use the notation to mean, there is some constant that depends on nothing (i.e. on none of the parameters of the problem) s.t. .

Our previous bound on can be written as

Here we used that , substituted the expressions for , and , and dropped some dominated terms.

We analyze the separate contribution of each term.

Our previous bound on can be written as

We analyze the contribution of each term.

To complete the proof, we need to analyze the contribution of . We have

Putting everything together, we conclude

Appendix

The following is a special case of what appeared in the previous essay as "Definition 1", introduced here for the sake of simplifying notations.

Definition B.1

Consider a set , an inner product space and some . Consider also , , a sequence and . is said to be -dependant on when, for any

Otherwise, is said to be -independent of .

The following is a special case of what appeared in the previous essay as "Definition A.1".

Definition B.2

Consider a set , a finite-dimensional inner product space and some . Assume is compact w.r.t. the product topology on . Consider also some , , and . We then use the notation

Proposition B.1

There is some s.t. the following holds.

Consider a finite set , a finite-dimensional inner product space and some . Let be the canonical filtration, i.e.

Consider also and s.t. for any and

Assume that with -probability for all . Fix , . Define by

Then,

Proof of Proposition B.1

Straightforward from "Proposition B.1" and "Proposition A.3" in the previous essay.

New Comment