Algorithms and Hardware for Efficient Processing of Logic-based Neural Networks

Jingkai Hong, Arash Fayyazi, Amirhossein Esmaili, Mahdi Nazemi, Massoud Pedram

Abstract

Traditional deep learning acceleration focuses on optimizing Multiply-Accumulate (MAC) operations. However, representing neural networks as massive Boolean logic circuits offers a promising alternative for high-throughput inference. This paper explores a novel framework consisting of a programmable Logic Processing Unit (LPU) and a specialized compiler designed to process logic-based neural networks. By partitioning large-scale logic graphs into Maximal Feasible Subgraphs (MFGs), the system overcomes the physical constraints of fixed-function hardware. Experimental results demonstrate that this approach achieves up to 25x higher throughput than state-of-the-art XNOR-based accelerators for complex models like VGG16.

1. Introduction

The computational demands of modern Deep Neural Networks (DNNs) have led to a surge in specialized hardware accelerators. While most architectures focus on high-precision arithmetic, Binary Neural Networks (BNNs) and Fixed-Function Combinational Logic (FFCL) have emerged as alternatives that trade precision for efficiency. FFCL, in particular, treats neurons as complex logic gates, offering extreme speed but suffering from a lack of programmability and scalability. This work introduces a programmable architecture and a corresponding compiler framework to address these limitations, enabling the efficient execution of massive logic-based models.

2. The Logic Processing Unit (LPU) Architecture

The core of the proposed hardware is the Logic Processing Unit (LPU), a many-core processor designed specifically for Boolean logic emulation. Unlike traditional CPUs or GPUs, the LPU is composed of Logic Processing Elements (LPEs).

2.1 Logic Processing Elements and Vectors

Each LPE is a programmable unit capable of performing any two-input logic operation. These elements are grouped into Logic Processing Vectors (LPVs), which function as stages in a deep pipeline. This structure allows the hardware to emulate the layers of a logic graph in a highly parallelized manner.

2.2 Distributed Memory and Snapshot Registers

To mitigate the "memory wall" common in AI hardware, the LPU utilizes "snapshot registers" distributed throughout the pipeline. These registers store intermediate results locally, allowing data to move at clock speed without the latency overhead of centralized scratchpad memory or external DRAM. For logic graphs exceeding the physical depth of the pipeline, a circulation mechanism feeds data back to the start, enabling the processing of arbitrarily deep networks.

3. The MFG-based Compiler Framework

Mapping a massive logic graph onto finite hardware requires sophisticated software orchestration. The authors developed a compiler that utilizes Maximal Feasible Subgraphs (MFGs) to partition and schedule operations.

3.1 Partitioning and Merging

The compiler first breaks the global logic graph into sub-graphs that fit the LPU’s physical constraints (width and depth). A key innovation is the "MFG Merging" algorithm, which identifies and combines single-output logic paths. This reduction in the total number of sub-graphs directly translates to higher throughput.

3.2 Instruction Generation

Once partitioned, the compiler generates a custom instruction stream. These instructions configure the LPEs at each clock cycle, effectively "re-wiring" the programmable logic to match the requirements of the specific neural network model being executed.

4. Experimental Evaluation

The framework was evaluated using a Xilinx VU9P FPGA across several benchmarks, including ImageNet-scale classification (VGG16), Network Intrusion Detection (NID), and Jet Substructure Classification (JSC).

4.1 Performance Results

The LPU demonstrated significant performance gains over existing methods. For the VGG16 model, the system achieved a throughput of 103.99K Frames Per Second (FPS). This represents a 25x improvement over XNOR-based accelerators and a 300x improvement over traditional MAC-based implementations.

4.2 Efficiency of the MFG Algorithm

The MFG Merging algorithm proved critical to performance, providing an average 5.2x throughput boost across all tested models. Furthermore, the design maintained a relatively low hardware footprint, utilizing only 20% of the FPGA's Flip-Flops and 37% of its Look-Up Tables (LUTs).

5. Discussion and Limitations

While the LPU excels in high-throughput scenarios, there are trade-offs regarding latency. For extremely small, latency-sensitive tasks like Jet Classification, "hard-wired" logic (ASIC-style FFCL) still outperforms the LPU due to the absence of programmable overhead. However, for most large-scale applications, the LPU provides a superior balance of speed and flexibility.

6. Conclusion

By rethinking neural networks as pure digital logic and providing the necessary hardware and compiler support, this research opens a new path for AI acceleration. The LPU framework successfully bridges the gap between the high performance of fixed-function logic and the flexibility of programmable processors, offering a scalable solution for the next generation of deep learning workloads.

Summary updated

BibTeX
@inproceedings{hong2023algorithms,
  author = {Jingkai Hong and Arash Fayyazi and Amirhossein Esmaili and Mahdi Nazemi and Massoud Pedram},
  title = {{Algorithms and Hardware for Efficient Processing of Logic-based Neural Networks}},
  booktitle = {DAC},
  year = {2023},
  doi = {10.1109/dac56929.2023.10247667},
}
Figure