通过掩码门建模与Verilog-AIG对齐,实现电路表征学习的逻辑等价性保持。
Circuit Representation Learning with Masked Gate Modeling and Verilog-AIG Alignment
- 在隐空间掩码门,保持电路逻辑等价性
- 结合LLM理解的Verilog代码约束重建门属性
- 适合电路设计自动化中的功能表征任务
理解电路结构与功能对电子设计自动化(EDA)至关重要。电路可表示为与非门图(AIG),便于通过图神经网络(GNN)实现表征学习。掩码建模范式在图表示学习中已被证明有效,但对原始电路进行掩码会破坏其逻辑等价性,不适用于电路表征学习。此外,现有方法常侧重结构信息而忽略电路功能等抽象信息。为此,我们提出MGVGA,一种新型约束式掩码建模范式,包含掩码门建模(MGM)和Verilog-AIG对齐(VGA)。MGM在隐空间掩码门并重建其属性,保持逻辑等价性;利用大语言模型(LLM)对Verilog代码功能的优秀理解能力,VGA在原电路上进行掩码,并在等效Verilog代码约束下重建被掩码门,使GNN能从LLM中学习电路功能。我们在多个EDA逻辑综合任务上评估MGVGA,结果表明其性能优于以往最先进方法。代码已开源:https://github.com/wuhy68/MGVGA。
原文摘要 · Abstract (English)
Understanding the structure and function of circuits is crucial for electronic design automation (EDA). Circuits can be formulated as And-Inverter graphs (AIGs), enabling efficient implementation of representation learning through graph neural networks (GNNs). Masked modeling paradigms have been proven effective in graph representation learning. However, masking augmentation to original circuits will destroy their logical equivalence, which is unsuitable for circuit representation learning. Moreover, existing masked modeling paradigms often prioritize structural information at the expense of abstract information such as circuit function. To address these limitations, we introduce MGVGA, a novel constrained masked modeling paradigm incorporating masked gate modeling (MGM) and Verilog-AIG alignment (VGA). Specifically, MGM preserves logical equivalence by masking gates in the latent space rather than in the original circuits, subsequently reconstructing the attributes of these masked gates. Meanwhile, large language models (LLMs) have demonstrated an excellent understanding of the Verilog code functionality. Building upon this capability, VGA performs masking operations on original circuits and reconstructs masked gates under the constraints of equivalent Verilog codes, enabling GNNs to learn circuit functions from LLMs. We evaluate MGVGA on various logic synthesis tasks for EDA and show the superior performance of MGVGA compared to previous state-of-the-art methods. Our code is available at https://github.com/wuhy68/MGVGA.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。