SPINBIS: Spintronics based Bayesian Inference System with Stochastic Computing

Xiaotao Jia, Jianlei Yang, Pengcheng Dai, Runze Liu, Yiran Chen, Weisheng Zhao · DOI

Introduction

Bayesian inference is a powerful framework for reasoning under uncertainty, but its computational demands often exceed the capabilities of traditional von Neumann architectures. Stochastic Computing (SC) has emerged as a promising alternative, representing numerical values as random bitstreams. In SC, complex arithmetic operations like multiplication are simplified to basic logic gates (e.g., AND gates). However, the generation of high-quality, truly random bitstreams remains a significant challenge. Conventional CMOS-based Pseudo-Random Number Generators (PRNGs) are often area-intensive and power-hungry, creating a bottleneck as Bayesian networks scale.

Methodology: Leveraging Spintronic Randomness

The SPINBIS architecture addresses these challenges by utilizing the inherent stochasticity of Magnetic Tunnel Junctions (MTJs). Unlike traditional circuits that strive for determinism, SPINBIS embraces the thermal fluctuations in MTJs to generate natural randomness.

MTJ-based Stochastic Bitstream Generators (SBG)

The core of the system is the MTJ-based SBG. An MTJ consists of a free layer, an oxide barrier, and a reference layer. Depending on the applied voltage and current direction, the MTJ switches between parallel (P) and anti-parallel (AP) states with a specific probability. This physical phenomenon provides a low-power source of randomness.

MTJ structure (a) and the 1T-1MTJ circuit configuration (b) used for stochastic bitstream generation.

To enhance efficiency, SPINBIS employs a State-Aware Self-Control Strategy. Traditional MTJ generators require a "reset-write-read" sequence. The proposed self-control circuit eliminates the reset step by comparing the current state with the previous one, effectively doubling the generation speed.

SBG Sharing and Stochastic Logic

To minimize hardware overhead in large-scale Bayesian networks, SPINBIS implements an SBG Sharing Strategy. By analyzing "conflict sets"—terminals that must have independent bitstreams to maintain accuracy—the system can share a limited pool of SBGs across multiple logic gates. This drastically reduces the number of physical MTJs required without compromising the precision of the inference results.

Example of a stochastic computing circuit where SBGs generate bitstreams for arithmetic operations, such as multiplication via an AND gate.

Results and Discussion

The SPINBIS architecture was evaluated using a target locating case study involving data fusion from multiple sensors. The system demonstrated remarkable performance compared to traditional FPGA-based 8-bit fixed-point implementations and previous MTJ-based stochastic designs.

  • Energy Efficiency: SPINBIS achieved a 26x improvement in energy efficiency over FPGA implementations and a 12x improvement over prior MTJ-based architectures.
  • Accuracy and Convergence: Due to the low correlation of MTJ-generated bitstreams, the system reached high accuracy (KL divergence < 0.029) in just 128 clock cycles, significantly faster than CMOS-based counterparts which often require thousands of cycles.
  • Area Trade-offs: While the inclusion of a switch matrix for SBG sharing introduced a 45% area overhead relative to basic MTJ designs, the overall gains in power and speed justify this cost for complex applications.

Conclusion

SPINBIS represents a significant step forward in hardware-accelerated Bayesian inference. By co-designing at the device and architecture levels, it transforms the "noise" of spintronic devices into a computational asset. Future work will focus on improving the stability of MTJ switching against environmental factors like temperature and optimizing the switch matrix to prevent routing congestion in even larger networks.

Summary updated

BibTeX
@article{jia2019spinbis,
  author = {Xiaotao Jia and Jianlei Yang and Pengcheng Dai and Runze Liu and Yiran Chen and Weisheng Zhao},
  title = {{SPINBIS: Spintronics based Bayesian Inference System with Stochastic Computing}},
  journal = {IEEE Trans. Comput. Aided Des. Integr. Circuits Syst.},
  year = {2019},
  doi = {10.1109/tcad.2019.2897631},
}
Figure