Semformer: Transformer Language Models with Semantic Planning
Yongjing Yin, Junran Ding, Kai Song, Yue Zhang
Abstract
Next-token prediction serves as the dominant component in current neural language models. During the training phase, the model employs teacher forcing, which predicts tokens based on all preceding ground truth tokens. However, this approach has been found to create shortcuts, utilizing the revealed prefix to spuriously fit future tokens, potentially compromising the accuracy of the next-token predictor. In this paper, we introduce Semformer, a novel method of training a Transformer language model that explicitly models the semantic planning of response. Specifically, we incorporate a sequence of planning tokens into the prefix, guiding the planning token representations to predict the latent semantic representations of the response, which are induced by an autoencoder. In a minimal planning task (i.e., graph path-finding), our model exhibits near-perfect performance and effectively mitigates shortcut learning, a feat that standard training methods and baseline models have been unable to accomplish. Furthermore, we pretrain Semformer from scratch with 125M parameters, demonstrating its efficacy through measures of perplexity, in-context learning, and fine-tuning on summarization tasks 1 .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Diffusion-LM Improves Controllable Text Generation cites Language Models are Few-Shot Learners
- Are Emergent Abilities of Large Language Models a Mirage? cites Language Models are Few-Shot Learners
- Beyond Multi-Token Prediction: Pretraining LLMs with Future Summaries cites Language Models are Few-Shot Learners
- Beyond Multi-Token Prediction: Pretraining LLMs with Future Summaries cites Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More More
- Beyond Multi-Token Prediction: Pretraining LLMs with Future Summaries cites Multi-Token Prediction Needs Registers
- Toward Consistent World Models with Multi-Token Prediction and Latent Semantic Enhancement cites Language Models are Few-Shot Learners
- Toward Consistent World Models with Multi-Token Prediction and Latent Semantic Enhancement cites Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More More
- Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More More cites Are Emergent Abilities of Large Language Models a Mirage?
- Multi-Token Prediction Needs Registers cites Vision Transformers Need Registers
- Faith and Fate: Limits of Transformers on Compositionality cites Language Models are Few-Shot Learners
Cited by top-tier papers4
- Beyond Multi-Token Prediction: Pretraining LLMs with Future SummariesDivyat Mahajan, Sachin Goyal, Badr Youbi Idrissi, Mohammad Pezeshki et al.ICLR 2026 · 15 citations
- Multi-Token Prediction Needs RegistersAnastasios Gerontopoulos, Spyridon Gidaris, Nikos KomodakisNeurIPS 2025 · 13 citations
- Toward Consistent World Models with Multi-Token Prediction and Latent Semantic EnhancementQimin Zhong, Hao Liao, Haiming Qin, Mingyang Zhou et al.ACL 2026 · 3 citations
- Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More MoreArvid FrydenlundACL 2025
Builds on20
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Diffusion-LM Improves Controllable Text GenerationXiang Lisa Li, John Thickstun, Ishaan Gulrajani, Percy Liang et al.NeurIPS 2022 · 1,546 citations
- Are Emergent Abilities of Large Language Models a Mirage?Rylan Schaeffer, Brando Miranda, Sanmi KoyejoNeurIPS 2023 · 796 citations
- Vision Transformers Need RegistersTimothée Darcet, Maxime Oquab, Julien Mairal, Piotr BojanowskiICLR 2024 · 769 citations
- Faith and Fate: Limits of Transformers on CompositionalityNouha Dziri, Ximing Lu, Melanie Sclar, Xiang Lorraine Li et al.NeurIPS 2023 · 728 citations
Related papers
- Predicting the Order of Upcoming Tokens Improves Language ModelingZayd Muhammad Kawakibi Zuhri, Erland Hilman Fuadi, Alham Fikri AjiICML 2026 · 3 citations
- ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-trainingWeizhen Qi, Yu Yan, Yeyun Gong, Dayiheng Liu et al.EMNLP Findings 2020 · 385 citations
- The Pitfalls of Next-Token PredictionGregor Bachmann, Vaishnavh NagarajanICML 2024 · 163 citations
- Planning-Aware Code Infilling via Horizon-Length PredictionYifeng Ding, Hantian Ding, Shiqi Wang, Qing Sun et al.EMNLP 2025
- Unfreeze with Care: Space-Efficient Fine-Tuning of Semantic Parsing ModelsWeiqi Sun, Haidar Khan, Nicolas Guenon des Mesnards, Melanie Rubino et al.WWW 2022 · 5 citations
