arXiv:2611.23081cs.LGNov 2026

Manuscript Offprint

arXiv:2611.23081

Learning to Undo: Transfer Reinforcement Learning under State Space Transformations

Mridul Mahajan, Aldo Pacchiano, Xuezhou Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Transfer learning in reinforcement learning (RL) has shown strong empirical success. In this work, we take a more principled perspective by studying when and how transferring knowledge between MDPs (a source and a target) can be provably beneficial. Specifically, we consider the case where there exists an undo map such that applying this map to the target’s state space recovers the source exactly. We propose an algorithm that learns this map by matching state feature statistics gathered from both MDPs, and then uses it to transfer the source policy to the target. We theoretically justify the algorithm by analyzing the setting when the undo map is linear and the source is linearly-Q⋆Q^{\star} realizable, where our approach has strictly better sample complexity than tabula rasa RL in the target MDP. Empirically, we demonstrate that these benefits extend beyond this regime: on challenging continuous control tasks and Atari games, our method achieves significantly better sample efficiency. Overall, our results highlight how shared structure between tasks can be leveraged for efficient transfer of policies across environments. Our codebase is publicly available at github.com/MridulMahajan44/neurips2026-learning-to-undo.

1 Introduction

Figure

Figure 1: State space transformations can significantly decrease sample efficiency (e.g., increasing observation size by 10×10\times).

Reinforcement learning (RL) has seen rapid progress in recent years and has achieved strong performance in complex tasks, such as video games, locomotion, manipulation, and navigation (Mnih et al., 2015; Lee et al., 2019; Zhu et al., 2019). Despite this, learning high-quality policies from scratch typically requires millions of environment interactions, which limits the applicability of RL in real-world domains where data collection is costly or time-consuming (Dulac-Arnold et al., 2019).

Transfer learning aims to overcome this challenge by leveraging knowledge learned from source tasks to accelerate learning on related target tasks (Taylor and Stone, 2009). It has the potential to drastically improve sample efficiency by effectively reusing prior experience. While transfer learning has seen strong empirical success in RL (Zhu et al., 2020), our goal is not to design a state-of-the-art transfer method that works across arbitrary variations in tasks. Instead, we study the problem from a more principled lens, where we explicitly model the similarity between tasks and exploit it to obtain an algorithm that not only has provable sample complexity improvements over learning from scratch, but also works empirically.

An interesting and practically relevant setting with such structure is that of state space transformations: the source and target tasks differ due to transformations in the state space. For instance, real-world transformations such as color transformation from grayscale to RGB, change in frame of reference, and sensor fusion – all are state space transformations (see Fig. 2). Such transformations provide a rich and practical setting to design principled transfer learning methods that explicitly model them. One might assume that such transformations are trivial to handle since the underlying task remains the same. However, this intuition is misleading: as shown in Fig. 1, even a 10×10\times increase in observation size in the sensor fusion setting, where readings must be aggregated meaningfully, is enough to render tabula rasa RL severely suboptimal, which highlights that principled transfer is necessary.

Figure

Figure 2: State space transformations are grounded in real-world applications.

State-space and observation transformations naturally occur in many practical RL scenarios where the underlying task dynamics remain unchanged, but the agent’s interface to the environment changes. For instance, in robotics, policies are often trained in simulation and then deployed on real systems, since real-world training is significantly more costly and difficult to parallelize (Zhao et al., 2020). In the transition from simulation to the real system, differences between simulated and physical sensors cause discrepancies in sensing and perception, and thus, introduce shifts in the agent’s observation space (Bohez et al., 2017). In such settings, relearning policies from scratch can be very sample-inefficient even though the underlying control problem essentially remains the same.

Furthermore, low-dimensional privileged state features are often available during development, but deployment must operate under high-dimensional inputs such as camera observations. Even when both types of observations are available, learning with compact representations is often substantially easier (Hu et al., 2024), which highlights the utility of learning under state-space transformations.

In this work, we address this setting by learning an undo map that transforms the state space in the target back to the source. Instead of learning a policy from scratch, we recover a function that undoes the transformation applied to the target states, which allows reusing source policies in the target task.

To this end, we introduce a distributional notion of undo discrepancy that measures the quality of a candidate undo map. Minimizing this discrepancy is equivalent to matching the state feature distributions in the source MDP and the corresponding undone target feature distributions at each timestep under open-loop action sequences. We then propose a practical transfer learning algorithm that optimizes this objective using samples from the target. Theoretically, we show that when the undo map is linear and the source is linearly-Q⋆Q^{\star} realizable, our approach has strictly better sample complexity than learning from scratch.

To empirically evaluate our method, we use challenging continuous control tasks and Atari games, and construct target tasks by applying transformations such as changes in frame of reference and coordinate system, sensor fusion-inspired transformations, and color shifts. We also consider perception gaps such as moving from sensor observations in the source to pixel observations in the target, and moving from semantic bitmaps in the source to pixel observations in the target. Our results show that learning the undo map consistently outperforms learning the target policy from scratch in terms of sample efficiency, where it often achieves near-optimal performance with an order of magnitude fewer samples. These results highlight the practical utility of our approach for transfer RL.

To summarize, our work makes the following contributions:

I. We propose a novel transfer learning method, Lumos (Learning to Undo by Matching Observation Statistics), that performs regression on state feature statistics to undo state-space transformations in the target MDP (Sections 3.1 and 3.2). II. Theoretically, we prove that our method achieves strictly better sample complexity than learning from scratch when the undo map is linear and the source is linearly-Q⋆Q^{\star} realizable (Section 3.3). III. We empirically demonstrate the practicality of our method via experiments on challenging continuous control tasks and Atari games involving state-space transformations (Section 4).