arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.13838cs.LGcs.AR
收藏

Circuit Transformer:一种保持逻辑等价性的Transformer

Circuit Transformer: A Transformer That Preserves Logical Equivalence

University College London(伦敦大学学院)

Xihan Li, Xing Li, Lei Chen, Xing Zhang, Mingxuan Yuan, Jun Wang

AI总结:

研究提出Circuit Transformer,通过具有截断特性的解码机制严格保持逻辑等价性,并利用马尔可夫决策过程优化电路,实验证明其在生成等价且更紧凑电路方面优于现有神经方法。

摘要:

使用由逻辑门组成的电路来实现布尔函数是数字计算机设计的基础。然而,实现的电路必须完全等价,由于偶尔会做出错误的预测,这阻碍了生成式神经方法在此任务上的应用。在本研究中,我们引入了一种生成式神经模型“Circuit Transformer”,它消除了此类错误预测,并生成严格等价于给定布尔函数的逻辑电路。主要思想是一种精心设计的解码机制,通过生成token逐步构建电路,该机制具有有利的“截断特性”,一旦候选token破坏等价性,就会将其阻断。通过这种方式,所提出的模型类似于典型的LLM工作,同时严格保持了逻辑等价性。此外,还提出了一种马尔可夫决策过程公式,用于优化电路的某些目标。在实验中,我们训练了一个拥有8800万个参数的Circuit Transformer来生成输入电路的等价但更紧凑的形式,在合成和真实世界基准测试中均优于现有的神经方法,且没有任何违反等价性约束的情况。

英文摘要:

Implementing Boolean functions with circuits consisting of logic gates is fundamental in digital computer design. However, the implemented circuit must be exactly equivalent, which hinders generative neural approaches on this task due to their occasionally wrong predictions. In this study, we introduce a generative neural model, the "Circuit Transformer", which eliminates such wrong predictions and produces logic circuits strictly equivalent to given Boolean functions. The main idea is a carefully designed decoding mechanism that builds a circuit step-by-step by generating tokens, which has beneficial "cutoff properties" that block a candidate token once it invalidate equivalence. In such a way, the proposed model works similar to typical LLMs while logical equivalence is strictly preserved. A Markov decision process formulation is also proposed for optimizing certain objectives of circuits. Experimentally, we trained an 88-million-parameter Circuit Transformer to generate equivalent yet more compact forms of input circuits, outperforming existing neural approaches on both synthetic and real world benchmarks, without any violation of equivalence constraints.

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

↑