AnCoder: Anchored Code Generation via Discrete Diffusion Models
On the map: Diffusion models → Discrete and text diffusion
Abstract (arXiv)
Diffusion language models offer a compelling alternative to autoregressive code generation, enabling global planning and iterative refinement of complex program logic. However, existing approaches fail to respect the rigid structure of programming languages and, as a result, often produce broken programs that fail to execute. To address this, we introduce AnchorTree, a framework that explicitly anchors the diffusion process using structured, hierarchical priors native to code. Specifically, AnchorTree uses the abstract syntax tree to prioritize resolving syntactically and semantically salient tokens, such as keywords (e.g., if, while) and identifiers (e.g., variable names), thereby establishing a structural scaffold that guides the remaining generation. We validate this framework via AnCoder, a family of models showing that structurally anchored diffusion offers a parameter-efficient path to high-quality code generation.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Discrete and text diffusion, one of 14 directions in Diffusion models. Builds on 36 of its 50 references that are in the map. First posted on arXiv 5 Feb 2026.
Builds on
36 of 50 references.
Closest ancestors · 11
Same direction, newest first
- 2025Test-Time Anchoring for Discrete Diffusion Posterior Sampling2 Oct
- 2025CoDA: Coding LM via Diffusion Adaptation27 Sep
- 2025Dream-Coder 7B: An Open Diffusion Language Model for Code1 Sep
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation25 Jun
- 2025Anchored Diffusion Language Model24 May
- 2025Remasking Discrete Diffusion Models with Inference-Time Scaling1 Mar
- 2025Large Language Diffusion Models14 Feb
- 2024Simple and Effective Masked Diffusion Language Models11 Jun
- 2024Simplified and Generalized Masked Diffusion for Discrete Data6 Jun
- 2024Your Absorbing Discrete Diffusion Secretly Models the Conditional Distributions of Clean Data6 Jun
- 2023Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution25 Oct
Other references · 25
- 2025Qwen3 Technical Reportcited by 8,195
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,005
- 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,655
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2021Structured Denoising Diffusion Models in Discrete State-Spacescited by 1,665
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2022Diffusion-LM Improves Controllable Text Generationcited by 1,006
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
13 more
- 2025Mercury: Ultra-Fast Language Models Based on Diffusioncited by 225
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
- 2025A Survey on Code Generation with LLM-based Agentscited by 104
- 2025Exploring the Potential of Diffusion Large Language Models in Code Generationcited by 16
- 2025DINGO: Constrained Inference for Diffusion LLMscited by 15
- 2018Studying the Difference Between Natural and Programming Language Corporacited by 13
- 2025Constrained Decoding of Diffusion LLMs with Context-Free Grammarscited by 13
- 2025TreeDiff: AST-Guided Code Generation with Diffusion LLMscited by 11
- 2025The Cosine Schedule is Fisher-Rao-Optimal for Masked Discrete Diffusion Modelscited by 11
- 2025Is LLM-Generated Code More Maintainable & Reliable than Human-Written Code?cited by 5
- 2025Where Do LLMs Still Struggle? An In-Depth Analysis of Code Generation Benchmarkscited by 5
- 2022Synthesizing Research on Programmers' Mental Models of Programs, Tasks and Concepts -- a Systematic Literature Reviewcited by 3
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or One
- 2026Beyond the Autoregressive Horizon: A Comprehensive Survey of Diffusion Models, World Modelling, and State Space Models for Code
- 2026DreamOn: Diffusion Language Models For Code Infilling Beyond Fixed-size Canvas
- 2026Constrained Code Generation with Discrete Diffusion
- 2023CodeFusion: A Pre-trained Diffusion Model for Code Generation
- 2026Beyond Execution: Static-Analysis Rewards and Hint-Conditioned Diffusion RL for Code Generation
- 2024Assessing Code Generation with Intermediate Languages
- 2025On Powerful Ways to Generate: Autoregression, Diffusion, and Beyond