Reflection Window: Text Generation with Selective Refinement

Zeyu Tang, Zhenhao Chen, Loka Li, Xiangchen Song, Yunlong Deng, Yifan Shen, Guangyi Chen, Peter Spirtes, Kun ZhangOpenReview 2025 · Submission to ICLR 2025 · Rejected

Abstract

The autoregressive approach to 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 text generation, we propose an approach that incorporates a sliding reflection window and a pausing criterion, such that reflection and generation can be carried out interchangeably as the generation proceeds. Our approach utilizes a selective refinement mechanism to strike the balance between efficiency and optimality, and the experimental results demonstrate the effectiveness of our method.
BibTeX
@misc{tang2025reflection,
  author = {Zeyu Tang and Zhenhao Chen and Loka Li and Xiangchen Song and Yunlong Deng and Yifan Shen and Guangyi Chen and Peter Spirtes and Kun Zhang},
  title = {{Reflection Window: Text Generation with Selective Refinement}},
  year = {2025},
  url = {https://openreview.net/forum?id=aS1IhKdLPP},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2025},
}
Figure