Spintronics based Stochastic Computing for Efficient Bayesian Inference System

Xiaotao Jia, Jianlei Yang, Zhaohao Wang, Yiran Chen, Hai Li, Weisheng Zhao · DOI

TL;DR

This paper introduces a novel Bayesian inference system leveraging spintronics-based stochastic computing. By using magnetic tunnel junctions (MTJs) to generate stochastic bitstreams, the system achieves significant improvements in power consumption and inference speed compared to traditional computing architectures for applications like data fusion and Bayesian belief networks.

What Problem Does This Paper Address?

Bayesian inference is a powerful tool for handling uncertainty and incompleteness in data, crucial for fields like artificial intelligence and expert systems. However, implementing these probabilistic computations on conventional floating-point architectures is inefficient, suffering from high power consumption, slow speeds, and underutilization of parallelism. Existing stochastic computing (SC) approaches, while promising, often rely on costly pseudo-random number generators, negating some of their inherent advantages. This paper aims to bridge this gap by proposing a more efficient and integrated solution using spintronics.

Methods

The core innovation lies in the development of a spintronics-based stochastic bitstream generator (SBG) using magnetic tunnel junctions (MTJs). MTJs exhibit inherent randomness in their switching behavior due to thermal fluctuations, making them ideal for generating stochastic bitstreams (SBs). The proposed SBG circuit integrates MTJs with CMOS transistors for both writing and reading MTJ states. The system then utilizes these SBs to perform Bayesian inference through stochastic computing (SC) circuits, primarily employing AND gates and multiplexers. This approach bypasses the need for traditional pseudo-random number generators, aiming for higher efficiency. The paper also proposes two specific Bayesian inference systems (BIS) tailored for data fusion and Bayesian belief networks, demonstrating the practical application of their SBG and SC architecture.

Datasets

Not discussed in the paper. The paper focuses on simulation-based evaluation using synthesized data and models for typical Bayesian inference problems.

Key Insights and Ideas

  • Spintronics as a Natural RNG: The inherent stochasticity of MTJ switching provides a hardware-native, low-power source for random bit generation, a key component for stochastic computing.
  • Integrated SBG and SC: By co-designing the SBG and the SC inference engine, the system avoids the overhead of external RNGs and data conversion, leading to greater efficiency.
  • Improved Accuracy with Longer Bitstreams: The accuracy of the stochastic inference results improves monotonically with the length of the stochastic bitstreams, a trade-off between precision and computational cost.
  • Low Correlation is Key: The paper emphasizes the importance of low correlation between generated bitstreams for accurate SC, and their proposed SBG design aims to achieve this through effective seed generation strategies.

Key Results

  • High Accuracy SBG: Simulation results show that the proposed MTJ-based SBG generates bitstreams with high accuracy and low correlation. For bitstream lengths of 64, 128, and 256, average errors were as low as 1.6%, 1.3%, and 1.1% respectively, compared to Monte-Carlo simulations.
  • Efficient Bayesian Inference: The proposed BIS for data fusion demonstrated comparable results to exact inference, with KL divergence decreasing significantly as bitstream length increased (e.g., from 0.0090 to 0.0018 for a 64x64 grid with bitstream lengths of 64 to 256).
  • Power and Speed Advantages: The paper claims significant improvements in power consumption and inference speed, citing an example where their system uses less than 0.01 mJ for a task that took 919 mJ on a laptop or 0.23 mJ on an FPGA with a much longer bitstream. The inference time is proportional to the bitstream length.

Limitations and Future Work

  • Scalability: While the paper demonstrates applications on 64x64 grids, scaling to much larger problems remains a challenge. The authors suggest further work on improving the scalability of the SBG and the overall inference system.
  • SBG Performance: The authors aim to further improve the SBG's accuracy, speed, and power efficiency.
  • Wider Application: Expanding the applicability of the proposed system to a broader range of Bayesian inference problems is a key future direction.
  • Hardware Implementation: The current work is simulation-based. Future work would involve fabricating and testing the proposed spintronics-based SBG and inference systems on actual hardware.

Summary updated

BibTeX
@inproceedings{jia2017spintronics,
  author = {Xiaotao Jia and Jianlei Yang and Zhaohao Wang and Yiran Chen and Hai Li and Weisheng Zhao},
  title = {{Spintronics based Stochastic Computing for Efficient Bayesian Inference System}},
  booktitle = {ASP-DAC},
  year = {2017},
  doi = {10.1109/aspdac.2018.8297385},
}
Figure