Skip to content
ImagineWorld

Hierarchical Latent Prediction for Language Models

node_idnode-paper_arxiv-2608.05806_hierarchical-latent-prediction-for-language-models
node_typenode-paper
schema_profileworld.node_paper.v1
alternate_namesarxiv-2608.05806
statusactive
orthogonal_scopemanifold, entropy, authority, state
manifoldworld
entropymedium
authorityguides
stateexternal
domainimagineworld.net
node_interiorrosetta_contract
unisonone evidence claim read five ways: seated in the latent-prediction field, the work does hierarchical latent prediction for language models — predicting future latents at multiple levels of abstraction instead of only the next token — its framework, regime, and stance agreeing on what it is
governed_byWORLD-MANIFOLD, CORPUS
constitutional_citationCONSTITUTION
evidence_bundleworld-bundle-paper
publication_classarxiv_preprint
paper_titleHierarchical Latent Prediction for Language Models
paper_authorsChang Shi, Tim Pearce, Manan Tomar, Siddhartha Sen, John Langford
arxiv_id2608.05806
arxiv_urlhttps://arxiv.org/abs/2608.05806
arxiv_categories{"primary":"cs.CL","secondary":["cs.AI"]}
arxiv_v1
arxiv_submitted_at2026-08-06
arxiv_updated_at2026-08-06
ocr_sourcearxiv_html
ocr_quality_classverbatim_latexml_html
extraction_toolarxiv-nodepaper-transpose
extraction_pipeline_versionworld-ingest-arxiv-html-v1.0
extracted_at2026-10-13T06:51:09Z
math_preserved_as_latextrue
figures_extractedtrue
references_structurally_parsedfalse
created_at2026-10-13T06:51:09Z
updated_at2026-10-14T05:23:52Z
local graph

Hierarchical Latent Prediction for Language Models

Section titled “Hierarchical Latent Prediction for Language Models”

Authors: Chang Shi, Tim Pearce, Manan Tomar, Siddhartha Sen, John Langford

arxiv: 2608.05806

Converted to markdown on 2026-10-13 from the arXiv HTML (LaTeXML) rendering; figures embedded from the same source.


While standard Next-Token Prediction (NTP) lays the foundation of language model pretraining, its teacher-forced training paradigm may not be optimal for long-horizon reasoning and planning. Recent works such as Multi-Token Prediction (MTP) and Next-Latent prediction (NextLat) try to mitigate the problem through predicting multiple future tokens and self-supervised prediction in the latent space. However, those auxiliary objectives either have a limited horizon or suffer from compounding error from multi-step rollout. We introduce Hierarchical Latent Prediction (HiLP), which introduces an auxiliary higher-level abstract latent to help reduce the error accumulation effect in latent-space rollouts. Experiments show that HiLP can lead to longer-horizon coherent belief state representation and demonstrate the effectiveness of our method across coding and multi-step reasoning benchmarks, and offers more speculative decoding efficiency.

Next-token prediction (NTP) with teacher forcing has yielded transformers of remarkable capability, yet it also introduces a training-inference mismatch known as exposure bias: during inference time, the auto-regressive token generation relies on its own previous outputs, leading to compounding errors which could degrade long-range generation quality.

Recent work NextLat (Teoh et al., 2025) partially mitigates the issue through enforcing a latent space self-prediction loss. However, its latent dynamics model predicts one step ahead. This means that the self-predictive learning signal, while effective in inducing local transition consistency, provides only indirect gradient pressure to form representations that capture structure at longer temporal scales. In practice, long-horizon dependencies still remain attenuated by sequential dynamics unrolling.

Multi-scale temporal abstraction methods have a long history in sequence modeling and reinforcement learning (Sutton et al., 1999; Bacon et al., 2017). Inherently, language incorporates hierarchical structures at multiple scales, from characters, phrases to sentences, paragraphs and discourses. Therefore, it is reasonable to extend NextLat with hierarchical learning signals at different granularities, for the sake of richer latent transition dynamics. This observation motivates a natural question: can we introduce temporal hierarchy directly into the latent-space self-prediction objective, shaping the representation of a language model transformer to encode multi-scale predictive structure during pretraining?

In this paper, we answer affirmatively by introducing Hierarchical Latent Prediction (HiLP). Our contributions are as follows:

    We propose HiLP, a hierarchical representation training method that introduces multi-scale self-predictive learning into transformer pretraining via sliding-window attention over latents, a higher-level dynamics model, and a combined NTP head.

    We evaluate the resulting models on downstream benchmark accuracy and speculative decoding efficiency, comparing HiLP with MTP and NextLat.

    We demonstrate that the entire hierarchical apparatus can be removed at inference time with no architectural overhead, preserving NextLat’s option of being a pure training-time intervention.

We use X_1:TX\_{1:T} to denote the token sequence prefix. A transformer G_θG\_{\theta} produces lower-level latents h_t=G_θ(X_1:t)\mathbf{h}\_{t}=G\_{\theta}(X\_{1:t}). A sliding-window attention (SWA) module with window kk produces higher-level abstract latents u_t=SWA(h_t−k+1:t)\mathbf{u}\_{t}=\mathrm{SWA}(\mathbf{h}\_{t-k+1:t}), a deterministic function of the last kk lower states.

A higher-level dynamics model is trained to predict kk steps ahead in this abstract space. This explicit coarser-scale prediction objective encourages lookahead planning beyond single-step latent transitions. A combined NTP head then conditions the next-token prediction on both level latents, taking advantage of abstract lookahead information to improve subsequent predictions. Four parameterised maps are jointly learned: output head p_θp\_{\theta}, lower dynamics p_ψp\_{\psi}, upper dynamics p_ϕp\_{\phi}, and combined head p_ρp\_{\rho}. An illustration of the architecture is shown in Fig. 1.

The total training objective is then a weighted sum of five terms: the standard NTP loss, the NextLat (lower-level) transition consistency loss, the KL term, the higher-level transition consistency loss, and the combined NTP loss. At inference time, only the standard NTP head is used, the entire hierarchical apparatus serves purely as an auxiliary training signal.

L_ntp\displaystyle\mathcal{L}\_{\mathrm{ntp}}=E_t<T ⁣[−log⁡p_θ(X_t+1∣h_t)]\displaystyle=\mathbb{E}\_{t<T}\!\left[-\log p\_{\theta}(X\_{t+1}\mid\mathbf{h}\_{t})\right](A)
---------------
L_h\displaystyle\mathcal{L}\_{\mathrm{h}}=E_t ⁣[1d∑_i=1dSL1(sg[h_t+i],h^_t+i)]\displaystyle=\mathbb{E}\_{t}\!\left[\tfrac{1}{d}\textstyle\sum\_{i=1}^{d}\mathrm{SL1}(\mathrm{sg}[\mathbf{h}\_{t+i}],\hat{\mathbf{h}}\_{t+i})\right](B)
------------
L_KL\displaystyle\mathcal{L}\_{\mathrm{KL}}=E_t ⁣[1d∑_i=1dD_KL ⁣(p_θsg(⋅∣sg[h_t+i]) ∥\displaystyle=\mathbb{E}\_{t}\!\left[\tfrac{1}{d}\textstyle\sum\_{i=1}^{d}D\_{\mathrm{KL}}\!\left(p\_{\theta}^{\mathrm{sg}}(\cdot\mid\mathrm{sg}[\mathbf{h}\_{t+i}])\,\middle\|\right.\right.
---------------
p_θsg(⋅∣h^_t+i))]\displaystyle\quad\quad\left.\left.p\_{\theta}^{\mathrm{sg}}(\cdot\mid\hat{\mathbf{h}}\_{t+i})\right)\right](C)
---------------
L_u\displaystyle\mathcal{L}\_{\mathrm{u}}=E_t ⁣[SmoothL1(sg[u_t+k], u^_t+k)]\displaystyle=\mathbb{E}\_{t}\!\left[\mathrm{SmoothL1}(\mathrm{sg}[\mathbf{u}\_{t+k}],\,\hat{\mathbf{u}}\_{t+k})\right](D)
------------
L_cntp\displaystyle\mathcal{L}\_{\mathrm{cntp}}=E_t<T ⁣[\displaystyle=\mathbb{E}\_{t<T}\!\bigl[
---------------
−log⁡p_ρ(X_t+1∣h_t,u~_t)]\displaystyle\quad-\log p\_{\rho}(X\_{t+1}\mid\mathbf{h}\_{t},\tilde{\mathbf{u}}\_{t})\bigr](E)

Where SL1(⋅,⋅)\mathrm{SL1}(\cdot,\cdot) denotes the SmoothL1 loss, sg[⋅]\mathrm{sg}[\cdot] the stop-gradient operator, and u~_t ⁣:= ⁣SWA(sg[h_t−k+1:t])\tilde{\mathbf{u}}\_{t}\!:=\!\mathrm{SWA}(\mathrm{sg}[\mathbf{h}\_{t-k+1:t}]) the higher-level latent with sg\mathrm{sg} applied inside SWA so gradients do not flow back into h\mathbf{h}. We use this stop-gradient in the combined NTP path to keep the token-level representation h_t\mathbf{h}\_{t} governed by the standard NTP and lower-level transition consistency losses, while allowing the combined head to train the SWA module and its higher-level representation. Without this separation, the combined-head cross-entropy would also update the lower latents through the SWA window, double-counting token-level supervision and creating a competing optimization signal for h_t\mathbf{h}\_{t}.

At optimality, the losses enforce:

p_θ(X_t+1∣h_t)\displaystyle p\_{\theta}(X\_{t+1}\mid\mathbf{h}\_{t})=P(X_t+1∣X_1:t)\displaystyle=\mathbb{P}(X\_{t+1}\mid X\_{1:t})(I)
---------------
p_ψ(h_t+1∣h_t,X_t+1)\displaystyle p\_{\psi}(\mathbf{h}\_{t+1}\mid\mathbf{h}\_{t},X\_{t+1})=P(h_t+1∣X_1:t+1)\displaystyle=\mathbb{P}(\mathbf{h}\_{t+1}\mid X\_{1:t+1})(II)
---------------
p_ϕ(u_t+k∣u_t)\displaystyle p\_{\phi}(\mathbf{u}\_{t+k}\mid\mathbf{u}\_{t})=P(u_t+k∣X_1:t)\displaystyle=\mathbb{P}(\mathbf{u}\_{t+k}\mid X\_{1:t})(III)
---------------
p_ρ(X_t+1∣h_t,u_t)\displaystyle p\_{\rho}(X\_{t+1}\mid\mathbf{h}\_{t},\mathbf{u}\_{t})=P(X_t+1∣X_1:t)\displaystyle=\mathbb{P}(X\_{t+1}\mid X\_{1:t})(IV)

where (I) and (IV) enforce next-token consistency, (II) and (III) enforce transition consistency.

Figure 1: Overview of HiLP with sliding-window size W = 3 W=3 . The higher-level latent is computed by sliding-window attention over backbone latents, the higher next-latent predictor maps u t u_{t} to u ^ t + W \hat{u}_{t+W} without token input, and both the standard NTP head and combined NTP head are trained, but the combined NTP head is dropped during inference to ensure no slow down in inference speed.

1B-parameter models are trained on 100B tokens using 8 ×\times NVIDIA B200 GPUs.

3.1 Coding and Multi-step Reasoning Benchmarks

Section titled “3.1 Coding and Multi-step Reasoning Benchmarks”

After pretraining, we use LM Evaluation Harness (Gao et al., 2024) to evaluate the zero-shot performance of the models on HumanEval coding benchmark Chen et al. (2021), and DataComp for LLMs (Li et al., 2025) to evaluate the models on a set of symbolic and multi-step benchmarks. Results in Tab. 1 and Fig. 2 show that HiLP is improve performance from the multi-scale latent prediction.

ModelHumanEval pass@1
NTP8.77
MTP9.21
NextLat10.58
HiLP11.33

Table 1: Code-generation benchmark accuracy on HumanEval. HumanEval results are computed from 1000 samples per task.

Figure 2: DCLM symbolic/multi-step eval results

Figure 2: DCLM symbolic/multi-step eval results

Figure 3: Latent cross-entropy curves for NextLat and HiLP on web and code splits. HiLP has comparable near-term latent

Figure 3: Latent cross-entropy curves for NextLat and HiLP on web and code splits. HiLP has comparable near-term latent prediction loss and lower long-horizon future and excess cross-entropy, indicating more stable multi-step latent rollout.

We evaluate speculative decoding on held-out validation splits of code and Nemotron-Climbmix data(Diao et al., 2026). For each model, we report the average number of accepted tokens per drafting step, and Avg match, the per-position draft-verifier argmax agreement averaged over K=1…4K{=}1{\ldots}4. Note that K=0K{=}0 NTP position is always accepted and is omitted from the per-KK columns;

ModelAvg Acc. Tok.↑\uparrowAvg match↑\uparrowK=1K{=}1K=2K{=}2K=3K{=}3K=4K{=}4K=5K{=}5K=6K{=}6K=7K{=}7K=8K{=}8
MTP2.570.5450.7070.6330.5310.310––––
NextLat3.260.5800.9180.6520.4220.3280.3090.2850.2340.234
HiLP (NTP head)3.410.5920.9380.6450.4140.3670.3240.3240.2930.340

Table 2: Speculative decoding results evaluated on a held-out validation split of code data.

ModelAvg Acc. Tok.↑\uparrowAvg match↑\uparrowK=1K{=}1K=2K{=}2K=3K{=}3K=4K{=}4K=5K{=}5K=6K{=}6K=7K{=}7K=8K{=}8
MTP2.110.1620.3010.1410.1090.098––––
NextLat2.570.4830.6410.5040.4100.3750.3240.3120.2460.254
HiLP (NTP head)2.590.4910.6990.4920.3790.3950.3280.4060.2890.289

Table 3: Speculative decoding results evaluated on a held-out validation split of Nemotron-ClimbMix data.

The latent prediction cross-entropy losses across rollout horizons up to 8 steps ahead are shown in 3. As the curves show, HiLP preserves the near-term cross-entropy of NextLat while producing lower future prediction error at longer horizons, suggesting that the hierarchical latent mitigates multi-step error accumulation.

Our work sits at the intersection of several active research threads: pretraining objectives beyond next-token prediction, latent-space language modeling, and hierarchical models.

5.1 Pretraining Objectives Beyond Next-Token Prediction

Section titled “5.1 Pretraining Objectives Beyond Next-Token Prediction”

The next-token prediction objective has largely limited the capacity of language models in downstream tasks that require longer-horizon reasoning and planning(Bachmann and Nagarajan, 2024; Nagarajan et al., 2025). Recent works have started to introduce auxiliary learning signals to mitigate this myopic gap through further future prediction (Gloeckle et al., ; Ahn et al., 2025; Teoh et al., 2025; Mahajan et al., 2025). However, these approaches usually operate on a single granularity scale and have limited horizon capability due to compounding error. HiLP differs in two ways: it introduces two latent prediction pathways at different temporal scales, so the coarser pathway supervises long-horizon structure directly rather than through repeated single-step unrolling; and all auxiliary heads are dropped at inference, so the longer-horizon signal costs nothing at deployment time.

Another line of work moves language generation itself into a continuous latent space. Large Concept Models (Barrault et al., 2024) perform autoregressive prediction over sentence-level embeddings, treating each sentence as a “concept” in a shared representation space. CALM (Shao et al., 2025) replaces next-token prediction with next-vector prediction, compressing a chunk of KK tokens into a single continuous vector to raise the semantic bandwidth of each generative step. Coconut Shao et al. (2025) lets the model reason in latent space by feeding its own hidden state back as the next input embedding instead of decoding to tokens. All of these approaches change the inference-time generation process to operate on latents, requiring bespoke decoding procedures or latent-to-text decoders. HiLP is the opposite design point: latent prediction is used purely as an auxiliary training signal to shape representations, while inference remains standard token-level autoregressive decoding with zero added latency.

Hierarchical model design has been researched in both language modeling area and other domains.

MegaByte (Yu et al., 2023) stacks a global patch-level transformer over a local byte-level one, the Byte Latent Transformer (Pagnoni et al., 2025) dynamically segments bytes into entropy-based patches that serve as the units of computation, and H-Net Hwang et al. (2025) learns content-dependent chunking end-to-end within a hierarchical U-Net-like network.

In model-based reinforcement learning, Hierarchical Planning with Latent World Models (Zhang et al., 2026) learns world models at multiple temporal scales within a shared latent space, using long-horizon latent predictions as subgoals for short-horizon control. In representation learning theory, Learning Discrete Concepts in Latent Hierarchical Models (Kong et al., 2024) formalizes concepts as discrete latent variables organized in a hierarchical causal model and derives identifiability conditions for recovering such hierarchical concept structure from high-dimensional unsupervised data. In time series analysis. HiTime Tao et al. (2024) employs a hierarchical feature encoder together with a hybrid prompting strategy to align time series and text modalities, improving multivariate time series classification with large language models. These works demonstrate the benefit of hierarchical latent structure across planning, representation identifiability, and time series domains. HiLP differs in a way that the hierarchy complexity is not consumed at inference time: to our knowledge it is the first to introduce hierarchical latent prediction as a pretraining objective for autoregressive language models, where the hierarchy shapes the representation during training and is then removed entirely.

HiLP introduces temporal hierarchy into the latent-space self-prediction objective, shaping the representation of language model transformers to encode multi-scale predictive structure during pretraining. Experiments show that it improves both speculative decoding and language models on tasks that need longer-horizon reasoning and planning.

In current work, the abstract latent prediction horizon is a manually set hyperparameter, which limits the flexibility of lookahead planning. Further designs including dynamically choosing the lookahead horizon could be beneficial. Also, the NTP head is used during inference in the current implementation, but combined NTP can also be used if we trade speed for accuracy.

  • Ahn et al. (2025) K. Ahn, A. Lamb, and J. Langford Efficient joint prediction of multiple future tokens. arXiv preprint arXiv:2503.21801. Cited by: §5.1.
  • Bachmann and Nagarajan (2024) G. Bachmann and V. Nagarajan The pitfalls of next-token prediction. arXiv preprint arXiv:2403.06963. Cited by: §5.1.
  • Bacon et al. (2017) P. Bacon, J. Harb, and D. Precup The option-critic architecture. In Proceedings of the AAAI conference on artificial intelligence, Vol. 31. Cited by: §1.
  • Barrault et al. (2024) L. Barrault, P. Duquenne, M. Elbayad, A. Kozhevnikov, B. Alastruey, P. Andrews, M. Coria, G. Couairon, M. R. Costa-jussà, D. Dale, et al. Large concept models: language modeling in a sentence representation space. arXiv preprint arXiv:2412.08821. Cited by: §5.2.
  • Chen et al. (2021) M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, A. Ray, R. Puri, G. Krueger, M. Petrov, H. Khlaaf, G. Sastry, P. Mishkin, B. Chan, S. Gray, N. Ryder, M. Pavlov, A. Power, L. Kaiser, M. Bavarian, C. Winter, P. Tillet, F. P. Such, D. Cummings, M. Plappert, F. Chantzis, E. Barnes, A. Herbert-Voss, W. H. Guss, A. Nichol, A. Paino, N. Tezak, J. Tang, I. Babuschkin, S. Balaji, S. Jain, W. Saunders, C. Hesse, A. N. Carr, J. Leike, J. Achiam, V. Misra, E. Morikawa, A. Radford, M. Knight, M. Brundage, M. Murati, K. Mayer, P. Welinder, B. McGrew, D. Amodei, S. McCandlish, I. Sutskever, and W. Zaremba Evaluating large language models trained on code. External Links: 2107.03374 Cited by: §3.1.
  • Diao et al. (2026) S. Diao, Y. Yang, Y. Fu, X. Dong, D. Su, M. Kliegl, Z. Chen, P. Belcak, Y. Suhara, H. Yin, et al. Nemotron-climb: clustering-based iterative data mixture bootstrapping for language model pre-training. Advances in Neural Information Processing Systems 38. Cited by: §3.2.
  • Gao et al. (2024) L. Gao, J. Tow, B. Abbasi, S. Biderman, S. Black, A. DiPofi, C. Foster, L. Golding, J. Hsu, A. Le Noac’h, H. Li, K. McDonell, N. Muennighoff, C. Ociepa, J. Phang, L. Reynolds, H. Schoelkopf, A. Skowron, L. Sutawika, E. Tang, A. Thite, B. Wang, K. Wang, and A. Zou The language model evaluation harness. Zenodo. External Links: Document, Link Cited by: §3.1.
  • [8] F. Gloeckle, B. Y. Idrissi, B. Rozière, D. Lopez-Paz, and G. Synnaeve Better & faster large language models via multi-token prediction, 2024. URL https://arxiv. org/abs/2404.19737. Cited by: §5.1.
  • Hwang et al. (2025) S. Hwang, B. Wang, and A. Gu Dynamic chunking for end-to-end hierarchical sequence modeling. arXiv preprint arXiv:2507.07955. Cited by: §5.3.
  • Kong et al. (2024) L. Kong, G. Chen, B. Huang, E. Xing, Y. Chi, and K. Zhang Learning discrete concepts in latent hierarchical models. Advances in Neural Information Processing Systems 37, pp. 36938–36975. Cited by: §5.3.
  • Li et al. (2025) J. Li, A. Fang, G. Smyrnis, M. Ivgi, M. Jordan, S. Gadre, H. Bansal, E. Guha, S. Keh, K. Arora, S. Garg, R. Xin, N. Muennighoff, R. Heckel, J. Mercat, M. Chen, S. Gururangan, M. Wortsman, A. Albalak, Y. Bitton, M. Nezhurina, A. Abbas, C. Hsieh, D. Ghosh, J. Gardner, M. Kilian, H. Zhang, R. Shao, S. Pratt, S. Sanyal, G. Ilharco, G. Daras, K. Marathe, A. Gokaslan, J. Zhang, K. Chandu, T. Nguyen, I. Vasiljevic, S. Kakade, S. Song, S. Sanghavi, F. Faghri, S. Oh, L. Zettlemoyer, K. Lo, A. El-Nouby, H. Pouransari, A. Toshev, S. Wang, D. Groeneveld, L. Soldaini, P. W. Koh, J. Jitsev, T. Kollar, A. G. Dimakis, Y. Carmon, A. Dave, L. Schmidt, and V. Shankar DataComp-lm: in search of the next generation of training sets for language models. External Links: 2406.11794, Link Cited by: §3.1.
  • Mahajan et al. (2025) D. Mahajan, S. Goyal, B. Y. Idrissi, M. Pezeshki, I. Mitliagkas, D. Lopez-Paz, and K. Ahuja Beyond multi-token prediction: pretraining llms with future summaries. arXiv preprint arXiv:2510.14751. Cited by: §5.1.
  • Nagarajan et al. (2025) V. Nagarajan, C. H. Wu, C. Ding, and A. Raghunathan Roll the dice & look before you leap: going beyond the creative limits of next-token prediction. External Links: 2504.15266, Link Cited by: §5.1.
  • Pagnoni et al. (2025) A. Pagnoni, R. Pasunuru, P. Rodriguez, J. Nguyen, B. Muller, M. Li, C. Zhou, L. Yu, J. E. Weston, L. Zettlemoyer, et al. Byte latent transformer: patches scale better than tokens. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 9238–9258. Cited by: §5.3.
  • Shao et al. (2025) C. Shao, D. Li, F. Meng, and J. Zhou Continuous autoregressive language models. arXiv preprint arXiv:2510.27688. Cited by: §5.2.
  • Sutton et al. (1999) R. S. Sutton, D. Precup, and S. Singh Between mdps and semi-mdps: a framework for temporal abstraction in reinforcement learning. Artificial intelligence 112 (1-2), pp. 181–211. Cited by: §1.
  • Tao et al. (2024) X. Tao, T. Pan, M. Cheng, Y. Luo, Q. Liu, and E. Chen Hierarchical multimodal llms with semantic space alignment for enhanced time series classification. ACM Transactions on Intelligent Systems and Technology. Cited by: §5.3.
  • Teoh et al. (2025) J. Teoh, M. Tomar, K. Ahn, E. S. Hu, T. Pearce, P. Sharma, A. Krishnamurthy, R. Islam, A. Lamb, and J. Langford Next-latent prediction transformers learn compact world models. arXiv preprint arXiv:2511.05963. Cited by: §1, §5.1.
  • Yu et al. (2023) L. Yu, D. Simig, C. Flaherty, A. Aghajanyan, L. Zettlemoyer, and M. Lewis Megabyte: predicting million-byte sequences with multiscale transformers. Advances in Neural Information Processing Systems 36, pp. 78808–78823. Cited by: §5.3.
  • Zhang et al. (2026) W. Zhang, B. Terver, A. Zholus, S. Chitnis, H. Sutaria, M. Assran, R. Balestriero, A. Bar, A. Bardes, Y. LeCun, et al. Hierarchical planning with latent world models. arXiv preprint arXiv:2604.03208. Cited by: §5.3.

Algorithm 1 summarizes one HiLP training step, combining the five objectives into a single backward pass. The SWA module is a causal sliding-window self-attention over the lower latents, so every position tt carries its own higher-level latent u_t\mathbf{u}\_{t} summarizing the last kk lower latents. All latent-space prediction targets are stop-gradiented, and both distributions in the KL term are decoded through a frozen copy of the NTP head (p_θsgp\_{\theta}^{\mathrm{sg}}), so each auxiliary loss shapes the representation only through its designated pathway: the rollout losses reach h\mathbf{h} through p_ψp\_{\psi}, the higher-level consistency loss trains p_ϕp\_{\phi} and the SWA module, and the combined cross-entropy trains p_ρp\_{\rho} and the SWA module alone via the stop-gradient inside u~_t\tilde{\mathbf{u}}\_{t}. At inference, only G_θG\_{\theta} and p_θp\_{\theta} are kept: the SWA module, both dynamics models, and the combined head are discarded.

Algorithm 1 One HiLP training step. E(⋅)E(\cdot) denotes the backbone, kk the SWA window size and lookahead offset, and dd the rollout depth. Expectations over tt average over all valid positions in the batch.

1: batch X_1:TX\_{1:T}; backbone G_θG\_{\theta} with NTP head p_θp\_{\theta}; lower dynamics p_ψp\_{\psi}; SWA module; higher dynamics p_ϕp\_{\phi}; combined head p_ρp\_{\rho}; loss weights λ_ntp,λ_h,λ_KL,λ_u,λ_cntp\lambda\_{\mathrm{ntp}},\lambda\_{\mathrm{h}},\lambda\_{\mathrm{KL}},\lambda\_{\mathrm{u}},\lambda\_{\mathrm{cntp}}

2: h_1:T←G_θ(X_1:T)\mathbf{h}\_{1:T}\leftarrow G\_{\theta}(X\_{1:T}) ▹\triangleright one backbone pass

3: L_ntp←E_t[−log⁡p_θ(X_t+1∣h_t)]\mathcal{L}\_{\mathrm{ntp}}\leftarrow\mathbb{E}\_{t}\big[{-\log p\_{\theta}(X\_{t+1}\mid\mathbf{h}\_{t})}\big] ▹\triangleright Eq. (A)

4: Lower-level rollout (teacher-forced tokens):

5: h^_t←h_t\hat{\mathbf{h}}\_{t}\leftarrow\mathbf{h}\_{t} for all tt;  L_h,L_KL←0\mathcal{L}\_{\mathrm{h}},\mathcal{L}\_{\mathrm{KL}}\leftarrow 0

6: for i=1,…,di=1,\dots,d do

7:   h^_t+i←p_ψ(h^_t+i−1, E(X_t+i))\hat{\mathbf{h}}\_{t+i}\leftarrow p\_{\psi}\big(\hat{\mathbf{h}}\_{t+i-1},\,E(X\_{t+i})\big)

8:   L_h+=1d E_t[SL1(sg[h_t+i], h^_t+i)]\mathcal{L}\_{\mathrm{h}}\mathrel{+}=\tfrac{1}{d}\,\mathbb{E}\_{t}\big[\mathrm{SL1}\big(\mathrm{sg}[\mathbf{h}\_{t+i}],\,\hat{\mathbf{h}}\_{t+i}\big)\big] ▹\triangleright Eq. (B)

9:   L_KL+=1d E_t[D_KL(p_θsg(⋅∣sg[h_t+i]) ∥ p_θsg(⋅∣h^_t+i))]\mathcal{L}\_{\mathrm{KL}}\mathrel{+}=\tfrac{1}{d}\,\mathbb{E}\_{t}\big[D\_{\mathrm{KL}}\big(p\_{\theta}^{\mathrm{sg}}(\cdot\mid\mathrm{sg}[\mathbf{h}\_{t+i}])\,\big\|\,p\_{\theta}^{\mathrm{sg}}(\cdot\mid\hat{\mathbf{h}}\_{t+i})\big)\big] ▹\triangleright Eq. (C)

10: end for

11: Higher-level channel:

12: u_t←SWA(h_t−k+1:t)\mathbf{u}\_{t}\leftarrow\mathrm{SWA}(\mathbf{h}\_{t-k+1:t}) ▹\triangleright abstract latent

13: u^_t+k←p_ϕ(u_t)\hat{\mathbf{u}}\_{t+k}\leftarrow p\_{\phi}(\mathbf{u}\_{t}) ▹\triangleright kk-step lookahead, no token input

14: L_u←E_t[SmoothL1(sg[u_t+k], u^_t+k)]\mathcal{L}\_{\mathrm{u}}\leftarrow\mathbb{E}\_{t}\big[\mathrm{SmoothL1}\big(\mathrm{sg}[\mathbf{u}\_{t+k}],\,\hat{\mathbf{u}}\_{t+k}\big)\big] ▹\triangleright Eq. (D)

15: Combined head (sg keeps h\mathbf{h} governed by NTP and rollout):

16: u~_t←SWA(sg[h_t−k+1:t])\tilde{\mathbf{u}}\_{t}\leftarrow\mathrm{SWA}\big(\mathrm{sg}[\mathbf{h}\_{t-k+1:t}]\big)

17: L_cntp←E_t[−log⁡p_ρ(X_t+1∣h_t,u~_t)]\mathcal{L}\_{\mathrm{cntp}}\leftarrow\mathbb{E}\_{t}\big[{-\log p\_{\rho}(X\_{t+1}\mid\mathbf{h}\_{t},\tilde{\mathbf{u}}\_{t})}\big] ▹\triangleright Eq. (E)

18: L←λ_ntpL_ntp+λ_hL_h+λ_KLL_KL+λ_uL_u+λ_cntpL_cntp\mathcal{L}\leftarrow\lambda\_{\mathrm{ntp}}\mathcal{L}\_{\mathrm{ntp}}+\lambda\_{\mathrm{h}}\mathcal{L}\_{\mathrm{h}}+\lambda\_{\mathrm{KL}}\mathcal{L}\_{\mathrm{KL}}+\lambda\_{\mathrm{u}}\mathcal{L}\_{\mathrm{u}}+\lambda\_{\mathrm{cntp}}\mathcal{L}\_{\mathrm{cntp}}

19: One optimizer step on ∇L\nabla\mathcal{L} w.r.t. θ\theta, ψ\psi, ϕ\phi, ρ\rho, and the SWA module

GroupHyperparameterValue
Backbone modelVocabulary size100,352
Training sequence length8,192
Hidden layers24
Attention heads16
Latent input combinationGLU-cross
ArchitectureHidden multiplier2
Latent window size4
Latent lookahead steps4
NTP loss weight1.0
MSE loss weight10.0
Loss weightsKL loss weight0.1
Higher-level MSE loss weight1.0
Combined NTP loss weight0.5
Input combinationGLU-cross
Combined headDownstream LM headNTP
Draft LM headNTP
OptimizationLatent learning rate1.0×10−31.0\times 10^{-3}
Latent evaluationEvaluation horizon8

Table 4: HiLP hyperparameter configuration.

Appendix C Latent overhead and efficiency.

Section titled “Appendix C Latent overhead and efficiency.”

Table 5 compares the four 100B-token code-data runs along three axes: total parameter count, the subset of parameters actually used during greedy NTP decoding, and training throughput. All four models share the same 1.06 B-parameter trunk and tied-free LM head, so the verifier path used at inference is identical and the additional parameters in MTP, NextLat, and HiLP are auxiliary draft components that are not required to produce the next-token distribution. NextLat adds a small (≈\approx19 M) next-latent predictor on top of the trunk, while HiLP and MTP each add a ≈\approx190–200 M draft module. Training throughput scales inversely with the size of the auxiliary loss graph: the NTP baseline reaches ≈\approx126 K tokens/s/GPU, NextLat retains ≈\approx83% of that throughput, HiLP retains ≈\approx65%, and MTP drops to ≈\approx49% because its four future-token heads must each be evaluated against the LM logits at every step.

Model# ParamsInf. ParamsTraining Step Breakdown (ms)Training Throughput
StepFwdBwdOptimTok/s/GPU↑\uparrowTF/GPU↑\uparrowMFU↑\uparrowSamp/s↑\uparrow
NTP1.06 B1.06 B44911929337126,2788980.399123.3
MTP1.25 B1.06 B9166312434361,7895090.22660.3
NextLat1.08 B1.06 B54220529542104,5058840.393102.1
HiLP1.27 B1.06 B6903293154681,6537800.34779.7

Table 5: Parameter counts and training efficiency for the 100B-token runs on 8 ⁣× ⁣8\!\times\!B200 GPUs.

Inf. Params: verifier path (trunk + LM head) used during greedy NTP decoding, identical across all models. Step breakdown: timing/step_time_sec and its components (forward, backward, optimizer), in milliseconds. Throughput: tokens/s/GPU, TFLOP/s/GPU, model FLOPs utilization, and samples/s (all GPUs).

We include an implementation-level ablation comparing the historical concat input-combination mode against the current glu_cross mode used by latent prediction modules. Let DD denote the hidden size, mm the latent-head hidden multiplier, and VV the vocabulary size. In the lower next-latent predictor, concat forms [h_t;e_t+1]∈R2D[\mathbf{h}\_{t};e\_{t+1}]\in\mathbb{R}^{2D} and feeds it directly to the SwiGLU predictor. This gives an intermediate width of 2mD2mD and costs 10mD210mD^{2} parameters and multiply-adds per token for the gate, up, and down projections, ignoring biases. By contrast, glu_cross computes

W_hh_t⊙σ(W_ee_t+1)∈RD,W\_{h}\mathbf{h}\_{t}\odot\sigma(W\_{e}e\_{t+1})\in\mathbb{R}^{D},

adding two D×DD\times D projections but reducing the following SwiGLU width to mDmD. Its corresponding cost is therefore (3m+2)D2(3m+2)D^{2}. With the default m=4m=4, this is 14D214D^{2} versus 40D240D^{2}, or about 35%35\% of the concat predictor cost.

The same distinction appears in the combined NTP head. For concat, the combined head maps [h_t;u_t]∈R2D[\mathbf{h}\_{t};\mathbf{u}\_{t}]\in\mathbb{R}^{2D} to logits, costing 2DV2DV. For glu_cross, the gated fusion costs 2D22D^{2} and the logits are produced from a DD-dimensional vector, costing DVDV, for a total of DV+2D2DV+2D^{2}. Thus glu_cross is especially attractive when V≫DV\gg D: it approximately halves the combined-head logit computation while also reducing the latent predictor from a 2D2D-wide to a DD-wide SwiGLU input.

ModeNTP loss↓\downarrowStep (ms)↓\downarrow
concat4.113919.5
glu_cross3.942818.9

Table 6: Input-combination ablation comparing next-token prediction loss and training step time.

Figure 4: concat input-combination mode used by the latent and combined NTP heads.

Figure 5: glu_cross input-combination mode, which gates a projected lower latent with the conditioning latent while preserving hidden width D D .