arXiv:2610.28360stat.MLOct 2026

Manuscript Offprint

arXiv:2610.28360

Confessions of a Masked MDP

Sebastian Reboul, Lorenzo Croissant, Hélène Halconruy

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 INTRODUCTION

Reinforcement learning, the interactive learning of control systems and games (Tesauro, 1995; Sutton and Barto, 2018), and in particular its formalisation using Markov Decision Processes (MDPs) (Puterman, 1994), has been an undeniably successful field of research in the last thirty years. Applications span far and wide, from datacenter cooling (Gao et al., 2014), to autonomous driving (Shalev-Shwartz et al., 2016), through advertising (Cai et al., 2017) and conversational AI training (Li et al., 2016).

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 (Bellman, 1957), this assumption is a convenience and varying actions can be accommodated at the cost of some burdensome notation (see, e.g., Puterman, 1994, Ch. 6).

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 (Huang and Ontanon, 2020).

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. (1999), 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 (Altman, 1999) and more recent (Achiam et al., 2017; Amani et al., 2021) 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. (2023), 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 (Angluin, 1988; Littlestone, 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 Section 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 Section 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 (2014), also identifying an auxiliary MDP formulation, à la Hao and Lattimore (2022). Finally, in Section 4, we discuss an example application to transfer learning of masks in MDPs, motivated by an industrial application.

References (29)