Circuit Transformer: A Transformer That Preserves Logical Equivalence

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Li, Xihan, Li, Xing, Chen, Lei, Zhang, Xing, Yuan, Mingxuan, Wang, Jun
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866912213711716352
author Li, Xihan
Li, Xing
Chen, Lei
Zhang, Xing
Yuan, Mingxuan
Wang, Jun
author_facet Li, Xihan
Li, Xing
Chen, Lei
Zhang, Xing
Yuan, Mingxuan
Wang, Jun
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2403_13838
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Circuit Transformer: A Transformer That Preserves Logical Equivalence
Li, Xihan
Li, Xing
Chen, Lei
Zhang, Xing
Yuan, Mingxuan
Wang, Jun
Machine Learning
Hardware Architecture
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.
title Circuit Transformer: A Transformer That Preserves Logical Equivalence
topic Machine Learning
Hardware Architecture
url https://arxiv.org/abs/2403.13838