Non-Monotonic Autoregressive Sequence Model

Tianyi Ma, Yiyue Qian, Yiyang Li, Zehong Wang, Yifan Ding, Zheyuan Zhang, Yan Liang, Chuxu Zhang, Yanfang YeICML 2026

Standard Large Language Models (LLMs) suffer from a fundamental structural limitation: they are monotonic. They generate sequences one token at a time, and once a token is sampled, it becomes a permanent part of the context. If a model makes a minor logical slip early in a reasoning chain, that error propagates, often snowballing into a completely hallucinated or nonsensical output.

Current solutions to this problem typically rely on external verifiers or multi-pass inference—generating an answer, critiquing it, and re-generating. While effective, these methods are computationally expensive and operate outside the model's primary generation loop.

To address this, researchers have introduced N-MARS (Non-Monotonic AutoregRessive Sequence modeling), a framework that asks a simple question: Can we design a model that internally detects and corrects its own errors on the fly?

The N-MARS Framework

N-MARS treats text generation as a dynamic process where the model can "pop" tokens off its internal stack, effectively granting the LLM a backspace key. The framework is built on four core pillars:

  1. The <UNDO> Token: A special action is added to the model's vocabulary. When the model samples the <UNDO> token, it effectively erases the previously generated token and attempts a new path.
  2. Sequence Alignment Augmentation: To teach the model how to use this backspace, the authors construct a dataset by comparing model-generated (often incorrect) trajectories with ground-truth references. They identify where the model diverged and insert <UNDO> tokens followed by the correct tokens, creating "correction traces."
  3. Masked Supervised Fine-Tuning (mSFT): Standard fine-tuning on these correction traces would accidentally teach the model to imitate the errors it is trying to fix. mSFT solves this by masking the loss on the error tokens themselves. The model "sees" the error as context but is only rewarded for predicting the <UNDO> token and the subsequent correct sequence.
  4. Group Relative Policy Optimization (GRPO): Finally, the model is refined using reinforcement learning. The reward function is multi-objective: it rewards correct final answers and provides a "judicious use" bonus for deploying <UNDO> effectively, while penalizing "stuttering" (excessive or useless erasing).

Key Insights

The development of N-MARS yielded several fascinating insights into how LLMs learn to self-correct:

  • The "Negative Learning" Trap: The paper provides a theoretical proof showing that standard supervised fine-tuning on error-correction data actually increases the probability of the model making the original error. mSFT is essential because it treats errors as "negative context" rather than target behaviors.
  • Token-Level vs. Step-Level Correction: Unlike previous backtracking methods that force a model to restart a sentence or an entire reasoning step, N-MARS operates strictly at the token level. This makes it highly task-agnostic—it can fix a single mistyped digit in a math problem or a single character in a code snippet without needlessly re-generating the entire line.
  • Correction as a Property of Task Depth: Interestingly, the optimal "budget" for how many <UNDO> tokens a model should use depends on the task's difficulty, not the model's size. Harder tasks (like competition-level math) consistently benefit from a higher correction budget than simpler grade-school math problems.

Empirical Results

The framework was evaluated on three primary reasoning benchmarks: GSM8K (grade school math), MATH-500 (high school competition math), and MBPP (basic Python programming). Using Llama-3.2-1B, Llama-3.1-8B, and Qwen3-4B as backbone models, N-MARS demonstrated robust performance across different architectures and scales.

  • State-of-the-Art Performance Gains: On Llama-3.2-1B, N-MARS improved accuracy by 11.4% on GSM8K and 13.4% on MATH compared to the strongest baseline (ReVISE).
  • Efficiency: Despite generating extra tokens during the "erase and retry" process, N-MARS often exhibited lower latency than multi-pass methods because it corrects errors in-place rather than re-deriving long reasoning chains from scratch.
  • Test-Time Scaling: When using majority voting (sampling multiple answers), N-MARS showed much stronger scaling than standard models. Because the model can explore different paths internally, the diversity of its final outputs is higher and more useful for consensus voting.

Limitations and Future Work

While N-MARS represents a significant step forward for non-monotonic sequence modeling, the authors note a few limitations. Currently, the framework operates strictly at the token level. Exploring hierarchical backtracking—allowing the model to choose between erasing a token, a phrase, or a whole paragraph—could further improve efficiency.

Additionally, N-MARS is currently a post-training framework. Integrating non-monotonic capabilities during the initial pre-training phase might lead to even more robust, "self-aware" models. Finally, while more efficient than multi-pass methods, the <UNDO> tokens still represent additional generation steps. In very long reasoning chains, these extra steps can accumulate, slightly increasing the total computational overhead.

Summary updated

BibTeX
@inproceedings{ma2026non,
  author = {Tianyi Ma and Yiyue Qian and Yiyang Li and Zehong Wang and Yifan Ding and Zheyuan Zhang and Yan Liang and Chuxu Zhang and Yanfang Ye},
  title = {{Non-Monotonic Autoregressive Sequence Model}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=r5PfcYvYEE},
}
Figure