Quantifying Generalisation in Imitation Learning
Nathan Gavenski, Odinaldo Rodrigues · 2025
Read Quantifying Generalisation in Imitation Learning by Nathan Gavenski, Odinaldo Rodrigues (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-2509-24784.txt.
Introduction
Nathan Gavenski and Odinaldo Rodrigues introduce Labyrinth, a test setting for imitation learning, in a 2025 paper. Imitation learning trains agents to copy expert actions. Standard test suites, they argue, vary too little between training and testing. That makes it hard to tell whether an agent truly generalizes or just repeats what it saw. Labyrinth gives exact control over maze layout, start and goal spots, and task difficulty.
The setting offers a fully visible grid world with known best actions. Training, testing, and final check runs can be kept clearly apart. Variants add hidden state, key-and-door tasks, and slippery ice floors. Because runs are easy to repeat and inspect, Labyrinth helps builders find which parts of a task break an agent. The goal is sturdier agents that carry skills into new settings.
Catalog record
| CREATOR | Nathan Gavenski, Odinaldo Rodrigues |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 88 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2509-24784
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Quantifying Generalisation in Imitation Learning Nathan Gavenski, Odinaldo Rodrigues Abstract Imitation learning benchmarks often lack sufficient variation between training and evaluation, limiting meaningful generalisation assessment. We introduce Labyrinth, a benchmarking environment designed to test generalisation with precise control over structure, start and goal positions, and task complexity. It enables verifiably distinct training, evaluation, and test settings. Labyrinth provides a discrete, fully observable state space and known optimal actions, supporting interpretability and fine-grained evaluation. Its flexible setup allows targeted testing of generalisation factors and includes variants like partial observability, key-and-door tasks, and ice-floor hazards. By enabling controlled, reproducible experiments, Labyrinth advances the evaluation of generalisation in imitation learning and provides a valuable tool for developing more robust agents. 1 Introduction Imitation learning lies at the intersection of reinforcement and supervised learning. It can be seen as a relaxation of the reinforcement learning problem, where the agent learns a new skill through its own experiences, into a supervised learning setting, where the agent learns by observing others perform the same task. Like supervised learning, imitation learning relies on observed data for training. However, its agentic nature makes evaluation more akin to reinforcement learning, as the agent’s performance is assessed through interactions with an environment rather than static comparisons against a dataset. As a result, many common evaluation benchmarks for imitation learning originate from the field of reinforcement learning. The most common benchmarks [ 11 ] for imitation learning are: (i) CartPole [ 2 ] ; and (ii) MountainCar [ 19 ] , which are classic control tasks; (iii) Ant [ 23 ] ; and (iv) Humanoid [ 24 ] , which are continuous control tasks; and (v) Atari Games, which set a benchmark for various games. Classic control tasks, although reasonable for testing the initial capabilities of an imitation learning agent, are too simplistic to capture the complexities of real-world decision-making. They have low-dimensional state spaces and a limited range of discrete actions. As a result, they provide only a narrow evaluation of an imitation learning agent’s capabilities. On the other hand, Continuous control tasks provide a more challenging evaluation setting. These environments feature high-dimensional state and action spaces, requiring agents to learn complex motor control strategies. However, they still share key limitations with classic control tasks, such as a lack of precise state abstractions and the expected behaviour for the agent at any given state. The first limitation refers to the vector state lacking information about the environment setting, such as the length of limbs for robots and the goal position, since the assumption is that the learned agent will be evaluated under the exact same constraints as it was during training. A common solution to incorporate this information is to use image-based states. However, when using images as states, the state may not accurately represent the difference between states due to the loss of precision from continuous numbers to pixel-based representation, and may exhibit partial observability since some parts of the agent may not be visible for the entire time. For the second limitation, in these environments, finding the optimal expected behaviour for an agent in any given state is virtually impossible, which hinders the formal assessment of generalisation. Finally, Atari Games introduces diverse tasks with visual inputs and long-term strategic planning. While they provide a more varied and challenging benchmark, they remain constrained because the training data and test environments do not differ, meaning agents are evaluated under the same conditions in which they were trained. This prevents a clear separation between training and testing data, which is crucial for assessing generalisation. To address these limitations, we introduce Labyrinth 1 1 1 Source code available at: https://github.com/NathanGavenski/Labyrinth , a novel environment designed to: (i) explicitly separate training and test data by altering structure, goals, or starting positions, demanding generalisation; (ii) provide a discrete and fully observable state space, where all possible states, transitions, and optimal actions are explicitly defined, enabling precise analysis of an agent’s decision-making; (iii) allow for the systematic analysis of an agent’s ability to learn and adapt to structural changes, offering insights into its robustness and generalisation capabilities; and (iv) the environment can be easily customised to increase the difficulty further, e.g., by increasing the size of the labyrinth or maintaining the same solution set but changing the structure to analyse the inner parameters of the agent. Labyrinth offers a more robust and comprehensive benchmark for imitation learning, more effectively capturing the challenges of real-world learning scenarios that require drastic adaptation from the agent than existing environments. 2 Labyrinth Environment In this work, we propose the Labyrinth environment to help assess the generalisation capabilities of imitation learning agents. Navigating through a labyrinth from designated starting and goal positions by observing the labyrinth’s entire structure is a trivial task. Humans can find a route by analysing all paths connecting the start and goal positions, and then applying a given criterion to select one (e.g., the shortest). Classical problem-solving approaches, such as breadth-first search, can generalise to any labyrinth structure (considering the problem’s solution and not its optimality). Therefore, navigating through a labyrinth should be considered an easy and well-suited task for measuring how well an imitation learning algorithm learns, and how general the agent’s resulting capability is, i.e., by using structural configurations (e.g., wall locations, obstacles, etc) not present in the training data or moving from a different initial starting point. Unlike other environments, a labyrinth offers some inherent characteristics: (i) agents cannot perform state-matching by forcing a path to be similar to its training data; (ii) changing the configuration of the labyrinth (walls, start and goal) does not affect the task and is easy to define; and (iii) changes between states are easier to identify since states can only differ by the agent’s position. These characteristics allow us to perform a more systematic evaluation of different methods. For example, one can train a set of agents in one labyrinth structure and only the starting position or a subset of its walls. Alongside the traditional task of navigating a labyrinth to reach a goal, the Labyrinth environment offers the possibility of making solutions more complex by adding two additional components: (i) key and door , where the agent must retrieve a key to open a door before reaching the goal; and (ii) ice floors , where the agent must avoid stepping onto “frozen” (unsafe) tiles. We discuss the rationale for these two tasks and their importance to imitation learning in Sec. 2.3 . 2.1 Structure and Actions Labyrinth can create a new structure by specifying the desired number of rows and columns, including height and width. The coordinates of the starting ( s_{0} ) and goal tiles ( g ) can be either (i) user-defined – the user specifies where the start and goal tiles are located; (ii) biased – the starting tile is at the lower-left corner of the labyrinth and the goal is at its upper right, or (iii) unbiased – the goal and starting tiles are set randomly within the labyrinth, according to a minimum specified distance of each other (cf. the Manhattan distance d(s_{0},g)=\mid x_{s_{0}}-x_{g}\mid+\mid y_{s_{0}}-y_{g}\mid ). We refer to these as biased and unbiased due to the nature of the action distribution