HackerPapers

arXiv:2404.00859cs.LG

Do language models plan ahead for future tokens?

Wilson Wu, John X. Morris, Lionel Levine

Abstract

Do transformers "think ahead" during inference at a given position? It is known transformers prepare information in the hidden states of the forward pass at time step $t$ that is then used in future forward passes $t+τ$. We posit two explanations for this phenomenon: pre-caching, in which off-diagonal gradient terms present during training result in the model computing features at $t$ irrelevant to the present inference task but useful for the future, and breadcrumbs, in which features most relevant to time step $t$ are already the same as those that would most benefit inference at time $t+τ$. We test these hypotheses by training language models without propagating gradients to past timesteps, a scheme we formalize as myopic training. In a constructed synthetic data setting, we find clear evidence for pre-caching. In the autoregressive language modeling setting, our experiments are more suggestive of the breadcrumbs hypothesis, though pre-caching increases with model scale.

arXiv comments
24 pages, 11 figures. Camera-ready for COLM 2024
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.CLComputation and Language

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from May 2024 to Jul 2026. Found in 2 HN submissions from Apr 2024 to Jul 2026. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • It's been known for several years that LLM activations encode future tokens ahead of time (e.g. https://arxiv.org/abs/2404.00859). But this has only been shown on simple tasks, so I think this paper is still quite neat. The interesting thing is that they show "future horizon…

      x312View on HNParent context

    • I think you're not looking at this from the right perspective. A LLM is designed to sample text, that follows the training distribution. It is not designed to tell you the "most likely" text that follows, and we don't actually want that. This would mean you have no diversity in…

      elcometView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.