mlsanityData to 14 Oct 2026

Transformers Can Navigate Mazes With Multi-Step Prediction

arXiv 2412.05117 ↗First posted 6 Dec 2024cs.LGcited by 11

Not on the map. Why?

Abstract (arXiv)

Despite their remarkable success in language modeling, transformers trained to predict the next token in a sequence struggle with long-term planning. This limitation is particularly evident in tasks requiring foresight to plan multiple steps ahead such as maze navigation. The standard next single token prediction objective, however, offers no explicit mechanism to predict multiple steps ahead - or revisit the path taken so far. Consequently, in this work we study whether explicitly predicting multiple steps ahead (and backwards) can improve transformers' maze navigation. We train parameter-matched transformers from scratch, under identical settings, to navigate mazes of varying types and sizes with standard next token prediction and MLM-U, an objective explicitly predicting multiple steps ahead and backwards. We find that MLM-U considerably improves transformers' ability to navigate mazes compared to standard next token prediction across maze types and complexities. We also find MLM-U training is 4x more sample efficient and converges 2x faster in terms of GPU training hours relative to next token training. Finally, for more complex mazes we find MLM-U benefits from scaling to larger transformers. Remarkably, we find transformers trained with MLM-U outperform larger transformers trained with next token prediction using additional supervision from A* search traces. We hope these findings underscore the promise of learning objectives to advance transformers' capacity for long-term planning. The code can be found at https://github.com/facebookresearch/maze_navigation_MLMU

Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Builds on 23 of its 28 references that are in the map. First posted on arXiv 6 Dec 2024.

Builds on

23 of 28 references.

References · 23

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  5. 2022Planning with Diffusion for Flexible Behavior Synthesiscited by 1,061
  6. 2022Diffusion-LM Improves Controllable Text Generationcited by 1,027
  7. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
  8. 2024Simple and Effective Masked Diffusion Language Modelscited by 848
  9. 2024Simplified and Generalized Masked Diffusion for Discrete Datacited by 626
  10. 2023The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"cited by 407
  11. 2024Better & Faster Large Language Models via Multi-token Predictioncited by 360
  12. 2022DiffusionBERT: Improving Generative Masked Language Models with Diffusion Modelscited by 214
11 more
  1. 2024The pitfalls of next-token predictioncited by 160
  2. 2024Beyond A*: Better Planning with Transformers via Search Dynamics Bootstrappingcited by 90
  3. 2023A Configurable Library for Generating and Manipulating Maze Datasetscited by 31
  4. 2024The Factorization Curse: Which Tokens You Predict Underlie the Reversal Curse and Morecited by 25
  5. 2024NavFormer: A Transformer Architecture for Robot Target-Driven Navigation in Unknown and Dynamic Environmentscited by 20
  6. 2024ALPINE: Unveiling the Planning Capability of Autoregressive Learning in Language Modelscited by 18
  7. 2023Structured World Representations in Maze-Solving Transformerscited by 16
  8. 2023DiSK: A Diffusion Model for Structured Knowledgecited by 16
  9. 2024Latent Plan Transformer for Trajectory Abstraction: Planning as Latent Space Inferencecited by 14
  10. 2023Investigating Navigation Strategies in the Morris Water Maze through Deep Reinforcement Learningcited by 3
  11. 2024Scaling Value Iteration Networks to 5000 Layers for Extreme Long-Term Planningcited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 7; 2026: 4.

11 papers.