Bayesian Curiosity for Efficient Exploration in Reinforcement Learning

Tom Blau, Lionel Ott, Fabio Ramos

TL;DR

This paper introduces Bayesian Curiosity, a plug-and-play module for Reinforcement Learning (RL) that uses Bayesian Linear Regression on a learned latent space to generate intrinsic rewards. By rewarding agents for visiting states where the model is most uncertain, the method significantly reduces sample complexity and enables robots to learn complex tasks—like grasping objects from raw pixels—much faster than standard approaches.

What Problem Does This Paper Address?

Reinforcement Learning often struggles with "sample complexity"—the need for millions of interactions before a policy becomes useful. A major culprit is the exploration-exploitation trade-off. Most state-of-the-art algorithms rely on naive exploration, like $\epsilon$-greedy (taking a random action occasionally), which wastes time revisiting well-known states.

This inefficiency is magnified in high-dimensional environments (like robotics) or when rewards are "sparse" (the agent only gets a signal upon total success). The authors aim to replace blind luck with "curiosity," directing the agent toward truly novel parts of the state space.

Methods

The authors propose a secondary model that runs alongside any standard RL algorithm (like TRPO or DDPG). The architecture consists of two main parts:

  1. Latent Space Embedding ($\phi_\psi$): A neural network that compresses high-dimensional observations (like images) into a lower-dimensional latent representation. This is pre-trained using a small set of expert demonstrations to ensure the latent space captures task-relevant features.
  2. Bayesian Linear Regression (BLR) Model ($B$): This model learns the relationship between latent states and actions. Crucially, BLR provides a predictive variance—a mathematical measure of uncertainty.

The intrinsic reward ($c_t$) is defined as the log of this predictive variance. If the agent encounters a state far from what it has seen before, the BLR uncertainty is high, generating a large curiosity reward. This is added to the standard environment reward ($e_t$) to form the final training signal: $r_t = e_t + \eta \cdot c_t$.

Fig. 2: Pipeline of RL with Bayesian Curiosity. Squares are functions and circles are variables.

Datasets

The method was evaluated across three distinct tiers of complexity:

  • Classic Control: Continuous versions of Mountaincar, Cartpole Swingup, Pendulum, and Acrobot. Rewards were "sparsified" to make exploration harder.
  • Simulated Robotics: A 6-DOF Kinova Jaco arm in the V-REP environment. Tasks included Cartesian control (using 3D coordinates) and visuomotor control (learning directly from RGB-D images) for reaching and grasping.
  • Physical Robot: Replicating the Cartesian reaching task on a real-world robotic arm to test robustness.

The curiosity model was pre-trained on a dataset of 8,000 points generated via an inverse kinematics solver.

Key Insights and Ideas

  • Uncertainty as a Proxy for Novelty: Unlike "count-based" exploration which is hard to scale to continuous spaces, Bayesian uncertainty naturally generalizes. If a new state is similar to a known one in the latent space, the uncertainty remains low.
  • Latent Space Stability: The authors found that keeping the latent embedding fixed during the RL phase is critical. Updating it mid-stream would "warp" the space, invalidating the BLR's previous knowledge and destabilizing the curiosity signal.
  • Visualizing Curiosity: The paper provides a striking visualization of how the curiosity surface changes. As the agent explores, the "reward peaks" in visited areas flatten out, forcing the agent to push into the unknown.
Fig. 3: Curiosity reward surface for mountaincar before and after an episode. Dots indicate visited states

Key Results

  • Significant Speedup: In classic control tasks, Bayesian Curiosity often matched baseline performance in 2x to 5x fewer timesteps.
  • Success in Sparse Environments: In the visuomotor grasping task—where the agent must learn to grab a cylinder from raw pixels with very little feedback—Bayesian Curiosity achieved a success rate that standard TRPO couldn't match even with triple the training time.
  • Robustness: The method showed much tighter interquartile ranges in performance, suggesting it is far less sensitive to the "luck of the draw" in random weight initialization compared to baselines like RND or VIME.
Performance comparison in Visuomotor Grasping shows Bayesian Curiosity (red) significantly outperforming baselines.

Limitations and Future Work

  • Dependency on Demonstrations: The current method requires a small set of demonstrations to pre-train the latent embedding. While 8,000 points is modest, a truly autonomous agent should ideally learn this embedding online.
  • Fixed Latent Space: Because the embedding is fixed, the agent's "sense of novelty" is limited by the features captured during pre-training.
  • Future Directions: The authors suggest exploring Random Fourier Features to approximate Gaussian Processes, which could provide even more robust uncertainty estimates, and developing ways to safely update the latent space during the RL process.

Summary updated

BibTeX
@misc{blau2019bayesian,
  author = {Tom Blau and Lionel Ott and Fabio Ramos},
  title = {{Bayesian Curiosity for Efficient Exploration in Reinforcement Learning}},
  year = {2019},
  eprint = {1911.08701},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.08701},
}
Figure