Insights from Verification: Training a Verilog Generation LLM with Reinforcement Learning with Testbench Feedback
On the map: LLM alignment / RLHF / preference optimisation → Process reward models for reasoning
Abstract (arXiv)
Large language models (LLMs) have shown strong performance in Verilog generation from natural language description. However, ensuring the functional correctness of the generated code remains a significant challenge. This paper introduces a method that integrates verification insights from testbench into the training of Verilog generation LLMs, aligning the training with the fundamental goal of hardware design: functional correctness. The main obstacle in using LLMs for Verilog code generation is the lack of sufficient functional verification data, particularly testbenches paired with design specifications and code. To address this problem, we introduce an automatic testbench generation pipeline that decomposes the process and uses feedback from the Verilog compiler simulator (VCS) to reduce hallucination and ensure correctness. We then use the testbench to evaluate the generated codes and collect them for further training, where verification insights are introduced. Our method applies reinforcement learning (RL), specifically direct preference optimization (DPO), to align Verilog code generation with functional correctness by training preference pairs based on testbench outcomes. In evaluations on VerilogEval-Machine, VerilogEval-Human, RTLLM v1.1, RTLLM v2, and VerilogEval v2, our approach consistently outperforms state-of-the-art baselines in generating functionally correct Verilog code. We open source all training code, data, and models at https://anonymous.4open.science/r/VeriPrefer-E88B.
Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Placed in Process reward models for reasoning, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 32 of its 41 references that are in the map. First posted on arXiv 22 Apr 2025.
Builds on
32 of 41 references.
Closest ancestors · 1
Same direction, newest first
Other references · 31
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2024GPT-4o System Cardcited by 4,588
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
- 2023Qwen Technical Reportcited by 3,344
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2016Concrete Problems in AI Safetycited by 1,642
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,407
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
19 more
- 2022Decomposed Prompting: A Modular Approach for Solving Complex Taskscited by 558
- 2023A Survey of Hallucination in Large Foundation Modelscited by 368
- 2023Statistical Rejection Sampling Improves Preference Optimizationcited by 323
- 2023Tool Learning with Foundation Modelscited by 302
- 2023VerilogEval: Evaluating Large Language Models for Verilog Code Generationcited by 252
- 2023VeriGen: A Large Language Model for Verilog Code Generationcited by 200
- 2023RTLLM: An Open-Source Benchmark for Design RTL Generation with Large Language Modelcited by 148
- 2024DrAttack: Prompt Decomposition and Reconstruction Makes Powerful LLM Jailbreakerscited by 101
- 2024BetterV: Controlled Verilog Generation with Discriminative Guidancecited by 100
- 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 99
- 2024VerilogCoder: Autonomous Verilog Coding Agents with Graph-based Planning and Abstract Syntax Tree (AST)-based Waveform Tracing Toolcited by 85
- 2024OriGen:Enhancing RTL Code Generation with Code-to-Code Augmentation and Self-Reflectioncited by 56
- 2024Revisiting VerilogEval: A Year of Improvements in Large-Language Models for Hardware Code Generationcited by 45
- 2024CodeV: Empowering LLMs with HDL Generation through Multi-Level Summarizationcited by 38
- 2024AutoVCoder: A Systematic Framework for Automated Verilog Code Generation using LLMscited by 36
- 2025OpenLLM-RTL: Open Dataset and Benchmark for LLM-Aided Design RTL Generationcited by 31
- 2025HaVen: Hallucination-Mitigated LLM for Verilog Code Generation Aligned with HDL Engineerscited by 25
- 2024PyraNet: A Multi-Layered Hierarchical Dataset for Verilogcited by 19
- 2024IRCoCo: Immediate Rewards-Guided Deep Reinforcement Learning for Code Completioncited by 13
Built on by
Citing papers per year: 2025: 6; 2026: 8.
14 papers.
Sort:
By area:
- 2025QiMeng-CodeV-R1: Reasoning-Enhanced Verilog Generationcited by 35
- 2025Large Language Model for Verilog Code Generation: Literature Review and the Road Aheadcited by 8
- 2025iDSE: Navigating Design Space Exploration in High-Level Synthesis Using LLMscited by 7
- 2025QiMeng-SALV: Signal-Aware Learning for Verilog Code Generationcited by 4
- 2026SiliconMind-V1: Multi-Agent Distillation and Debug-Reasoning Workflows for Verilog Code Generationcited by 4
- 2026CktEvo: Repository-Level RTL Code Benchmark for Design Evolutioncited by 3
- 2025VeriGRAG: Enhancing LLM-Based Verilog Code Generation with Structure-Aware Soft Promptscited by 2
- 2025QiMeng-CRUX: Narrowing the Gap Between Natural Language and Verilog via Core Refined Understanding eXpression for Circuit Designcited by 1
- 2026Towards Generalizable Reasoning: Group Causal Counterfactual Policy Optimization for LLM Reasoningcited by 1
- 2026LLMs in Digital EDA: A perspective on shifting roles from Generation to Orchestrationcited by 1
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026Exploring LLM-based Verilog Code Generation with Data-Efficient Fine-Tuning and Testbench Automationcited by 0
- 2026BEHAVE: Functional Behavior Modeling Enables Self-Improving Agents for Hardware Design and Verification28 Sep 2026
- 2026CovR: Coverage-Aware Hardware Verification via Reasoning-Guided Reinforcement Learning15 Sep 2026
- 2026LLMs in Digital EDA: A perspective on shifting roles from Generation to Orchestration27 Aug 2026
- 2026Exploring LLM-based Verilog Code Generation with Data-Efficient Fine-Tuning and Testbench Automation16 Apr 2026
- 2026SiliconMind-V1: Multi-Agent Distillation and Debug-Reasoning Workflows for Verilog Code Generation10 Feb 2026
- 2026CktEvo: Repository-Level RTL Code Benchmark for Design Evolution10 Feb 2026
- 2026Towards Generalizable Reasoning: Group Causal Counterfactual Policy Optimization for LLM Reasoning6 Feb 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025QiMeng-CRUX: Narrowing the Gap Between Natural Language and Verilog via Core Refined Understanding eXpression for Circuit Design25 Nov 2025
- 2025Large Language Model for Verilog Code Generation: Literature Review and the Road Ahead29 Oct 2025
- 2025QiMeng-SALV: Signal-Aware Learning for Verilog Code Generation22 Oct 2025
- 2025VeriGRAG: Enhancing LLM-Based Verilog Code Generation with Structure-Aware Soft Prompts27 Sep 2025
2 more
- 2025QiMeng-CodeV-R1: Reasoning-Enhanced Verilog Generationcited by 35
- 2026SiliconMind-V1: Multi-Agent Distillation and Debug-Reasoning Workflows for Verilog Code Generationcited by 4
- 2026Towards Generalizable Reasoning: Group Causal Counterfactual Policy Optimization for LLM Reasoningcited by 1
- 2026CovR: Coverage-Aware Hardware Verification via Reasoning-Guided Reinforcement Learningcited by 0
- 2026CovR: Coverage-Aware Hardware Verification via Reasoning-Guided Reinforcement Learning15 Sep 2026
- 2026SiliconMind-V1: Multi-Agent Distillation and Debug-Reasoning Workflows for Verilog Code Generation10 Feb 2026
- 2026Towards Generalizable Reasoning: Group Causal Counterfactual Policy Optimization for LLM Reasoning6 Feb 2026
- 2025QiMeng-CodeV-R1: Reasoning-Enhanced Verilog Generation30 May 2025
- 2025Large Language Model for Verilog Code Generation: Literature Review and the Road Aheadcited by 8
- 2025iDSE: Navigating Design Space Exploration in High-Level Synthesis Using LLMscited by 7
- 2025QiMeng-SALV: Signal-Aware Learning for Verilog Code Generationcited by 4
- 2026CktEvo: Repository-Level RTL Code Benchmark for Design Evolutioncited by 3
- 2025VeriGRAG: Enhancing LLM-Based Verilog Code Generation with Structure-Aware Soft Promptscited by 2
- 2025QiMeng-CRUX: Narrowing the Gap Between Natural Language and Verilog via Core Refined Understanding eXpression for Circuit Designcited by 1
- 2026LLMs in Digital EDA: A perspective on shifting roles from Generation to Orchestrationcited by 1
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026Exploring LLM-based Verilog Code Generation with Data-Efficient Fine-Tuning and Testbench Automationcited by 0
- 2026LLMs in Digital EDA: A perspective on shifting roles from Generation to Orchestration27 Aug 2026
- 2026Exploring LLM-based Verilog Code Generation with Data-Efficient Fine-Tuning and Testbench Automation16 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
- 2025QiMeng-CRUX: Narrowing the Gap Between Natural Language and Verilog via Core Refined Understanding eXpression for Circuit Design25 Nov 2025
- 2025Large Language Model for Verilog Code Generation: Literature Review and the Road Ahead29 Oct 2025
- 2025QiMeng-SALV: Signal-Aware Learning for Verilog Code Generation22 Oct 2025
- 2025VeriGRAG: Enhancing LLM-Based Verilog Code Generation with Structure-Aware Soft Prompts27 Sep 2025
- 2025iDSE: Navigating Design Space Exploration in High-Level Synthesis Using LLMs28 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025VeriReason: Reinforcement Learning with Testbench Feedback for Reasoning-Enhanced Verilog Generation
- 2025VERIRL: Boosting the LLM-based Verilog Code Generation via Reinforcement Learning
- 2024Large Language Model for Verilog Generation with Code-Structure-Guided Reinforcement Learning
- 2025TB or Not TB: Coverage-Driven Direct Preference Optimization for Verilog Stimulus Generation
- 2025Rethinking Verification for LLM Code Generation: From Generation to Testing
- 2026GRPO with State Mutations: Improving LLM-Based Hardware Test Plan Generation
- 2025ChipSeek: Optimizing Verilog Generation via EDA-Integrated Reinforcement Learning
- 2025VFocus: Better Verilog Generation from Large Language Model via Focused Reasoning