Learning Machines Implemented on Non-Deterministic Hardware

Suyog Gupta, Vikas Sindhwani, Kailash GopalakrishnanarXiv 2014

Abstract

This paper highlights new opportunities for designing large-scale machine learning systems as a consequence of blurring traditional boundaries that have allowed algorithm designers and application-level practitioners to stay oblivious to the details of the underlying hardware-level implementations. The hardware/software co-design methodology advocated here hinges on the deployment of compute-intensive machine learning kernels onto compute platforms that trade-off determinism in the computation for improvement in speed and/or energy efficiency. To achieve this, we revisit digital stochastic circuits for approximating matrix computations that are ubiquitous in machine learning algorithms. Theoretical and empirical evaluation is undertaken to assess the impact of the hardware-induced computational noise on algorithm performance. As a proof-of-concept, a stochastic hardware simulator is employed for training deep neural networks for image recognition problems.

Introduction

As Moore’s Law and Dennard scaling reach their physical limits, traditional processor designs struggle to meet the escalating computational demands of modern machine learning (ML). Standard CPUs and GPUs are engineered for deterministic workloads—tasks like financial transactions or scientific simulations where bit-level precision is non-negotiable.

However, ML algorithms are fundamentally different. They are inherently robust to noise, designed to extract patterns from messy, real-world data. Forcing these error-resilient algorithms to run on high-precision, energy-intensive hardware is inefficient. This paper proposes a hardware/software co-design approach that swaps deterministic hardware for "noisy" stochastic circuits, leveraging this inherent resilience to gain massive improvements in speed and energy efficiency.

Stochastic Computing and Hardware Co-design

The core of this approach is Stochastic Computing (SC). Unlike traditional binary representation, SC represents numbers as streams of random bits (Bernoulli sequences), where the value is encoded as the probability of a bit being "1."

In the stochastic domain, complex arithmetic operations become remarkably simple. For instance, multiplying two numbers requires only a single AND gate, a stark contrast to the area-intensive circuitry required for a traditional binary multiplier. The authors propose offloading compute-intensive kernels, specifically General Matrix Multiplication (GEMM), to a dedicated stochastic hardware accelerator.

Stochastic circuit architecture for computing dot products.

The hardware-induced errors are mathematically modeled as zero-mean Gaussian noise. Analysis shows that gradient descent can still converge to an optimal solution even when gradients are corrupted by this hardware noise, provided the noise characteristics are well-understood.

Experimental Results

The methodology was evaluated using a high-level simulator to train Deep Neural Networks (DNNs) on the MNIST dataset.

Noise as a Regularizer

A key insight is that hardware noise can act as a form of regularization. Similar to software techniques like "Dropout," the randomness inherent in the hardware prevents the model from overfitting, potentially leading to better generalization on unseen data.

Performance and Precision

Stochastic computing offers a unique "precision knob": the length of the bit-stream ($N$). Researchers can use long bit-streams for high accuracy or short bit-streams for extreme speed on the same hardware.

Cross-entropy error during training for various bit-stream lengths compared to a deterministic control.

In DNN experiments, a network trained with stochastic hardware (bit-stream length $N=256$) achieved a test error of 1.62%, actually outperforming the control network trained with standard 64-bit floating-point precision (1.75%). As shown in the training curves, performance remained remarkably stable across various bit-stream lengths, suggesting that "perfect" hardware is not a prerequisite for effective AI.

Conclusion and Future Work

This work demonstrates that non-deterministic hardware can accelerate ML training while maintaining or even improving accuracy. However, challenges remain. Generating stochastic bit-streams requires random number generators (RNGs) which impose their own hardware overhead. Furthermore, while results on MNIST are promising, future research must address scalability to larger architectures like Transformers and the engineering complexities of physical "Stochastic ALU" implementations.

Summary updated

BibTeX
@misc{gupta2014learning,
  author = {Suyog Gupta and Vikas Sindhwani and Kailash Gopalakrishnan},
  title = {{Learning Machines Implemented on Non-Deterministic Hardware}},
  year = {2014},
  eprint = {1409.2620},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1409.2620},
}
Figure