LAFP: Preserving Latent Action Structure in Latent Policy Learning via Flow Matching

Jiexi Lyu, Xizhou Bu, Qingqiu Huang, Chufeng Tang, Xiaoshuai Hao, Hongbo Wang, Wei Li

TL;DR

Teaching robots or agents from unlabeled videos usually fails at a hidden bottleneck: standard behavior cloning averages out valid, distinct choices into a blurry compromise, destroying the rich structure of learned "latent actions." Latent Action Flow Policy (LAFP) swaps behavior cloning for flow matching to preserve these multimodal action structures, and introduces a clever interpolation trick so the final action decoder doesn't get confused by stochasticity. The result is an 8.2% jump in task success rates with minimal extra compute.

What Problem Does This Paper Address?

High-quality, action-labeled data for robotics and embodied AI is scarce, while unlabeled video is practically infinite. To bridge this gap, researchers use a three-stage pipeline:

  1. Pre-training: Train an Inverse Dynamics Model (IDM) on pairs of video frames $(o_t, o_{t+1})$ to invent a compressed "latent action" $z_t$ describing what happened in between.
  2. Distillation: Train a latent policy to predict that $z_t$ looking only at the current frame $o_t$ (since the future frame isn't available at test time).
  3. Post-training: Use a tiny amount of real action-labeled data to train an action decoder that translates latent actions into physical commands.

Here is the catch: looking at before-and-after frames (Stage 1) is easy and deterministic—the agent clearly went left. Looking at only the current frame (Stage 2) is inherently multimodal—the agent could plausibly go left or right to dodge an obstacle. Prior methods use standard Behavior Cloning (MSE loss) in Stage 2, which averages "left" and "right" into "straight into the wall," collapsing the carefully learned latent space.

Generative models like Flow Matching can capture multiple modes, but they introduce a new headache in Stage 3: because a generative policy is stochastic, it might sample a latent action for "go right" when the recorded dataset label for that frame says "go left," teaching the action decoder a mismatched, noisy mapping.

Methods

LAFP upgrades Stages 2 and 3 while keeping standard VQ-VAE-based pre-training (from the baseline LAOM, where 10% of frames have action labels to regularize the space).

Figure 1: Overview of LAFP. Stage 1 learns an IDM-induced latent action space with an auxiliary action decoder. Stage 2 distills the frozen IDM targets using conditional flow matching. Stage 3 freezes the flow policy and trains the Post-AD with decoder aligned interpolation to reduce the mismatch between stochastic latent samples and physical action labels.
  • Stage 2: Flow Matching Distillation (New): Instead of predicting a single point, LAFP trains a conditional flow policy $\pi_{\text{flow}}$ to transport Gaussian noise $z_0$ to the frozen IDM's target latent $z_t$. Notably, the network uses x-prediction (directly predicting the clean target latent $z_t$ rather than the velocity vector field) and integrates over just 3 Euler steps.
  • Stage 3: Decoder-Aligned Interpolation (New): During post-training, LAFP freezes the flow policy so its delicate latent geometry isn't warped. To solve the label-mismatch problem when training the post-training action decoder (Post-AD), LAFP cheats—legally! Since we have the next frame $o_{t+1}$ in the training set, we know the exact IDM target $z_t$. Instead of starting flow inference from pure random noise $z_0$, LAFP starts from an interpolated point partway between $z_0$ and $z_t$. This nudges the frozen flow solver to land on the specific mode matching the recorded physical action $a_t$. At test time, it starts from pure Gaussian noise as normal.
Figure 2: Flow policy training and decoding. Top: x-prediction and v-prediction parameterize the same linear probability path. Right: Direct sampling can pair different plausible latents with the same labeled action during Post-AD training; decoder aligned interpolation keeps the generated la- tent near its transition specific IDM target. Bottom: At deployment, the frozen flow policy transports Gaussian noise to a latent action, which the Post-AD maps to an environment action.

Datasets

The authors evaluate offline imitation learning across all 16 PROCGEN environments (including Miner, Ninja, CaveFlyer, and StarPilot), which feature procedurally generated levels testing navigation, platforming, collection, and combat. For each game, they collected ~2.6M training frames and 6.5K held-out frames using an expert PPO agent, exposing only 10% of the physical action labels during training. No new benchmarks were introduced.

Key Insights and Ideas

  • Preserving geometry means zero-shot decoder transfer: Because LAFP's flow policy faithfully mimics the IDM's latent distribution, you can actually throw away the Stage 3 decoder, plug in the auxiliary decoder from Stage 1 (which never saw policy-generated latents), and get the exact same 62.6% average success rate! Behavior cloning drops by nearly 10% under the same test.
  • Do not fine-tune the flow policy: In standard behavior cloning, jointly fine-tuning the policy and decoder in Stage 3 helps slightly. In LAFP, joint fine-tuning wrecks the learned transport field—dropping average success from 62.6% to 50.6% (and crashing to 0.0% in unforgiving games like StarPilot). Freezing the flow policy is essential.
UMAP projections showing LAFP preserves the IDM's latent structure, while fine-tuning distorts it.
  • Predict targets, not velocities, in high dimensions: As latent dimensionality scales up to 256, standard vector-field prediction (v-prediction) degrades badly due to accumulated integration errors over few steps, whereas directly predicting the target latent (x-prediction) stays rock-solid.

Key Results

  • Task Performance: Across all 16 PROCGEN games, LAFP achieves a 62.6% average success rate, beating the fine-tuned LAOM behavior cloning baseline (54.4%) by 8.2 percentage points. Huge gains appear in complex games like Miner (87.0% vs. 36.4%) and Ninja (92.4% vs. 75.0%).
  • Distributional Alignment: Measuring distance to the true IDM latent space via squared Maximum Mean Discrepancy (MMD, lower is better), LAFP scores 0.00060 on average across 16 games, nearly two orders of magnitude closer than frozen LAOM (0.03846).
  • Efficiency & Interpolation: Decoder-aligned interpolation boosts highly multimodal tasks like CaveFlyer from 18.4% (naive noise sampling) to 27.8%. Using 3 flow steps hits the performance sweet spot while adding less than 1× inference latency overhead compared to a single-step policy.

Limitations and Future Work

  • Discrete & Single-Task Scope: Experiments are limited to discrete-action video games with a separate model trained per game. Continuous robotic control, multi-task shared policies, and real-world hardware remain untested.
  • Fine-Tuning Instability: Because joint post-training collapses the flow geometry, the latent representation cannot adapt to downstream nuances. Developing structure-preserving joint optimization is an open direction.
  • Multi-Step Latency: Even 3 flow steps cost more compute than a 1-step policy; the authors suggest exploring one-step flow distillation (like consistency models) next.

Summary updated

Abstract

Learning high quality latent actions from large-scale unlabeled videos, coupled with limited real-world interaction data for training an action decoder, has emerged as a promising paradigm for scalable latent policy learning. However, existing approaches typically rely on behavior cloning, which tends to collapse inherently multimodal action distributions into unimodal ones, thereby degrading the pretrained latent action structure. While flow matching provides a potential alternative, directly applying it leads to a misalignment between latent actions and physical actions during action decoder training, due to the stochastic nature of the learned policy. To address these, we propose Latent Action Flow Policy (LAFP), which leverages flow matching for latent policy learning and introduces an inference-time interpolation mechanism to mitigate stochasticity-induced misalignment. Experimental results demonstrate that LAFP consistently outperforms prior methods on most downstream imitation learning tasks, achieving an 8.2\% improvement in average success rate while incurring less than 1× additional inference overhead.
BibTeX
@inproceedings{lyu2026lafp,
  author = {Jiexi Lyu and Xizhou Bu and Qingqiu Huang and Chufeng Tang and Xiaoshuai Hao and Hongbo Wang and Wei Li},
  title = {{LAFP: Preserving Latent Action Structure in Latent Policy Learning via Flow Matching}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=oGzuQHMtXk},
}
Figure