Quality over Quantity: Diversity-Aware Data Selection for Efficient Verilog Code Generation
Yiheng Shen, Wei Zheng, Xiao Wei, Hao Shen, Xiang Chen, Guang Yang
Abstract
Large Language Models (LLMs) have shown remarkable potential in Verilog code generation, yet existing datasets contain con siderable noise and redundancy. Prior data selection methods address only isolated quality aspects, neglect the global diversity of the training set, and cannot capture Verilog-specific structural semantics. To bridge this gap, we propose VeriSelector, the first data selection framework for Verilog code generation that jointly optimizes quality and diversity. We formulate the selec tion problem as a constrained bi-objective subset selection problem and solve it via a three-stage approximation. For quality, a multi-granularity pipeline first verifies functional correctness through testbench simulation and then filters misaligned samples via Instruction-Following Difficulty (IFD) scoring. For diversity, 109-dimensional Verilog-specific structural features (AST, CFG, and Netlist) are fused with textual embeddings for clustering-based diversity modeling. A proportional adaptive sampling strat egy then allocates per-cluster quotas guided by IFD ranks, with a provable distribution preservation guarantee. Experiments on three LLMs and three benchmarks show that VeriSelector outperforms full-dataset training and state-of-the-art baselines us ing only 20%-25% of the data, achieving Performance Retention Rates above 118% and reducing training time by over 80%. Notably, VeriSelector improves average Pass@1 by 18.49%-29.43% over full-dataset training and by 1.36%-7.95% over the best-performing baseline across all evaluated models.
Create a lesson
Metadata
- Comments
- Under review
Related papers
LLM-Assisted Verilog Code Refinement for Efficient RTL Clock Gating
Shared title terminologycs.ARGeuna Chang, Seohyun Kim, Youngsoo Shin
UniCASE: A Unified 16-bit Floating-Point Format with Criticality-Aware Selective ECC for Efficient DNN Protection
Shared title terminologycs.ARAmna Hassan, Semeen Rehman
RTLuminate: Illuminating RTL Code Generation with Assertion Feedback
Shared title terminologycs.ARArash Ardakani, Yujing Wang, Ryan Eun et al.
NoP Generator: Package-Aware Co-Design of Chiplet Systems
Shared title terminologycs.ARYishan Zhang, Lei Shen
GPS: Guiding Phase-Level Prefetcher Selection with Data-Driven Method
Shared title terminologycs.ARBuqing Xu, Mengming Li, Qijun Zhang et al.
CPU-Eval: Evaluating Large Language Models for CPU Hardware Code Generation
Shared title terminologycs.ARYuisei Iwata, Yutaka Masuda, Tohru Ishihara