Latent Dynamics · 2026-11-30

One Model, Many Depths: Straightening Latent Trajectories for Post-Hoc Depth Reduction

Siddharth Rout, Nguyen Thi Hong Linh, Peter Yichen Chen, Eldad Haber

arXiv:2611.35011PDF

AI-assisted summary based on the paper. Consult the linked source for methods and limitations. Benchmark numbers appear after editor verification.

TL;DR

The authors view transformer layers as steps of a discretized latent ODE and note that post-hoc layer pruning degrades predictions because the latent trajectory is curved. They add a trajectory-straightening regularizer that penalizes layer-update deviation from the mean update, and at inference they replace dropped layers by repeating the last computed update. On multiple ViT/DiT tasks, step-consistency improves by orders of magnitude and depth reduction degrades more gracefully than without regularization.

Why it matters

Depth-flexible models let users trade accuracy for compute at inference. The paper targets this by shaping latent trajectory geometry during training (aligned layer updates) and using a simple extrapolation rule when dropping layers. The authors report large reductions in a step-consistency proxy and improved degradation under aggressive depth reduction relative to unconstrained models and sometimes LayerDrop, while also reporting costs (lower full-depth quality at large λ, sharp losses on harder tasks, and slower optimization).

Method

  • Model layers as discrete ODE steps on latent states; define per-layer update Δ_i and a step-consistency loss that penalizes deviation of each Δ_i from the mean update over the trajectory.
  • Train with L_MSE + λ L_straightening; very large λ is unstable and requires scheduled increase.
  • At inference, drop N_D layers and run the first L−N_D layers, then extrapolate by repeating the last computed update N_D times before decoding.

Limitation

The authors state they do not provide theoretical analysis of when a straight trajectory is achievable or how the constraint changes the function class. They also do not claim matching existing pruning/early-exit accuracy–cost trade-offs and include only LayerDrop as a baseline in head-to-head comparisons.

Abstract (from arXiv)

Stacked layers in a transformer can be read as steps of a discretized ODE acting on a latent state. In standard models, this latent trajectory is strongly curved, and pruning layers after training sharply degrades performance. We propose a trajectory-straightening regularizer that penalizes each layer's update for deviating from the average update, which pushes successive layers to move the hidden state in a shared direction. At inference, an extrapolation rule replaces dropped layers by repeating the last computed update. We test the idea on vision transformers (for classification of MNIST, CIFAR100, satellite cloud images) and on diffusion transformers (for MNIST super-resolution, Moving MNIST video prediction, 2m temperature nowcasting). The regularizer lowers a directional-misalignment measure by one to several orders of magnitude and, at moderate strengths, largely preserves full-depth quality on most tasks. Models trained with it degrade far more gracefully than unconstrained models when layers are removed, and more gracefully than LayerDrop under aggressive reductions, although LayerDrop is as good or better for mild reductions. The costs are real: lower full-depth quality at large $\lambda$, steep accuracy loss under aggressive depth reduction on harder tasks, and slower optimization. We compare against LayerDrop, a structured-dropout baseline, on every task. Our evidence is that shaping the geometry of latent trajectories is a promising route to depth-flexible models, not that it already beats existing alternatives. Code is available at https://github.com/Siddharth-Rout/straightenedTransformer.

Related papers

Publication record

Bibliographic evidence describes where and when a record appeared. It does not validate scientific claims.

First announced by arXiv: 2026-11-30 · Indexed by Pub-AI: 2026-11-30 UTC

preprint

One Model, Many Depths: Straightening Latent Trajectories for Post-Hoc Depth Reduction

Siddharth Rout, Nguyen Thi Hong Linh, Peter Yichen Chen, Eldad Haber

First announced by arXiv: 2026-11-30 · Original record ↗

arxiv
2611.35011
Explicit source versions (1)
  • v1 · Date not supplied
  1. Preprint available

    Source date: 2026-11-30 · First detected: 2026-11-30 UTC · Historical baseline

    Source evidence (1)
    • Official evidence ↗ · RSS guid=oai:arXiv.org:2611.35011v1; arxiv:announce_type=new; item pubDate (official metadata)
Abstract · arxiv

Stacked layers in a transformer can be read as steps of a discretized ODE acting on a latent state. In standard models, this latent trajectory is strongly curved, and pruning layers after training sharply degrades performance. We propose a trajectory-straightening regularizer that penalizes each layer's update for deviating from the average update, which pushes successive layers to move the hidden state in a shared direction. At inference, an extrapolation rule replaces dropped layers by repeating the last computed update. We test the idea on vision transformers (for classification of MNIST, CIFAR100, satellite cloud images) and on diffusion transformers (for MNIST super-resolution, Moving MNIST video prediction, 2m temperature nowcasting). The regularizer lowers a directional-misalignment measure by one to several orders of magnitude and, at moderate strengths, largely preserves full-depth quality on most tasks. Models trained with it degrade far more gracefully than unconstrained models when layers are removed, and more gracefully than LayerDrop under aggressive reductions, although LayerDrop is as good or better for mild reductions. The costs are real: lower full-depth quality at large $λ$, steep accuracy loss under aggressive depth reduction on harder tasks, and slower optimization. We compare against LayerDrop, a structured-dropout baseline, on every task. Our evidence is that shaping the geometry of latent trajectories is a promising route to depth-flexible models, not that it already beats existing alternatives. Code is available at https://github.com/Siddharth-Rout/straightenedTransformer.