Zero-shot Imitation Learning by Latent Topology Mapping

Maxwell J. Jacobson, Yexiang XuearXiv 2026 · arXiv

TL;DR

ZALT (Zero-shot Agents from Latent Topologies) enables agents to solve complex, long-horizon tasks by mapping expert demonstrations into a graph of "hub states." By planning over these abstract junctions instead of primitive actions, ZALT achieves a 55% zero-shot success rate on unseen tasks in a 3D maze, dwarfing the 6% achieved by the strongest traditional imitation learning baselines.

What Problem Does This Paper Address?

Imitation learning (IL) is a powerful way to teach agents, but it struggles with two major hurdles: compounding errors and zero-shot generalization.

In long-horizon tasks—where an agent might need to perform hundreds of actions to reach a goal—even tiny errors in a policy or dynamics model accumulate over time. Eventually, the agent drifts off-course and fails. Furthermore, collecting demonstrations for every possible start-to-goal combination is often impossible. Researchers want agents that can take an incomplete set of demonstrations and "stitch" together familiar behavioral segments to solve entirely new tasks without further training.

Methods

The authors introduce ZALT, which moves away from primitive-level planning to a hierarchical approach based on a Behavior Topology.

  1. Latent Space Learning: ZALT first learns a dynamics-aligned latent space using a low-level encoder-decoder model. This space is designed so that states leading to similar future behaviors are grouped together.
  2. Hub Discovery: The system identifies "hubs"—latent states where multiple demonstrations either converge (meet) or diverge (split). These hubs act as reusable junctions in the data.
  3. Topology Mapping: These hubs become nodes in a graph, and the demonstrated segments between them become edges.
  4. Hierarchical Planning:
    • High-level: A dynamics model (using a GRU) predicts the most plausible sequence of hubs to reach a goal, given the agent's history.
  5. Low-level: Specific hub-to-hub policies are trained via behavioral cloning to execute the transitions between these junctions.

At inference time, ZALT searches the topology for the most likely path and executes it by chaining these learned policies.

Figure 1: Directly composing behavior at the primitive-action level requires many sequential decisions, allowing small policy, model, or distribution-shift errors to compound until the objective is lost (left). ZALT instead learns a behavior topology from demonstrations, using a low-level dynamics model to identify a few reusable hub states (middle). Then, a high-level dynamics model plans over those hubs, and demonstration-trained policies execute the selected hub-to-hub segments (right). This compresses a long primitive horizon into a shorter sequence of abstract transitions, enabling zero-shot composition of new start–goal behaviors with fewer opportunities for error accumulation. Demonstration video: https://arcosin.github.io/Zalt/

Datasets

The authors evaluated ZALT in a custom 3D maze environment (built on MiniWorld/CARL). The task is highly compositional: the agent must find keys, unlock specific doors, collect diamonds, and deposit them in a barrel in a specific order.

The dataset consisted of:

  • 18 successful demonstrations: Intentionally incomplete, covering only half of the possible start-goal pairs.
  • 120 failed demonstrations: Included to help the model identify unsupported routes and common failure points.

Key Insights and Ideas

  • Horizon Compression: One of ZALT's biggest wins is reducing the planning horizon. A task requiring ~250 primitive steps is compressed into roughly 33 hub-level transitions. This massive reduction (about 8x) leaves far fewer opportunities for errors to compound.
  • Automatic Junction Discovery: Instead of manually defining subgoals, ZALT finds them by looking at where expert trajectories naturally intersect or branch out.
  • Path-Dependent Planning: The high-level model doesn't just look at the current hub; it considers the history of hubs visited. This is crucial for tasks with internal state—like knowing if you've already picked up a specific key that isn't currently visible in the agent's first-person view.
Figure 2: Hub formation. ZALT coa- lesces demonstration latent vectors into clusters. Hubs are clusters where demos converge from multiple previous clusters or diverge into multiple next clusters.

Key Results

ZALT significantly outperformed all baselines in the zero-shot setting:

  • Zero-shot Success: ZALT achieved 55% success on unseen tasks. The strongest baseline, DQN+BC, managed only 6%, while others (CQL, IQL, Option-Critic) failed completely (0%).
  • Seen Task Success: Even on tasks it had seen demonstrations for, ZALT reached 72.2% success, while the best baseline only reached 11%.
  • Online Adaptation: When allowed 500 episodes of online interaction to "fix" their performance, the baselines still failed to improve, highlighting how difficult long-horizon credit assignment is for standard RL/IL methods.
Figure 3: Success rate on unseen start–goal pairs immediately after seeing demonstrations (left), and after a period of online adaptation in the environment (right). ZALT has a zero-shot success rate of 0.55 (immediate success in 55% of the unseen tasks). The only baseline able to show any zero-shot capability was DQN+BC with a 0.06 success rate. After 500 episodes of adaptation (interacting online with the environment), no baselines gained back performance, likely due to the long horizons.

Limitations and Future Work

While ZALT is a major step forward, it has a few notable limitations:

  • Connectivity Assumption: ZALT assumes that the demonstration data contains enough overlapping segments to form a connected graph. If a required behavioral bridge is missing, the agent cannot cross it.
  • Latent Quality: The effectiveness of the hubs depends heavily on the quality of the learned latent representation. If the encoder fails to distinguish between behaviorally different but visually similar states, the topology will be flawed.
  • Static Topology: Currently, ZALT builds a fixed topology from a fixed dataset. The authors suggest that future work could involve online topology mapping, where the agent adds new hubs and refines edges as it interacts with the environment.
Figure 4: Video frames from a successful ZALT zero-shot inference run (goal: green gem, then red gem). For each step, the top is a visualization of the behavior topology with hubs that are a part of the plan highlighted. Below are the actual images received by the agent. Note that the same visual state (t=2, 42, 92) can have different hubs depending on what has already been done in the environment. In this case, a complex ∼200 step traversal was encoded in only 31 hubs. This horizon compression and selection of states to be hubs allowed this task to be completed, despite never appearing in training data (zero-shot). The full video can be viewed at: https://arcosin.github.io/Zalt/.

Summary updated

Abstract

Imitation learning is effective for training agents when expert demonstrations are available, but collecting demonstrations for every complex task in an environment is costly. We study the long-horizon, goal-conditioned setting where a fixed demonstration dataset contains useful behavior, but not complete examples for every task the agent must solve. Existing imitation learning methods can learn strong policies from demonstrations, but when solving long-horizon tasks, small errors accumulate over long primitive-action trajectories and make zero-shot adaptation to new tasks unreliable. We introduce Zero-shot Agents from Latent Topologies (ZALT), an imitation-learning method that solves unseen start-goal tasks beyond those demonstrated during training. ZALT identifies latent hub states where trajectories converge or diverge, learns policies and a dynamics model over hub-to-hub transitions, and plans over the hub topology to complete new tasks. This topology makes demonstrated behaviors explicitly composable while compressing long tasks into shorter sequences of abstract transitions -- combined, these enable ZALT to perform zero-shot adaptation. In a complex 3D maze environment, ZALT achieves 55% zero-shot success on unseen tasks, compared to 6% for the strongest baseline.
BibTeX
@misc{jacobson2026zero,
  author = {Maxwell J. Jacobson and Yexiang Xue},
  title = {{Zero-shot Imitation Learning by Latent Topology Mapping}},
  year = {2026},
  eprint = {2605.08450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.08450},
}

Loading related content...

Figure