LangProp: A code optimization framework using Large Language Models applied to driving
On the map: End-to-end autonomous driving → Large language models for driving
Abstract (arXiv)
We propose LangProp, a framework for iteratively optimizing code generated by large language models (LLMs), in both supervised and reinforcement learning settings. While LLMs can generate sensible coding solutions zero-shot, they are often sub-optimal. Especially for code generation tasks, it is likely that the initial code will fail on certain edge cases. LangProp automatically evaluates the code performance on a dataset of input-output pairs, catches any exceptions, and feeds the results back to the LLM in the training loop, so that the LLM can iteratively improve the code it generates. By adopting a metric- and data-driven training paradigm for this code optimization procedure, one could easily adapt findings from traditional machine learning techniques such as imitation learning, DAgger, and reinforcement learning. We show LangProp's applicability to general domains such as Sudoku and CartPole, as well as demonstrate the first proof of concept of automated code optimization for autonomous driving in CARLA. We show that LangProp can generate interpretable and transparent policies that can be verified and improved in a metric- and data-driven way. Our code is available at https://github.com/shuishida/LangProp.
Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). Placed in Large language models for driving, one of 9 directions in End-to-end autonomous driving. Builds on 42 of its 59 references that are in the map. First posted on arXiv 18 Jan 2024.
Builds on
42 of 59 references.
References · 42
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2017CARLA: An Open Urban Driving Simulatorcited by 2,431
- 2022Do As I Can, Not As I Say: Grounding Language in Robotic Affordancescited by 2,302
30 more
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,172
- 2022Inner Monologue: Embodied Reasoning through Planning with Language Modelscited by 1,057
- 2016End to End Learning for Self-Driving Carscited by 1,000
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2022ProgPrompt: Generating Situated Robot Task Plans using Large Language Modelscited by 598
- 2023ViperGPT: Visual Inference via Python Execution for Reasoningcited by 591
- 2022Visual Programming: Compositional visual reasoning without trainingcited by 507
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022TransFuser: Imitation with Transformer-Based Sensor Fusion for Autonomous Drivingcited by 477
- 2022VIMA: General Robot Manipulation with Multimodal Promptscited by 403
- 2018ChauffeurNet: Learning to Drive by Imitating the Best and Synthesizing the Worstcited by 391
- 2019A Survey of Autonomous Driving: Common Practices and Emerging Technologiescited by 373
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
- 2019Causal Confusion in Imitation Learningcited by 286
- 2018Learning to Drive in a Daycited by 266
- 2022Trajectory-guided Control Prediction for End-to-end Autonomous Driving: A Simple yet Strong Baselinecited by 247
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 228
- 2017Deep Reinforcement Learning framework for Autonomous Drivingcited by 224
- 2022Safety-Enhanced Autonomous Driving Using Interpretable Sensor Fusion Transformercited by 211
- 2023Planning with Large Language Models for Code Generationcited by 179
- 2022Model-Based Imitation Learning for Urban Drivingcited by 149
- 2019Self-Driving Cars: A Surveycited by 147
- 2022Imitation Is Not Enough: Robustifying Imitation with Reinforcement Learning for Challenging Driving Scenarioscited by 124
- 2023Hidden Biases of End-to-End Driving Modelscited by 95
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
- 2023Errors are Useful Prompts: Instruction Guided Task Programming with Verifier-Assisted Iterative Promptingcited by 45
Built on by
Citing papers per year: 2024: 6; 2025: 8; 2026: 3.
17 papers.
Sort:
By area:
- 2025CaRL: Learning Scalable Planning Policies with Simple Rewardscited by 34
- 2024Hidden Biases of End-to-End Driving Datasetscited by 30
- 2024LLMs: A Game-Changer for Software Engineers?cited by 11
- 2024LLM4AD: Large Language Models for Autonomous Driving -- Concept, Review, Benchmark, Experiments, and Future Trendscited by 10
- 2024Generating and Evolving Reward Functions for Highway Driving with Large Language Modelscited by 8
- 2025Learning Game-Playing Agents with Generative Code Optimizationcited by 8
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspectivecited by 7
- 2025Survey of GenAI for Automotive Software Development: From Requirements to Executable Codecited by 5
- 2024A Survey on Large Language Model-empowered Autonomous Drivingcited by 3
- 2025On Simulation-Guided LLM-based Code Generation for Safe Autonomous Driving Softwarecited by 3
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimizationcited by 3
- 2026CktEvo: Repository-Level RTL Code Benchmark for Design Evolutioncited by 3
5 more
- 2025LLM-based Realistic Safety-Critical Driving Video Generationcited by 2
- 2026IndustryCode: A Benchmark for Industry Code Generationcited by 1
- 2024On Debiasing Text Embeddings Through Context Injectioncited by 0
- 2025AI-CDA4All: Democratizing Cooperative Autonomous Driving for All Drivers via Affordable Dash-cam Hardware and Open-source AI Softwarecited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026IndustryCode: A Benchmark for Industry Code Generation3 Apr 2026
- 2026CktEvo: Repository-Level RTL Code Benchmark for Design Evolution10 Feb 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimization16 Dec 2025
- 2025Learning Game-Playing Agents with Generative Code Optimization27 Aug 2025
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective2 Aug 2025
- 2025Survey of GenAI for Automotive Software Development: From Requirements to Executable Code20 Jul 2025
- 2025LLM-based Realistic Safety-Critical Driving Video Generation2 Jul 2025
- 2025AI-CDA4All: Democratizing Cooperative Autonomous Driving for All Drivers via Affordable Dash-cam Hardware and Open-source AI Software10 May 2025
- 2025CaRL: Learning Scalable Planning Policies with Simple Rewards24 Apr 2025
- 2025On Simulation-Guided LLM-based Code Generation for Safe Autonomous Driving Software2 Apr 2025
- 2024Hidden Biases of End-to-End Driving Datasets12 Dec 2024
5 more
- 2024LLMs: A Game-Changer for Software Engineers?1 Nov 2024
- 2024LLM4AD: Large Language Models for Autonomous Driving -- Concept, Review, Benchmark, Experiments, and Future Trends20 Oct 2024
- 2024On Debiasing Text Embeddings Through Context Injection14 Oct 2024
- 2024A Survey on Large Language Model-empowered Autonomous Driving21 Sep 2024
- 2024Generating and Evolving Reward Functions for Highway Driving with Large Language Models15 Jun 2024
- 2024Hidden Biases of End-to-End Driving Datasetscited by 30
- 2024LLM4AD: Large Language Models for Autonomous Driving -- Concept, Review, Benchmark, Experiments, and Future Trendscited by 10
- 2024Generating and Evolving Reward Functions for Highway Driving with Large Language Modelscited by 8
- 2024A Survey on Large Language Model-empowered Autonomous Drivingcited by 3
- 2025On Simulation-Guided LLM-based Code Generation for Safe Autonomous Driving Softwarecited by 3
- 2025LLM-based Realistic Safety-Critical Driving Video Generationcited by 2
- 2025AI-CDA4All: Democratizing Cooperative Autonomous Driving for All Drivers via Affordable Dash-cam Hardware and Open-source AI Softwarecited by 0
- 2025LLM-based Realistic Safety-Critical Driving Video Generation2 Jul 2025
- 2025AI-CDA4All: Democratizing Cooperative Autonomous Driving for All Drivers via Affordable Dash-cam Hardware and Open-source AI Software10 May 2025
- 2025On Simulation-Guided LLM-based Code Generation for Safe Autonomous Driving Software2 Apr 2025
- 2024Hidden Biases of End-to-End Driving Datasets12 Dec 2024
- 2024LLM4AD: Large Language Models for Autonomous Driving -- Concept, Review, Benchmark, Experiments, and Future Trends20 Oct 2024
- 2024A Survey on Large Language Model-empowered Autonomous Driving21 Sep 2024
- 2024Generating and Evolving Reward Functions for Highway Driving with Large Language Models15 Jun 2024
- 2025CaRL: Learning Scalable Planning Policies with Simple Rewardscited by 34
- 2024LLMs: A Game-Changer for Software Engineers?cited by 11
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspectivecited by 7
- 2025Survey of GenAI for Automotive Software Development: From Requirements to Executable Codecited by 5
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimizationcited by 3
- 2026CktEvo: Repository-Level RTL Code Benchmark for Design Evolutioncited by 3
- 2026IndustryCode: A Benchmark for Industry Code Generationcited by 1
- 2024On Debiasing Text Embeddings Through Context Injectioncited by 0
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026IndustryCode: A Benchmark for Industry Code Generation3 Apr 2026
- 2026CktEvo: Repository-Level RTL Code Benchmark for Design Evolution10 Feb 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimization16 Dec 2025
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspective2 Aug 2025
- 2025Survey of GenAI for Automotive Software Development: From Requirements to Executable Code20 Jul 2025
- 2025CaRL: Learning Scalable Planning Policies with Simple Rewards24 Apr 2025
- 2024LLMs: A Game-Changer for Software Engineers?1 Nov 2024
- 2024On Debiasing Text Embeddings Through Context Injection14 Oct 2024
Similar, not cited
Close in wording, no citation either way
- 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedback
- 2026Domain-Adaptable Reinforcement Learning for Code Generation with Dense Rewards
- 2023Drive Like a Human: Rethinking Autonomous Driving with Large Language Models
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization
- 2023LaMPilot: An Open Benchmark Dataset for Autonomous Driving with Language Model Programs
- 2023DriveMLM: Aligning Multi-Modal Large Language Models with Behavioral Planning States for Autonomous Driving
- 2024Large Language Models for Human-like Autonomous Driving: A Survey
- 2023LanguageMPC: Large Language Models as Decision Makers for Autonomous Driving