UCL Discovery
UCL home » Library Services » Electronic resources » UCL Discovery

Circuit Transformer: A Transformer That Preserves Logical Equivalence

Li, X; Li, X; Chen, L; Zhang, X; Yuan, M; Wang, J; (2025) Circuit Transformer: A Transformer That Preserves Logical Equivalence. In: 13th International Conference on Learning Representations ICLR 2025. ICLR: Singapore. Green open access

[thumbnail of 5788_Circuit_Transformer_A_Tra.pdf]
Preview
PDF
5788_Circuit_Transformer_A_Tra.pdf - Accepted Version

Download (539kB) | Preview

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. Code: https://github.com/snowkylin/circuit-transformer.

Type: Proceedings paper
Title: Circuit Transformer: A Transformer That Preserves Logical Equivalence
Open access status: An open access version is available from UCL Discovery
Publisher version: https://openreview.net/forum?id=kpnW12Lm9p
Language: English
Additional information: This version is the version of record. For information on re-use, please refer to the publisher’s terms and conditions.
Keywords: Transformer, Logic, EDA, Circuit, Logic Synthesis
UCL classification: UCL
UCL > Provost and Vice Provost Offices > UCL BEAMS
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science > Dept of Computer Science
URI: https://discovery.ucl.ac.uk/id/eprint/10212509
Downloads since deposit
3Downloads
Download activity - last month
Download activity - last 12 months
Downloads by country - last 12 months

Archive Staff Only

View Item View Item