CodeFusion: A Pre-trained Diffusion Model for Code Generation
On the map: Diffusion models → Discrete and text diffusion
Abstract (arXiv)
Imagine a developer who can only change their last line of code, how often would they have to start writing a function from scratch before it is correct? Auto-regressive models for code generation from natural language have a similar limitation: they do not easily allow reconsidering earlier tokens generated. We introduce CodeFusion, a pre-trained diffusion code generation model that addresses this limitation by iteratively denoising a complete program conditioned on the encoded natural language. We evaluate CodeFusion on the task of natural language to code generation for Bash, Python, and Microsoft Excel conditional formatting (CF) rules. Experiments show that CodeFusion (75M parameters) performs on par with state-of-the-art auto-regressive systems (350M-175B parameters) in top-1 accuracy and outperforms them in top-3 and top-5 accuracy due to its better balance in diversity versus quality.
Key facts. Cited by 31 papers in the map (data through 7 Oct 2026). Placed in Discrete and text diffusion, one of 14 directions in Diffusion models. Builds on 27 of its 36 references that are in the map. First posted on arXiv 26 Oct 2023.
Builds on
27 of 36 references.
Closest ancestors · 2
Same direction, newest first
- 2023AR-Diffusion: Auto-Regressive Diffusion Model for Text Generation16 May
- 2022Text Generation with Diffusion Language Models: A Pre-training Approach with Continuous Paragraph Denoise22 Dec
Other references · 25
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020Denoising Diffusion Probabilistic Modelscited by 20,851
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,185
- 2021Zero-Shot Text-to-Image Generationcited by 4,276
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2022Diffusion-LM Improves Controllable Text Generationcited by 1,006
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
13 more
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2016Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Modelscited by 299
- 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
- 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 101
- 2018NL2Bash: A Corpus and Semantic Parser for Natural Language Interface to the Linux Operating Systemcited by 97
- 2021Non-Autoregressive Text Generation with Pre-trained Language Modelscited by 36
- 2023An Empirical Comparison of Pre-Trained Models of Source Codecited by 25
- 2021Toward Code Generation: A Survey and Lessons from Semantic Parsingcited by 8
- 2023TransCoder: Towards Unified Transferable Code Representation Learning Inspired by Human Skillscited by 8
Built on by
Citing papers per year: 2023: 1; 2024: 8; 2025: 15; 2026: 7.
31 papers.
Sort:
By area:
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generationcited by 184
- 2023LaMPilot: An Open Benchmark Dataset for Autonomous Driving with Language Model Programscited by 45
- 2024Logits of API-Protected LLMs Leak Proprietary Informationcited by 38
- 2025LaDiR: Latent Diffusion Enhances LLMs for Text Reasoningcited by 25
- 2025From Bits to Rounds: Parallel Decoding with Exploration for Diffusion Language Modelscited by 22
- 2025Proving the Coding Interview: A Benchmark for Formally Verified Code Generationcited by 18
- 2025Exploring the Potential of Diffusion Large Language Models in Code Generationcited by 16
- 2026DreamOn: Diffusion Language Models For Code Infilling Beyond Fixed-size Canvascited by 16
- 2025TreeDiff: AST-Guided Code Generation with Diffusion LLMscited by 11
- 2024Pragmatic Competence Evaluation of Large Language Models for the Korean Languagecited by 8
- 2024FALCON: Feedback-driven Adaptive Long/short-term memory reinforced Coding Optimization systemcited by 8
19 more
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Taskscited by 6
- 2025MOCHA: Are Code Language Models Robust Against Multi-Turn Malicious Coding Prompts?cited by 5
- 2024A Survey on Large Language Models from Concept to Implementationcited by 4
- 2025Text-Diffusion Red-Teaming of Large Language Models: Unveiling Harmful Behaviors with Proximity Constraintscited by 4
- 2025A Neurosymbolic Agent System for Compositional Visual Reasoningcited by 4
- 2025A Novel Diffusion Model for Pairwise Geoscience Data Generation with Unbalanced Training Datasetcited by 3
- 2025Diffusion is a code repair operator and generatorcited by 3
- 2026Why Gaussian Diffusion Models Fail on Discrete Data and How to Prevent It?cited by 3
- 2025System Log Parsing with Large Language Models: A Reviewcited by 2
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or Onecited by 2
- 2025MoE-DiffuSeq: Enhancing Long-Document Diffusion Models with Sparse Attention and Mixture of Expertscited by 1
- 2026Autoregressive, Yet Revisable: In Decoding Revision for Secure Code Generationcited by 1
- 2026DICE: Diffusion Large Language Models Excel at Generating CUDA Kernelscited by 1
- 2024A Survey on the Real Power of ChatGPTcited by 0
- 2024Thesis proposal: Are We Losing Textual Diversity to Natural Language Processing?cited by 0
- 2024Eliciting Instruction-tuned Code Language Models' Capabilities to Utilize Auxiliary Function for Code Generationcited by 0
- 2025Tabularis Formatus: Predictive Formatting for Tablescited by 0
- 2026Beyond the Autoregressive Horizon: A Comprehensive Survey of Diffusion Models, World Modelling, and State Space Models for Codecited by 0
- 2026Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFTcited by 0
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or One3 Sep 2026
- 2026Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT13 Aug 2026
- 2026Beyond the Autoregressive Horizon: A Comprehensive Survey of Diffusion Models, World Modelling, and State Space Models for Code9 Apr 2026
- 2026Why Gaussian Diffusion Models Fail on Discrete Data and How to Prevent It?2 Apr 2026
- 2026DICE: Diffusion Large Language Models Excel at Generating CUDA Kernels12 Feb 2026
- 2026DreamOn: Diffusion Language Models For Code Infilling Beyond Fixed-size Canvas1 Feb 2026
- 2026Autoregressive, Yet Revisable: In Decoding Revision for Secure Code Generation1 Feb 2026
- 2025MoE-DiffuSeq: Enhancing Long-Document Diffusion Models with Sparse Attention and Mixture of Experts23 Dec 2025
- 2025From Bits to Rounds: Parallel Decoding with Exploration for Diffusion Language Models26 Nov 2025
- 2025LaDiR: Latent Diffusion Enhances LLMs for Text Reasoning6 Oct 2025
- 2025Exploring the Potential of Diffusion Large Language Models in Code Generation14 Sep 2025
- 2025Tabularis Formatus: Predictive Formatting for Tables14 Aug 2025
19 more
- 2025Diffusion is a code repair operator and generator14 Aug 2025
- 2025TreeDiff: AST-Guided Code Generation with Diffusion LLMs2 Aug 2025
- 2025MOCHA: Are Code Language Models Robust Against Multi-Turn Malicious Coding Prompts?25 Jul 2025
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation25 Jun 2025
- 2025A Neurosymbolic Agent System for Compositional Visual Reasoning9 Jun 2025
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Tasks28 Apr 2025
- 2025System Log Parsing with Large Language Models: A Review7 Apr 2025
- 2025Proving the Coding Interview: A Benchmark for Formally Verified Code Generation8 Feb 2025
- 2025Text-Diffusion Red-Teaming of Large Language Models: Unveiling Harmful Behaviors with Proximity Constraints14 Jan 2025
- 2025A Novel Diffusion Model for Pairwise Geoscience Data Generation with Unbalanced Training Dataset1 Jan 2025
- 2024FALCON: Feedback-driven Adaptive Long/short-term memory reinforced Coding Optimization system28 Oct 2024
- 2024Eliciting Instruction-tuned Code Language Models' Capabilities to Utilize Auxiliary Function for Code Generation20 Sep 2024
- 2024Thesis proposal: Are We Losing Textual Diversity to Natural Language Processing?15 Sep 2024
- 2024A Survey on Large Language Models for Code Generation1 Jun 2024
- 2024A Survey on the Real Power of ChatGPT22 Apr 2024
- 2024A Survey on Large Language Models from Concept to Implementation27 Mar 2024
- 2024Pragmatic Competence Evaluation of Large Language Models for the Korean Language19 Mar 2024
- 2024Logits of API-Protected LLMs Leak Proprietary Information14 Mar 2024
- 2023LaMPilot: An Open Benchmark Dataset for Autonomous Driving with Language Model Programs7 Dec 2023
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generationcited by 184
- 2025From Bits to Rounds: Parallel Decoding with Exploration for Diffusion Language Modelscited by 22
- 2026DreamOn: Diffusion Language Models For Code Infilling Beyond Fixed-size Canvascited by 16
- 2025A Novel Diffusion Model for Pairwise Geoscience Data Generation with Unbalanced Training Datasetcited by 3
- 2025Diffusion is a code repair operator and generatorcited by 3
- 2026Why Gaussian Diffusion Models Fail on Discrete Data and How to Prevent It?cited by 3
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or Onecited by 2
- 2025MoE-DiffuSeq: Enhancing Long-Document Diffusion Models with Sparse Attention and Mixture of Expertscited by 1
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or One3 Sep 2026
- 2026Why Gaussian Diffusion Models Fail on Discrete Data and How to Prevent It?2 Apr 2026
- 2026DreamOn: Diffusion Language Models For Code Infilling Beyond Fixed-size Canvas1 Feb 2026
- 2025MoE-DiffuSeq: Enhancing Long-Document Diffusion Models with Sparse Attention and Mixture of Experts23 Dec 2025
- 2025From Bits to Rounds: Parallel Decoding with Exploration for Diffusion Language Models26 Nov 2025
- 2025Diffusion is a code repair operator and generator14 Aug 2025
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation25 Jun 2025
- 2025A Novel Diffusion Model for Pairwise Geoscience Data Generation with Unbalanced Training Dataset1 Jan 2025
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2024Logits of API-Protected LLMs Leak Proprietary Informationcited by 38
- 2025Proving the Coding Interview: A Benchmark for Formally Verified Code Generationcited by 18
- 2025Exploring the Potential of Diffusion Large Language Models in Code Generationcited by 16
- 2025TreeDiff: AST-Guided Code Generation with Diffusion LLMscited by 11
- 2024Pragmatic Competence Evaluation of Large Language Models for the Korean Languagecited by 8
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Taskscited by 6
- 2025MOCHA: Are Code Language Models Robust Against Multi-Turn Malicious Coding Prompts?cited by 5
- 2024A Survey on Large Language Models from Concept to Implementationcited by 4
- 2025System Log Parsing with Large Language Models: A Reviewcited by 2
- 2026Autoregressive, Yet Revisable: In Decoding Revision for Secure Code Generationcited by 1
- 2026DICE: Diffusion Large Language Models Excel at Generating CUDA Kernelscited by 1
12 most cited of 17 All 17 (JSON)
- 2026Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT13 Aug 2026
- 2026DICE: Diffusion Large Language Models Excel at Generating CUDA Kernels12 Feb 2026
- 2026Autoregressive, Yet Revisable: In Decoding Revision for Secure Code Generation1 Feb 2026
- 2025Exploring the Potential of Diffusion Large Language Models in Code Generation14 Sep 2025
- 2025Tabularis Formatus: Predictive Formatting for Tables14 Aug 2025
- 2025TreeDiff: AST-Guided Code Generation with Diffusion LLMs2 Aug 2025
- 2025MOCHA: Are Code Language Models Robust Against Multi-Turn Malicious Coding Prompts?25 Jul 2025
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Tasks28 Apr 2025
- 2025System Log Parsing with Large Language Models: A Review7 Apr 2025
- 2025Proving the Coding Interview: A Benchmark for Formally Verified Code Generation8 Feb 2025
- 2024Eliciting Instruction-tuned Code Language Models' Capabilities to Utilize Auxiliary Function for Code Generation20 Sep 2024
- 2024Thesis proposal: Are We Losing Textual Diversity to Natural Language Processing?15 Sep 2024
12 newest of 17 All 17 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026Constrained Code Generation with Discrete Diffusion
- 2023Improving Code Generation by Training with Natural Language Feedback
- 2026AnCoder: Anchored Code Generation via Discrete Diffusion Models
- 2025Dream-Coder 7B: An Open Diffusion Language Model for Code
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation
- 2024CodeLutra: Boosting LLM Code Generation via Preference-Guided Refinement
- 2024Comments as Natural Logic Pivots: Improve Code Generation via Comment Perspective
- 2026CodeAlchemy: Synthetic Code Rewriting at Scale