Autoregressive, Yet Revisable: In Decoding Revision for Secure Code Generation
Not on the map. Why?
Abstract (arXiv)
Large Language Model (LLM) based code generation is predominantly formulated as a strictly monotonic process, appending tokens linearly to an immutable prefix. This formulation contrasts to the cognitive process of programming, which is inherently interleaved with forward generation and on-the-fly revision. While prior works attempt to introduce revision via post-hoc agents or external static tools, they either suffer from high latency or fail to leverage the model's intrinsic semantic reasoning. In this paper, we propose Stream of Revision, a paradigm shift that elevates code generation from a monotonic stream to a dynamic, self-correcting trajectory by leveraging model's intrinsic capabilities. We introduce specific action tokens that enable the model to seamlessly backtrack and edit its own history within a single forward pass. By internalizing the revision loop, our framework Stream of Revision allows the model to activate its latent capabilities just-in-time without external dependencies. Empirical results on secure code generation show that Stream of Revision significantly reduces vulnerabilities with minimal inference overhead.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 27 of its 33 references that are in the map. First posted on arXiv 1 Feb 2026.
Builds on
27 of 33 references.
References · 27
- 2017Attention Is All You Needcited by 59,932
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2024Deliberative Alignment: Reasoning Enables Safer Language Modelscited by 292
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 133
- 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 89
- 2024CyberSecEval 2: A Wide-Ranging Cybersecurity Evaluation Suite for Large Language Modelscited by 84
- 2025Dream-Coder 7B: An Open Diffusion Language Model for Codecited by 81
- 2023Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issuescited by 78
- 2024Instruction Tuning for Secure Code Generationcited by 63
15 more
- 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repaircited by 55
- 2025Flexible and Efficient Grammar-Constrained Decodingcited by 42
- 2024ReposVul: A Repository-Level High-Quality Vulnerability Datasetcited by 35
- 2023CodeFusion: A Pre-trained Diffusion Model for Code Generationcited by 31
- 2025Multi-Turn Code Generation Through Single-Step Rewardscited by 27
- 2024ProSec: Fortifying Code LLMs with Proactive Security Alignmentcited by 24
- 2025EpiCoder: Encompassing Diversity and Complexity in Code Generationcited by 21
- 2023CrossCodeBench: Benchmarking Cross-Task Generalization of Source Code Modelscited by 16
- 2024Selective Prompt Anchoring for Code Generationcited by 16
- 2024EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuningcited by 15
- 2024ROCODE: Integrating Backtracking Mechanism and Program Analysis in Large Language Models for Code Generationcited by 12
- 2025Teaching an Old LLM Secure Coding: Localized Preference Optimization on Distilled Preferencescited by 10
- 2024JumpCoder: Go Beyond Autoregressive Coder via Online Modificationcited by 7
- 2025Semantics-Aligned, Curriculum-Driven, and Reasoning-Enhanced Vulnerability Repair Frameworkcited by 4
- 2023Self-Infilling Code Generationcited by 3
Built on by
Citing papers per year: 2026: 1.
1 paper.