Abstract
A long-lived autonomous agent should be able to respond online to novel instances of tasks from a familiar domain. Acting online requires ‘fast’ responses, in terms of rapid convergence, especially when the task instance has a short duration such as in applications involving interactions with humans. These requirements can be problematic for many established methods for learning to act. In domains where the agent knows that the task instance is drawn from a family of related tasks, albeit without access to the label of any given instance, it can choose to act through a process of policy reuse from a library in contrast to policy learning. In policy reuse, the agent has prior experience from the class of tasks in the form of a library of policies that were learnt from sample task instances during an offline training phase. We formalise the problem of policy reuse and present an algorithm for efficiently responding to a novel task instance by reusing a policy from this library of existing policies, where the choice is based on observed ‘signals’ which correlate to policy performance. We achieve this by posing the problem as a Bayesian choice problem with a corresponding notion of an optimal response, but the computation of that response is in many cases intractable. Therefore, to reduce the computation cost of the posterior, we follow a Bayesian optimisation approach and define a set of policy selection functions, which balance exploration in the policy library against exploitation of previously tried policies, together with a model of expected performance of the policy library on their corresponding task instances. We validate our method in several simulated domains of interactive, short-duration episodic tasks, showing rapid convergence in unknown task variations.
Introduction
In many real-world scenarios—such as a robot interacting with a new person or a drone responding to a sudden security breach—an agent does not have the luxury of time. Traditional Reinforcement Learning (RL) often requires thousands of trials to converge on an optimal strategy. If a task only lasts for a few minutes, the agent might finally learn the optimal strategy just as the task ends.
This paper addresses the "short-duration task" challenge by introducing the Bayesian Policy Reuse (BPR) framework. BPR assumes the agent has already mastered several related tasks offline and aims to minimize regret: the difference between the agent's actual performance and the performance it could have achieved had it known the optimal policy from its library from the start.
Methods
The BPR algorithm is built upon three main pillars:
- The Policy Library ($\\Pi$): A collection of policies learned offline for various task types.
- Performance & Observation Models: During an offline phase, the agent learns how each policy performs on different task types and identifies the "signals" (observations) generated by these task-policy pairs.
- The Bayesian Update: When faced with a new, unknown task, the agent maintains a belief (a probability distribution) over which known task type the current one most closely resembles. Every trial provides a signal (e.g., reward or state transition) used to update this belief via Bayes’ rule.
To optimize policy selection, the authors adapt several exploration heuristics from Bayesian Optimization:
- $\\epsilon$-greedy & Belief Sampling: Baselines for balancing exploration and exploitation.
- Expected Improvement (EI): Selecting the policy most likely to exceed the current best performance estimate.
- Belief Entropy (BE): Selecting policies that maximize information gain to reduce uncertainty.
- Knowledge Gradient (KG): A sophisticated approach estimating the value of information for future trials.
Key Insights
- Global Updates: Unlike standard bandit algorithms (e.g., UCB1) that only learn about the specific policy executed, BPR uses an offline model of task relationships. A single trial with one policy can update the agent's belief about the effectiveness of all other policies in the library.
- Signal-Based Learning: Learning does not require exact rewards. Any observation correlated with performance—such as user interaction speed or environmental sensors—can serve as a signal to identify the task type.
- Task Similarity: The authors formalize task similarity using $\\epsilon$-balls. If two tasks result in nearly identical performance across the library, they are treated as the same "type," simplifying the search space.
Evaluation and Results
The BPR framework was evaluated across three simulated environments: a Golf Club Selection task, Online Personalization for telephone banking, and a Surveillance Domain involving drone deployment in a grid-world.
Key findings include:
- Rapid Convergence: In the surveillance domain, BPR variants (notably BPR-EI and BPR-KG) converged to the optimal library policy in approximately 15 episodes, roughly four times faster than brute-force search.
- Baseline Superiority: BPR significantly outperformed standard Multi-Armed Bandit (UCB1) and Gaussian Process Optimization (GP-UCB). UCB1 lacked global task-correlation knowledge, while GP-UCB struggled without a predefined similarity metric.
- Heuristic Performance: BPR-EI emerged as the most robust variant, providing the best balance between convergence speed and total regret.
Conclusion
Bayesian Policy Reuse offers a powerful method for agents to act instantly in novel but familiar situations by leveraging a pre-existing policy library. While the framework's effectiveness depends on the library's coverage and assumes static task types, it demonstrates significant improvements in convergence for short-duration tasks. Future research may explore non-stationary tasks where the task type evolves during interaction.
Summary updated