Title: MIMEx: Intrinsic Rewards from Masked Input Modeling
Venue: NeurIPS 2023
Accepted: yes
Keywords: reinforcement learning

exploration

intrinsic reward

intrinsic motivation

masked autoencoder
Abstract: Exploring in environments with high-dimensional observations is hard. One promising approach for exploration is to use intrinsic rewards, which often boils down to estimating "novelty" of states, transitions, or trajectories with deep networks. Prior works have shown that conditional prediction objectives such as masked autoencoding can be seen as stochastic estimation of pseudo-likelihood. We show how this perspective naturally leads to a unified view on existing intrinsic reward approaches: they are special cases of conditional prediction, where the estimation of novelty can be seen as pseudo-likelihood estimation with different mask distributions. From this view, we propose a general framework for deriving intrinsic rewards -- Masked Input Modeling for Exploration (MIMEx) -- where the mask distribution can be flexibly tuned to control the difficulty of the underlying conditional prediction task. We demonstrate that MIMEx can achieve superior results when compared against competitive baselines on a suite of challenging sparse-reward visuomotor tasks.

MIMEx:

Abstract

Exploring in environments with high-dimensional observations is hard. One promising approach for exploration is to use intrinsic rewards, which often boils down to estimating 'novelty' of states, transitions, or trajectories with deep networks. Prior works have shown that conditional prediction objectives such as masked autoencoding can be seen as stochastic estimation of pseudo-likelihood. We show how this perspective naturally leads to a unified view on existing intrinsic reward approaches: they are special cases of conditional prediction, where the estimation of novelty can be seen as pseudo-likelihood estimation with different mask distributions. From this view, we propose a general framework for deriving intrinsic rewards M asked I nput M odeling for Ex ploration (MIMEx) - where the mask distribution can be flexibly tuned to control the difficulty of the underlying conditional prediction task. We demonstrate that MIMEx can achieve superior results when compared against competitive baselines on a suite of challenging sparse-reward visuomotor tasks.

1 Introduction

In supervised learning (SL), it is often assumed that data is given, i.e. the data collection process has been handled by humans. In reinforcement learning (RL), however, agents need to collect their own data and update their policy based on the collected data. The problem of how data is collected is known as the exploration problem. Agents face the exploration-exploitation trade-off to balance between maximizing its cumulative rewards (exploitation) and improving its knowledge of the environment by collecting new data (exploration). Exploration is therefore of central importance in the study of RL; it is the only way through which an agent can learn decision-making from scratch.

Simple exploration heuristics like using ϵ -greedy policy [22, 23] and adding Gaussian action noise [21, 30, 31] are often too inefficient to solve challenging tasks with sparse reward. Meanwhile, designing dense reward functions is intractable to scale to many tasks across environments, due to the amount of domain knowledge and engineering effort needed. Training agents with intrinsic rewards, i.e. providing exploration bonuses that agents jointly optimize with extrinsic rewards, is a promising way to inject bias into exploration. This exploration bonus is often derived from a notion of 'novelty', such that agent receives higher bonus in more 'novel' states. In classical count-based methods [35], for example, the exploration bonus is derived from state visitation counts directly. To scale to high dimensional states, recent works often derive the exploration bonus from either (1) pseudo-counts [4, 24, 39] (i.e. approximate state visitation counts) or (2) prediction error from a proxy model. In the latter case, the proxy model is responsible for representing the relative novelty of states, for example with respect to learned forward models [25, 34] or randomly initialized networks [8].

While count-based (including pseudo-counts) methods and prediction-error-based methods are typically viewed as distinct approaches for intrinsic reward [1, 2, 20], these methods often boil down to similar formulations in practice. That is, they rely on the same underlying idea of estimating

novelty by approximating likelihood, while different in the quantities they model: states, transitions, trajectories, etc. Recent works have demonstrated how conditional prediction objectives such as masked language modeling are connected to pseudo-likelihood [29, 43], one way of approximating likelihood. Under this view, approaches that estimate novelty can be viewed as modeling different conditional prediction problems, or masked prediction problems with different mask distributions.

From this perspective, we propose M asked I nput M odeling for Ex ploration (MIMEx), a generalized framework for intrinsic reward methods. On a high level, MIMEx allows for flexible trajectory-level exploration via generalized conditional prediction. To evaluate on hard-exploration problems with high-dimensional observations and dynamics, we develop a benchmark suite of eight challenging robotic manipulation tasks that involve realistic visuomotor control with sparse rewards. We show that MIMEx achieves superior results when compared with common baselines, and investigate why it works better than other approaches through extensive ablation studies.

2 Preliminaries

2.1 From RL Exploration to Intrinsic Reward

Among approaches for RL exploration, one of the most successful is to jointly optimize an intrinsic reward in addition to the environment reward (a.k.a. the extrinsic reward). At each time step, the agent is trained with reward r t = r e t + β · r i t , where r e t is the environment reward, r i t is the intrinsic reward, and β is a parameter to control the scale of exploration bonus. The intrinsic reward approach is flexible and general, as it simply requires modifying the reward function. This also means that intrinsic reward function can be learned and computed in a manner compartmentalized from the policy, allowing one to leverage models and objectives that scale differently from policy optimization.

The key principle underlying intrinsic reward approaches is optimism in the face of uncertainty [7], which has been empirically observed to be effective for encouraging active exploration [37]. In other words, the intrinsic reward is supposed to encourage agents to visit states that are less frequently visited, or pursue actions that lead to maximum reduction in uncertainty about the dynamics; note that the latter is equivalent to visiting transitions that are less frequently visited.

2.2 Intrinsic Reward and Conditional Prediction

Works in intrinsic reward literature tend to draw on different concepts such as novelty, surprise, or curiosity, but their practical formulation often follows the same principle: to encourage the agent to visit novel states or state transitions, it is desirable for r i t to be higher in less frequently visited states or state transitions than in frequently visited ones. Deriving intrinsic reward therefore requires knowledge on state density or state transition density.

Recent intrinsic reward methods can be categorized into either pseudo-counts-based or predictionerror-based [2]. In pseudo-counts-based methods [4, 8, 24], state density is modeled directly; in prediction-error-based methods [18, 25], a forward model is learned and prediction error is used as a proxy of state transition density. Under this view, we can unify existing intrinsic reward methods into one framework, where only the underlying conditional prediction problem differs.

2.3 Pseudo-Likelihood from Masked Prediction Error

Prior works [29, 43] have shown how the masked autoencoding objective in models like BERT [9] can be viewed as stochastic maximum pseudo-likelihood estimation on a training set of sequences of random variables X = ( x 1 , ..., x T ) . Under this objective, the model approximates the underlying joint distribution among variables, by modeling conditional distributions x t | X \ t resulting from masking at position t . Despite being an approximation, the pseudo-likelihood has been shown to be a useful proxy, e.g. as a scoring function for sampling from language model [29].

More concretely, [43] * define pseudo log-likelihood as:

where D is a training set. To more efficiently optimize for the conditional probability of each variable in a sequence given all other variables, they propose to stochastically estimate under a masking

distribution ˜ t k ∼ U ( { 1 , . . . , | X |} )

While this is defined for categorical variables, for continuous variables we can simply consider reconstruction error on masked prediction as regressing to a unit Normal distribution of variables such as observations, features, and trajectories. From this perspective, we can view different cases of conditional prediction as different forms of maximum pseudo-likelihood estimation and implement them as masked autoencoders.

3 Sequence-Level Masked Autoencoders

The observations outlined in Section 2, in particular the link between masked prediction and pseudolikelihood, allow us to draw connections between different classes of intrinsic reward methods. Prediction-error-based methods consider the problem of conditionally predicting s t +1 from ( s t , a t ) by masking s t +1 from ( s t +1 , s t , a t ) tuples, which can be viewed as approximating the pseudolikelihood of the next state under a Gaussian prior. Pseudo-counts-based methods approximate the likelihood of s t , which can be achieved by marginalizing the prediction error across maskings of s t . As summarized in Table 1, we can view these approaches as estimating pseudo-likelihood via masked prediction with different mask distributions.

Inspired by this perspective, we propose M asked I nput M odeling for Ex ploration (MIMEx), a generalized framework for intrinsic reward methods. Simply put, MIMEx derives intrinsic reward based on masked prediction on input sequences with arbitrary length. Such a framework naturally lends itself to greater control over the difficulty of the underlying conditional prediction problem; by controlling how much information we mask, we can flexibly control the signal-to-noise ratio of the prediction problem and thus control the variance of the prediction error. Moreover, it provides the setup to fill a space in literature: trajectory-level exploration. Existing approaches framed as conditional prediction often consider one-step future prediction problems, which can saturate early as a useful exploratory signal [8, 16, 25]. While longer time-horizon prediction problems capture more complex behavior, they can suffer from high variance [27]. MIMEx allows for tempering the difficulty of prediction by varying input sequence length; by setting up conditional prediction problems on trajectories, we can obtain intrinsic rewards that consider transition dynamics across longer time horizons and extract richer exploration signals. We can also easily tune the difficulty of the prediction problem, by varying both the input length and the amount of conditioning context given a fixed input length.

The fact that MIMEx sets up a masked prediction learning problem comes with several additional benefits. First, masked autoencoding relies on less domain knowledge compared to methods like contrastive learning, and has proven success across many different input modalities [9, 10, 17, 32, 43]. Moreover, we can leverage standard architectures such as those used in masked language modeling [9] and masked image modeling [17], for which the scalability and stability have been tested. MIMEx can be added to any standard RL algorithm as a programmatically simple module that encourages exploration.

We describe the implementation details of MIMEx in the remainder of this section. An overview of our framework is shown in Figure 1.

3.1 Sequence Autoencoders for Exploration

Given a sequence of trajectory information stored in the form of tuples ( o k , a k , r e k ) for k = 1 , ..., t , we now describe how to derive intrinsic reward r i t for time step t .

Zt-2

Zt-2

MIMEx（T= 3)

t-2

Q

Zt-

[Zt-]

t-1

Zt

t

Encoder

Z

MIMEx

Zt

Encode

Zt+1

t+1

Zt+1

[Zt+1

Mask

&

Decode

t+1

2>

[Zt+2)

0t+2

Zt+2

Zt+2

t+2

t+2

t+2

Input sequence generation We define a parameter T that represents the length of sequence we use to derive the exploration bonus. From the selected time step t , we extract the sequence of inputs up to T steps before t , including time step t . When t > = T , we take sequence ( o t -T +1 , ..., o t -1 , o t ) ; when t < T , we pad observations at time steps before the initial step with zeros such that the input sequence length is always T . We use a Transformer-based encoder to convert each input observation o k to a latent embedding z k , obtaining an input sequence ( z t -T +1 , ..., z t ) .

Online masked prediction Given the generated input sequences, we train a masked autoencoder model online using the sequences as prediction target. Specifically, we treat observation embedding z k at each time step k as a discrete token, randomly mask out X % of the tokens in each sequence using a learned mask token, and pass the masked sequence into a Transformer-based decoder to predict the reconstructed sequence. The random mask is generated with a uniform distribution. The more 'novel' an input sequence is, the higher its masked prediction error is expected to be. MIMEx is compatible with a wide range of high-dimensional inputs across different modalities, thanks to the scalability of its architecture and the stability of its domain-agnostic objective.

3.2 Masked Prediction Loss as Intrinsic Reward

We use the scalar prediction loss generated during the online masked prediction as an intrinsic reward, i.e. r i t = L t . The intrinsic reward is used in the same way as described in Section 2, i.e. r t = r e t + β · r i t where β is a parameter to control the scale of exploration bonus. Intuitively, this encourages the agent to explore trajectory sequences that have been less frequently encountered.

3.3 Backbone RL Algorithm

Our exploration framework is agnostic to the backbone RL algorithm since it only requires taking a trajectory sequence as input. In Section 5, we empirically demonstrate how MIMEx can work with either on-policy or off-policy RL algorithms, using PPO [31] and DDPG [21, 33] as examples.

4 PixMC-Sparse Benchmark

4.1 Motivation

Exploration can be challenging due to sparsity of rewards, or high-dimensionality of observation and action spaces paired with complex dynamics. Existing benchmarks for exploration algorithms span a spectrum between two ways of controlling the sparsity of reward: (1) long task horizon; (2) high-dimensional observations (e.g. pixels). Either side of the spectrum can contribute to increased sample complexity, along the time dimension or the space dimension. While existing works on deep RL exploration often evaluate on popular benchmarks such as the Arcade Learning Environment [6] and DeepMind Control Suite [40], these benchmarks often involve densely engineered rewards or deep exploration in environments with simple dynamics (e.g. Montezuma's Revenge) [3, 12, 38].

Identifying a missing space of exploration benchmarks that involve higher-dimensional observation inputs and more complex dynamics, we construct a challenging task suite named PixMC-Sparse (Pixel Motor Control with Sparse Reward). The suite includes eight continuous control tasks, with realistic dynamics and egocentric camera views of a robot as observation. PixMC-Sparse is built on PixMC [44] as an extension to the original suite.

4.2 From PixMC to PixMC-Sparse

The original PixMC task suite does not necessarily pose challenging exploration problems due to densely shaped rewards (see Appendix A.2 for details of the original PixMC reward functions). Therefore, we modified the tasks to reflect more realistic hard-exploration challenges. To summarize, we sparsify the reward signals by removing certain continuous distance-based rewards from each original task. We show details of how each task's reward function is modified in Table 2, and include additional annotated visualization in Appendix A.3.

4.3 Evaluation Protocol

The difficulty level of each hard-exploration task presented in PixMC-Sparse can be tuned by (1) increasing the environment's time or space resolution, or (2) minimizing reward shaping. Either approach reduces the extent to which the benchmark is saturated, and the latter is itself a practical and realistic motivation for studying exploration in RL. In Table 3, we show a sample curriculum to minimize reward shaping for Cabinet , Pick , and Move tasks, starting from the fully dense reward functions (included in Appendix A.2).

In Figure 2, we present a case study of evaluating exploration algorithms on increasingly sparse KukaPick tasks. Task success is defined by agent picking up an object on table using a Kuka arm. †

KukaPick

08

Success Rate (%)

60

40

20

0

0

1

2

3

4

5

6

Steps (M)

1e7

dense

sparse

sparse+MIMEx

sparser+MIMEx

5 Experiments

In this section, we show that MIMEx achieves superior results and study why it works better than other approaches. We start by evaluating MIMEx against three baseline methods, on eight

Figure 2: Evaluating exploration algorithms with increasingly sparse reward. We show an example on PixMC-Sparse's KukaPick task. When using fully dense reward, the base RL agent with random action noise exploration can already achieve success rates of over 80% consistently ( dense ). With one dense reward term removed, the base RL agent completely fails to solve the task ( sparse ). With the addition of our exploration algorithm, MIMEx, some success is observed and the success rates again start to provide useful information for evaluation ( sparse+MIMEx ). With more dense reward terms removed, performance of MIMEx agent is further away from saturation ( sparser+MIMEx ). We can continue to develop and evaluate more powerful exploration algorithms by using increasingly sparse reward.

tasks from PixMC-Sparse (Section 4) and six tasks from DeepMind Control suite [40]. Then, we present ablation studies of MIMEx on PixMC-Sparse to understand specific factors that contribute to MIMEx's performance and obtain insights for its general usage. We report all results with 95% confidence intervals and over 7 random seeds.

5.1 Implementation Details

We describe details of MIMEx implementation, independent of the base RL algorithms. On a high level, implementation of the MIMEx model is similar to that of MAE [17]. The model consists of an encode & mask module and a decode module.

Given an input sequence x with shape ( B,L,D ) where B is the batch size, L is the sequence length, and D is the feature dimension, the encode & mask module first projects the last dimension of x to the encoder embedding size through a fully-connected layer; the corresponding positional embeddings are then added to the time dimension (length L ) of x . We denote this intermediate latent vector as z . We apply random masking with uniform distribution to the latent vector z , following the same protocol used in MAE [17]. The masked latent vector z m is then passed through a Transformer-based encoder.

The decode module first inserts mask tokens to all masked positions of z m , then passes z m to a Transformer-based decoder. Finally, another fully-connected layer projects the last dimension of z m back to the input feature dimension D . We calculate the reconstruction loss on only the masked positions, and use the loss as intrinsic reward.

For all environments, we use a batch size of 512, the Adam [19] optimizer, and a MIMEx learning rate of 0.0001. We use a mask ratio of 70% for all tasks; a β (exploration weight) of 0.05 for Reach tasks and 0.05 for Cabinet, Pick, Move tasks. For the encoder, we use an embedding dimension of 128, with 4 Transformer blocks and 4 heads; for the decoder, we use an embedding dimension of 64, with 1 Transformer block and 2 heads. We run each experiment on an NVIDIA A100 GPU.

5.2 Comparison with Baselines

We compare MIMEx to three RL exploration baselines: random action noise ( noise ), intrinsic curioisty module [25] ( icm ) and random network distillation [8] ( rnd ). We choose these baselines for their generality in formulation and robustness in performance. We show that MIMEx can be flexibly incorporated into both on-policy algorithms and off-policy algorithms: for tasks in PixMC-Sparse, we implement MVP [44] with PPO [31] (an on-policy algorithm) being the core RL algorithm; for tasks in DeepMind Control suite (DMC), we implement DrQv2 [45] with DDPG [33] (an off-policy algorithm) being the core RL algorithm. Note that MVP and DrQv2 are the respective state-of-the-art algorithm on each environment. Results are shown in Figure 3.

For PixMC-Sparse, we find that MIMEx outperforms all baselines on all tasks, in terms of both final task success rate and sample efficiency. Importantly, the performance gap between MIMEx and baseline methods becomes more pronounced on the harder Pick and Move tasks, where exploration also becomes more challenging.

For DMC, we find that MIMEx achieves higher average performance than all baselines on 2 out of 6 tasks ( cartpole swingup sparse , quadruped walk ), while having similar average performance as the noise and rnd baselines on the other 4 tasks ( acrobot swingup , finger turn easy , quadruped run , finger turn hard ). We also observe that MIMEx exhibits lower variance compared to similarly performant baselines on all tasks. As discussed in Section 4, we find it difficult to benchmark RL exploration methods on DMC even when using high-dimensional pixel inputs, and recommend using harder exploration task suite such as PixMC-Sparse to better evaluate state-of-the-art exploration algorithms.

5.3 How does MIMEx improve performance?

We have conducted extensive ablation studies to make relevant design choices and understand why MIMEx works better than other approaches. For brevity, here we only present factors that result in significant improvement in task performance. Due to computational constraints, we only show results on 2 tasks from PixMC-Sparse, an easier KukaReach task and a harder KukaPick task. We summarize our findings below.

Trajectory-level exploration To our knowledge, MIMEx is the first framework that successfully incorporates sequence-level intrinsic reward to solve hard exploration tasks. Intuitively, doing so

FrankaReach

KukaReach

100

80

Success Rate (%)

80

Success Rate (%)

8

60

40

40

20

20

0

0

0

1

2

3

4

5

6

7

8

0.0

0.2

0.4

0.6

0.8

1.0

12

1.4

1.6

Steps (M)

1e6

Steps (M)

le7

KukaCabinet

FrankaCabinet

100

100

Success Rate (%)

80

Success Rate (%)

08

60

60

40

40

20

20

0

0

0.0

0.5

10

15

2.0

2.5

3.0

0.0

0.5

10

1.5

2.0

Steps (M)

le7

Steps (M)

le7

KukaPick

FrankaPick

100

100

Success Rate (%)

80

Success Rate (%)

80

60

60

40

40

20

20

0

0

0

2

3

4

5

6

0

1

2

3

4

5

6

Steps (M)

le7

Steps (M)

le7

KukaMove

FrankaMove

100

60

50

Success Rate (%)

80

Success Rate (%)

60

OE

40

20

20

10

0

0

0

1

2

3

4

5

6

0

1

2

3

4

5

6

Steps (M)

le7

Steps (M)

le7

ours

noise

icm

md

acrobot_swingup

finger_tun_easy

quadruped_run

500

300

1000

Episode Reward

Episode Reward

800

Episode Reward

400

200

600

300

100

400

200

200

100

0

00

0.2

0.4

0.6

0.8

10

12

14

0.0

0.2

0.4

8090

10

1.2

1.4

00

0.20.4

0.6

1.0

12

1.4

Steps (M)

le6

Steps (M)

le6

Steps (M)

1e6

cartpole_swingup_sparse

finger_turn_hard

quadruped_walk

1000

1000

800

Episode Reward

800

600

Episode Reward

800

Episode Reward

009

600

400

400

400

200

200

00

0

0.0

0.2

0.4

0.6

0.8

1.0

12

1.4

00

0.2

0.4

0.6

0.8

10

12

1.4

00

0.2

0.4

0.6

0.8

10

12

1.4

Steps (M)

le6

Steps (M)

le6

Steps (M)

le6

icm

md

ours noise

encourages agent to search for new trajectories rather than one-step transitions, which may lead to more complex exploration behavior. The empirical results from varying the exploration sequence length used in MIMEx, as shown in Figure 4, suggest that using sequences with length greater than 2 (i.e. transitions that are longer than one step) indeed improves exploration efficiency.

Variance reduction High variance is a classical curse to RL algorithms [36]. In deriving intrinsic reward using MIMEx, a source of high variance is the random masking step during the maskautoencode process. We hypothesize that reducing variance in conditional prediction can lead to large performance gain, and empirically test the effect of doing so. In particular, we find that a simple variance reduction technique - applying random mask multiple times and taking the average prediction error over different maskings - can greatly improve agent performance. We show our results in Figure 4.

Model scalability Recent advances in generative models have showcased the importance of scale, which we hypothesize also applies to the case of trajectory modeling for deriving intrinsic reward. We show our empirical results that verified this hypothesis in Figure 4. Performance gains are achieved by simply increasing the size of MIMEx's base model (specially, doubling the size of Transformer-based decoder), especially in the harder KukaPick environment.

5.4 How does varying mask distribution affect performance of MIMEx?

As discussed in Section 3, one characteristic of MIMEx is that it enables extremely flexible control over the difficulty of conditional prediction for deriving intrinsic rewards. In theory, this flexibility allows MIMEx to encompass the full spectrum of pseudo-likelihood estimation via masked prediction. We hypothesize that this would enable MIMEx to be both general and powerful: the same implementation of MIMEx can achieve superior performance compared to baselines in a wide range of settings. We are therefore particularly interested in studying how varying mask distribution affects the performance of MIMEx. Below, we show ablation studies on two attributes of MIMEx that can be easily adjusted to change the mask distribution: mask ratio and mask dimension.

Mask ratio One straightforward way to vary the mask distribution and tune the difficulty of conditional prediction is to simply adjust the mask ratio when applying random mask. Intuitively, when the mask ratio is lower, the amount of information given to the model is larger, and the conditional prediction problem becomes easier. On the two PixMC-Sparse tasks we used, we find that results from using certain fixed mask ratios exhibit high variance across tasks, for example the results from using mask ratios 20% and 50% in Figure 5. We hypothesize that, because the difficulty of exploration varies from task to task, there exists a different 'optimal' mask ratio parameter for each task. In theory, MIMEx can be tuned to achieve 'optimal' performance by choosing a specific mask ratio for each task. In practice, we use a fixed mask ratio of 70% for our default implementation since we find it achieve a good trade-off between hyperparameter tuning and robustness of performance.

KukaReach

KukaPick

100

100

80

80

Success Rate (%)

Success Rate (%)

60

20

20

0

0.00

0.25

0.50

0.75

1.00

1.25

1.50

Steps (M)

le7

Steps (M)

le7

12

13

14

15

16

KukaReach

KukaPick

100

80

Success Rate (%)

8

20

0

0.00

0.25

0.50

0.75

1.00

1.25

1.50

Steps (M)

le7

Steps (M)

le7

nm1

nm5

KukaReach

KukaPick

80

100

Success Rate (%)

Success Rate (%)

60

40

20

0

000

0.25

0.50

0.75

1.00

1.25

1.50

Steps (M)

le7

(w) sda1s

le7

smaller

larger

Mask type Another degree of freedom of MIMEx lies in the flexibility of choosing which input dimension to apply random masks to. Fully random masking on the last dimension of input (i.e. feature dimension) will enable the most fine-grained control over the underlying conditional prediction problem. We hypothesize that this greater degree of freedom might allow MIMEx to achieve better performance on certain tasks, but might also require more substantial effort to find the optimal parameter. In Figure 5, we compare the performance of (1) masking only on the time dimension with a mask ratio of 70% and (2) masking on the feature dimension with mask ratios of 80%, 90%, and 95% on our chosen tasks. Empirically, we observe similar results between these two types of masking with the chosen mask ratios, so opted to use the more computationally efficient time-only masking in our default implementation.

KukaReach

KukaPick

KukaReach

KukaPick

100

100

100

100

08

80

08

80

Success Rate (%)

Success Rate (%)

Success Rate (%)

Success Rate (%)

60

60

60

60

40

40

40

40

20

20

20

0

0

0

0

000

0.25

0.50

Steps (M)

0.751.00

1.25

1.50

1e7

0

1

2

Steps (M)

3

4

5

6

1e7

0.00

0.25

0.50

Steps (M)

0.751.00

1.25

1.50

1e7

1

2

Steps (M)

3

4

5

6

1e7

70%

20%

50%

70%

80%(a)

90%(a)

95%(a)

6 Related Works

Undirected exploration [41] approaches add noise to individual actions (e.g. random action noise) [11], action policy (e.g. ϵ -greedy), or even network weights [13]. These methods are often surprisingly strong baselines for hard-exploration problems [38].

Classical count-based methods provide another effective way to perform exploration [35]. To bring count-based exploration to high-dimensional state spaces, [4] and [24] propose pseudo-count as a useful surrogate of novelty, using CTS [5] and PixelCNN [42] as the density model respectively. [39] is another example of count-based exploration, but uses hash code instead of pseudo-count for state visitations.

[8] takes a different approach by approximating novelty with prediction error on random features. The intuition is the same - prediction error should be higher for less visited states. The closest to our work are perhaps works that generate prediction errors by learning a forward dynamics model. For example, [25, 34] can be seen as special cases of our framework in that they only perform one-step prediction. [16] is similar to our work in spirit, but learns a multi-step dynamics model with recurrent networks and generates multi-step prediction error with a BYOL-like [15] prediction objective. Relatedly, [28] derives intrinsic rewards through predicting temporally extended general value functions, though focusing on partial observable tabular environment. [18, 26] use reduction of uncertainty under the learned model as intrinsic reward; the former uses Bayesian neural network and the latter uses ensemble disagreement. In practice, these methods perform worse because it is usually hard to get a good estimate of the reduction in uncertainty with all the stochasticity inherent in modern neural networks and optimization tools.

7 Limitations and Future Work

Inspired by a unified perspective on intrinsic reward approaches, we present Masked Input Modeling for Exploration (MIMEx), a general framework for deriving intrinsic rewards. By using a masked autoencoding objective on variable-length input sequences, MIMEx enables flexible control over the difficulty of its underlying pseudo-likelihood estimation. By leveraging a scalable architecture and objective function, MIMEx can be easily scaled up and stabilized to solve challenging sparse-reward tasks, achieving superior performance compared to several competitive baselines.

One limitation of MIMEx that is that it can potentially hurt performance on easier tasks that do not require exploration, as in the case of exploration bonus approaches in general [38]. Moreover, while MIMEx can improve sample efficiency on hard-exploration tasks like those in PixMC-Sparse,

to tractably solve much harder problems like real-world sensorimotor learning, we might need a combination of MIMEx and stronger bias from other sources - for example expert demonstrations. Improving exploration from either angle will be important steps for future work.

While we did not investigate into how different representation learning methods affect the performance of MIMEx in this work, adding representation learning techniques is possible in the MIMEx framework and is an interesting direction for future work. Looking forward, we hope to study how MIMEx can be leveraged to transfer knowledge from pretrained representations to the exploration problem, particularly given its scalability and flexibility.

References

S. Amin, M. Gomrokchi, H. Satija, H. van Hoof, and D. Precup. A survey of exploration methods in reinforcement learning. arXiv preprint arXiv:2109.00157 , 2021.

A. Aubret, L. Matignon, and S. Hassas. A survey on intrinsic motivation in reinforcement learning. arXiv preprint arXiv:1908.06976 , 2019.

A. P. Badia, B. Piot, S. Kapturowski, P. Sprechmann, A. Vitvitskyi, Z. D. Guo, and C. Blundell. Agent57: Outperforming the atari human benchmark. In International Conference on Machine Learning , pages 507-517. PMLR, 2020.

M. Bellemare, S. Srinivasan, G. Ostrovski, T. Schaul, D. Saxton, and R. Munos. Unifying count-based exploration and intrinsic motivation. Advances in neural information processing systems , 29, 2016.

M. Bellemare, J. Veness, and E. Talvitie. Skip context tree switching. In E. P. Xing and T. Jebara, editors, Proceedings of the 31st International Conference on Machine Learning , volume 32 of Proceedings of Machine Learning Research , pages 1458-1466, Bejing, China, 22-24 Jun 2014. PMLR.

M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research , 47:253-279, 2013.

R. I. Brafman and M. Tennenholtz. R-max-a general polynomial time algorithm for near-optimal reinforcement learning. Journal of Machine Learning Research , 3(Oct):213-231, 2002.

Y. Burda, H. Edwards, A. Storkey, and O. Klimov. Exploration by random network distillation. arXiv preprint arXiv:1810.12894 , 2018.

J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 , 2018.

A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 , 2020.

O. Eberhard, J. Hollenstein, C. Pinneri, and G. Martius. Pink noise is all you need: Colored noise exploration in deep reinforcement learning. In The Eleventh International Conference on Learning Representations , 2022.

A. Ecoffet, J. Huizinga, J. Lehman, K. O. Stanley, and J. Clune. First return, then explore. Nature , 590(7847):580-586, 2021.

M. Fortunato, M. G. Azar, B. Piot, J. Menick, I. Osband, A. Graves, V. Mnih, R. Munos, D. Hassabis, O. Pietquin, et al. Noisy networks for exploration. arXiv preprint arXiv:1706.10295 , 2017.

K. Goyal, C. Dyer, and T. Berg-Kirkpatrick. Exposing the implicit energy networks behind masked language models via metropolis-hastings. arXiv preprint arXiv:2106.02736 , 2021.

J.-B. Grill, F. Strub, F. Altch´ e, C. Tallec, P. Richemond, E. Buchatskaya, C. Doersch, B. Avila Pires, Z. Guo, M. Gheshlaghi Azar, et al. Bootstrap your own latent-a new approach to self-supervised learning. Advances in neural information processing systems , 33:21271-21284, 2020.

Z. Guo, S. Thakoor, M. Pˆ ıslar, B. Avila Pires, F. Altch´ e, C. Tallec, A. Saade, D. Calandriello, J.-B. Grill, Y. Tang, et al. Byol-explore: Exploration by bootstrapped prediction. Advances in neural information processing systems , 35:31855-31870, 2022.

K. He, X. Chen, S. Xie, Y. Li, P. Doll´ ar, and R. Girshick. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 16000-16009, 2022.

R. Houthooft, X. Chen, Y. Duan, J. Schulman, F. De Turck, and P. Abbeel. Vime: Variational information maximizing exploration. Advances in neural information processing systems , 29, 2016.

D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 , 2014.

P. Ladosz, L. Weng, M. Kim, and H. Oh. Exploration in deep reinforcement learning: A survey. Information Fusion , 2022.

T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y . Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971 , 2015.

V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602 , 2013.

V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. nature , 518(7540):529-533, 2015.

G. Ostrovski, M. G. Bellemare, A. Oord, and R. Munos. Count-based exploration with neural density models. In International conference on machine learning , pages 2721-2730. PMLR, 2017.

D. Pathak, P. Agrawal, A. A. Efros, and T. Darrell. Curiosity-driven exploration by self-supervised prediction. In International conference on machine learning , pages 2778-2787. PMLR, 2017.

D. Pathak, D. Gandhi, and A. Gupta. Self-supervised exploration via disagreement. In International conference on machine learning , pages 5062-5071. PMLR, 2019.

A. Ramesh, L. Kirsch, S. van Steenkiste, and J. Schmidhuber. Exploring through random curiosity with general value functions, 2022.

A. Ramesh, L. Kirsch, S. van Steenkiste, and J. Schmidhuber. Exploring through random curiosity with general value functions. Advances in Neural Information Processing Systems , 35:18733-18748, 2022.

J. Salazar, D. Liang, T. Q. Nguyen, and K. Kirchhoff. Masked language model scoring. arXiv preprint arXiv:1910.14659 , 2019.

J. Schulman, S. Levine, P. Abbeel, M. Jordan, and P. Moritz. Trust region policy optimization. In International conference on machine learning , pages 1889-1897. PMLR, 2015.

J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347 , 2017.

Y. Seo, D. Hafner, H. Liu, F. Liu, S. James, K. Lee, and P. Abbeel. Masked world models for visual control. arXiv preprint arXiv:2206.14244 , 2022.

D. Silver, G. Lever, N. Heess, T. Degris, D. Wierstra, and M. Riedmiller. Deterministic policy gradient algorithms. In International conference on machine learning , pages 387-395. PMLR, 2014.

B. C. Stadie, S. Levine, and P. Abbeel. Incentivizing exploration in reinforcement learning with deep predictive models. arXiv preprint arXiv:1507.00814 , 2015.

A. L. Strehl and M. L. Littman. An analysis of model-based interval estimation for markov decision processes. Journal of Computer and System Sciences , 74(8):1309-1331, 2008.

R. S. Sutton and A. G. Barto. Reinforcement learning: An introduction . MIT press, 2018.

R. S. Sutton, A. G. Barto, et al. Introduction to reinforcement learning. 1998.

A. A. Ta¨ ıga, W. Fedus, M. C. Machado, A. Courville, and M. G. Bellemare. Benchmarking bonus-based exploration methods on the arcade learning environment. arXiv preprint arXiv:1908.02388 , 2019.

H. Tang, R. Houthooft, D. Foote, A. Stooke, O. Xi Chen, Y. Duan, J. Schulman, F. DeTurck, and P. Abbeel. # exploration: A study of count-based exploration for deep reinforcement learning. Advances in neural information processing systems , 30, 2017.

Y. Tassa, Y. Doron, A. Muldal, T. Erez, Y. Li, D. d. L. Casas, D. Budden, A. Abdolmaleki, J. Merel, A. Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690 , 2018.

S. B. Thrun. Efficient exploration in reinforcement learning. Technical report, Citeseer, 1992.

A. Van den Oord, N. Kalchbrenner, L. Espeholt, O. Vinyals, A. Graves, et al. Conditional image generation with pixelcnn decoders. Advances in neural information processing systems , 29, 2016.

A. Wang and K. Cho. Bert has a mouth, and it must speak: Bert as a markov random field language model. arXiv preprint arXiv:1902.04094 , 2019.

T. Xiao, I. Radosavovic, T. Darrell, and J. Malik. Masked visual pre-training for motor control. arXiv preprint arXiv:2203.06173 , 2022.

D. Yarats, R. Fergus, A. Lazaric, and L. Pinto. Mastering visual continuous control: Improved dataaugmented reinforcement learning. arXiv preprint arXiv:2107.09645 , 2021.

A Appendix

A.1 Clarification on reference to [43]

As we make a reference to [43] - a work that was later retracted due to an error - we would like to clarify that we are aware of the error and our claims remain valid despite the error in cited work.

In [43], the authors mistakenly viewed BERT[9] as a Markov Random Field (MRF). While the original goal of [43] was to derive a procedure for sampling from masked language models (MLMs) by viewing them as MRFs, the work also inspired the use of MLM prediction error as a way for scoring sequences when decoding from a language model. The way we propose to use MLMs is similar to the latter, i.e. as a proxy metric for scoring sequence-level predictions of trajectory information. In other words, we do not formally treat the MLM in MIMEx as an MRF, and we do not attempt to obtain conditional distributions from which one generates samples. We also note that a correct energy-based view was later proposed in [14], which does not change the argument that we put forth either. While sampling from an energy-based model is expensive, we only seek to obtain a useful stochastic estimate of the energy function for the purpose of scoring.

A.2 Detailed reward design of the original PixMC tasks

We present the detailed reward terms of each task in the original PixMC. The total environment reward of each task is the sum of all reward terms, each multiplied with a tunable scale parameter. 'Bonus' type of reward terms are discrete while other types of reward terms are continuous.

FrankaReach: distance to goal (from parallel gripper); goal bonus when distance to goal is smaller than a threshold value; action penalty.

KukaReach: distance to goal (from humanoid hand); goal bonus when distance to goal is smaller than a threshold value; action penalty.

FrankaCabinet: distance to handle (of cabinet); handle bonus when mesh of parallel gripper intersects mesh of handle; open bonus when cabinet is open; distance to goal (from parallel gripper); open pose bonus when parallel gripper is within a certain pose distribution; goal bonus when distance to goal is smaller than a threshold value; action penalty.

KukaCabinet: distance to handle (of cabinet); handle bonus when mesh of humanoid hand intersects mesh of handle; open bonus when cabinet is open; distance to goal (from humanoid hand); open pose bonus when humanoid hand is within a certain pose distribution; goal bonus when distance to goal is smaller than a threshold value; action penalty.

FrankaPick: distance to object (from parallel gripper); lift bonus when object is lifted above the table; distance to goal (from parallel gripper); goal bonus when distance to goal is smaller than a threshold value; action penalty.

KukaPick: distance to object (from humanoid hand); lift bonus when object is lifted above the table; distance to goal (from humanoid hand); goal bonus when distance to goal is smaller than a threshold value; action penalty.

FrankaMove: distance to object (from parallel gripper); lift bonus when object is lifted above the table; distance to goal (from parallel gripper); goal bonus when distance to goal is smaller than a threshold value; action penalty.

KukaMove: distance to object (from humanoid hand); lift bonus when object is lifted above the table; distance to goal (from humanoid hand); goal bonus when distance to goal is smaller than a threshold value; action penalty.

Due to the dense reward terms, these tasks are not sufficiently challenging for benchmarking state-ofthe-art exploration algorithms.

A.3 Detailed comparison between PixMC and PixMC-Sparse tasks

We visualize partial trajectory of all PixMC-Sparse tasks in Figure 6. Below, we provide more details on how agents are rewarded differently in PixMC-Sparse compared to in PixMC.

For Reach tasks, agent needs to move its end effector (parallel gripper in the case of Franka; humanoid hand in the case of Kuka) such that the end effector reaches a specific goal location. In PixMC, agent receives a variable-valued reward at every time step; the reward value is continuous and inversely

proportional to end effector's distance to goal location. In PixMC-Sparse, agent only receives a fixed-discrete-valued reward when its end effector intersects with a small spherical space (visualized as the green sphere) around the goal location.

For Cabinet tasks, agent needs to grasp the cabinet handle using its end effector, open the drawer, and keep pulling until it reaches a goal location. In PixMC, agent constantly receives a variable-valued reward inversely proportional to end effector's distance to cabinet handle. In PixMC-Sparse, agent only receives a fixed-valued reward when the mesh of its end effector intersects with the mesh of cabinet handle (visualized as the green sphere) around the goal location.

For Pick tasks, agent needs to grasp a cube-shaped object using its end effector and lift up the object until it reaches a goal height. In PixMC, agent constantly receives a variable-valued reward inversely proportional to end effector's distance to object, and a lift bonus when it starts to successfully lift up the object (i.e. when object is above the table). In PixMC-Sparse, agent does not receive any distance-to-object-based reward, i.e. no reward until it starts to lift up the object.

For Move tasks, agent needs to grasp a cube-shaped object using its end effector and lift up the object until it reaches a goal location. In PixMC, agent constantly receives a variable-valued reward inversely proportional to end effector's distance to object, and a lift bonus when it starts to successfully lift up the object (i.e. when object is above the table). In PixMC-Sparse, agent does not receive any distance-to-object-based reward, i.e. no reward until it starts to lift up the object.

A.4 Wall-Clock Time and GPU Memory Usage Comparisons

We compare the training wall-clock time for MIMEx ( ours ) against that of 3 exploration baselines: random action noise ( noise ), intrinsic curiosity module ( icm ), and random network distillation ( rnd ). We include 3 variations of MIMEx for comparison: (1) standard model size and masking once ( smaller, nm1 in Figure 4), (2) standard model size and masking 5 times ( smaller, nm5 in Figure 4), (3) larger model size and masking once ( smaller, nm1 in Figure 4). We find that MIMEx not only achieves superior sample efficiency and performance, but also adds little wall-clock time overhead compared to the baselines.

Similarly, we compare the average GPU memory usage for MIMEx against the baselines, using the same 3 variations of MIMEx for comparison as above. We find that while MIMEx does consume more memory resources during training, the increased memory usage is less than 36% even when comparing the most compute-intensive MIMEx version ( ours(2) ) against the least compute-intensive baseline ( noise ).

Each number reported above was averaged from 10 experiment runs on the KukaReach task in PixMC-Sparse; each run was trained on a single NVIDIA A100 GPU.

A.5 Additional Results on More Diverse Tasks and Environments

To check if MIMEx generalizes to other domains, we ran additional experiments to compare MIMEx with ICM and RND on the ALE [6] PRIVATE EYE and VENTURE environments. Below, we report all results with 95% confidence intervals, over 5 random seeds on each method (ICM, RND, MIMEx).

Our results for ICM and RND are similar to those reported in prior works. For MIMEx, we only tuned the exploration beta parameter; without extensive hyperparameter tuning, MIMEx still performs comparably with ICM/RND.

A.6 Additional Results on Varying Mask Distribution

We perform additional ablation studies to better understand the importance of mask distribution in MIMEx formulation, especially on PixMC-Sparse tasks where existing methods (ICM, RND) fail. We interpolate between the MIMEx masking distribution and a masking distribution closest to ICM/RND on the KukaReach task.

The following exploration sequence length and mask distributions are used: (1) 70% uniformly random mask with sequence length 5 ( l5 uniform 70 ); , (2) 70% fixed mask, sequence length 5 ( l5 fixed 70 ), (3) 50% fixed mask, sequence length 5 ( l5 fixed 50 ), (4) 50% fixed mask, sequence length 2 ( l2 fixed 50 ). For 'fixed mask', we only always mask out the last X positions of the input sequence based on the mask ratio, effectively making the reconstruction problem a future-state prediction problem. All results are reported with 95% confidence intervals and over 7 random seeds.

KukaReach

100

80

Success Rate (%)

60

40

20

0

0.00

0.25

0.50

0.75

1.00

1.25

1.50

Steps (M)

le7

15_uniform_70

15_fixed_70

15_fixed_50

12_fixed_50

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces a novel method for Exploration in RL, called MIMEx (Masked Input Modeling for Exploration).\n\nPrevious approaches for exploration investigated intrinsic rewards, usually computed as a measure of a state or transition’s “novelty”, adding them to extrinsic rewards (the actual task’s rewards) to enhance the algorithm’s exploration and thus performance, especially for tasks with sparse rewards.\n\nThe present paper argues that those previous intrinsic reward methods can be viewed under a unifying lens as approaches that use pseudo-likelihood estimation to estimate novelty. A general algorithm is introduced called MIMEx that computes pseudo-likelihood over entire trajectories, as the prediction loss of a masked sequence autoencoder. This loss corresponds to the intrinsic reward for an entire trajectory, and can be simply added to task rewards when running any RL algorithm.\n\nThe paper then demonstrates the effectiveness of the approach with evaluations, baseline comparisons and ablation studies on a “PixMC-Sparse” benchmark suite.\n\nSTRENGTHS:\nThe paper is very clearly and naturally presented, with great care put into arguing for a coherent story. The work is original, arguing for a straightforward but interesting generalization of existing concepts in the RL literature.\n\nThe natural blending of theoretical justification for the work (pseudo-likelihood as novelty), application of recently popular techniques (masked sequence modeling) and experimental results make the paper highly significant. The generalization of the concept of intrinsic rewards to entire trajectories is also extremely interesting.\n\nThe experimental results are thorough, including evaluation on different benchmark settings, comparisons with other approaches, and extensive ablation studies. In particular, the ablation study showing how scaling of the autoencoder transformer affects results seems very interesting, and should warrant further investigation.\n\nWEAKNESSES:\nIt seems that adding a whole masked autoencoder to compute intrinsic rewards may incur a hefty computational cost. What is the overall runtime / resource utilization of MIMEx compared to other baselines? Even if MIMEx is more computationally demanding, it can still be a good choice due to sample efficiency, especially for offline RL tasks. In any case, the paper would greatly benefit from such an analysis.\n\nQUESTIONS:\nA few points:\n* **[a]** Can the authors address the point raised in “Weaknesses”, related to computational cost?\n* **[b]** In Section 5.3, “Trajectory-level exploration”, specifically in Figure 4: Why does a sequence length of 6 reduce performance? From the authors’ presentation, it may seem that increasing trajectory length should in principle always guarantee a benefit. Why is there instead an optimum at lengths shorter than 6?\n* **[c]** Minor point: For all plot figures, font sizes are too small.\n\nLIMITATIONS:\nI believe the authors appropriately addressed the limitations of their work.", "TITLE": "Official Review", "RECOMMENDATION": 8, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-06-27"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes to use masked autoencoding (similar to MAE) in RL and use the loss as an intrinsic reward for exploration in sparse reward domains. Their method, MIMEx, does masked reconstruction of latent observation o_t, based on the previous T observations, and assigns the loss as intrinsic reward r_t. They propose that count-based or prediction error-based intrinsic rewards can be viewed in the same masked autoencoding framework, as specific inputs and masks (such as ICM and RND). They show experiments in DM Control Suite and a harder version of PixMC denoted as PixMC-Sparse, which sparsifies the shaped reward. They show that MIMEx outperforms ICM and RND baselines.\n\nSTRENGTHS:\nExperiment results suggest it is stronger than ICM and RND, and the method itself is relatively straightforward. The paper does clearly demonstrate evidence that this is a viable method for exploration.\n\nWEAKNESSES:\nThe formulation of masked autoencoding and trying to express other methods like RND and ICM in terms of it is not a very strong argument. One of the key parts of RND is the usage of a fixed random network, which is not properly captured by a varying mask; it is captured by allowing an arbitrary transformation of the inputs. For ICM, the representation learning part from inverse control is also not captured by the formulation, but also delegated to a transformation of the inputs. Representation learning is often a key part of an exploration algorithm, which MIMEx does not directly capture. By allowing an arbitrary transformation of the inputs, the actual masking portion of MIMEx becomes less important, since masking can equally be delegated as a different transformation of the inputs, resulting in only needing a trivial mask for MIMEx. I think there should be less emphasis on this part for the paper, as the experiments also do not investigate this idea further. An example of further investigation would be to try to emulate RND/ICM or other exploration approaches through specific masks (not just random masks) and showing whether specific masks may be better or worse than uniform random masking.\n\nI believe your reference [14] Byol-explore, does incorporate sequence-level information in its prediction error for intrinsic reward, which is not mentioned in related work.\n\n---- After Author Rebuttals ----\n\nAfter reading other reviews and the author rebuttals, I think the authors have addressed the addressable parts of my concerns, as well as have stated that they will clarify their main claim to be more nuanced. Thus I'm inclined to slightly raise my score.\n\nQUESTIONS:\nMIMEx seems to be encoding and decoding latents (as opposed to pixels), so are you allowing gradients from MIMEx to also flow back through to those latents? I.e. are you stopping gradients from the input/target sides? If not stopping gradients, then is there a danger that the representation will collapse to a constant? If yes, then are you relying on the RL to train the latent representations?\n\nIn your Figure 1, MIMEx only receives latent observations as input/target. Why are actions not included? Many forward model predictions rely on state and action information for prediction, including ICM. What was the reasoning behind this? If actions were included, then MIMEx would be able to more closely emulate many multi-step prediction methods such as [14] Byol-explore or SPR (Data-Efficient Reinforcement Learning with Self-Predictive Representations https://arxiv.org/abs/2007.05929) by picking a mask the only masks out observations but keeps around actions.\n\nLIMITATIONS:\nThis paper addresses some of the limitations, but another potential limitation for this method is partial observability, especially for long horizon problems. Only using the previous T observations as input might not be a rich enough context for predicting the next observation, so there would need to be another way of adding more past information.\n\nAnother potential limitation is stochasticity. Since MIMEx is predicting observations, it will suffer from high loss if the observations are stochastic, similar to many other prediction-error-based approaches that try to directly predict the observation. RND avoids the issue by same-step prediction, while ICM relies on the representation learning of inverse control to filter our dynamics-irrelevant noise. With MIMEx, it seems like even adding white noise to observations could end up with high losses everywhere.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-04"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces a novel approach to exploration in reinforcement learning (RL) called Masked Input Modeling for Exploration (MIMEx). MIMEx uses a masked autoencoding objective on variable-length input sequences to derive intrinsic rewards for exploration. The paper claims that MIMEx improves exploration efficiency in sparse-reward tasks and show that MIMEx outperforms claimed competitive baselines on tasks from the PixMC-Sparse suite and the DeepMind Control Suite except for in a few cases, such as certain cases in which the reward is not sparse.\n\nSTRENGTHS:\n**Originality**  \nThe paper introduces a fresh approach to exploration in reinforcement learning, applying existing concepts in a new way. This application of masked autoencoders and pseudo-likelihood estimation to the problem of exploration in sparse reward environments is at least innovative.\n\n**Quality**  \nThe paper is well-structured and provides a comprehensive examination of the proposed MIMEx method. The paper creates a new benchmark dataset from an existing one with non-trivial modifications, and explains these. The paper has conducted extensive experiments and provided a detailed ablation study, which adds to the quality of the paper. The paper does an adequate job at discussing it's limitations and potential future directions for its work.\n\n**Clarity**  \nThe paper is very well-written and mostly clear in its presentation. The paper has done an excellent job of explaining the MIMEx method, its implementation details, and the experimental setup. The explanation of dense rewards for the PixMC environment, the construction of the PixMC-Sparse, and the use of figures and tables to illustrate the results is superb.\n\n**Significance**  \nMIMEx shows superior performance to certain benchmark exploration algorithms, __random action noise__, __intrinsic curiosity module__, and __random network distillation__, some of which have been shown to perform well at the time of their publication on long-horizon sparse reward tasks, such as Montezuma's Revenge. The model allows for easy adjustment of the time horizons it considers, though tuning this hyperparameter may be difficult. MIMEx is agnostic to standard RL algorithm and model choice, allowing it to be used on several problems.  \n\n---\nOverall, this paper is easy to read and combines ideas into a novel exploration method that could be useful. However, it's unclear to me the generalizability of most of the results and the increased compute, memory, and wall-clock expenses wrt the horizon needed for the MIMEx module.\n\nThank you for providing code with your submission for both sets of benchmarks!\n\n**I have changed my score from a 5 to a 6 as a result of the authors rebuttal, in which they show evidence of additional work that addresses the key concern I had as well as additional results clarify ambiguities I had. Thank you, Authors. I'm happy that my rebuttal helped you improve your work and that you considered and addressed my concerns by performing additional work to improve your work and sharing these results clearly in your rebuttal.**\n\nWEAKNESSES:\nThe paper's main idea, while innovative in its application, is built upon existing concepts in the field, such as masked autocoders and prediction error based exploration. It uses standard latent embeddings of observations and then reconstruction of masked embeddings to compute the prediction error, which is work that has been done for years, a recent example of which is [1], work that the paper transparently references (this transparency is a strength in clarity and overall). The paper could have better highlighted the unique aspects of their approach and how it diverges from or improves upon existing methods in reinforcement learning exploration. Though PixMC-Sparse gets a discrete bonus in some environments for reaching a certain intermediate state, the paper could've evaluated MIMEx on easily accessible or created environments by easily modifying existing ones that focus on more diverse types of sparse rewards, such as discrete instead of continuous (wrt to goal distance) rewards.\n\n- The paper's quality could be improved with a more diverse set of experimental tasks and environments. The current selection of environments for which hyperparameter and ablation studies were done do not generalize to much outside of their specific domains, so they don't demonstrate the generalizability of the MIMEx method. However, I do understand that these experiments can be computationally expensive, but I would recommend performing additional ablations on environments that differ significantly from Kuka_____ in order to maximize confidence in the generalization of the results of these ablations. \n- In lines 118-119, the paper states that \"MIMEx can be added...as a lightweight module...\" but there is no mention, let alone evaluation wrt horizon $T$ of the increased memory footprint or wall-clock time needed to calculate the intrinsic reward.\n- Later exploration methods [2, 3] that are catered toward sparsity or perform better than the baselines presented are not used as baselines. But, to the paper's defense, [3] was published just Sep 2022. However, the issue is that the most recent baseline used is RND, which was published in 2018, and there are many better ones that exist to evaluate MIMEx against.\n\n- The paper could better justify the usage of each of the exploration baselines used for readers that may not be familiar with RND's performance on Montezuma's revenge though it does do this somewhat in the Related Works section.\n\n- Again, while the paper shows promising results on specific tasks, its impact could be limited if the method's effectiveness doesn't extend to a broader range of tasks and environments. The paper could increase its relevance and significance by demonstrating MIMEx's effectiveness in more diverse scenarios and discussing potential applications beyond the current scope.\n\n[1] Xiao, T., Radosavovic, I., Darrell, T., & Malik, J. (2022). Masked visual pre-training for motor control. arXiv preprint arXiv:2203.06173.  \n[2] Zhang, T., Rashidinejad, P., Jiao, J., Tian, Y., Gonzalez, J. E., & Russell, S. (2021). Made: Exploration via maximizing deviation from explored regions. Advances in Neural Information Processing Systems, 34, 9663-9680.  \n[3] Eberhard, O., Hollenstein, J., Pinneri, C., & Martius, G. (2022, September). Pink noise is all you need: Colored noise exploration in deep reinforcement learning. In The Eleventh International Conference on Learning Representations.\n\nQUESTIONS:\n1. Should the equality in the display mode equation in line 84 be an approximation since $|X|$ is not necessarily infinite?\n2. Referring to lines 204-206, what are the internals of the transformer blocks? Could you clarify because not all transformer blocks are in the same order or contain the same properties as [4].\n3. Why choose the three chosen exploration baselines, random action noise, intrinsic curiosity module, and random network distillation?\n4. I'm confused by the inclusion of the sample curriculum in Table 3. Is this only an informative point, or is this something you evaluated?\n5. In lines 233-234, the paper states \"Trajectory-level exploration To our knowledge, MIMEx is the first framework that successfully incorporates sequence-level intrinsic reward to solve hard exploration tasks.\" Doesn't [5] do this implicitly as the discount factor in [5] is varied? Again, this is a relatively recent publication.\n6. Minor suggestion, to make the results of Figure 2 more tangible and to improve readibility, I suggest providing a visual and explanation of the KukaPick task alongside Figure 2, even though it is in the Appendix.\n7. Do you have ideas on extensions of Online masked prediction to offline RL and any advantages or disadvantages using MIMEx with this paradigm?\n\n[4] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., ... & Polosukhin, I. (2017). Attention is all you need. Advances in neural information processing systems, 30.  \n[5] Ramesh, A., Kirsch, L., van Steenkiste, S., & Schmidhuber, J. (2022). Exploring through random curiosity with general value functions. Advances in Neural Information Processing Systems, 35, 18733-18748.\n\nLIMITATIONS:\nThe main limitation is the limited understanding of the generalizability of the results to problem domains, even sparse reward ones, that are different than PixMC-Sparse, which most are. \n\nThe paper does address that MIMEx may hurt performance when rewards aren't sparse, but it could provide more limitations on absence of additional memory, compute expense, and wall-clock time needed to add the MIMEx intrinsic reward generation model, which has multiple, multiple-layer transformers and more.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-05"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work proposed a general framework for deriving intrinsic rewards called Masked Input Modeling for Exploration (MIMEx). This method starts from the observation that existing intrinsic reward approaches are special cases of conditional prediction, where the estimation of novelty can be seen as pseudo-likelihood estimation with different mask distributions. From this perspective, MIMEx derives intrinsic reward based on masked prediction on input sequences, which naturally lends itself to controlling the difficulty of the underline conditional prediction task. Empirically results on eight tasks from PixMC-Sparse and six tasks from DeepMind Control Suite demonstrate that MIMEx outperforms other baselines regarding sample efficiency.\n\nSTRENGTHS:\n1. This work proposed a general framework for deriving intrinsic rewards, which can be applied to various hard-exploration tasks. \n2. The most interesting part of MIMEx is that it enables extremely flexible control over the difficulty of conditional prediction for deriving intrinsic rewards. Section 5.4 provides comprehensive studies to understand how varying mask distribution affects the performance of MIMEx.\n3. Extensive ablation studies have been provided to understand why MIMEx works better than other approaches. The comparisons are provided among diverse directions, including trajectory-level exploration, variance reduction, and model scalability.\n\nWEAKNESSES:\n1. The smoothness of writing can be improved, e.g., section 3.1 is not closely related to other parts of MIMEx. The motivation of using masked prediction loss as the intrinsic reward is not clear enough. \n2. Line 81 cited a retracted paper.\n\nQUESTIONS:\n1. What motivates using masked prediction loss as the intrinsic reward? \n2. When reading the introduction, I have the following questions: how masked language modeling is connected to pseudo-likelihood? Why approaches that estimate novelty can be viewed as modeling different conditional prediction problems or masked prediction problems with different mask distributions?\n\nLIMITATIONS:\n1. One limitation of MIMEx is that it can potentially hurt performance on easier tasks that do not require exploration, as in the case of exploration bonus approaches.\n2. Stronger bias from other sources, like the expert demonstrations, is needed to improve the exploration ability of MIMEx further. \n\n\n------------\nAfter rebuttal\n---------------\nI would like to thank the authors for addressing part of my concerns. I agree to increase my score slightly.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-07"}