VeriLadder: A Multi-Agent Specification Refinement System for Tool-Verified Verilog Datasets
Organizations: University of Delaware, Newark, Delaware, USA
Abstract
Training data is a bottleneck in AI, especially for large language models (LLMs) that write Verilog, because register-transfer-level (RTL) code is rarely published and existing datasets mostly check code for syntax, not instruction correctness. This paper presents VeriLadder, a five-level Verilog dataset, and the multi-agent framework that builds it, in which LLM agents write and revise specifications, and EDA tools (a synthesizer and a formal equivalence checker) decide what is accepted. Its levels follow an engineer's checks. Level 1 labels designs from two large Verilog corpora, namely RTLCoder and PyraNet, with synthesis results, failure causes, critical warnings and post-synthesis metrics. 28% of RTLCoder designs fail synthesis and are kept as negatives. Level 2 grades each instruction on four specification qualities, and low grades predict failed rebuilds. Level 3 rewrites each instruction into a refined specification and accepts it only if an LLM from another model family, reading only that specification, writes a circuit formally equivalent to the original. This raises the share of rebuildable designs from 26.1% to 78.2%, keeping every failed specification with its counterexample. Levels 4 and 5 add verified paraphrases and one-fact variants, hard negatives that differ only in one behavior from the verified design. VeriLadder labels the synthesizability of 716,627 designs and, from RTLCoder, provides 11,247 refined specifications, 32,393 paraphrases and 8,397 one-fact variants. Fine-tuning Qwen2.5-Coder-7B-Instruct on VeriLadder raises functional pass@1 from 31.7% to 50.0% on VerilogEval v2 and from 35.0% to 45.2% on RTLLM v2. The dataset and fine-tuned models are publicly available.
Figures & tables
| Code | Specification | Added training data | ||||||||||
| Dataset | Samples | Syntax | Synthesis | Failure | PPA | Quality | Checked | Formal | Repaired | Teacher | Para- | Hard |
| cause | metric | vs. code | check | trajectories | phrases | negatives | ||||||
| RTLCoder ( Liu et al., 2025a ) | 27K | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| MG-Verilog ( Zhang et al., 2024 ) | 11K | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ e | ✗ |
| PyraNet ( Nadimi et al., 2025 ) | 692K | ✓ | ✗ | a | ✗ | b | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| MetRex ( Abdelatty et al., 2025 ) | 25.9K | ✓ | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Grade | Consistency : every statement is true of the design | Unambiguity : every statement has one reading | Completeness : every port-visible behavior is stated | Verifiability : every requirement can be checked at the ports |
|---|---|---|---|---|
| 5 | Every stated behavior matches. | Nothing is open. | An equivalent design can be built from the text alone. | Every requirement maps to a check on named ports. |
| 4 | One secondary detail is wrong: “tc is a registered output.” | One minor item is open: “on each clock” (which edge?) | One minor item is missing: priority of reset over enable not stated. | One requirement has no time or condition: “tc indicates the last count.” |
| 3 | Core correct, several details wrong: “asynchronous reset … tc high at 254.” | One or two important items are open: “active reset” ; “tc signals overflow.” | Ports complete, several behaviors missing: tc never defined, wrap-around not stated. | Several vague requirements: “updates as needed” ; “at the right time.” |
| 2 | Core partly wrong or self-contradictory: “8-bit counter that counts 0 to 999, then saturates.” | Most behavior is open: “reset clears it; counts when enabled; tc marks the end.” | Ports incomplete, core partly given: “8-bit counter with clock and reset; output count.” | Mostly qualitative: “works correctly; handles overflow reliably.” |
| 1 | A different function: “a 4-bit down-counter with load.” | The core function is open: “a counter with reset and enable that signals when done.” | Almost nothing is stated: “Design a counter.” | Entirely qualitative: “a fast, robust, low-power counter.” |
| Model | Pre-trained | KTO | Gain |
|---|---|---|---|
| Qwen2.5-Coder-7B-Instruct | 77.5 | 89.0 | +11.5 |
| Qwen3-32B | 70.4 | 84.3 | +13.9 |
| Qwen2.5-7B-Instruct | 60.1 | 80.8 | +20.7 |
| Qwen2.5-Coder-1.5B-Instruct | 40.6 | 80.6 | +40.0 |
| Qwen2.5-14B-Instruct | 69.7 | 80.6 | +10.9 |
| Gemma-3-4B-it | 52.2 | 78.7 | +26.5 |
| VerilogEval v2 ( Liu et al., 2023b ) | RTLLM v2 ( Lu et al., 2024 ) | VeriLadder-Bench | ||||||
| Type | Model | Open- source | pass@1 | pass@5 | pass@1 | pass@5 | pass@1 | pass@5 |
| Foundation | GPT-4o | ✗ | 65.9 | 71.2 | 57.6 | 66.0 | 86.5 | 92.7 |
| GPT-5 | ✗ | 71.2 | 80.8 | 57.6 | 66.0 | 87.6 | 94.7 | |
| GPT-6-sol | ✗ | 85.5 | 89.1 | 71.2 | 76.0 | 92.9 | 93.7 | |
| Llama-3.1-8B-I | ✓ | 23.0 | 34.9 | 16.7 | 32.0 | 41.5 | 69.7 | |
| Qwen2.5-7B-I | ✓ | 25.5 | 38.7 | 26.2 | 43.6 | 55.4 | 75.4 | |
Synthetic Data Generation for Language Models
Synthetic data generation for language models creates artificial text, tasks, and interaction traces to train or evaluate models.
See all 310 papers