# P3: Probabilistic Policy Propagation for Stable VAE-Based Robot Learning

Robotics.world

> VAE-based PPO is a standard recipe for legged locomotion: a VAE compresses noisy, high-dimensional sensor history into a latent code, and a policy acts on that code.

**arXiv**: 2607.25541 · Preprint · not peer-reviewed

**Published**: 2026-07-28

**Authors**: Liyun Yan, Jianming Ma, Yang Zhang, Shengcheng Fu, Zhanxiang Cao, Keqi Zhu, Yizhi Chen, Yue Gao

## In plain words

VAE-based PPO is a standard recipe for legged locomotion: a VAE compresses noisy, high-dimensional sensor history into a latent code, and a policy acts on that code. The true policy is an average over all possible latent codes, but existing implementations evaluate the probability ratio and KL divergence using just one sampled latent per observation.

## AI summary

## Overview

**Research area:** Robot learning — specifically reinforcement learning for legged locomotion, combining Variational Autoencoders (VAEs) for state estimation with Proximal Policy Optimization (PPO).

**Technical level:** Advanced. The paper assumes familiarity with PPO clipping, KL divergence, trust-region arguments, variational inference, and moment propagation through neural network layers.

**Scope:** The paper diagnoses a theoretical mismatch between stochastic VAE latents and PPO’s probability-ratio estimation, then proposes a distribution-aware estimator (P³) and validates it on humanoid terrain traversal in Isaac Sim, MuJoCo, and on a real Unitree G1 robot.

## What This Paper Is About

VAE-based PPO is a standard recipe for legged locomotion: a VAE compresses noisy, high-dimensional sensor history into a latent code, and a policy acts on that code. The true policy is an average over all possible latent codes, but existing implementations evaluate the probability ratio and KL divergence using just one sampled latent per observation.

The authors argue this single-sample shortcut systematically biases the ratio, distorts PPO’s clipping decisions, and injects extra gradient noise — explaining the slow, unstable training long observed in this framework. Their goal is to estimate the actual marginalized policy instead.

## Key Contributions

1. **A theoretical diagnosis of instability in VAE-based PPO.** The authors derive an upper bound on the marginalized policy KL divergence via Jensen’s inequality, showing it decomposes into an estimator-shift term and an actor-consistency term over the *entire* latent distribution — a term prior methods regularize using only a single latent sample.
2. **A gradient-noise analysis.** Using the Delta method and a Taylor expansion of the actor, they show the additional latent-sampling noise scales with advantage magnitude, action dimension, and inverse action standard deviation, with a 1/N dependence on sample count (Equation 6).
3. **P³ (Probabilistic Policy Propagation).** A framework with two interchangeable estimators of the same marginalized policy over shared weights: deterministic moment matching (MM), which propagates first and second moments through probabilistic linear and ELU layers, and Monte Carlo (MC) latent sampling.
4. **Latent Sample Fine-Tuning (LSFT).** A hybrid schedule that trains with MM to a plateau, then switches to MC sampling (N = 15) for a short calibration phase, improving robustness without paying MC’s cost throughout training.

## Main Findings

- **Single-sample estimation wastes data.** Under a controlled identical-policy diagnostic, the single-sample VAE (MC with N = 1) keeps only **64.6%** of samples inside the clipping interval, meaning **35.4%** are spuriously clipped. Data efficiency rises to **79.3%** at N = 5, **89.8%** at N = 15, and **96.5%** at N = 50. MM reaches **100.0%** by construction.
- **KL estimates are biased by roughly a factor of three.** For a single-epoch update at epoch 1000, the single-sample VAE overestimates the stable high-sample KL value by approximately 3×. The discrepancy shrinks as N grows, and MM closely matches the estimate obtained with more than 30 samples.
- **MM underestimates action variance but preserves the mean.** The actor’s output resembles a multivariate Gaussian with non-diagonal covariance; MM’s diagonal propagation misses cross-dimensional covariance and yields an overly narrow policy. After LSFT, the propagated and sampled distributions agree more closely.
- **Faster convergence than sampling baselines.** P³ reaches a high-difficulty plateau after **7,000 epochs** of MM training, then runs **1,000 epochs** of LSFT (total 8,000). MC-only with N = 50 converges at epoch **10,000** and at a lower difficulty, so P³ needs **20% fewer** training epochs. MC-only with N = 5 and the single-sample VAE never converged within the 15,000-epoch budget.
- **Faster than representation-learning baselines.** Against AE, SPR, and a direct Actor–Critic baseline, P³ converges first at epoch **8,000** with the highest terminal curriculum difficulty. AE is the only other method to converge, reaching roughly **4.65** at epoch **12,000**, so P³ needs **33% fewer** epochs. SPR and Actor–Critic fail the criterion within 15,000 epochs.
- **Best MuJoCo transfer performance.** Total reward / lifetime: VAE 16.2 / 15.4; SimpleActorCritic 13.7 / 18.3; AE 17.9 / 18.0; SPR 10.7 / 14.4; MC-only (N = 50) 18.2 / 19.4; P³-MM 18.9 / 19.7; full P³ 20.1 / 20.0. MM alone already beats MC-only at its 7,000-epoch checkpoint, and LSFT adds a further gain.
- **Best real-world success counts (10 trials each).** Stepping stones / stairs / gaps: VAE 6 / 7 / 7; SimpleActorCritic 0 / 2 / 3; AE 4 / 7 / 7; SPR 2 / 2 / 4; MC-only (N = 50) 8 / 7 / 9; P³-MM 7 / 7 / 9; full P³ 8 / 9 / 10.

## Methodology in Plain English

The setup is a standard one for legged robots. A VAE encoder looks at a history of proprioceptive readings (and a CNN looks at exteroceptive terrain data) and outputs a Gaussian latent — a mean and a variance. The actor then maps that latent plus the current observation to joint target positions. Because the latent is a distribution, the real policy is an average over all latents.

The authors replace the usual one-sample guess with two ways of computing that average.

**Moment matching** pushes the latent’s mean and variance through the actor’s existing layers, without adding any new network. Linear layers combine the weights with the input variance via a Hadamard (elementwise) product; the ELU activation has a closed-form moment formula derived in the appendix. The result is a Gaussian action distribution whose variance is the propagated variance plus PPO’s exploration variance. Because this is deterministic given an observation, repeated evaluations give identical ratios — no sampling noise, no spurious clipping.

**Monte Carlo sampling** draws N latents, runs the actor on each, and averages the resulting Gaussians. This captures the full nonlinear transformation of the latent distribution, including correlations MM’s diagonal approximation drops — but actor evaluation and memory both scale linearly in N. The paper notes N ≥ 50 is reliable but expensive to use throughout training.

**The hybrid** exploits the fact that both estimators share the same encoder and actor weights, so switching is free. Train with MM to get a strong, low-noise policy quickly; then switch to MC with N = 15 for a brief LSFT phase to expose the actor to real latent uncertainty.

Experiments use humanoid terrain traversal (stepping stones, stairs, gaps) with a curriculum that promotes robots that clear a terrain and demotes those that fail. Training happens at scale in Isaac Sim with RSL-RL; policies are then re-evaluated in MuJoCo (whose contact solver differs from IsaacLab, making it a meaningful transfer test) and finally on a 29-DoF Unitree G1 with a robot-centric elevation map from FAST-LIO on a Livox mid-360 LiDAR. Inference runs on a laptop with an NVIDIA RTX 5090.

## Why This Matters

**Impact on research.** The paper reframes a common engineering annoyance — VAE-based PPO trains slowly and unstably — as a concrete estimation-theory problem with a derivable fix. Because P³ changes only the likelihood estimator and not the architecture or hyperparameters, it is a drop-in change for a large body of existing locomotion work that builds on VAE state estimation.

**Real-world applications:**

- Humanoid and quadruped locomotion over stepping stones, stairs, and gaps, where the VAE’s latent absorbs unobservable quantities such as linear velocity and terrain friction.
- Sim-to-real deployment where observation and dynamics shift perturb the latent representation, making robustness across the latent distribution directly valuable.
- Legged inspection or delivery robots in unstructured environments where proprioceptive history plus exteroceptive terrain mapping must be fused online.
- Any PPO pipeline with a stochastic intermediate representation — the argument is not specific to locomotion.

**Industry relevance.** P³’s headline benefit is sample and epoch efficiency: 20% fewer epochs than the strongest sampling baseline and 33% fewer than the AE baseline, with data efficiency moving from 64.6% to above 96%. For teams paying for large-scale GPU simulation (the authors use NVIDIA Hopper GPUs), fewer epochs translate directly into cost. The fact that the full method runs on a single RTX 5090 laptop at deployment time matters for shipping on real hardware.

## Future Directions

- **Closing MM’s covariance gap more cheaply.** MM’s diagonal approximation discards cross-unit covariance by construction and underestimates action variance; reducing that gap without paying MC’s O(N) cost is left open.
- **Reducing MC’s cost.** The paper states N ≥ 50 is reliable but expensive, and actor evaluation and activation memory scale with N. Better variance-reduction or partial-sampling schemes would let the accurate estimator run longer.
- **Extending beyond locomotion.** The theoretical argument concerns any PPO policy with a stochastic latent, but the evaluation is confined to humanoid terrain traversal; validating on manipulation or other sensing modalities is untested.
- **Re-examining prior VAE-based locomotion results.** Since the diagnosis implies past methods were optimizing a biased surrogate, it is an open question how much published performance was left on the table by single-sample estimation.

## Target Audience

Robotics and RL researchers already working with, or considering, VAE-based PPO for legged locomotion — particularly those who have hit unexplained training instability. It also suits graduate students comfortable with trust-region policy optimization who want a worked example of deriving a practical fix from a KL-divergence decomposition. Readers without a PPO background will find Sections 3 and the appendices demanding.

## Authors’ abstract

Variational Autoencoders are widely used to encode high-dimensional and noisy observations in robotics. However, their stochastic latent creates a mismatch with Proximal Policy Optimization (PPO): an effective policy marginalizes over the latent distribution, whereas former implementations estimate its probability ratio and KL divergence using only one latent sample. We identify a fundamental but overlooked theoretical cause: naive single-sample approximations in stochastic…

[The full abstract on arXiv](https://arxiv.org/abs/2607.25541)

[Read the original paper](https://arxiv.org/abs/2607.25541)

## Related papers

- [PartiGen: Part-Aware Representations for Language-Conditioned Humanoid Motion Generation](https://robotics.world/paper/partigen-part-aware-representations-for-language-conditioned-humanoid-2610.13373) 2026-10-09 · cs.RO · Also by Keqi Zhu, Liyun Yan +5
- [BeJEPA: A Goal-Conditioned Humanoid Behavior World Model via Unsupervised RL](https://robotics.world/paper/bejepa-a-goal-conditioned-humanoid-behavior-world-model-via-2610.23127) 2026-10-16 · cs.RO · Also by Keqi Zhu, Liyun Yan +5
- [CompliantBot: Learning Whole-Body Compliance across Task Interfaces for Humanoid Control](https://robotics.world/paper/compliantbot-learning-whole-body-compliance-across-task-interfaces-for-2611.01748) 2026-11-01 · cs.RO · Also by Keqi Zhu, Yang Zhang +3
- [ActSafeGuard: Differentiable and Training-Aligned Constraint Enforcement for Flow-Matching Policies](https://robotics.world/paper/actsafeguard-differentiable-and-training-aligned-constraint-enforcement-2609.11697) 2026-09-10 · cs.RO · Also by Jianming Ma, Yang Zhang +1
- [URF: A Unified Robot Control-Policy Framework for Stable Contact Aware Manipulation](https://robotics.world/paper/urf-a-unified-robot-control-policy-framework-for-stable-contact-aware-2607.20912) 2026-07-23 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/p3-probabilistic-policy-propagation-for-stable-vae-based-robot-learning-2607.25541
