Analog In-Memory Computing with Uncertainty Quantification for Efficient Edge-based Medical Imaging Segmentation

Imane Hamzaoui, Hadjer Benmeziane, Zayneb Cherif, Kaoutar El Maghraoui

Introduction

Deploying deep learning models for medical imaging—such as MRI or CT scans—on edge devices presents a massive challenge. Traditional digital systems suffer from the "Von Neumann bottleneck," where moving data between the processor and memory consumes significant time and energy.

Analog In-Memory Computing (AIMC) offers a compelling solution by performing computations directly within memory arrays using physical properties like Ohm's and Kirchhoff's laws. However, AIMC introduces a major challenge: hardware noise. Physical components are inherently less precise than digital bits, leading to computational inaccuracies. For critical medical applications where a wrong pixel could mean a missed tumor, understanding how to manage this noise and quantify a model's "certainty" is paramount. This paper explores how AIMC can revolutionize medical imaging at the edge, demonstrating that certain neural network architectures are remarkably resilient to analog noise, and that strategic noise injection can actually improve diagnostic certainty.

Methods and Datasets

To bridge the gap between digital and analog paradigms, the researchers utilized Hardware-Aware Training (HWA) via the IBM AIHWKIT. This process injects simulated analog noise during the training phase, forcing the model to learn features that are robust to hardware imperfections. Monte Carlo Sampling was then used to quantify uncertainty, measuring how much a model's predictions fluctuate across multiple passes of the same data.

The authors evaluated three major neural network architectures:

  • U-Net: The classic "pyramidal" standard for medical segmentation.
  • U-Net++: An evolution of U-Net with nested, dense skip pathways.
  • Swin UNET: A transformer-based architecture utilizing an "isotropic" design, which treats image patches consistently without a hierarchical down-sampling/up-sampling bottleneck.

These models were tested across three diverse benchmark datasets: Brain Tumor Segmentation (MRI scans), Spleen Segmentation (CT scans), and Nuclei Detection (various modalities including brightfield and fluorescence).

Key Insights and Results

Architecture is Destiny

The most striking finding is that isotropic architectures (like Swin Transformers) are far more robust to analog noise than pyramidal ones (like U-Nets). In U-Nets, alternating down-sampling and up-sampling layers act as an amplifier for noise variations. Swin Transformers treat image patches more uniformly, leading to much higher stability.

Performance comparison of analog vs. digital training across architectures and datasets.

As shown in the performance comparisons, Swin-like architectures exhibited a minimal accuracy drop of only 0.04 when moving to analog-aware training in brain segmentation tasks. In contrast, pyramidal structures like U-Net and U-Net++ saw significant performance drops ranging from 0.15 to 0.22. Furthermore, Swin UNET achieved the highest average tile utilization (43.2%) and reuse factor, proving highly efficient despite a larger parameter count.

Noise as a Feature, Not a Bug

Rather than merely fighting hardware noise, the authors discovered that strategic noise injection during training acts as a powerful regularizer. It prevents overfitting and actually increases the certainty of the model's predictions.

Uncertainty analysis showing probability density distributions for diseased and healthy samples.

Uncertainty density analysis revealed that analog-trained models produced "sharper" probability distributions. This indicates that the models were more confident and consistent in their predictions compared to their digitally-trained counterparts.

Pipelining for Volumetric Data

AIMC also allows for highly effective data pipelining. For 3D data like MRI or CT scans, sequential image slices can be processed in parallel. This significantly reduces latency and increases throughput, which is a critical factor for urgent, real-time medical scenarios at the edge.

Limitations and Future Work

The authors acknowledge that AIMC accelerators are still in the early stages of development, meaning these results are largely based on high-fidelity simulations of hardware behavior.

For future work, the team plans to leverage Neural Architecture Search (NAS) to automatically discover new transformer-based architectures specifically optimized for analog hardware. The ultimate goal is to move beyond adapting existing models and instead design "analog-native" architectures that maximize both computational efficiency and diagnostic reliability.

Summary updated

BibTeX
@inproceedings{hamzaoui2024analog,
  author = {Imane Hamzaoui and Hadjer Benmeziane and Zayneb Cherif and Kaoutar El Maghraoui},
  title = {{Analog In-Memory Computing with Uncertainty Quantification for Efficient Edge-based Medical Imaging Segmentation}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=hvp5I4dDya},
}
Figure