Abstract
Generalizing reinforcement learning (RL) policies across visually distinct domains remains a significant challenge, particularly when visual cues are misleading or data is scarce. Traditional domain adaptation methods often rely on pixel-level mapping, which fails under high visual divergence. We present Online Prototype Alignment (OPA), a framework that enables few-shot policy transfer by focusing on the functional similarity of objects rather than their visual appearance. By utilizing purposeful exploration to identify object roles through interaction, OPA achieves near-optimal transfer performance in as few as 100 steps, significantly outperforming state-of-the-art baselines in both efficiency and robustness.
Introduction
In Reinforcement Learning, the ability to take a policy trained in a source environment and deploy it in a target environment—known as domain adaptation—is crucial for real-world applications. Most existing methodologies assume that visual features provide a reliable bridge between domains. However, this assumption collapses in two scenarios: Visual Divergence, where the same functional object (e.g., a reward-giving item) looks entirely different or even resembles a penalty-giving item in the new domain; and Data Inefficiency, where the agent requires millions of interactions to learn new visual mappings.
Humans navigate new environments by interacting with objects to deduce their function. If a new fruit provides energy, we treat it as food regardless of its color. OPA brings this functional mindset to RL, treating visual textures as mere labels that must be decoded through interaction rather than static truths.
Methodology
OPA is built upon Object-Oriented RL (OORL), representing the environment state as a collection of discrete objects. The framework operates in three distinct phases:
1. Novelty Detection
The agent employs an auto-encoder trained on objects from the source domain. Upon entering a target domain, any object yielding a high reconstruction loss is flagged as "unseen," triggering the adaptation process.
2. Purposeful Exploration
To identify the function of these unseen objects, the agent uses an exploration policy ($\pi_{exp}$) and an inference model ($q_\theta$). These are trained in the source domain using "imaginary" environments where object textures and labels are randomly shuffled. The exploration policy is optimized to maximize the Mutual Information between the agent's trajectories and the underlying object functionalities. Essentially, the agent learns a specialized behavior—"poking" or interacting with objects—to efficiently reveal their identity.
3. Prototype Alignment
During deployment, the agent executes the exploration policy for a limited number of episodes. The inference model observes these interactions and maps the target objects to "prototypes" (functional categories) established in the source domain. Once this mapping is confirmed, the agent can immediately apply the original task policy using the newly aligned functional map.
Experimental Setup
The researchers evaluated OPA against two primary benchmarks:
- Hunter: A custom object-centric suite where agents interact with prey and obstacles. A "Case B" variant was introduced where textures were completely randomized to test functional versus visual transfer.
- Crafter: A complex, 2-D Minecraft-like environment. To create a significant visual shift, standard textures (e.g., trees, coal) were replaced with icons from the Nethack dataset.
Results and Discussion
Massive Data Efficiency
In the Hunter environment, OPA achieved a performance ratio of approximately 1.0 (near-optimal transfer) after only 100 steps in the target domain. In contrast, competitive baselines such as UNIT4RL and LTMBR required between 3 million and 5 million steps to reach comparable performance levels. This represents a multi-order-of-magnitude improvement in adaptation speed.
Robustness to Visual Divergence
While image-to-image translation methods like UNIT4RL struggled when objects lacked unique visual distributions or shared similar textures, OPA remained robust. Because OPA identifies objects based on their reaction to the agent's actions (transition dynamics) and their impact on rewards, it is immune to visual "noise" that would typically confuse pixel-based models.
Performance in Complex Tasks
On the Crafter benchmark, OPA maintained a 1.01 performance ratio, effectively matching or slightly exceeding the source performance. The best-performing baseline, DARLA, only achieved a ratio of 0.57, illustrating OPA's superior ability to handle complex, multi-object environments.
Conclusion and Future Work
Online Prototype Alignment demonstrates that functional interaction is a powerful alternative to visual mapping for policy transfer. By separating the task of identifying the environment from the task of solving it, OPA enables true few-shot adaptation.
However, the framework currently has limitations. It relies on the environment being decomposable into discrete objects, which may be difficult in high-dimensional, continuous pixel spaces without clear boundaries. Additionally, the multi-stage nature of the pipeline means that errors in novelty detection can propagate. Future research may focus on applying these functional principles to non-object-centric environments and exploring domains where the underlying physics or reward structures also undergo shifts.
Summary updated