Reflection-Window Decoding: Text Generation with Selective Refinement
Zeyu Tang, Zhenhao Chen, Xiangchen Song, Loka Li, Yunlong Deng, Yifan Shen, Guangyi Chen, Peter Spirtes, Kun Zhang
Abstract
The autoregressive decoding for text generation in large language models (LLMs), while widely used, is inherently suboptimal due to the lack of a built-in mechanism to perform refinement and/or correction of the generated content. In this paper, we consider optimality in terms of the joint probability over the generated response, when jointly considering all tokens at the same time. We theoretically characterize the potential deviation of the autoregressively generated response from its globally optimal counterpart that is of the same length. Our analysis suggests that we need to be cautious when noticeable uncertainty arises during text generation, which may signal the sub-optimality of the generation history. To address the pitfall of autoregressive decoding for text generation, we propose an approach that incorporates a sliding reflection window and a pausing criterion, such that refinement and generation can be carried out interchangeably as the decoding proceeds. Our selective refinement framework strikes a balance between efficiency and optimality, and our extensive experimental results demonstrate the effectiveness of our approach.
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
- Measuring Massive Multitask Language Understanding cites Language Models are Few-Shot Learners
- Token-Guard: Towards Token-Level Hallucination Control via Self-Checking Decoding cites Self-Refine: Iterative Refinement with Self-Feedback
- Reflexion: language agents with verbal reinforcement learning cites Self-Refine: Iterative Refinement with Self-Feedback
- Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
Cited by top-tier papers4
- AnesSuite: A Comprehensive Benchmark and Dataset Suite for Anesthesiology Reasoning in LLMsXiang Feng, Wentao Jiang, Zengmao Wang, Yong Luo et al.ICLR 2026 · 2 citations
- PersonaX: Multimodal Datasets with LLM-Inferred Behavior TraitsLoka Li, Wong Yu Kang, Minghao Fu, Guangyi Chen et al.ICLR 2026 · 2 citations
- Token-Guard: Towards Token-Level Hallucination Control via Self-Checking DecodingYifan Zhu, Huiqiang Rong, Haoran LuoICLR 2026
- Causal Modeling of Selection in EvolutionHaoyue Dai, Zeyu Tang, Peter Spirtes, Kun ZhangICML 2026
Builds on17
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 citations
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
Related papers
- Multi-Branch Self-Drafting for LLM Inference AccelerationZipeng Gao, Qingrong Xia, Tong Xu, Xinyu Duan et al.AAAI 2025 · 2 citations
- Self-Reflective Generation at Test TimeJian Mu, Qixin Zhang, Zhiyong Wang, Menglin Yang et al.ACL 2026 · 3 citations
- Once-More: Continuous Self-Correction for Large Language Models via Perplexity-Guided InterventionJiaxun Gao, Him Wai (Michael) Ng, Z. Jane WangICLR 2026
- Exploring the Hidden Capacity of LLMs for One-Step Text GenerationGleb Mezentsev, Ivan V. OseledetsEMNLP 2025 · 3 citations
- AdaDec: A Uncertainty-Guided Lookahead Decoding Framework for LLM-Based Code GenerationKaifeng He, Mingwei Liu, Chong Wang, Zike Li et al.FSE 2026
