EXPOSURE: Explaining Sources of Uncertainty in Reinforcement Learning
Authors: Kiana Farhadyar, Yannick Vogt, Philipp Laur, Ayça Çelik, Iman Nematollahi, Gabriel Kalweit, Maria Kalweit
Organizations: Department of Computer Science, University of Freiburg, Freiburg, Germany · IMBIT//BrainLinks-BrainTools, Freiburg, Germany · Collaborative Research Institute Intelligent Oncology, Freiburg, Germany
Shapley values in reinforcement learning are used to explain which observation features drive an agent's behavior and expected return, but not its certainty. Explaining certainty requires understanding how observation features influence different sources of return uncertainty, and Shapley values need the agent's prediction for every subset of visible features. We propose EXPOSURE, which uses one mask-aware belief network for both action selection and Shapley explanations. It explains the variance of the return, split into an observational part due to missing features and an inherent part due to the environment's own randomness, and the entropy of its belief over the masked features. In tic-tac-toe and Minesweeper, where exact Shapley values are computable, EXPOSURE gives more accurate explanations of expected return and its uncertainty, while uniquely explaining belief uncertainty.
Figures & tables
Figure 1: Overview of EXPOSURE. An encoder maps a board with any subset of features masked to a latent belief, trained to match the belief from the full board. Blue arrows trace the masked board’s path, while the agent acts on the belief from the full board. From a belief, a Q-head predicts the mean and variance of the return, and a decoder completes the masked features. The maps show each feature’s Shapley value for the four explanation targets on the input board.
Figure 2: Tic-tac-toe, random opponent. (a–c) UMAP of the belief mean E[z∣oN] on all boards, colored by (a) exact result, (b) estimated maxaQ and (c) who holds the key center cell. (d) Exact and model Shapley values on one board (action in pink has no Shapley value). Headers give v^(∅)→v^(N) , and the model’s Shapley values sum to v^(∅)−v^(N) . Blue cells raise certainty, red ones lower it. Against the random opponent, the agent expects a win. Cells matter by the lines they lie on (center on four, a corner on three, an edge on two). In vobs , free corners and the winning edge raise certainty, while the bottom O, an edge cell, lowers it, as it makes a draw likelier. In vinh , the top X, a weak edge move by the opponent, raises certainty most. In H , each revealed cell narrows the belief.
wins (%)
ϕQ : ρ
ϕobs : ρ
ϕinh : ρ
ϕH : ρ
Tic-tac-toe random
EXPOSURE
93.5±1.3
0.67±0.01
0.64±0.05
0.69±0.01
0.76±0.00
MA-DQN
94.7±0.5
0.66±0.01
0.43±0.01
0.57±0.01
–
DQN + surr.
92.5±1.2
0.63±0.01
0.53±0.04
0.49±0.02
–
Tic-tac-toe perturbed minimax
EXPOSURE
8.8±0.7
0.67±0.01
0.42±0.02
0.85±0.00
0.56±0.01
MA-DQN
9.5±0.3
0.42±0.01
0.23±0.01
0.65±0.03
–
DQN + surr.
8.4±1.2
0.49±0.02
0.18±0.04
0.59±0.03
–
Table 1: Mean per board Spearman correlation ρ of each method’s Shapley values and the exact ones, then mean ± SD over 3 seeds. Bold marks the largest mean, EXPOSURE’s for every explanation, and only EXPOSURE gives H . Wins are greedy-policy win rates, and the optimal agent reaches 96.4 , 9.8 and 87.9% .
Uncertainty estimation provides promising capabilities for reinforcement learning (RL) agents. Notably, estimating uncertainty can reduce the training time and enable agents to obtain greater rewards over time by exploiting information related to whether an action would facilitate exploration of portions of an environment that are well-known versus those that are relatively unknown. In this work, we propose a novel formulation of the experience replay buffer commonly used in RL that we call uncertainty-driven replay memory (UDRM), which entails an update scheme for internally stored memories based on uncertainty estimates obtained by an RL model during training. In contrast to existing forms of RL, which typically use temporal difference error or the distribution of transitions to update the replay memory buffer and train RL controllers, our scheme biases the memory buffer to store more uncertain transitions that will improve an RL agent's generalization throughout training. Experimental results demonstrate that our proposed uncertainty-aware replay buffer enables an RL agent to obtain higher rewards during training compared to other existing uncertainty-aware RL frameworks.
Sheeraja Rajakrishnan, Alexander G. Ororbia, Travis Desell +1
Recently, the Shapley value has been widely applied in machine learning for feature importance analysis and model explainability. The multilinear extension of games proposed by Owen (1972) expresses the Shapley value as the integral of partial derivatives along the main diagonal of the cube. Direct evaluation of this integral requires exponential-time computation of the partial derivatives. To improve computational efficiency, we propose a sampling-based estimation strategy within Owen's multilinear extension framework, combining stratified sampling with coalition leverage scores. Experimental results demonstrate that the proposed method significantly reduces computational costs while maintaining explanation accuracy.
Jing Liu, Elena Parilina, Chi Zhao
Saint Petersburg State University, 7/9 Universitetskaya nab., Saint Petersburg, 199034, Russia
A major challenge of Reinforcement Learning is that agents often learn undesired behaviors that seem to defy the reward structure they were given. Explainable Reinforcement Learning (XRL) methods can answer queries such as "explain this specific action", "explain this specific trajectory", and "explain the entire policy". However, XRL lacks a formal definition for behavior as a pattern of actions across many episodes. We provide such a definition, and use it to enable a new query: "Explain this behavior". We present Behavior-Explainable Reinforcement Learning (BXRL), a new problem formulation that treats behaviors as first-class objects. BXRL defines a behavior measure as any function m:Π→R, allowing users to precisely express the pattern of actions that they find interesting and measure how strongly the policy exhibits it. We define contrastive behaviors that reduce the question "why does the agent prefer a to a′?" to "why is m(π) high?" which can be explored with differentiation. We do not implement an explainability method; we instead analyze three existing methods and propose how they could be adapted to explain behavior. We present a port of the HighwayEnv driving environment to JAX, which provides an interface for defining, measuring, and differentiating behaviors with respect to the model parameters.
Ram Rachum, Yotam Amitai, Yonatan Nakar +2
University of California, Berkeley · Tufts University · Independent Researcher +1