Circuit Transformer: A Transformer That Preserves Logical Equivalence
Xihan Li, Xing Li, Lei Chen, Xing Zhang, Mingxuan Yuan, Jun Wang
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Evolving Graph Structured Programs for Circuit Generation with Large Language Models cites Towards Next-Generation Logic Synthesis: A Scalable Neural Circuit Generation Framework
- Towards Next-Generation Logic Synthesis: A Scalable Neural Circuit Generation Framework cites SLAP: A Supervised Learning Approach for Priority Cuts Technology Mapping
Cited by top-tier papers4
- Towards Next-Generation Logic Synthesis: A Scalable Neural Circuit Generation FrameworkZhihai Wang, Jie Wang, Qingyue Yang, Yinqi Bai et al.NeurIPS 2024 · 17 citations
- Tropical Attention: Neural Algorithmic Reasoning for Combinatorial AlgorithmsBaran Hashemi, Kurt Pasque, Christopher Teska, Ruriko YoshidaNeurIPS 2025 · 14 citations
- KeeA*: Epistemic Exploratory A* Search via Knowledge CalibrationDengwei Zhao, Shikui Tu, Yanan Sun, Lei XuNeurIPS 2025
- Evolving Graph Structured Programs for Circuit Generation with Large Language ModelsYinqi Bai, Jie Wang, Lei Chen, Zhihai Wang et al.ICLR 2026
Builds on8
- Versatile Multi-stage Graph Neural Network for Circuit RepresentationShuwen Yang, Zhihao Yang, Dong Li, Yingxue Zhang et al.NeurIPS 2022 · 72 citations
- The Policy-gradient Placement and Generative Routing Neural Networks for Chip DesignRuoyu Cheng, Xianglong Lyu, Yang Li, Junjie Ye et al.NeurIPS 2022 · 59 citations
- DeepGate: learning neural representations of logic gatesMin Li, Sadaf Khan, Zhengyuan Shi, Naixing Wang et al.DAC 2022 · 55 citations
- Functionality matters in netlist representation learningZiyi Wang, Chen Bai, Zhuolun He, Guangliang Zhang et al.DAC 2022 · 45 citations
- SLAP: A Supervised Learning Approach for Priority Cuts Technology MappingWalter Lau Neto, Matheus T. Moreira, Yingjie Li, Luca G. Amarù et al.DAC 2021 · 32 citations
Related papers
- Teaching Temporal Logics to Neural NetworksChristopher Hahn, Frederik Schmitt, Jens U. Kreber, Markus Norman Rabe et al.ICLR 2021 · 78 citations
- Circuit Representation Learning with Masked Gate Modeling and Verilog-AIG AlignmentHaoyuan Wu, Haisheng Zheng, Yuan Pu, Bei YuICLR 2025
- Iterative Circuit Repair Against Formal SpecificationsMatthias Cosler, Frederik Schmitt, Christopher Hahn, Bernd FinkbeinerICLR 2023 · 1 citation
- Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with TransformersColin Wei, Yining Chen, Tengyu MaNeurIPS 2022 · 117 citations
- Cascaded Text Generation with Markov TransformersYuntian Deng, Alexander M. RushNeurIPS 2020 · 16 citations
