Latent Memory Palace: Reasoning for Control as Autoregressive Variational Inference

1 University of Washington 2 Toyota Research Institute
Scene Camera
Wrist Camera
Reasoning Steps
Latent Memory Palace (LMP) casts reasoning as variational inference with an autoregressive latent distribution. From this principle, we build (1) performant control policies that can adaptively allocate their test-time compute, and (2) discrete action tokenizers amenable to training autoregressive policies.

Overview

Human decision-making is highly flexible, ranging from immediate reactions to extended deliberations. Large language models have also shown a similar capacity for adaptive reasoning. However, bringing this capability to control policies is challenging, since reasoning directly in language can be too coarse for motor control. We propose to have control policies reason iteratively in a learned latent space trained end-to-end for action prediction. This preserves the benefit of iterative, adaptive computation while allowing latents to capture control-relevant information at the appropriate granularity.

Method

Reasoning as Variational Inference

We cast reasoning for control as inference in a latent-variable model, where actions \(a\) are generated from observations \(o\) and latent traces \(z = (z_1, z_2, \ldots, z_{T(z)})\) drawn from a vocabulary \(\mathcal{V} \cup \{\texttt{eos}\}\). We maximize the evidence lower bound of the maximum likelihood objective:

\[ \log p(a \mid o) \;\ge\; \mathbb{E}_{z_{1:T(z)} \sim q_\theta(\cdot \mid o, a)} \big[\, \log p_\phi(a \mid o, z_{1:T(z)}) \,\big] - D_{\mathrm{KL}}\!\big(\, q_\theta(z_{1:T(z)} \mid o, a) \,\big\|\, p_\theta(z_{1:T(z)} \mid o) \,\big). \]

The learned prior \(p_\theta(z \mid o)\) and the action decoder \(p_\phi(a \mid o, z)\) together fully parameterize a policy: actions are generated by first sampling a reasoning trace \(z \sim p_\theta(z \mid o)\), then sampling \(a \sim p_\phi(a \mid o, z)\).

Adaptive Computation via Compression

The objective above doesn't inherently incentivize adaptive computation. We introduce compression by decaying the Gaussian action decoder's variance with latent length. This imposes a length penalty and encourages the model to allocate latent steps parsimoniously.

Training via Latent Space Reinforcement Learning

We optimize the ELBO using latent-space reinforcement learning. Training alternates between two phases: (1) the posterior generates a buffer of latent trajectories; (2) the model optimizes a clipped surrogate objective (PPO) of the evidence lower bound, minimizing KL divergence to the posterior while maximizing action likelihood.

Practical Instantiation

LMP uses a cross-attention encoder-decoder architecture. The encoder attends to observations and actions to autoregressively generate a variable-length sequence of latent tokens. The decoder attends to observations and latent tokens to predict action chunks. A EOS token terminates the reasoning chain, allowing the model to adaptively allocate its computation.

Policy Experiments

Real-Robot (DROID)

We train language-conditioned LMP-π and DP on the DROID dataset. Deployed zero-shot, LMP-π outperforms DP on block-bowl and marker-mug. We then finetune on two more tasks: peg-hole and clean-table. LMP-π demonstrates both precision and compositional generalization, notably picking up at least two objects with 95% success in clean-table.

Zero-Shot Finetuned
block-bowl marker-mug peg-hole clean-table (1/3) clean-table (2/3) clean-table (3/3)
DP 0.40 0.25 0.30 0.80 0.55 0.25
LMP-π 0.65 0.55 0.70 0.95 0.95 0.55

LMP-π

DP

Simulation (LIBERO-90)

On language-conditioned multitask LIBERO-90, LMP-π performs marginally better than DP across the board, but a closer look reveals significantly higher success on the bottom-10 tasks. This indicates that LMP-π organizes information with less cross-task interference. The per-task breakdown below shows LMP-π tapering off at a slower rate than DP.

All Tasks Bottom-10 Tasks
DP 0.909 ±0.004 0.463 ±0.011
LMP-π 0.933 ±0.003 0.645 ±0.023

Hover a bar to see task details.

Action Tokenizer Experiments

We can instantiate LMP as a variable-length discrete action tokenizer, LMP-tok, by dropping the observation conditioning. When controlling for downstream autoregressive policies, LMP-tok significantly outperforms all baselines and is the only method achieving nontrivial performance on the RoboMimic tool-hang task.

Task VQ-VAE FAST OAT LMP-tok
robomimic-lift 0.82 ±0.06 0.98 ±0.02 0.97 ±0.02 1.00 ±0.00
robomimic-can 0.32 ±0.08 0.57 ±0.12 0.57 ±0.08 0.93 ±0.02
robomimic-square 0.02 ±0.02 0.42 ±0.10 0.32 ±0.08 0.67 ±0.10
robomimic-tool-hang 0.00 ±0.00 0.00 ±0.00 0.00 ±0.00 0.17 ±0.02
robomimic average 0.29 0.49 0.47 0.69
libero-soup-cheese 0.18 ±0.05 0.22 ±0.13 0.15 ±0.04 0.92 ±0.05
libero-mug-mug 0.28 ±0.02 0.10 ±0.04 0.23 ±0.02 0.88 ±0.06
libero-moka-moka 0.00 ±0.00 0.02 ±0.02 0.17 ±0.08 0.63 ±0.08
libero-bowl-drawer 0.02 ±0.02 0.37 ±0.09 0.60 ±0.07 0.75 ±0.08
libero-book-caddy 0.23 ±0.06 0.40 ±0.07 0.42 ±0.10 0.57 ±0.06
libero average 0.14 0.22 0.31 0.75

lift

can

square

tool-hang

Analysis

Does the model adaptively allocate test-time compute?

We visualize the number of reasoning steps generated during rollouts. The model uses fewer reasoning steps during gripper movements, e.g., grasping and releasing in DROID tasks or hand-over in RoboMimic transport.

DROID Tasks

Simulation Tasks

Probing Task

We manually slide a block through the open gripper while querying the policy for the number of reasoning steps at each state. The reasoning length shifts with the block's position relative to the gripper.

Does iterative computation help?

We compare LMP-π to two non-iterative latent-variable baselines: Gaussian VAE Policy and VQ-BeT. LMP-π consistently outperforms both on D3IL and RoboMimic, indicating that fixed-length latent representations lack the granularity needed for complex manipulation tasks.

Task VQ-BeT VAE LMP-π
d3il-aligning 0.23 ±0.03 0.51 ±0.07 0.71 ±0.04
d3il-stacking 0.53 ±0.03 0.71 ±0.07 0.86 ±0.04
d3il-sorting-2 0.46 ±0.02 0.67 ±0.13 0.80 ±0.01
d3il-sorting-4 0.41 ±0.01 0.68 ±0.04 0.68 ±0.02
d3il-sorting-6 0.32 ±0.04 0.70 ±0.04 0.75 ±0.04
d3il average 0.39 0.57 0.76
robomimic-lift 0.96 ±0.00 0.97 ±0.01 1.00 ±0.00
robomimic-can 0.83 ±0.04 0.78 ±0.07 1.00 ±0.00
robomimic-square 0.58 ±0.06 0.79 ±0.08 0.87 ±0.02
robomimic-tool-hang 0.15 ±0.04 0.29 ±0.06 0.51 ±0.08
robomimic-transport 0.26 ±0.05 0.58 ±0.12 0.75 ±0.08
robomimic average 0.56 0.68 0.83

Does compression contribute to performance?

We ablate compression strength by controlling the decoder variance schedule. A smaller σmin penalizes prediction errors more heavily, yielding shorter latent traces. Across LIBERO tasks, increasing compression (smaller σmin) improves performance, showing that parsimonious allocation of latent tokens is crucial for generalization.

σmax → σmin All Tasks Bottom-10 Tasks
0.1 → 0.01 0.933 ±0.003 0.645 ±0.023
0.1 → 0.03 0.913 ±0.001 0.567 ±0.006
0.1 → 0.05 0.870 ±0.012 0.450 ±0.045

On DROID checkpoints, we find that too little compression (0.1-0.08) causes the decoder to ignore the latents; too much (0.1-0.01) forces overly short traces and raises reconstruction error; we use a balanced schedule (0.2-0.02) in our experiments.

Effect of compression

More Analysis

Latent length over training We find the reasoning length to increase spontaneously throughout training. The length is initially low because of high reconstruction errors, then increases as training converges.

Posterior latent length over training

Reasoning length vs. action variance We find reasoning length to be negatively correlated with nearest-neighbor action variance. The variance can be largely attributed to binarized gripper actions timed differently across demonstrations, resulting in the model spending less compute during gripper movements.

Reasoning length vs KNN action variance

Reasoning and multimodality We visualize rollouts on the D3IL avoiding task as the maximum number of latent steps is truncated. The policy becomes effectively deterministic as the latent length decreases to zero, yet it remains mode-seeking rather than mode-averaging.

Mode-seeking under truncated latent steps

BibTeX

@misc{zhu2026lmp,
    author    = {Zhu, Chuning and Xu, Eva and Barreiros, Jose and Srinivasan, Krishnan and Shah, Paarth and Gupta, Abhishek},
    title     = {Latent Memory Palace: Reasoning for Control as Autoregressive Variational Inference},
    year      = {2026},
}