Transitive Array: An Efficient GEMM Accelerator with Result Reuse

Cong Guo, Chiyue Wei, Jiaming Tang, Bowen Duan, Song Han, Hai Li, Yiran Chen

TL;DR

This paper introduces transitive sparsity, a novel paradigm that accelerates General Matrix Multiplication (GEMM) by reusing previously computed partial results from overlapping bit patterns. To exploit this, the authors design the Transitive Array, a multiplication-free hardware accelerator that achieves up to a 7.46$\times$ speedup and a 2.31$\times$ energy reduction over state-of-the-art accelerators on LLaMA models without sacrificing accuracy.

What Problem Does This Paper Address?

General Matrix Multiplication (GEMM) is the primary computational bottleneck when deploying Deep Neural Networks (DNNs) and Large Language Models (LLMs). While quantization reduces data precision (e.g., to 4-bit or 1-bit integers) and bit-slicing techniques exploit "bit sparsity" by skipping zero bits, they still perform redundant additions.

Specifically, different rows in a bit-sliced matrix often share identical bit patterns. For instance, if Row A requires adding elements 1, 2, and 3, and Row B requires adding elements 2 and 3, standard hardware computes these completely independently. This paper addresses this unexploited redundancy. The core challenge lies in the strict execution dependencies and the difficulty of dynamically balancing workloads across parallel computing lanes without introducing massive scheduling overhead.

Figure 1: Comparison of bit sparsity and transitive sparsity (Ours) on the binary general matrix multiplication.

Methods

The authors propose a co-designed hardware/software solution consisting of the following components:

  • Bit-Slicing: Quantized integer matrices are decomposed into multiple binary 1-bit matrices to transform integer GEMM into binary operations.
  • Hasse Graph Representation: The mathematical relationships between overlapping bit patterns are modeled using a Hasse graph (a Directed Acyclic Graph representing a finite partially ordered set). This graph identifies "prefixes" (preceding computed results) and "suffixes" (subsequent operations that can reuse them).
  • Scoreboard Design (Static & Dynamic): To resolve execution order dependencies, rows are sorted by their Hamming weight (PopCount). A hardware scoreboard prunes the Hasse graph into independent, workload-balanced trees assigned to parallel lanes. The dynamic scoreboard operates on-the-fly, making it uniquely compatible with the dynamic attention layers found in LLMs.
  • Transitive Array (TA) Architecture: A multiplication-free hardware accelerator. It utilizes Prefix Processing Elements (PPEs) to transitively compute and store prefix results in a distributed buffer, and Accumulation Processing Elements (APEs) to resolve final sums. A non-blocking Benes network handles data routing.
Figure 2: Quantization and bit-slicing. A weight tensor (FP16) is quantized into an Int4 weight matrix (4 × 4). Bit-slicing decomposes each bit level of the Int4 matrix and reorganizes them into a binary weight matrix of shape (16 × 4).

Datasets

The architecture was evaluated using the following workloads:

  • LLaMA (v1, v2, and v3): Evaluated on the Wikitext dataset, utilizing language modeling perplexity (PPL) as the primary metric to ensure quantization accuracy.
  • ResNet-18: Evaluated on the ImageNet dataset to demonstrate the accelerator's effectiveness on traditional convolutional neural networks (CNNs).

Key Insights and Ideas

  • Sparsity Beyond Zeros: Traditional sparsity methods focus on skipping zeros. Transitive sparsity instead exploits the redundancy among ones. By recognizing that a row with more active bits can inherit the computed sum of a row with fewer active bits, the architecture eliminates redundant additions.
  • Hasse Graphs for Linear Complexity: Finding optimal reuse paths in a matrix normally incurs cubic ($O(N^3)$) complexity. Mapping the problem to a Hasse graph reduces the scheduling overhead to linear complexity, making runtime (dynamic) scheduling feasible for activation-dependent attention layers.
  • Multiplication-Free GEMM: By bit-slicing down to binary matrices and utilizing result reuse, the entire GEMM operation is transformed purely into a series of intelligent additions and accumulations, completely removing power-hungry hardware multipliers.

Key Results

  • LLM Speedup: Achieves a 7.46$\times$ speedup over Olive and a 3.97$\times$ speedup over BitVert on LLaMA models.
  • Energy Efficiency: Reduces energy consumption by 2.31$\times$ compared to Olive and 1.65$\times$ compared to BitVert.
  • CNN Performance: On ResNet-18, it achieves a 4.26$\times$ speedup over BitFusion and a 2.21$\times$ speedup over ANT.
  • Accuracy Preservation: Maintains near-lossless perplexity scores on LLaMA models compared to the unquantized FP16 baseline, significantly outperforming alternative hardware-driven quantization methods like Tender.

Limitations and Future Work

  • Buffer Energy Overhead: Frequent accesses to the prefix buffer mean that buffer operations consume the majority of the system's energy (56.4% of the total energy breakdown).
  • Future Directions: The authors note that the Transitive Array architecture shares similarities with SIMD and processing-in-memory layouts. They suggest exploring implementations using GPU tensor cores to mitigate buffer energy overhead and adapt the paradigm to broader computing scenarios.

Summary updated

BibTeX
@inproceedings{guo2025transitive,
  author = {Cong Guo and Chiyue Wei and Jiaming Tang and Bowen Duan and Song Han and Hai Li and Yiran Chen},
  title = {{Transitive Array: An Efficient GEMM Accelerator with Result Reuse}},
  booktitle = {ISCA},
  year = {2025},
  doi = {10.1145/3695053.3731043},
}
Figure