NatGen: Generative pre-training by "Naturalizing" source code
Not on the map. Why?
Abstract (arXiv)
Pre-trained Generative Language models (e.g. PLBART, CodeT5, SPT-Code) for source code yielded strong results on several tasks in the past few years, including code generation and translation. These models have adopted varying pre-training objectives to learn statistics of code construction from very large-scale corpora in a self-supervised fashion; the success of pre-trained models largely hinges on these pre-training objectives. This paper proposes a new pre-training objective, "Naturalizing" of source code, exploiting code's bimodal, dual-channel (formal & natural channels) nature. Unlike natural language, code's bimodal, dual-channel nature allows us to generate semantically equivalent code at scale. We introduce six classes of semantic preserving transformations to introduce un-natural forms of code, and then force our model to produce more natural original programs written by developers. Learning to generate equivalent, but more natural code, at scale, over large corpora of open-source code, without explicit manual supervision, helps the model learn to both ingest & generate code. We fine-tune our model in three generative Software Engineering tasks: code generation, code translation, and code refinement with limited human-curated labeled data and achieve state-of-the-art performance rivaling CodeT5. We show that our pre-trained model is especially competitive at zero-shot and few-shot learning, and better at learning code properties (e.g., syntax, data flow).
Key facts. Cited by 54 papers in the map (data through 13 Oct 2026). Builds on 41 of its 68 references that are in the map. First posted on arXiv 15 Jun 2022.
Builds on
41 of 68 references.
References · 41
- 2017Attention Is All You Needcited by 60,106
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,304
- 2020Language Models are Few-Shot Learnerscited by 32,320
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,549
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,322
- 2021Evaluating Large Language Models Trained on Codecited by 8,205
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,884
- 2016Overcoming catastrophic forgetting in neural networkscited by 4,753
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,304
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 905
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 743
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 651
29 more
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2017Zero-Shot Learning -- A Comprehensive Evaluation of the Good, the Bad and the Uglycited by 538
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 475
- 2019Generalizing from a Few Examples: A Survey on Few-Shot Learningcited by 462
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2018Meta-Transfer Learning for Few-Shot Learningcited by 306
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 221
- 2017Learning to Represent Programs with Graphscited by 220
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2020A Transformer-based Approach for Source Code Summarizationcited by 132
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 125
- 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 108
- 2018Mapping Language to Code in Programmatic Contextcited by 104
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
- 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
- 2019On Learning Meaningful Code Changes via Neural Machine Translationcited by 50
- 2018CODIT: Code Editing with Tree-Based Neural Modelscited by 40
- 2015On the "Naturalness" of Buggy Codecited by 35
- 2020Typilus: Neural Type Hintscited by 29
- 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 29
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2019Coupling Retrieval and Meta-Learning for Context-Dependent Semantic Parsingcited by 18
- 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrastscited by 17
- 2020Neural Software Analysiscited by 11
- 2017Neural Attribute Machines for Program Generationcited by 3
Built on by
Citing papers per year: 2022: 2; 2023: 21; 2024: 16; 2025: 9; 2026: 6.
54 papers.
Sort:
By area:
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 102
- 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 101
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 74
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 56
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 44
- 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 43
- 2023A New Era in Software Security: Towards Self-Healing Software via Large Language Models and Formal Verificationcited by 42
- 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Modelscited by 38
- 2023Code Execution with Pre-trained Language Modelscited by 34
- 2023Measuring The Impact Of Programming Language Distributioncited by 32
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
38 more
- 2023Better patching using LLM prompting, via Self-Consistencycited by 29
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMscited by 21
- 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generatorscited by 21
- 2023Towards Efficient Fine-tuning of Pre-trained Code Models: An Experimental Study and Beyondcited by 20
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2024Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programmingcited by 19
- 2024Selective Prompt Anchoring for Code Generationcited by 16
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
- 2023Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?cited by 14
- 2024Transformer-Based Models Are Not Yet Perfect At Learning to Emulate Structural Recursioncited by 14
- 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 14
- 2022Who Evaluates the Evaluators? On Automatic Metrics for Assessing AI-based Offensive Code Generatorscited by 11
- 2024Enhancing LLM-Based Coding Tools through Native Integration of IDE-Derived Static Contextcited by 10
- 2023Towards Causal Deep Learning for Vulnerability Detectioncited by 9
- 2023Functional Overlap Reranking for Neural Code Generationcited by 9
- 2025Do LLMs Consider Security? An Empirical Study on Responses to Programming Questionscited by 9
- 2023Learning from Teaching Assistants to Program with Subgoals: Exploring the Potential for AI Teaching Assistantscited by 7
- 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lackingcited by 7
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMscited by 7
- 2024Defending Code Language Models against Backdoor Attacks with Deceptive Cross-Entropy Losscited by 5
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2023Towards Understanding What Code Language Models Learnedcited by 3
- 2023Challenging Bug Prediction and Repair Models with Synthetic Bugscited by 3
- 2024Pinning "Reflection" on the Agenda: Investigating Reflection in Human-LLM Co-Creation for Creative Codingcited by 3
- 2024Exploring Data-Efficient Adaptation of Large Language Models for Code Generationcited by 3
- 2024SCoPE: Evaluating LLMs for Software Vulnerability Detectioncited by 3
- 2024CodeCipher: Learning to Obfuscate Source Code Against LLMscited by 3
- 2024Genetic Auto-prompt Learning for Pre-trained Code Intelligence Language Modelscited by 2
- 2024LLMs in the Heart of Differential Testing: A Case Study on a Medical Rule Enginecited by 2
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
- 2026A Jagged Frontier: Evaluating Robustness of Code Agents to Semantics-Preserving Transformationscited by 1
- 2023On ML-Based Program Translation: Perils and Promisescited by 0
- 2024Perspective of Software Engineering Researchers on Machine Learning Practices Regarding Research, Review, and Educationcited by 0
- 2025T3: Multi-level Tree-based Automatic Program Repair with Large Language Modelscited by 0
- 2025Fine-Tuning Code Language Models to Detect Cross-Language Bugscited by 0
- 2025CLASP: Training-Free LLM-Assisted Source Code Watermarking via Semantic-Preserving Transformationscited by 0
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Codecited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
50 most cited of 54 All 54 (JSON)
- 2026PatchBench: Evaluating AI Agents for Vulnerability Patching3 Sep 2026
- 2026A Jagged Frontier: Evaluating Robustness of Code Agents to Semantics-Preserving Transformations18 Aug 2026
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026Memorization Diagnostics for Code LLMs Should be Scale-Aware13 Aug 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Code5 Dec 2025
- 2025CLASP: Training-Free LLM-Assisted Source Code Watermarking via Semantic-Preserving Transformations13 Oct 2025
- 2025Fine-Tuning Code Language Models to Detect Cross-Language Bugs29 Jul 2025
- 2025T3: Multi-level Tree-based Automatic Program Repair with Large Language Models26 Jun 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
38 more
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasets21 Mar 2025
- 2025Do LLMs Consider Security? An Empirical Study on Responses to Programming Questions20 Feb 2025
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insights10 Feb 2025
- 2024Perspective of Software Engineering Researchers on Machine Learning Practices Regarding Research, Review, and Education28 Nov 2024
- 2024CodeCipher: Learning to Obfuscate Source Code Against LLMs8 Oct 2024
- 2024What can Large Language Models Capture about Code Functional Equivalence?20 Aug 2024
- 2024Selective Prompt Anchoring for Code Generation17 Aug 2024
- 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMs7 Aug 2024
- 2024SCoPE: Evaluating LLMs for Software Vulnerability Detection19 Jul 2024
- 2024Defending Code Language Models against Backdoor Attacks with Deceptive Cross-Entropy Loss12 Jul 2024
- 2024Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programming3 May 2024
- 2024Genetic Auto-prompt Learning for Pre-trained Code Intelligence Language Models20 Mar 2024
- 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generators6 Mar 2024
- 2024Exploring Data-Efficient Adaptation of Large Language Models for Code Generation29 Feb 2024
- 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lacking19 Feb 2024
- 2024LLMs in the Heart of Differential Testing: A Case Study on a Medical Rule Engine16 Feb 2024
- 2024Pinning "Reflection" on the Agenda: Investigating Reflection in Human-LLM Co-Creation for Creative Coding15 Feb 2024
- 2024Enhancing LLM-Based Coding Tools through Native Integration of IDE-Derived Static Context6 Feb 2024
- 2024Transformer-Based Models Are Not Yet Perfect At Learning to Emulate Structural Recursion23 Jan 2024
- 2023Functional Overlap Reranking for Neural Code Generation16 Oct 2023
- 2023Large Language Model-Aware In-Context Learning for Code Generation15 Oct 2023
- 2023Towards Causal Deep Learning for Vulnerability Detection12 Oct 2023
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translation8 Oct 2023
- 2023Challenging Bug Prediction and Repair Models with Synthetic Bugs3 Oct 2023
- 2023Learning from Teaching Assistants to Program with Subgoals: Exploring the Potential for AI Teaching Assistants19 Sep 2023
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Review4 Jul 2023
- 2023Towards Understanding What Code Language Models Learned20 Jun 2023
- 2023Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?2 Jun 2023
- 2023Better patching using LLM prompting, via Self-Consistency31 May 2023
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMs31 May 2023
- 2023A New Era in Software Security: Towards Self-Healing Software via Large Language Models and Formal Verification24 May 2023
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generation13 May 2023
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation9 May 2023
- 2023Code Execution with Pre-trained Language Models8 May 2023
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?24 Apr 2023
- 2023Towards Efficient Fine-tuning of Pre-trained Code Models: An Experimental Study and Beyond11 Apr 2023
- 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detection1 Apr 2023
- 2023On ML-Based Program Translation: Perils and Promises21 Feb 2023
50 newest of 54 All 54 (JSON)
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 102
- 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 101
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 74
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 56
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 44
- 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 43
- 2023A New Era in Software Security: Towards Self-Healing Software via Large Language Models and Formal Verificationcited by 42
- 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Modelscited by 38
- 2023Code Execution with Pre-trained Language Modelscited by 34
- 2023Measuring The Impact Of Programming Language Distributioncited by 32
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
12 most cited of 49 All 49 (JSON)
- 2026PatchBench: Evaluating AI Agents for Vulnerability Patching3 Sep 2026
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026Memorization Diagnostics for Code LLMs Should be Scale-Aware13 Aug 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025Auto-SPT: Automating Semantic Preserving Transformations for Code5 Dec 2025
- 2025Fine-Tuning Code Language Models to Detect Cross-Language Bugs29 Jul 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasets21 Mar 2025
- 2025Do LLMs Consider Security? An Empirical Study on Responses to Programming Questions20 Feb 2025
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insights10 Feb 2025
12 newest of 49 All 49 (JSON)