arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.27969cs.SEcs.AI
收藏

从幻象到基础:迈向可靠的多模态电路到Verilog代码生成

From Mirage to Grounding: Towards Reliable Multimodal Circuit-to-Verilog Code Generation

State Key Laboratory of Blockchain and Data Security, Zhejiang University(区块链与数据安全国家重点实验室,浙江大学);Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security, Hangzhou(杭州高新技术区(滨江)区块链与数据安全研究院,杭州);School of Artificial Intelligence and Computer Science, Nantong University(人工智能与计算机科学学院,南通大学)

Guang Yang, Xing Hu, Xiang Chen, Xin Xi

AI总结:

本文提出VeriGround模型,通过标识符匿名化、拒绝增强和D-ORPO对齐,解决了多模态模型在电路到Verilog代码生成中的可靠性问题,验证了真实视觉基础的重要性。

摘要:

多模态大语言模型(MLLMs)越来越多地用于将视觉元素转换为代码,从UI草图转换为HTML到科学图表转换为Python脚本。电路图可以视为一种用于硬件的视觉领域特定语言:它编码了时间、拓扑和位级别语义,这些语义在非专业检查中不可见,但在硅芯片制造后却安全关键。将此类图表转换为寄存器传输级(RTL)代码因此代表了视觉到代码生成的极端可靠性测试。我们揭示了一种现象,称为幻象:用空白图像替换电路图会使Pass@k保持不变甚至更高,因为模型绕过了视觉输入,转而利用模块标题中的标识符语义来检索标准RTL模板。这构成了一种新的、高度隐蔽的AI辅助代码生成中的缺陷类别,直接削弱了MLLMs的信任度。为了量化影响,我们构建了C2VEVAL,并在配对的正常/匿名协议下评估了八个MLLMs,其中匿名模式对图表和模块标题中的所有标识符进行匿名化;匿名模式得分在所有模型中急剧下降,证实了高正常模式准确性主要是幻象。我们随后提出VeriGround(4B),通过标识符匿名化、拒绝增强和D-ORPO(决策聚焦ORPO)偏好对齐进行训练,后者优先权重大纲生成或拒绝的令牌。VeriGround在正常/匿名模式下的功能Pass@1分别为46.11%/42.51%,其假拒绝率仅为1.20%/0.00%,同时在空白图像上保持>92%的拒绝率。仅使用4B参数,VeriGround在正常模式下与GPT-5.4表现相当,并在匿名模式下显著优于所有基线,证实了真正的视觉基础。

英文摘要:

Multimodal large language models (MLLMs) are increasingly used to translate visual artifacts into code, from UI mockups into HTML to scientific plots into Python scripts. A circuit diagram can be viewed as a visual domain-specific language for hardware: it encodes timing, topology, and bit level semantics that are invisible to casual inspection yet safety critical once fabricated in silicon. Translating such diagrams into register-transfer-level(RTL) code therefore represents an extreme reliability test for vision-to-code generation. We reveal a phenomenon we call Mirage: replacing a circuit diagram with a blank image leaves Pass@k unchanged or even higher, because models bypass the visual input and instead exploit identifier semantics in the module header to retrieve canonical RTL templates. This constitutes a new, highly covert class of defect in AI-assisted code generation that directly undermines MLLMs' trustworthiness. To quantify the effect, we construct C2VEVAL and evaluate eight MLLMs under a paired Normal/Anony protocol in which Anony mode anonymizes all identifiers in both the diagram and the module header; Anony-mode scores drop sharply across all models, confirming that high Normal-mode accuracy is largely a Mirage. We then propose VeriGround (4B), trained with identifier anonymization, refusal augmentation, and D-ORPO (Decision-Focused ORPO) preference alignment that up-weights pivotal generate-or-refuse tokens. VeriGround achieves Functional Pass@1 of 46.11%/42.51%(Normal/Anony) with a False Refusal Rate of only 1.20%/0.00%, while maintaining >92% Refusal Rate on blank images. With only 4B parameters, VeriGround performs on par with GPT-5.4 under Normal and significantly outperforms all baselines under Anony, confirming genuine visual grounding.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑