MAGIK: Mapping to Analogous Goals via Imagination-enabled Knowledge Transfer
Ajsal Shereef Palattuparambil, Thommen George Karimpanal, Santu Rana · 2025
Read MAGIK: Mapping to Analogous Goals via Imagination-enabled Knowledge Transfer by Ajsal Shereef Palattuparambil, Thommen George Karimpanal, Santu Rana (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-01623.txt.
Introduction
Ajsal Palattuparambil, Thommen Karimpanal, and Santu Rana published a computing paper in 2025 on teaching learning agents to reuse skills on like tasks by analogy. People transfer knowledge between tasks with little relearning, while agents usually retrain from scratch. Their framework, MAGIK, maps things in a new task to their matches in a known task through an imagination step. The agent then reuses its old policy without touching the new setting.
Tests on grid and robot control tasks show strong zero-shot transfer from only a few human-labeled examples. Comparisons with related methods highlight the analogy mapping as the key gain. The authors present imagination-based mapping as a fresh route to transfer.
Catalog record
| CREATOR | Ajsal Shereef Palattuparambil, Thommen George Karimpanal, Santu Rana |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 55 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-01623
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
MAGIK: Mapping to Analogous Goals via Imagination-enabled Knowledge Transfer Ajsal Shereef Palattuparambil, Thommen George Karimpanal, Santu Rana Abstract Humans excel at analogical reasoning - applying knowledge from one task to a related one with minimal relearning. In contrast, reinforcement learning (RL) agents typically require extensive retraining even when new tasks share structural similarities with previously learned ones. In this work, we propose MAGIK , a novel framework that enables RL agents to transfer knowledge to analogous tasks without interacting with the target environment. Our approach leverages an imagination mechanism to map entities in the target task to their analogues in the source domain, allowing the agent to reuse its original policy. Experiments on custom MiniGrid and MuJoCo tasks show that MAGIK achieves effective zero-shot transfer using only a small number of human-labelled examples. We compare our approach to related baselines and highlight how it offers a novel and effective mechanism for knowledge transfer via imagination-based analogy mapping. † † paperid: 123 1 Introduction Deep Reinforcement Learning (RL) has achieved remarkable success in various domains, from robotic manipulation to autonomous navigation. However, a fundamental challenge remains— transferability across related tasks and environments. Traditional Deep RL models often struggle to adapt to new but structurally related tasks, requiring extensive retraining. This limitation hinders the deployment of RL agents in real-world applications, where goals may frequently change [ 32 ] . Traditional transfer learning in RL typically involves fine-tuning a pre-trained policy on a new task, adapting the agent’s behavior through additional interaction with the target environment. This approach assumes access to target-task data and requires further exploration and learning, which may be impractical in real-world scenarios where data collection is costly or risky. Zero-shot transfer—adapting to a new task without any additional training—remains especially challenging because it requires decoupling the agent’s knowledge of the environment from the specific goals it was trained to achieve. Most RL agents map perceived observations directly to a monolithic policy shaped by the reward structure. As a result, even subtle changes in the reward function or observation space can disrupt this mapping, making it difficult to adapt across tasks. To better understand the kind of transfer we are interested in, consider a simple example: an agent is trained in an environment containing both apples and oranges, but receives rewards only for picking apples. Later, the agent is instructed to perform a new task—picking oranges instead. A human in this situation would naturally think, “Why not pick the oranges the same way I picked the apples?”—reusing the learned skill by mentally substituting one target object for another, without needing to relearn from scratch. We aim to equip RL agents with this kind of cognitive flexibility. Specifically, we focus on tasks that are structurally similar but differ in goals or semantics. Rather than retraining, the agent is encouraged to “imagine” the oranges as apples and execute the same policy as if it were solving the original task. In essence, the agent solves the analogous task by mapping the current observation in the target task to a familiar one from the source task, thereby invoking its prior knowledge to act appropriately. Figure 1 illustrate this idea. Figure 1 : The agent first learns a source policy for picking apples. Later, when instructed to pick oranges, it imagines the oranges as apples and reuses the same policy, effectively solving the new task without retraining. To enable this kind of zero-shot transfer, we propose M apping to A nalogous G oals via I magination-enabled K nowledge (MAGIK), a generative approach based on a semi-supervised Variational Autoencoder (VAE). The core idea is simple: instead of learning a new policy for the target task, the agent imagines how the current situation would appear if it belonged to the original task it was trained on. By doing so, it can reuse its learned policy in a new context. This is enabled by a VAE that learns to disentangle task-agnostic aspects of an observation—such as the layout or object positions—from task-specific aspects—such as the identity of the rewarded object. Later, when faced with a new task, the agent generates (or imagines) a modified observation by combining the task-agnostic structure from the target task with task-specific information from the source task. This effectively maps the target observation into a familiar, source-like one where the agent already knows how to act. While prior work on transfer in RL ( Gamrian and Goldberg 2019 ; Zhu et al. 2024 ; Zhang et al. 2017 ; Touati et al. 2022 ; Chua et al. 2024 ) often requires fine-tuning or additional interaction with the target task, our method bypasses this entirely—requiring only a small number of labeled data points to help structure the latent space during training. MAGIK relies solely on what the agent has already learned and uses imagination to reinterpret the new task in familiar terms. This allows the agent to act effectively in new but related tasks without any further training. We empirically validate our approach in controlled RL environments, showing that MAGIK enables successful adaptation to new tasks with zero additional interaction. Our contributions are as follows: • Proposal of a framework that achieves policy reuse in a zero-shot setting through imagination. • We use a semi-supervised VAE architecture that disentangles class-agnostic and class-related features, allowing controlled state generation for analogous tasks. The remainder of the paper is structured as follows. Section 2 reviews related work on transfer learning and generative models in RL. Section 3 outlines necessary background. Section 4 discusses the problem setup. Section 5 presents our approach, including the architecture of the imagination network and the training procedure. Section 6 provides experimental results, and Sections 7 offer discussion and concluding remarks. 2 Related Work Our work builds upon existing methods by integrating elements from transfer learning, imagination-based RL, semi-supervised VAEs, and structured latent representations. 2.1 Transferability in Deep RL A key strategy for improving transfer in RL involves learning shared latent representations that remain invariant across different tasks and domains Higgins et al. 2017b ; Cobbe et al. 2019 ; Gamrian and Goldberg 2019 . These approaches enable agents to extract transferable features, allowing adaptation to new environments with minimal fine-tuning. However, many such methods rely on direct interaction with the target environment or assume the reward function remains unchanged across tasks. In contrast, our method facilitates transfer without direct exposure to the target domain, using a structured imagination model to infer representations aligned with analogous tasks. In Shereef Palattuparambil et al. 2024 , a personalised policy is constructed by dynamically integrating human intent via policy fusion. Successor Features (SFs) Barreto et al. 2017 offer another promising direction for transfer by decomposing the value function into dynamics-dependent and reward-specific components. Generalised Policy Improvement (GPI) Barreto et al. 2018 builds upon this to support zero-shot adaptation across tasks with shared dynamics and differing rewards. Recent work has scaled SFs to high-dimensional visual inputs using deep encoders Borsa et al. 2018 ; Chua et al. 2024 ; Touati et al. 2022 ; Zhang et al. 2017 . The SF assume the linearity of the reward and this makes them limited in their applicability. Unlike SF, our approach does not assume linearity in the reward function