arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.12732cs.LG
收藏

基于掩码门建模与 Verilog-AIG 对齐的电路表示学习

Circuit Representation Learning with Masked Gate Modeling and Verilog-AIG Alignment

The Chinese University of Hong Kong(香港中文大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);ChatEDA Tech(ChatEDA科技)

Haoyuan Wu, Haisheng Zheng, Yuan Pu, Bei Yu

AI总结:

本文提出 MGVGA 框架,通过潜在空间掩码门建模保持逻辑等价,并借助 Verilog-AIG 对齐从 LLM 学习电路功能,在多项 EDA 逻辑综合任务上超越现有方法。

摘要:

理解电路的结构和功能对于电子设计自动化(EDA)至关重要。电路可以表示为与非图(And-Inverter graphs,AIG),从而能够通过图神经网络(GNN)高效实现表示学习。掩码建模范式已被证明在图表示学习中有效。然而,对原始电路进行掩码增强会破坏其逻辑等价性,因此不适合电路表示学习。此外,现有掩码建模范式通常优先考虑结构信息,却以牺牲电路功能等抽象信息为代价。为解决这些局限,我们提出 MGVGA,这是一种新颖的受约束掩码建模范式,融合了掩码门建模(MGM)和 Verilog-AIG 对齐(VGA)。具体而言,MGM 通过在潜在空间而非原始电路中掩码门来保持逻辑等价性,随后重建这些被掩码门的属性。同时,大语言模型(LLM)已展现出对 Verilog 代码功能的出色理解。基于这一能力,VGA 对原始电路执行掩码操作,并在等价 Verilog 代码的约束下重建被掩码门,使 GNN 能够从 LLM 学习电路功能。我们在面向 EDA 的多种逻辑综合任务上评估 MGVGA,结果表明 MGVGA 相比以往最先进方法具有优越性能。我们的代码可在 https://github.com/wuhy68/MGVGA 获取。

英文摘要:

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.

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

↑