RAPA-ConvNets: Modified Convolutional Networks for Accelerated Training on Architectures With Analog Arrays

Malte J. Rasch, Tayfun Gokmen, Mattia Rigotti, Wilfried Haensch

Abstract

Analog arrays are a promising emerging hardware technology with the potential to drastically speed up deep learning. Their main advantage is that they employ analog circuitry to compute matrix-vector products in constant time, irrespective of the size of the matrix. However, ConvNets map very unfavorably onto analog arrays when done in a straight-forward manner, because kernel matrices are typically small and the constant time operation needs to be sequentially iterated a large number of times. Here, we propose to parallelize the training by replicating the kernel matrix of a convolution layer on distinct analog arrays, and randomly divide parts of the compute among them. With this modification, analog arrays execute ConvNets with a large acceleration factor that is proportional to the number of kernel matrices used per layer (here tested 16-1024). Despite having more free parameters, we show analytically and in numerical experiments that this new convolution architecture is self-regularizing and implicitly learns similar filters across arrays. We also report superior performance on a number of datasets and increased robustness to adversarial attacks. Our investigation suggests to revise the notion that emerging hardware architectures that feature analog arrays for fast matrix-vector multiplication are not suitable for ConvNets.

Introduction

Analog memory arrays, specifically those utilizing non-volatile memory devices like Resistive Processing Units (RPUs), represent a paradigm shift in deep learning hardware. By leveraging Ohm's law and Kirchhoff's current law, these arrays can perform matrix-vector multiplications (MVM) in $O(1)$ time, regardless of the matrix dimensions. This physical implementation of compute-in-memory offers the potential for orders-of-magnitude improvements in energy efficiency and throughput.

Analog array computation using Ohm's law for matrix-vector multiplication and rank-one updates.

However, standard Convolutional Neural Networks (ConvNets) present a significant challenge for this technology. In a standard convolution, a small kernel matrix is applied sequentially to thousands of overlapping image patches. This sequential processing scales linearly with the number of pixels, negating the constant-time advantage of the analog array. Furthermore, the small size of typical kernels leaves much of the analog array's capacity underutilized. The authors propose RAPA-ConvNets to bridge this gap by enabling model parallelism on stationary-weight hardware.

Methods

The authors propose RAPA (Replicated Arrays with Permuted Assignment) Convolution. Instead of using a single kernel matrix per convolutional layer, the kernel is replicated across $n_t$ distinct analog arrays or "tiles." During the forward pass, input image patches are randomly partitioned and distributed among these tiles. Since each tile is physically independent, they can process their assigned patches in parallel, leading to a theoretical acceleration factor proportional to $n_t$.

The study investigated several tiling schemes for distributing patches:

  • Image-based: Assigning contiguous spatial regions to specific tiles.
  • Alternating: Using a checkerboard pattern for assignment.
  • Random: Shuffling patches to tiles, with resampling every epoch.
  • Perforated: A baseline where patches are dropped to reduce computation.

At inference time, the network can generate multiple predictions by sampling different random patch assignments and taking a majority vote. To prove hardware viability, the authors simulated the network using both standard Floating Point (FP) math and a highly realistic RPU simulator that injects analog noise, limited precision, and device-to-device variations.

Results and Discussion

The RAPA-ConvNet architecture was evaluated on CIFAR-10, CIFAR-100, and SVHN datasets. Key findings include:

1. Accuracy and Regularization

Despite the massive increase in parameters due to kernel replication, RAPA-ConvNets showed no signs of overfitting. In fact, random tiling acted as a powerful implicit regularizer, similar to Dropout. On CIFAR-10, the RAPA model achieved a test error of 16.3%, compared to 18.5% for the standard ConvNet baseline.

2. Filter Synchronization

Interestingly, the independent tiles naturally learned nearly identical filters. Because each tile receives a statistically similar distribution of patches and error signals, the weights synchronize without explicit communication or weight-syncing overhead.

3. Hardware Resilience and Speedup

Simulations with noisy RPU models showed only a 1-2% drop in accuracy, demonstrating that the architecture is robust to the physical limitations of analog hardware. By using up to 128 tiles for the first convolutional layer, the architecture can theoretically execute a training epoch 128 times faster on analog hardware.

4. Adversarial Robustness

RAPA-ConvNets exhibited significantly higher resistance to adversarial attacks like the Fast Gradient Sign Method (FGSM). The random routing prevents the model from developing the high-confidence, brittle decision boundaries that adversarial noise exploits. Scaling to 128 tiles reduced the vulnerability gap by 64%.

Conclusion

RAPA-ConvNets provide a scalable method to parallelize convolutions on analog hardware. By turning the sequential nature of convolutions into a parallel, stochastic process, the architecture achieves both hardware acceleration and improved generalization. While digital overhead for patch routing remains a consideration, this work suggests that analog arrays are highly suitable for modern deep learning architectures.

Summary updated

BibTeX
@inproceedings{rasch2019rapa,
  author = {Malte J. Rasch and Tayfun Gokmen and Mattia Rigotti and Wilfried Haensch},
  title = {{RAPA-ConvNets: Modified Convolutional Networks for Accelerated Training on Architectures With Analog Arrays}},
  booktitle = {Frontiers in Neuroscience},
  year = {2019},
  doi = {10.3389/fnins.2019.00753},
}
Figure