NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DeepCAM: A Fully CAM-based Inference Accelerator with Variable Hash Lengths for Energy-efficient Deep Neural Networks

Duy-Thanh Nguyen, Abhiroop Bhattacharjee, Abhishek Moitra, Priyadarshini Panda

Introduction

Deep Neural Networks (DNNs) have become the backbone of modern artificial intelligence, yet their deployment is increasingly constrained by the energy and computational demands of traditional hardware. At the heart of these networks lies the dot-product operation—specifically Multiply-Accumulate (MAC) operations—which accounts for over 90% of total processing time. In standard von-Neumann architectures, the constant movement of data between the processor and memory creates a "memory wall," leading to significant energy waste and latency. DeepCAM addresses these bottlenecks by introducing a novel Process-In-Memory (PIM) accelerator that replaces traditional algebraic math with a geometric approximation, achieving $O(1)$ time complexity for dot-product operations.

The Computational Challenge: Beyond the Memory Wall

While systolic arrays, such as those found in Google’s Tensor Processing Units (TPUs), have significantly improved the efficiency of DNN inference, they still generally operate with $O(N)$ time complexity. Furthermore, current PIM solutions often rely on analog crossbars, which are frequently susceptible to noise and environmental variations. DeepCAM departs from these approaches by utilizing digital-like Content Addressable Memory (CAM) structures. By performing calculations entirely within the memory array, DeepCAM eliminates the need for data shuffling and drastically reduces the energy footprint of high-dimensional vector operations.

Methodology

The core innovation of DeepCAM is the transition from algebraic dot products to geometric dot products. This shift is facilitated by three primary components: geometric approximation, random projection hashing, and a dynamic hardware architecture.

1. Geometric Approximation and Hashing

Instead of calculating the sum of products ($x \cdot y = \sum x_i y_i$), DeepCAM treats inputs and weights as vectors in Euclidean space, where the dot product is defined as $x \cdot y = \|x\| \|y\| \cos(\theta)$. To estimate the angle ($\theta$) efficiently, the system employs the Johnson-Lindenstrauss lemma to map high-dimensional vectors into short binary "hashes." The Hamming distance—the number of differing bits between these hashes—serves as a direct approximation of the angle between the original vectors.

2. Dynamic FeFET CAM Architecture

The hardware is constructed using Ferroelectric Field-Effect Transistors (FeFETs), which offer superior density and efficiency compared to standard CMOS. A key feature of this architecture is the Variable Hash Length (VHL) capability. The CAM is designed as a "dynamic" structure where 256-bit memory chunks can be linked using transmission gates. This allows the system to adjust hash lengths from 256 to 1024 bits on the fly, depending on the precision requirements of specific neural network layers.

3. On-the-fly Context Generation

While model weights are hashed offline and stored in the CAM, activations must be processed in real-time. DeepCAM includes an on-chip hardware module known as the Context Generator. Utilizing a Non-Volatile Memory (NVM) crossbar, this module hashes activations as they pass between layers, ensuring the pipeline remains efficient and stationary.

Experimental Evaluation

The researchers evaluated DeepCAM across several standard computer vision benchmarks, including MNIST (LeNet5), CIFAR10 (VGG11 and ResNet18), and CIFAR100 (VGG16 and ResNet18).

Performance and Efficiency

DeepCAM demonstrates transformative performance gains over traditional architectures:

  • Speedup: The accelerator is up to 523× faster than the Eyeriss systolic array and 3498× faster than a traditional Intel Skylake CPU.
  • Energy Efficiency: DeepCAM consumes between 2.16× and 109× less energy than Eyeriss. When compared to RRAM-based analog PIM systems, DeepCAM remains approximately 71× more energy-efficient.

Accuracy and Precision

Despite the use of approximate computing, the impact on classification accuracy is minimal. For the VGG11 model on the CIFAR10 dataset, DeepCAM achieved 90.5% accuracy, representing a negligible drop from the 91.25% software baseline. This is largely attributed to the VHL strategy, which assigns longer hashes to layers that are more sensitive to approximation and shorter hashes to more robust layers, optimizing the power-accuracy trade-off.

Discussion and Insights

The primary advantage of DeepCAM lies in its $O(1)$ complexity. Because a CAM can compare a search key against all stored data simultaneously, the time required to estimate the dot product does not increase with vector size. This effectively breaks the linear scaling bottleneck inherent in traditional processors. Furthermore, the use of an Activation-Stationary Dataflow allows for 100% hardware utilization, facilitating faster convolutions by mapping activations to CAM rows.

However, there are limitations to this approach. The geometric approximation may not be suitable for non-error-tolerant applications or specific architectures where high-precision algebraic results are mandatory. Additionally, the Context Generator adds peripheral complexity to the hardware design, requiring specialized NVM crossbars and sense amplifiers.

Conclusion

DeepCAM represents a significant step forward in PIM technology, proving that geometric approximation combined with FeFET-based CAMs can deliver massive improvements in both speed and energy efficiency. By breaking the $O(N)$ complexity barrier and implementing variable hash lengths, DeepCAM provides a scalable and flexible solution for the next generation of edge AI and energy-constrained deep learning applications.

Summary updated

BibTeX
@inproceedings{nguyen2023deepcam,
  author = {Duy-Thanh Nguyen and Abhiroop Bhattacharjee and Abhishek Moitra and Priyadarshini Panda},
  title = {{DeepCAM: A Fully CAM-based Inference Accelerator with Variable Hash Lengths for Energy-efficient Deep Neural Networks}},
  booktitle = {DATE},
  year = {2023},
  doi = {10.23919/date56975.2023.10137068},
}
Figure