SafeCiM: Investigating Resilience of Hybrid Floating-Point Compute-in-Memory Deep Learning Accelerators

Swastik Bhattacharya, Sanjay Das, Anand Menon, Shamik Kundu, Arnab Raha, Kanad BasuarXiv 2025

TL;DR

Compute-in-Memory (CiM) accelerators are crucial for running Large Language Models (LLMs) efficiently at the edge, but their vulnerability to hardware faults remains a major blind spot. This paper systematically evaluates silent data corruption across the digital Floating-Point CiM pipeline and introduces SafeCiM, a fault-resilient architecture that reduces accuracy degradation by up to 49×.

What Problem Does This Paper Address?

Generative AI models require high-precision Floating-Point (FP) arithmetic to maintain output quality. However, running these models on traditional von Neumann hardware creates massive energy and data-transmission bottlenecks. Digital FP Compute-in-Memory (FP-CiM) architectures solve this by embedding lightweight integer units that handle decomposed exponent and mantissa operations directly within or near memory arrays.

Despite their efficiency, the hardware robustness of FP-CiM structures is largely unexplored. Physical faults caused by radiation, aging, or manufacturing defects can manifest as bit-flips in the datapath. Unlike control-path faults that cause obvious system crashes, datapath faults result in Silent Data Corruption (SDC). These errors propagate silently across deep neural network layers, potentially dropping an LLM's inference accuracy to 0% without warning—a catastrophic risk for mission-critical or safety-sensitive edge applications like autonomous driving.

Fig. 1: Floating-point CiM architecture.

Methods

The authors first develop FaultCiM, a modular fault-injection framework designed to evaluate permanent bit-flip errors across six critical stages of the FP-CiM pipeline: input pre-alignment, weight pre-alignment, memory cells, multipliers, adder trees, global alignment, and normalization.

Fig. 2: FaultCiM overview.

Using insights from this framework, they propose SafeCiM, a robust hardware design optimized for 4096 MAC units. SafeCiM relies on four foundational design decisions:

  1. Post-Alignment Paradigm: Shifting mantissas after multiplication and addition rather than before, which naturally masks the numerical impact of Most Significant Bit (MSB) faults.
  2. Smaller Stencil Partitioning: Breaking down the standard large crossbar array into a smaller $ic \times oc \times H \times W$ stencil to isolate errors.
  3. Optimized Stencil Configuration: Utilizing a smaller input channel size ($ic=8$) to limit how far an adder tree fault can percolate.
  4. Two-Staged Global Alignment: Integrating a local-then-global alignment process within the adder tree to prevent column-wide mis-scaling.
Fig. 3: Bit-flip fault injection locations in FP CiM datapath.

Datasets

The framework and architecture were evaluated using four diverse, industry-standard workloads mapped to the FP-CiM architecture:

  • AlexNet fine-tuned on CIFAR-100 (Image classification)
  • BERT-Base evaluated on the Emotion tweets corpus (Sentence-level text classification)
  • LLaMA-3.2-1B evaluated on MMLU (Autoregressive text generation)
  • Qwen-0.3B-Base (referred to as Qwen3-0.6B-Base) evaluated on MMLU (Autoregressive text generation)

Note: Due to the extreme computational complexity of low-level hardware simulations, LLM evaluations were conducted using 120 randomly selected prompts from the MMLU dataset.

Key Insights and Ideas

  • The Downstream Fragility Principle: The vulnerability of the FP-CiM pipeline increases closer to the output. The normalization stage is the most fragile, followed by global alignment and the adder tree. Faults here directly corrupt the final sign and exponent bits, frequently generating NaNs or inverting signs.
  • The MSB Dominance Exception: While Most Significant Bit (MSB) faults are generally the most destructive, global alignment presents a unique exception. Flipping middle exponent bits (bits 2 and 3) corrupts the shift-control logic worse than an MSB flip, causing catastrophic column-wide mantissa mis-scaling.
  • Model Depth Amplifies Faults: Deeper models like LLaMA-3.2-1B accumulate errors across successive decoder layers. An MSB fault rate of just 0.1% in the multipliers causes total accuracy collapse in LLaMA, whereas the shallower AlexNet remains robust up to a 3% fault rate.
  • Quantization Trade-offs: Quantizing the pipeline to fixed-point INT8 actually makes the hardware more sensitive to Least Significant Bit (LSB) faults compared to BFLOAT16 and FP8, debunking the assumption that lower-precision quantization inherently improves hardware fault tolerance.

Key Results

  • Catastrophic Baseline Vulnerability: In standard pre-alignment FP-CiM architectures, a single bit-flip fault in the adder tree can completely destroy an LLM's performance, bringing inference accuracy down to 0%.
  • SafeCiM Mitigation: For a configuration of 4096 MAC units, SafeCiM reduces the model accuracy drop by 49× for a single adder fault in AlexNet compared to the baseline architecture.
  • Preserving Baseline Accuracy: Under multiplier and memory cell faults at a 0.5% fault rate, SafeCiM's post-alignment design completely preserved the baseline accuracy of AlexNet (63.1% vs 1.25% in baseline) and BERT (93.4% vs 46.2% in baseline).

Limitations and Future Work

  • Evaluation Scale: Due to the high computational overhead of simulating bit-level hardware faults, the LLM benchmarks were restricted to a subset of 120 prompts from the MMLU dataset rather than the full suite.
  • Hardware Overhead: While moving to a post-alignment paradigm and smaller stencils drastically improves fault resilience, it requires duplicating normalization and rounding blocks. The paper does not deeply quantify the exact area and power overhead penalties introduced by SafeCiM's extra logic.
  • Future Directions: The authors note the need to validate these architectural guidelines on physical silicon chips and explore adaptive mitigation techniques for transient soft errors.

Summary updated

BibTeX
@misc{bhattacharya2025safecim,
  author = {Swastik Bhattacharya and Sanjay Das and Anand Menon and Shamik Kundu and Arnab Raha and Kanad Basu},
  title = {{SafeCiM: Investigating Resilience of Hybrid Floating-Point Compute-in-Memory Deep Learning Accelerators}},
  year = {2025},
  eprint = {2512.00059},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.00059},
}
Figure