WorksMathematics
Confessions of a Masked MDP
Abstract
In reinforcement learning, one presumes the action set to be known ahead of time, and, thus, one must know if any state-action pairs are not permissible ahead of computations. In some applications, determining this action mask is the main computational bottleneck. Isolating this problem to highlight its core properties, we study how to combine the search for an optimal policy with the learning of the mask itself, under a linear MDP model in which each attempted action reveals the exact value of a linear score determining its validity. In this framework, we first construct an algorithm based on deterministic optimistic optimization and show that it is minimax optimal, which we show is also computationally efficient. However, it is sub-optimal on non-degenerate instances, as we show. We propose an alternative, which is also computationally efficient, which plans its exploration strategy. This algorithm admits a formal interpretation as an analogue of information-directed-sampling for deterministic feedback, which may be of independent interest. Finally, we study an application of this framework to transfer learning, where the invalid action set changes over time.
Introduction
Reinforcement learning, the interactive learning of control systems and games ([35, 33]), and in particular its formalisation using Markov Decision Processes (MDPs) ([29]), has been an undeniably successful field of research in the last thirty years. Applications span far and wide, from datacenter cooling ([14]), to autonomous driving ([31]), through advertising ([12]) and conversational AI training ([21]). In the MDP formalisation, the set of available actions is typically assumed to be independent of the state of the system. In the classical theory ([10]), this assumption is a convenience and varying actions can be accommodated at the cost of some burdensome notation (see, e.g., Puterman, [29]).
In computation, however, ever since RL methods have shifted to GPU-accelerated computation (Mnih et al., 2015), varying actions have become nefarious spoilers. Indeed, GPU-acceleration of, e.g., Value Iteration, relies on the ability to broadcast operations over the entire state-action space. The solution, early adopted by practitioners, is to use a boolean invalid action mask to zero-out the rewards (and/or transitions) corresponding to invalid actions. Hadamard multiplication by the mask preserves the tensor structure, and is accelerated. Remarkably, there has been some theoretical work showing that masking preserves the convergence of Policy Gradient ([17]).
This state of affairs is acceptable in many applications. However, in some cases, computing the mask is itself the computational bottleneck. For instance, in civil engineering applications, each action corresponds to a refinement of the current design (state), and determining whether it satisfies the project’s design constraints may require extensive simulations. Precomputing all possible designs in order to check their feasibility for a building is, quite evidently, a prohibitively expensive approach to architecture.
When pre-computation of the mask is impossible, the current approach is to penalise invalid actions through reward shaping Ng et al. [25], which is a form of Lagrangian relaxation. However, when it comes to learning, this approach is fundamentally flawed: it treats the deterministic signal of permissibility and the stochastic reward signal homogeneously, a dilution which explains the terrible performance of these as learning methods.
One would expect the literature on constrained MDPs to have addressed this problem somehow. Yet, both classical [2] and more recent [1, 3] work focuses on expected costs, with the aim of controlling violations. In our setting, due to determinism of signals, there is no reason to repeat a known violation. The closest work to ours is, thus, that of Wei et al. [37], whose instantaneous hard constraints are in the same spirit, but whose regret bounds are dominated by the minimax analysis and stochasticity of the rewards in the interior of the constraints, which prevents the identification of optimal exploration strategies.
At the end of the day, we are left to face an MDP with masked actions, a masked MDP, if you will, with the problem of how to efficiently explore it to identify the mask. Motivated by the computational cost of the mask itself, we focus on 0-noise feedback, analogous to membership-query and realizable-classification settings [22] (Angluin 1988). We will show, with Theorem 2.3, that this is sufficient to achieve optimal regret if one must also learn the MDP dynamics and/or rewards. While the mask confesses its values freely, the problem of reaching the information efficiently through the MDP dynamics remains.
In the remainder of this section, we detail the setting explicitly, and formally introduce the problem of mask learning. Thereafter, in § 2, we establish a minimax-optimal algorithm based on Optimism in the Face of Uncertainty (OFU), and argue that this is not a good benchmark for this problem. In § 3, we thus study finer, instance-dependent bounds, and introduce an algorithm which improves the exploration of OFU on non-degenerate instances, and connect it to the information-directed sampling (IDS) algorithm of Russo and Van Roy [30], also identifying an auxiliary MDP formulation, à la Hao and Lattimore [15]. Finally, in § 4, we discuss an example application to transfer learning of masks in MDPs, motivated by an industrial application.
Setting
As a basis, let be a finite-horizon MDP, with state space , action space , transition kernel , with , reward , and horizon .
We will adopt the formalism of linear MDPs (without loss of generality as it subsumes tabular MDPs). Thus, we assume that there exists a known feature map , , such that, for all ,
for some parameter . Moreover, we assume that the transition kernel is linear in the features, i.e. there is parameter-valued function over such that
for all .
From , we can define a family of masked MDPs, indexed by the masks , viewed either as function from or a -valued matrix in . The masked MDP is defined on the augmented state space , where denotes an absorbing cemetery state. Its reward function is given for by
with . For , the transition kernel of is defined by
with the remaining probability mass assigned to the cemetery state:
Finally, since is absorbing, .
Note that a masked linear MDP remains a linear MDP, up to increasing the dimensions by 1. Indeed the new feature map is defined as . Thus, in order to ease exposition and maintain consistent algebraic tools, we will also represent the mask linearly using the embedding , i.e. we assume that there is such that
for all .
When clear from context, we drop subscripts of .
In a (masked) MDP, given any and , let be the Markov chain induced by (Markov policies) and starting from . It is well known that there is a cumulated-reward-maximising policy of this form, and we can solve the control problem by limiting ourselves to maximising, over , the value functions defined for by
Moreover, we will denote the value function
where the supremum is taken over all Markov time-dependent policies . When necessary to clarify a mask on the MDP, we will add superscripts to , , or to indicate the mask, e.g. , , and . When considering an initial distribution over states, we will use the shorthand and likewise for .
Minimax mask learning
On the masked MDP, we can consider three main learning problems: the mask, the dynamics, and the combination of both. In this section, we draw a general picture of the mask learning problem with broad strokes, focusing on minimax-optimality.
Learning problems on masked MDPs
Clearly, if the mask is known but the dynamics must be learnt, the problem is statistically indistinguishable from a classical RL problem [19]. By comparison, we will focus on the other two problems where the mask is unknown, due to the absence of its pre-computation, and an agent observes only sequences of state-action-reward-mask quadruples. Meanwhile, the learning problem of the dynamics is naturally formulated as an episodic online RL problem [19], wherein visiting a state-action pair reveals a noisy signal of the reward and a sampled transition from . Notice that, due to the presence of a cemetery state, one must consider an episodic setting, rather than a non-episodic one.
Let denote the unknown true parameter of the mask’s linear form. Letting be a learning algorithm which produces a sequence of action trajectories by playing policies , we measure its performance by its cumulative pseudo-regret, which, after episodes, is defined as
We continue, in Section 2.2, by the construction of a minimax-optimal optimistic algorithm. Then, in Section 2.3, we show that any such algorithm is a sufficient building block for learning transitions and rewards if necessary. This will complete the picture of these three learning problems.
Minimax Regret bounds
Naturally, one would begin a study of learning masks in a masked MDP by studying minimax-optimal regret. However, as Theorem 2.1 will show, this paradigm is a poor benchmark for understanding the moving pieces of the problem. Indeed, due to the linear embedding, the number of mistakes that can be made by any reasonable1 algorithm is determined by the feature map in a tight manner.
In order to keep track of available information about the mask, we will use a version space (as in, e.g., Angluin, 1988) which contains all system hypotheses consistent with observed values of the mask. Let be a collection of state-action pairs , , and define by . The version space compatible with is
wherein , and is a priori feasible set, say the unit ball. More broadly, we call a version space if there is a set such that .
Whenever the learner plays , it observes the exact score (whether the action is valid or not), and thus , as well as the reward and next state of (the next state being if the action is invalid). This noiseless feedback model is an extension of the deterministic bandit problems [24].
Given a version space , the linear structure of the mask partitions the state-action space into three sets: the certified valid pairs,
the certified invalid pairs,
and the remaining uncertified pairs,
In other words, a pair is uncertified whenever the range of includes zero.
As the learner plays, it generates a non-decreasing sequence of sets by interacting with the environment, whose parameter lies in the intersection of the non-increasing sequence , where .
Given , is defined by linear equalities (up to intersection with ), so that sampling a new pair cannot affect the version space unless is linearly independent of . This implies that the number of mistakes made by a reasonable algorithm (that never plays in ) is at most
Figure 1. Visualisation of and .
This quantity will be the central focus of our exploration analysis, however, it should be noted features linearly dependent on can still identify the validity of other pairs (for instance and in Section 2.2), which we will use to improve exploration.
Theorem 2.1. Let be the Euclidean ball. For every and every , there is a masked MDP with on which any algorithm satisfies
Proof. Consider the masked MDP in Figure 2. We take the trivial feature map, so that . Under the best possible mask, all actions in go to with reward . Under the real mask, only one of the actions is valid in . Any algorithm has no choice but to take actions at random in until is reached, which incurs regret each time. The bound follows from expected number of trials, see Appendix § 10.§ 4.
Figure 2. The MDP in the proof of Theorem 2.1.
In an unmasked MDP, optimistic algorithms offer a simple-to-analyse class of minimax-optimal algorithms ([6, 18, 7]). We now introduce their analogue in the masked setting, which we call version-space optimism (VSO). Since the mask is observed noiselessly, VSO is more closely related to the work of Munos [24] than to these standard RL algorithms. It maintains all mask models still compatible with the observations and acts according to the most optimistic one, thereby exploiting only constraints that have already been ruled out by the data. Note that this algorithm is computationally feasible, since the space of masks to search is at most -dimensional and the MDPs are linear. It is also possible to implement it using Extended Value Iteration ([18]), see Appendix § 12.
Proposition 2.2. Let be the Euclidean ball. For any , the version-space optimism algorithm (Algorithm 1) satisfies
Proof. By optimism over the version space, either episodes are free ( coincides with the optimal policy of the true mask) or they land on an element of , which resolves a direction of . Since there are at most directions to resolve, the claim follows.
Theorem 2.1 and Proposition 2.2 together show that the minimax regret rate for the problem is no different from the rate one would get if one could query each state-action pair directly. In this sense, it is of very limited interest and, the heart of the problem lies in understanding how to leverage the dynamics of the MDP to query the version space at minimal regret.
Separation theorem
Theorem 2.3 will now argue that mask learning can be separated from the problem of learning the dynamics and rewards of the underlying linear MDP, which motivates our choice to study the mask learning problem in isolation. Suppose we have an optimistic learning algorithm for linear MDPs that is capable of achieving, over episodes, a high-probability regret bound on an MDP with horizon . We denote the trajectory of in episode by and denote by corresponding step regret upper bounds (see, e.g., Azar et al. [7]).
Theorem 2.3. Consider a reasonable algorithm that is jointly optimistic in the mask and the linear MDP.
Let be the probability, conditional on the information available before episode , that an action is attempted that is invalid under the true mask. If the analysis of holds under the joint interaction2, with
Then
with probability at least , wherein . A high-probability bonus bound for the learner on an unmasked MDP alone does not imply the joint-interaction assumption above.
We defer the proof to Appendix B.5. Let us sketch it briefly. On episodes with no exploration we use the existing bounds of , trajectorially. On exploratory episodes, we use the usual regret decomposition
where is episode ’s conditional pseudo-regret and is its first invalid-action time.
We bound the resulting accumulation of exploration using a martingale argument between samples and , then show decrease of the dimensionality potential
where is the subspace whose value is known on .
As a consequence of Theorems 2.1 and 2.3, it would appear that the problem is trivially solved. Instead, it is more accurate to observe that minimax analysis is not the correct lens to analyse the problem, which, indeed, is not statistical. Rather, the core of the problem, and the next section, lies in how to adapt exploration to the interaction of the dynamics with the feature-space of each instance.
Planned exploration
To understand the shortcomings of VSO on non-pathological instances, let us introduce one which is intuitively cheap to explore, but where optimistic algorithms fail. This instance (see Figure 3) is an extension of Figure 2. Of the actions, only one, say leads to , as before. But now, instead of all other actions being invalid (masked), some proportion of them leads (with 0 reward) to a chain3 of states which transition to each other with reward 1. In the final state of the chain, , yields reward 1, and all other actions 0, and we take any feature map satisfying
Figure 3. The second example MDP.
for all , . Thus, the rewards obtainable are: 0, if the first action is invalid, if one takes at the end of the chain, if one takes instead, and finally if one takes from the start.
On this instance, any algorithm must still begin by sampling doors at random. However, VSO believes that all untried actions lead to directly, so they have value while the chain always has value at most. Thus, VSO never takes the chain, incurring a regret of order as before. Since a chain can be found (on average) in tries, and then any further exploration costs at most , hence it is possible to move from a multiplicative dependence in to an additive one.
This type of exploration problem is fundamental in control problems, and has been documented in the literature of MDPs (see, for instance, the forthcoming work of Boon et al. (2026)). In order to address it, we introduce a planning-based algorithm which can be readily interpreted as an analogue of the information-directed sampling (IDS) algorithm of Russo and Van Roy [30] (see also Hao and Lattimore [15]). Let us first introduce the algorithm, and then we will compare it to both VSO and IDS.
In order to determine which are the best exploratory paths through the masked MDP, let us start by specifying a generic version space , and consider a set of target state-action pairs . Given any (non-stationary, randomised) policy , let be the first time that the trajectory generated by reaches a state-action pair in .
Consider the family of auxiliary MDPs with the same dynamics and rewards as the original MDP, except that actions are limited to except that episodes terminate early if is reached, yielding a fixed reward of . The value functional of this MDP is readily seen to be
Via this auxiliary MDP, it is straightforward to obtain a dynamic programming representation of , or, in fact, of the associated value function , which is given by Proposition 3.1.
Proposition 3.1. The optimal value functions satisfy the following family, indexed by and , of dynamic programming equations
with terminal conditions . Moreover, a pointwise maximiser of the right-hand side of (2) (understood as taking if the -term is dominant) is an optimal policy for the auxiliary MDP .
The dynamic programming (Bellman) equation (2) might appear highly irregular, and it is indeed uncommon in reinforcement learning. It is the standard form for a mixed control and stopping (a.k.a. free-boundary) problem, a well-studied class of stochastic control problems in the mathematical finance literature see, e.g., Pham [28]. Compare also pure stopping problems with a dynamic programming equation, such as prophet problems (Hill and Kertz [16]).
In any case, for finite-dimensional MDPs, resolution of this equation is numerically straightforward, and we can thus use this solution to compute an optimal policy which explores through the shaped reward of (1), which targets at each step . 4
Regret analysis of Algorithm 2, see Proposition 3.2, bounds the regret of -planning in terms of the clearing price for a version space and a target , that is
| Algorithm 2 | -planning |
| 1: | Input: initial version space , initial law . |
| 2: | for do |
| 3: | |
| 4: | Compute . |
| 5: | Play for the episode, collect . |
| 6: | Update , and . |
| 7: | end for |
Table 2.
(recall that is the initial state distribution).
Proposition 3.2. For any , and any , the -planning algorithm (Algorithm 2) satisfies
wherein .
We defer the proof to Section B.3 for brevity. The high-level argument mirrors the proof of Proposition 2.2, and no regret except that we can keep track of the regret of exploration episodes through rather than upper-bounding by e.g. when we have despite exploration.
Now, let us turn to the interpretation of Algorithm 2 as a form of Information-Directed Sampling (IDS). Let us recall the initial set-up of IDS in stochastic bandits and reinforcement learning. Given a filtration of information available before episode , and an unknown parameter with a given prior, IDS rests on the computation of the mutual information between the history of observations in episodes up to , , and a target unknown variable (for us, ). Accounting explicitly for the policy that generates the observations, we define
Here, denotes the probability measure induced by policy and initial distribution , conditional on the observed history . The random variable is any history-valued variable whose restriction up to episode coincides with the observed history. IDS plays the policy
which minimises a (quasi-)regret-to-information ratio.
In MDPs, Hao and Lattimore (2022) introduced an alternate formulation, where the policy is chosen acaccording to the penalised objective
which can be recast as an auxiliary MDP with a suitably shaped reward; see Proposition 4.8 therein.
In this formulation, the structural correspondence between (3) and (1) is immediately apparent. In our case, due to the absence of noise in the dynamics (uncertainty is only in the mask), information theory tools and Bayesian methods wither away and leave behind the likelihood of hitting a masked parameter, for which the best proxy is the entry probability into . With this interpretation in mind, we can rewrite in terms of a ratio, using Lemma 3.3.
Lemma 3.3. For any and such as the clearing price satisfies
Let us briefly show that the ratio introduced in Lemma 3.3 serves as a computable proxy for the “regret-to-information” ratio underlying IDS. The numerator in (4) is an upper bound on the regret of , since
and
which can be computed under . Similarly, the denominator is a computable lower bound on the expected number of resolved dimensions, since and, a.s., . This quantity is used at analysis time in Proposition 3.2.
Application to Transfer Learning
In RL, beyond single tasks, the literature has increasingly aimed to improve computational efficiency by learning multiple instances at once or sequentially. The former has generally been studied in zero-shot RL Touati et al. [36], while the latter falls under transfer learning. Given a learnt source and unlearnt target task, transfer aims to leverage shared structures to improve learning, see Pan and Yang [26] for a broad survey. In RL, the common method is to pre-train representations of environments on large datasets, and then fine-tune them on small-data target tasks Yosinski et al. [38]. There have been a number of proposed representations: learnt policies Fernández and Veloso [13], value functions Taylor and Stone [34], latent state features Parisotto et al. [27], successor features Barreto et al. [8, 9], samples Lazaric et al. [20], or models of the environment Sun et al. [32]. In all cases, the difficulty lies not only in transferring the correct information, but also in how to spread learning cost between source and target.
Applied to masked MDPs, we seek to transfer information about two masks for the same linear MDP. The medium of transfer we propose is to choose the set of VSO and -planning from information obtained about a prior mask in three experimental frameworks. Throughout, the base MDP always has 10 states, 5 actions (one of which aborts the MDP independently of the mask), , and horizon 10. The transfer procedure is repeated for 1000 random MDPs and masks, all figures report averaging on these samples. At each random trial, independently for each pair , we draw three coordinates of uniformly, and draw values for them according to a distribution, setting the rest to 0. The function is 0 everywhere except at two uniformly random states, with respective weights and , for . Meanwhile, the reward parameter is drawn uniformly in and the source mask is drawn uniformly at random on the unit disk in the hyperplane orthogonal to the vector of ones.5 We take this disk as in what follows. Our three experiments differ in the sampling process of the target mask with respect to the source which is sampled uniformly in . All transfer version spaces will be intersected with to bring the parameter back into the hyperplane. Let denote the Minkowski sum: .
Single-step transfer
In our first setting, the source mask is assumed to be known, and the target mask to lie within distance of it. We therefore initialize the target algorithm from the restricted version space
To assess the benefit of this prior information, we compare each algorithm initialized from with the same algorithm run on the same target task from the full version space .
Figure 4. Single-step transfer. Left: expected regret against the number of episodes, , . Right: total regret against , with . Solid: started from ; dashed: no transfer, started from .
Without transfer (dashed lines), the two algorithms are close, -planning performing slightly better as grows. With transfer, both perform much better, and -planning is ahead of VSO at every dimension but the smallest, showing the (on average) lower regret of -planning. Moreover, Figure 5 shows that transfer reduces regret and strengthens the advantage of -planning when the transferred version space is tight (small ). This is consistent with -planning exploiting certified actions to acquire information at lower regret. As increases, fewer actions are certified initially and this advantage fades.
Figure 5. Single-step transfer: total regret against the transfer radius , , log-log axes. Solid: started from ; dashed: no transfer, started from .
Multiple-step transfer
Building on the previous setting, we consider a sequence of tasks with mask parameters , sampled from a uniform source then sequentially uniformly in the ball . We repeat the transfer along the chain by taking the version spaces are as follows: Task 1 starts from , and task from , where is the version space transferred from task . This yields a sequential transfer scheme with a set-valued warm start, in the spirit of procedures that leverage information from a previous optimization problem to facilitate the next one [5]. Each task is thus solved within a region informed by the preceding task, rather than from the full parameter space.
Figure 6 shows that -planning retains its edge over time. Its lead per task stacks across tasks, so that the gap accumulates along the chain (left), and it widens with the dimension (right). The compounding aspect of this procedure shows that -planning can turn a slight advantage in learning in each transfer task into substantial gains in sequential transfer settings.
Figure 6. Multiple-step transfer, tasks of 10 episodes. Left: regret accumulated over the chain, ; dashed vertical lines mark the task switches. Right: total regret over the tasks against .
We present further experiments on partial-learning of transferable information in Appendix C.
Conclusion
In this work, we study masked MDPs with unknown action validity and exact linear score feedback. Our separation result gives conditions under which mask-learning costs enter additively when rewards and transitions are also unknown. Version-space optimism achieves minimax-optimal regret, however, minimax optimality can conceal substantial differences in the cost of acquiring information.
To exploit these differences, we introduced -planning, which plans exploration through an auxiliary planning problem. Its clearing price yields an instance-dependent regret bound and connects the method to information-directed sampling for deterministic feedback. Transfer experiments illustrate how version spaces preserve useful information across changing masks and how planned exploration can produce gains that accumulate across tasks.
AI use statement
In this work, we used generative AI tools for several tasks: review or verification of content, and generation of code or proof drafts from formal arguments. We have not used generative AI tools for theoretical or conceptual development, mathematical claims or proofs (beyond formalisation and edition), while method implementation, translation, dataset cleaning or reformatting, qualitative analysis, and interpretation of results are not applicable to this work. Additionally, we used generative AI tools for literature discovery, editing text, creating figures and code. All AI-assisted work was checked line by line by the authors. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
Acknowledgements
The work of Hélène Halconruy was supported by the French National Research Agency (ANR) under grant ANR-24-CE40-3341 (project DECATTLON) and benefited from Hi! PARIS and State funding managed by the ANR under the France 2030 program (reference ANR-23-IACL-0005).
Appendix
The appendix is organised as follows. Section A collects the notation used throughout the paper. Section B first introduces the quantities used to track the information gathered on the mask parameter, then provides the proofs of our results: Section B.1 establishes the dynamic programming representation for the auxiliary MDP problem (Proposition 3.1), Section B.2 derives the clearing-price characterisation (Lemma 3.3), Section B.3 proves the regret bound of -planning (Proposition 3.2), Section B.4 proves the lower bound for mask learning (Theorem 2.1), and Section B.5 proves the separation result (Theorem 2.3). Section C experiments with transfer from a partially learnt source task. Finally, Section D presents action optimism, an alternative to version-space optimism, and links it to extended value iteration.
Notations
Table 1 lists the notation of the paper, grouped by topic. A subscript denotes the value of a quantity at episode .
| Algorithm 1 | Version-space optimism (VSO) |
| 1: | Input: initial version space , initial law . |
| 2: | for do |
| 3: | Set . |
| 4: | Play for the episode, collect . |
| 5: | , and . |
| 6: | end for |
Table 1.
| Symbol | Meaning |
| MDP and masks | |
| finite-horizon MDP | |
| step; | |
| initial law; initial state | |
| feature map; dimension | |
| reward and transition parameters | |
| mask | |
| masked MDP, reward, transitions | |
| cemetery state | |
| masked feature map | |
| (also ) | true mask parameter |
| mask parameter | |
| Policies, values and regret | |
| policy; Markov policies | |
| state at step ; pair played at step | |
| value of ; optimal value | |
| episode; number of episodes | |
| cumulative pseudo-regret | |
| expectation, probability under | |
| information before episode | |
| Version spaces | |
| prior set of mask parameters | |
| unit ball; ball of centre , radius | |
| observed pairs | |
| features of ; revealed values | |
| version space | |
| pair; its feature | |
| certified valid, certified invalid pairs | |
| uncertified pairs | |
| features of ; dimension of their span | |
| directions known on | |
| potential | |
| informative pairs | |
| Algorithms | |
| target set | |
| first time is reached | |
| auxiliary MDP | |
| value of ; optimal value in | |
| clearing price |
Table 1 (PDF p. 11). Notations used in the paper.
| Symbol | Meaning |
| , , | linear-MDP learner; its regret bound; step bounds |
| , | history; mutual information |
| Transfer experiments | |
| transfer radius | |
| transfer prior | |
| , , | chain of masks; number of tasks; episodes per task |
| Minkowski sum |
Table 1 (continued).
Proofs
Let us first introduce the quantities used to track information about the mask parameter. The subspace
contains the directions whose scalar values are completely determined by the current version space. The potential
counts the remaining unknown directions (when in ) in the span of the initially uncertified (in ) features, while
identifies exactly the pairs that resolve at least one such direction. This construction allows us to relate visits to to decreases in .
These quantities distinguish knowledge of an action’s validity from knowledge of its underlying scalar value: an already certified action may still provide useful scalar information, such as certifying further actions for example if in Figure 2.2.
Throughout, is the knowledge state entering episode , , and the truth.
Proof of Proposition 3.1
The auxiliary MDP is the planning tool underlying -planning. Proposition 3.1 provides the dynamic programming representation needed to compute its optimal policy for a fixed exploration reward.
Proposition 3.1. The optimal value functions satisfy the following family, indexed by and , of dynamic programming equations
with terminal conditions . Moreover, a pointwise maximiser of the right-hand side of (2) (understood as taking if the -term is dominant) is an optimal policy for the auxiliary MDP .
Proposition
Proof of Proposition 3.1. The following recursion in
is exactly the value-iteration scheme for a finite-horizon MDP with known dynamics, in which each state retains its certified actions, together with their rewards and transitions, with the possibility of absorption into the terminal state with reward whenever an action of is present. A policy of this auxiliary MDP has a stopping time at which it takes its first action absorbing action, with if no contact is made. Its expected cumulative reward is the reward collected before , plus on the event , namely
Proof of Lemma 3.3
Here we prove the view of the clearing price that is the basis for the comparison with information-directed sampling.
Lemma
Lemma 3.3. For any and such as the clearing price satisfies
Proof of Lemma 3.3. Let be a set state-action pairs containing , denote the function . For a policy , note its stopping time be at which it takes its first action in . Noting
Let us show that
Taking the minimum over will close the argument. By Proposition 3.1, is a supremum over policys of the affine functions
whose slopes are probabilities, hence lie in . Thus, for all and every route ,
Taking the supremum over routes gives , where . Exchanging and yields , so is 1-Lipschitz, and in particular continuous. This will be used later.
Suppose . By the finite-horizon dynamic-programming recursion, the supremum is attained by some policy such that
Thus
where the last inequality is in the lemmas assumptions. This shows , thus
Taking the infimum over both sides gives us .
Conversely, let . The infimum definition of implies that there exists some route such as
Rearranging and taking the supremum gives us . By continuity of , we also have which gives us the same large inequality the edge case of .
Proof of Proposition 3.2
We prove the main performance guarantee for -planning.
Proposition
Proposition 3.2. For any , and any , the -planning algorithm (Algorithm 2) satisfies
wherein .
Proof of Proposition 3.2. Fix , and let denote the information available before episode , including the choice of . Set
where
and
Let be the first time that reaches , with if no such pair is reached during the episode. The reach probability is
. The fact that we condition on is because we are no longer considering any but the random variable .
By definition of we have
In the proof of Lemma 3.3 we show that is such that :
thus
As in the previous proof, consider the case where we are on a non zero-regret episodes, so its right-hand side is nonnegative.
It remains to relate the probability in (5) to the increment in and taking the expectation will yield the result. Since ,
so on every sample path.
Recall
On the event , let denote the first pair reached in . Thus we can write
Because we have , so . Playing reveals , hence . Since also belongs to this subspace,
whereas . Recall
The intersection in therefore gains at least one dimension. This proves
Taking conditional expectations in (6) and substituting into (5), we obtain
where we used that is nonnegative and -measurable. Finally, summing over episodes and applying the tower property gives
Hence the result.
Remark
Remark B.1. Proposition 3.1 and Lemma 3.3 are proved for arbitrary target sets, the agent being allowed to stop at any pair of , the same proof gives the same bound for any -measurable targets , with prices . These prices are non-increasing in , so yields the smallest ones.
Proof of Theorem 2.1
Here we provide explicit construction of the MDP offering the lower bound on the regret of any learning algorithm.
Theorem
Theorem 2.1. Let be the Euclidean ball. For every and every , there is a masked MDP with on which any algorithm satisfies
Proof of Theorem 2.1. Let , take the initial distribution , and consider the masked MDP of Figure 2: ; from , every action leads deterministically to with reward 1, and in every action loops deterministically on with reward 1.
Take
This is a linear MDP: for instance, one may take
Then
on both and , while
Moreover, every pair is uncertified under , and
so .
For , let
under which is the only valid action in , while every action is valid in . Draw uniformly in . Every episode in which an invalid action is played in incurs regret , since the optimal value is whereas the episode then moves to the cemetery state and collects no reward.
Playing with reveals the score , independently of the value of , and rewards and transitions are deterministic and known. Conditional on the internal randomisation of the algorithm, let denote the sequence of actions selected in along the counterfactual history in which every action tried so far is invalid. Since the feedback following any such failure is always the same, this sequence is independent of .
If , then the realised history coincides with this all-failures history through episode , and episode incurs regret . Since is uniform on and ,
Therefore,
where and .
Since the supremum over dominates the average over , this gives
The second inequality follows from
Proof of Theorem 2.3
Here we prove that that mask learning can be separated from the problem of learning the the underlying MDP, motivating our choice to study the mask learning problem in isolation.
Theorem
Theorem 2.3. Consider a reasonable algorithm that is jointly optimistic in the mask and the linear MDP. Let be the probability, conditional on the information available before episode , that an action is attempted that is invalid under the true mask. If the analysis of holds under the joint interaction6, with
Then
with probability at least , wherein . A high-probability bonus bound for the learner on an unmasked MDP alone does not imply the joint-interaction assumption above.
Proof of Theorem 2.3. Let
Let be the indicator of the event that an invalid action is attempted in episode . If , the attempted action is truly invalid, so its exact observed mask score is strictly negative. Its feature was initially uncertified: it could not have been initially certified valid, and the algorithm does not select certified-invalid pairs. Moreover, its feature is not in , since otherwise its score would already be known to be negative and the pair would be certified invalid. The feature therefore lies in the span of the initially undecided features but adds a new known direction when its scalar score is observed. Thus whenever . The potential is nonincreasing and starts at , which gives, pathwise,
The sequence is a martingale-difference sequence with increments of range length one. By the one-sided Azuma–Hoeffding inequality, with probability at least ,
Intersect this event with the assumed bonus event, also of probability at least . On the intersection, sum the episode-wise decomposition over to obtain the claimed bound. A union bound gives probability at least .
Partially learnt source
In this Section we consider a single-transfer setting in which the source task is only partially learnt before transfer. Starting from , the source algorithm is stopped once of the mask directions have been identified. The resulting version space is then transferred to the target, drawn uniformly in whose version space becomes . This partial transfer preserves the information already learnt on the source even though the entire source mask is not learnt, making it less restrictive than transferring the source solution entirely. As in the single-step setting, we compare this initialization with the same algorithm run on the same target from the full version space .
Figure 7 shows that useful transfer does not require a fully learnt source: additional identified directions progressively reduce target regret for both algorithms. Their similar performance for most values of indicates that much of the improvement comes from the transferred information itself. A slight advantage for -planning appears when all source directions have been identified, presumably arising from the large a proportion of certified actions that it can use to plan.
Figure 7. Partially learnt source: total regret against the number of source directions learnt before transfer, . Solid: started from ; dashed: no transfer, started from .
Action optimism - Extended Value Iteration
Version-space optimism requires finding a single consistent mask under which the optimal value is maximal. Although planning for a fixed mask is straightforward, searching over compatible masks can be costly. This motivates a relaxation that applies optimism locally, in the spirit of extended value iteration: retain an action whenever some parameter in the current version space makes it valid. Once these action sets are constructed, the policy is obtained by a single backward value-iteration pass. This relaxation avoids a separate planning problem for each compatible mask.
The policy played is the optimal policy of the MDP with the following optimistic action set:
Note that there is no reason why one mask structurally admits them all, as different actions may be justified by different parameters, so the algorithm may plan with a model that does not exist in the version space. The relaxation is also strictly looser, noting we have
References
- [1]Joshua Achiam, David Held, Aviv Tamar, and Pieter Abbeel. Constrained policy optimization. In Proceedings of the 34th International Conference on Machine Learning, pages 22–32. PMLR, 2017.arxiv.org/abs/1705.10528
- [2]Eitan Altman. Constrained Markov Decision Processes. Chapman and Hall/CRC, 1999.
- [3]Sanae Amani, Christos Thrampoulidis, and Lin Yang. Safe Reinforcement Learning with Linear Function Approximation. In Proceedings of the 38th International Conference on Machine Learning, pages 243–253. PMLR, July 2021.arxiv.org/abs/2106.06239
- [5]Jordan Ash and Ryan P Adams. On warm-starting neural network training. Advances in neural information processing systems, 33:3884–3894, 2020.arxiv.org/abs/1910.08475
- [6]Peter Auer and Ronald Ortner. Logarithmic online regret bounds for undiscounted reinforcement learning. Advances in neural information processing systems, 19, 2006.
- [7]Mohammad Gheshlaghi Azar, Ian Osband, and Rémi Munos. Minimax regret bounds for reinforcement learning. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, pages 263–272. PMLR, 06–11 Aug 2017.arxiv.org/abs/1703.05449
- [8]André Barreto, Will Dabney, Rémi Munos, Jonathan J Hunt, Tom Schaul, Hado Van Hasselt, and David Silver. Successor features for transfer in reinforcement learning. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1606.05312
- [9]Andre Barreto, Diana Borsa, John Quan, Tom Schaul, David Silver, Matteo Hessel, Daniel Mankowitz, Augustin Zidek, and Remi Munos. Transfer in deep reinforcement learning using successor features and generalised policy improvement. In International conference on machine learning, pages 501–510. PMLR, 2018.arxiv.org/abs/1901.10964
- [10]Richard Bellman. Dynamic Programming. Princeton University Press, 1957.pubmed.ncbi.nlm.nih.gov/17730601
- [12]Qing Cai et al. Deep reinforcement learning for sponsored search real-time bidding. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2017.
- [13]Fernando Fernández and Manuela Veloso. Probabilistic policy reuse in a reinforcement learning agent. In Proceedings of the fifth international joint conference on Autonomous agents and multiagent systems, pages 720–727, 2006.DOI
- [14]Jian-Jia Gao et al. Machine learning applications for data center optimization. Google Technical Report, 2014.
- [15]Botao Hao and Tor Lattimore. Regret bounds for information-directed reinforcement learning. In Advances in Neural Information Processing Systems, volume 35, 2022.arxiv.org/abs/2206.04640
- [16]Theodore P Hill and Robert P Kertz. A survey of prophet inequalities in optimal stopping theory. Contemporary Mathematics, 125(1):191, 1992.DOI
- [17]Shengyi Huang and Santiago Ontañon. A closer look at invalid action masking in policy gradient algorithms. arXiv preprint arXiv:2006.14171, 2020.DOI
- [18]Thomas Jaksch, Ronald Ortner, and Peter Auer. Near-optimal regret bounds for reinforcement learning. Journal of Machine Learning Research, 11(51):1563–1600, 2010.
- [19]Chi Jin, Zhuoran Yang, Zhaoran Wang, and Michael I. Jordan. Provably efficient reinforcement learning with linear function approximation. In Conference on Learning Theory, pages 2137–2143, 2020.arxiv.org/abs/1907.05388
- [20]Alessandro Lazaric, Marcello Restelli, and Andrea Bonarini. Transfer of samples in batch reinforce- ment learning. In Proceedings of the 25th international conference on Machine learning, pages 544–551, 2008.
- [21]Jiwei Li et al. Deep reinforcement learning for dialogue generation. arXiv preprint arXiv:1606.01541, 2016.arxiv.org/abs/1606.01541
- [22]Nick Littlestone. Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm. Machine Learning, 2(4):285–318, 1988.
- [24]Rémi Munos. Optimistic optimization of a deterministic function without the knowledge of its smoothness. Advances in Neural Information Processing Systems, 24, 2011.
- [25]Andrew Y Ng, Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In Proceedings of the Sixteenth International Conference on Machine Learning, pages 278–287, 1999.
- [26]Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2009.DOI
- [27]Emilio Parisotto, Jimmy Lei Ba, and Ruslan Salakhutdinov. Actor-mimic: Deep multitask and transfer reinforcement learning. arXiv preprint arXiv:1511.06342, 2015.arxiv.org/abs/1511.06342
- [28]Huyền Pham. Continuous-time Stochastic Control and Optimization with Financial Applications, volume 61 of Stochastic Modelling and Applied Probability. Springer, Berlin, 2009.DOI
- [29]Martin L. Puterman. Markov Decision Processes: Discrete Stochastic Dynamic Programming. Wiley, 1994.
- [30]Daniel Russo and Benjamin Van Roy. Learning to optimize via information-directed sampling. In Advances in Neural Information Processing Systems, volume 27, 2014.arxiv.org/abs/1403.5556
- [31]Shai Shalev-Shwartz, Shaked Shammah, and Amnon Shashua. Safe, multi-agent, reinforcement learning for autonomous driving. In arXiv preprint arXiv:1610.03295, 2016.
- [32]Yuewen Sun, Kun Zhang, and Changyin Sun. Model-based transfer reinforcement learning based on graphical model representations. IEEE Transactions on Neural Networks and Learning Systems, 34(2):1035–1048, 2021.DOI
- [33]Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, 2 edition, 2018.
- [34]Matthew E Taylor and Peter Stone. Cross-domain transfer for reinforcement learning. In Proceedings of the 24th international conference on Machine learning, pages 879–886, 2007.DOI
- [35]Gerald Tesauro. Temporal difference learning and TD-Gammon. Communications of the ACM, 38(3):58–68, 1995.DOI
- [36]Ahmed Touati, Jérémy Rapin, and Yann Ollivier. Does zero-shot reinforcement learning exist? arXiv preprint arXiv:2209.14935, 2022.arxiv.org/abs/2209.14935
- [37]Honghao Wei, Xin Liu, and Lei Ying. Safe Reinforcement Learning with Instantaneous Constraints: The Role of Aggressive Exploration, December 2023. arXiv:2312.14470.arxiv.org/abs/2312.14470
- [38]Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? Advances in neural information processing systems, 27, 2014.arxiv.org/abs/1411.1792






