Bayesian Policy Reuse

Benjamin Rosman, Majd Hawasly, Subramanian Ramamoorthy

In the field of artificial intelligence, the ability to learn from scratch is a hallmark of general intelligence. However, in practical applications—such as a service robot interacting with a new user or a drone deployed for emergency response—the luxury of thousands of training trials is non-existent. These scenarios require "thinking fast": the ability to recall and apply past experiences to a novel but related situation immediately.

A seminal paper by Benjamin Rosman, Majd Hawasly, and Subramanian Ramamoorthy, titled "Bayesian Policy Reuse," proposes a framework to solve this problem. Instead of treating every new interaction as a blank slate for reinforcement learning, the authors frame task adaptation as a selection problem from a library of pre-trained policies.

The Challenge: The Data-Hungry Nature of RL

Standard Reinforcement Learning (RL) algorithms typically require extensive interaction with an environment to converge on an optimal policy. This "data-hunger" is a significant barrier for short-duration tasks where the window for successful intervention is narrow. While an agent might understand the general class of tasks it faces (e.g., "navigating a building"), it often lacks the specific parameters of the current instance (e.g., "the layout of this specific floor").

Bayesian Policy Reuse (BPR) Framework

The BPR algorithm operates in two distinct phases to bridge the gap between general knowledge and specific task instances:

  1. Offline Phase: The agent constructs a performance and observation model. It evaluates its library of policies against a set of known task "types" to determine how each policy performs and what feedback signals (e.g., rewards, state transitions) they typically generate.
  2. Online Phase: When encountering an unknown task, the agent maintains a Bayesian belief over the possible task types. After each trial or interaction, it receives a signal and applies Bayes' rule to update this belief.
Utility curves for different policies across task instances, illustrating how signals at specific points inform policy selection.

To navigate the exploration-exploitation trade-off during the online phase, the authors employ several Bayesian Optimization heuristics:

  • Expected Improvement (EI): Prioritizes policies likely to exceed the current best performance estimate.
  • Belief Entropy (BE): Selects policies that maximize information gain to reduce uncertainty about the task type.
  • Knowledge Gradient (KG): Uses a one-step look-ahead to balance immediate rewards with the value of future information.

Key Insights: Global Updates and Signal Richness

A critical advantage of BPR over traditional Multi-Armed Bandit (MAB) approaches (like UCB1) is the concept of global updates. In a standard MAB, testing one "arm" (policy) only provides information about that specific arm. In BPR, because the agent possesses an offline model of how different task types relate, a single trial provides information about the entire library. If a specific policy fails in a predictable way, the agent can immediately infer the likely failure or success of other policies in the library.

Furthermore, BPR is agnostic to the type of feedback received. These "signals" can range from simple rewards to complex state transitions. The richer the signal, the more rapidly the agent's belief converges on the correct task type.

Experimental Validation

The authors validated BPR across three simulated domains: the Golf Club Selection problem, Online Personalization for banking systems, and a complex 68-task Surveillance Domain involving a drone locating poachers.

In the surveillance domain, BPR variants—particularly BPR-EI—demonstrated remarkable efficiency, converging to the optimal policy in approximately 15 episodes. In contrast, a standard UCB1 bandit would require nearly 70 episodes just to sample each policy once, highlighting the power of leveraging prior experience.

Conclusion and Future Directions

Bayesian Policy Reuse offers a pragmatic solution for deploying autonomous agents in the real world. By shifting the focus from learning to selection, agents can achieve high performance in a fraction of the time required by traditional methods.

While BPR assumes that new tasks are drawn from a distribution similar to the offline library, future research may address "out-of-distribution" tasks or environments where task parameters drift over time. Ultimately, BPR provides a robust foundation for agents that can truly "think fast" by effectively recalling the past.

Summary updated

BibTeX
@article{rosman2016bayesian,
  author = {Benjamin Rosman and Majd Hawasly and Subramanian Ramamoorthy},
  title = {{Bayesian Policy Reuse}},
  journal = {Machine Learning},
  year = {2016},
  url = {https://openreview.net/forum?id=JMGPSfhZX1s},
}
Figure