atlas

Research map / Large language models / Agents, code and math

VeriThoughts: Enabling Automated Verilog Code Generation using Reasoning and Formal Verification

NeurIPS 2025 · Large language models › Agents, code and math · approach: Retrieval-augmented formal theorem proving · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces VeriThoughts, a ~20K-sample formally verified Verilog reasoning dataset built from MetRex with Gemini-generated questions and DeepSeek-R1 reasoning traces, and fine-tunes Qwen2.5-14B reasoning models that set open-source results on VerilogEval.

Problem

LLM Verilog code generation lacks large-scale question-code-reasoning data, and existing evaluations rely on weak testbench simulation rather than formal equivalence checking.

Approach

Generate natural-language questions for synthesizable Verilog, regenerate Verilog with a reasoning model, and use Yosys-based formal equivalence checking as a self-consistency label for question-answer quality; use the resulting data for SFT of reasoning models and a formally verified benchmark.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add reasoning traces rather than use instruction-only training examples (ablation)Qwen-2.5-Instruct-7B fine-tuned on self-consistent VeriThoughts data · VeriThoughtsPass@1: 49.0% -> 75.5% (Diff. 26.5%)Helped
Add reasoning traces rather than use instruction-only training examples (ablation)Qwen-2.5-Instruct-7B fine-tuned on self-consistent VeriThoughts data · VerilogEvalPass@1: 21.9% -> 34.6% (Diff. 12.7%)Helped
Add reasoning traces rather than use instruction-only training examples (ablation)Qwen-2.5-Instruct-7B fine-tuned on inconsistent ground-truth-target data · VeriThoughtsPass@1: 44.9% -> 51.0% (Diff. 6.1%)Helped
Add reasoning traces rather than use instruction-only training examples (ablation)Qwen-2.5-Instruct-7B fine-tuned on inconsistent ground-truth-target data · VerilogEvalPass@1: 19.8% -> 37.2% (Diff. 17.4%)Helped
Add reasoning traces rather than use instruction-only training examples (ablation)Qwen-2.5-Instruct-7B fine-tuned on inconsistent generated-target data · VeriThoughtsPass@1: 51.0% -> 82.8% (Diff. 31.8%)Helped
Add reasoning traces rather than use instruction-only training examples (ablation)Qwen-2.5-Instruct-7B fine-tuned on inconsistent generated-target data · VerilogEvalPass@1: 37.9% -> 37.3% (Diff. -0.6%)No clear effect
Add self-consistency filtering to select training examples (ablation)Qwen-2.5-Instruct-7B reasoning model trained on ground-truth targets · VeriThoughtsPass@1: 51.0% -> 75.5% (Diff. 24.5%)Helped
Add self-consistency filtering to select training examples (ablation)Qwen-2.5-Instruct-7B reasoning model trained on ground-truth targets · VerilogEvalPass@1: 37.2% -> 34.6% (Diff. -2.6%)Hurt
Add self-consistency filtering to select training examples (ablation)Qwen-2.5-Instruct-7B instruction model trained on ground-truth targets · VeriThoughtsPass@1: 44.9% -> 49.0% (Diff. 4.1%)Helped
Add self-consistency filtering to select training examples (ablation)Qwen-2.5-Instruct-7B instruction model trained on ground-truth targets · VerilogEvalPass@1: 19.8% -> 21.9% (Diff. 2.1%)Mixed
Use generated Verilog targets from inconsistent prompt-answer pairs instead of ground-truth targets from self-consistent pairs (ablation)Qwen-2.5-Instruct-7B reasoning model · VeriThoughtsPass@1: 75.5% -> 82.8% (Diff. -7.3%)Helped
Use generated Verilog targets from inconsistent prompt-answer pairs instead of ground-truth targets from self-consistent pairs (ablation)Qwen-2.5-Instruct-7B reasoning model · VerilogEvalPass@1: 34.6% -> 37.3% (Diff. -2.7%)Helped

Surprising findings

Limitations

Experimental setup

Datasets: MetRex VeriThoughts VerilogEval

Benchmarks: VerilogEval VeriThoughts benchmark

Metrics: pass@1 pass@5 pass@10

Baselines: VerilogEval CL-Verilog RTLCoder DeepSeek-R1-Distill-Qwen-14B Qwen3-14B GPT-4o Claude 3.7 Sonnet ChatGPT-o3 Gemini-2.5-Flash-Preview-04-17

Builds on: MetRex VerilogEval LLaMA-Factory DeepSeek-R1

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy