Learn the Interface, Not the Implementation: Output Representation Dominates Training Regime in LLM-Based RTL Generation

📄 arXiv: 2610.25881v1 📥 PDF

作者: Siddharth Patel, Vikram Singh, Siddharth Savyasachi Malu, Rohit Singh

分类: cs.LG, cs.AR

发布日期: 2026-10-19

备注: 6 pages, 3 figures. Accepted for presentation at VLSID 2027


💡 一句话要点

提出基于输出表示的训练策略以优化LLM的RTL生成

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 寄存器传输级 输出表示 训练策略 硬件设计 能效优化 自动化验证

📋 核心要点

  1. 现有的LLM在RTL生成中的训练方法多样,但输出表示的影响未被充分重视。
  2. 论文提出通过固定任务和数据,独立研究训练方案和输出表示的影响,强调输出表示的重要性。
  3. 实验结果显示,配置表示的通过率高达0.83,而原始RTL的通过率最高仅为0.17,且小模型在能效上表现优越。

📝 摘要(中文)

大语言模型(LLM)在寄存器传输级(RTL)生成中的研究主要集中于训练方法,如微调和强化学习。本文认为,输出表示的选择才是关键。通过对单错误校正、双错误检测(SECDED)ECC内存包装器的生成任务进行研究,固定任务、数据和正确性验证,独立变化训练方案和输出表示,结果表明,接近原始RTL的表示在通过率上表现不佳,而配置表示的通过率显著提高。此外,原始RTL在输出长度上存在硬限制,导致超过32位数据字的生成变得不可行。最后,较小模型结合验证生成器在能效上表现优越,展示了学习接口而非实现的重要性。

🔬 方法详解

问题定义:本文旨在解决大语言模型在寄存器传输级生成中的训练效率和输出质量问题。现有方法过于关注训练策略,而忽视了输出表示的选择对生成结果的影响。

核心思路:论文提出在固定任务和数据的情况下,独立分析不同训练方案和输出表示的效果,强调输出表示的优先级。通过对比不同表示的生成效果,展示了学习接口而非实现的必要性。

技术框架:研究设计了一个实验框架,包含七种训练方案和四种输出表示形式,从完全展开的平面Verilog到由确定性生成器扩展的八字段配置。通过与参考生成器的比较,评估生成结果的正确性。

关键创新:最重要的创新在于明确输出表示对生成质量的主导作用。与传统方法相比,配置表示在没有训练的情况下就能达到更高的通过率,显著提升了生成效率。

关键设计:实验中使用的关键参数包括训练方案的选择、输出表示的形式,以及模型的参数量(如小于5000万参数的模型与32亿参数的微调模型的比较)。

🖼️ 关键图片

img_0
img_1
img_2

📊 实验亮点

实验结果显示,接近原始RTL的表示在通过率上最高仅为0.17,而配置表示在无训练情况下的通过率达到0.83。经过训练后,所有训练方案的通过率均在0.89至1.00之间。此外,较小模型在能效上表现优越,使用约1600倍更少的推理能量。

🎯 应用场景

该研究的潜在应用领域包括数字电路设计、硬件描述语言生成以及自动化验证工具。通过优化生成过程,能够提高设计效率,降低能耗,推动硬件设计的自动化进程,具有重要的实际价值和未来影响。

📄 摘要(原文)

Large-language-model register-transfer-level (RTL) generation has concentrated on how to train the model: fine-tuning, continued pre-training, and reinforcement learning from a verifier. We argue this is the second-order question. On a bounded, formally specifiable task of generating single-error-correcting, double-error-detecting (SECDED) ECC memory wrappers, we hold the task, data, and correctness oracle fixed and vary two axes independently: the training regime (seven settings) and the output representation (four levels, from fully expanded flat Verilog to an eight-field configuration expanded by a deterministic generator). Because a reference generator exists, correctness is decided by formal equivalence over a design space of approximately ten million points, rather than sampled from a hand-written testbench. Two results follow. First, representation dominates: every representation close to raw RTL reaches a pass rate of at most 0.17, while the configuration reaches 0.83 with no training at all. Once the model emits the configuration, every training regime achieves a pass rate between 0.89 and 1.00. Second, raw RTL hits a hard output-length limit: a 512-bit design requires 44,237 tokens of flat Verilog compared with just 69 tokens for the configuration. Consequently, raw generation becomes infeasible above 32-bit data words rather than merely inaccurate. A model trained from scratch with fewer than 50 million parameters, combined with the verified generator, achieves 0.89 formal equivalence, compared with 1.00 for a 32-billion-parameter fine-tuned model, while using approximately 1600 times less inference energy per correct design. Inference energy also dominates amortized training energy. The lesson is to learn the interface, not the implementation.