[Paper Review] $MC^2RAM$: Markov Chain Monte Carlo Sampling in SRAM for Fast Bayesian Inference
This paper proposes MC²RAM, a novel SRAM-based architecture that accelerates Bayesian inference by co-locating Markov Chain Monte Carlo (MCMC) sampling, random number generation (RNG), and analog-to-digital/digital-to-analog conversion (ADC/DAC) within SRAM arrays. By performing Metropolis-Hastings sampling in-situ with low-precision ADC/DAC and exploiting spatial locality, the design achieves 500 samples in 2000 cycles at 1 GHz with only 91 μW per iteration, significantly reducing data movement and power consumption while tolerating hardware non-idealities.
This work discusses the implementation of Markov Chain Monte Carlo (MCMC) sampling from an arbitrary Gaussian mixture model (GMM) within SRAM. We show a novel architecture of SRAM by embedding it with random number generators (RNGs), digital-to-analog converters (DACs), and analog-to-digital converters (ADCs) so that SRAM arrays can be used for high performance Metropolis-Hastings (MH) algorithm-based MCMC sampling. Most of the expensive computations are performed within the SRAM and can be parallelized for high speed sampling. Our iterative compute flow minimizes data movement during sampling. We characterize power-performance trade-off of our design by simulating on 45 nm CMOS technology. For a two-dimensional, two mixture GMM, the implementation consumes ~ 91 micro-Watts power per sampling iteration and produces 500 samples in 2000 clock cycles on an average at 1 GHz clock frequency. Our study highlights interesting insights on how low-level hardware non-idealities can affect high-level sampling characteristics, and recommends ways to optimally operate SRAM within area/power constraints for high performance sampling.
Motivation & Objective
- To address the high energy and latency of traditional von Neumann architectures in Bayesian inference by co-locating computation and data in SRAM.
- To enable high-throughput, low-power MCMC sampling for Gaussian Mixture Models (GMMs), which are more expressive than single Gaussian models.
- To explore the impact of hardware non-idealities—such as process variation and ADC/DAC precision—on MCMC sampling accuracy and performance.
- To optimize power-area trade-offs in SRAM-based in-memory computing for Bayesian inference workloads.
Proposed method
- Integrates RNG cells, DACs, and ADCs directly within SRAM arrays to co-locate MCMC sampling, parameter storage, and random number generation.
- Uses a two-step flash ADC with 10 comparators to minimize delay (2 cycles) and support high throughput, despite high power consumption.
- Employs calibrated transistors and reduced turn-on voltage in DACs to mitigate process variation and channel length modulation effects.
- Performs density computation in analog domain using scaled random steps (R/σ²) and computes acceptance ratios via analog comparison.
- Applies a Markov chain-based iterative flow where successive samples are close in value, minimizing computational load per iteration.
- Uses 8-bit precision for DAC and ADC, with analysis showing ADC below 5 bits degrades sampling accuracy significantly.
Experimental results
Research questions
- RQ1How can MCMC sampling for Bayesian inference be accelerated by co-locating computation and data in SRAM?
- RQ2What is the impact of ADC/DAC precision and process variation on the accuracy of MCMC sampling in analog SRAM-based systems?
- RQ3Can low-precision, in-memory MCMC sampling achieve acceptable sampling quality while minimizing power and area?
- RQ4How do hardware non-idealities such as channel length modulation and mismatch affect high-level sampling characteristics?
- RQ5What is the optimal power-performance trade-off for in-SRAM MCMC sampling under area and precision constraints?
Key findings
- The MC²RAM design achieves 500 MCMC samples in 2000 clock cycles at 1 GHz, consuming only 91 μW per iteration.
- ADC precision has a strong impact on sampling accuracy: below 5-bit precision, KL divergence from ground truth increases significantly.
- DAC precision has minimal impact on KL divergence, indicating tolerance to DAC non-idealities.
- The 10 comparators in the 2-step flash ADC account for 60% of ADC power, but their 2-cycle delay enables high sampling throughput.
- SRAM and DAC together contribute 18% of total power, while ADC dominates at 82%.
- Sampling accuracy degrades with increasing GMM component separation and higher dimensionality, highlighting scalability challenges.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.