EfficientBioAI: Making Bioimaging AI Models Efficient in Energy, Latency and Representation

Yu Zhou, Justin Sonneck, Sweta Banerjee, Stefanie Dörr, Anika Grüneboom, Kristina Lorenz, Jianxu ChenarXiv 2023 · DOI

Introduction

In the last decade, the field of bioimaging has undergone a massive transformation, shifting toward high-throughput screening and the generation of enormous 3D datasets. While artificial intelligence (AI) models—such as CellPose and various U-Net architectures—have become indispensable for analyzing this data, they carry a significant, often overlooked computational cost. Since 2012, the energy required for a single AI forward pass has increased approximately 300-fold. For biologists, this translates to long processing times—sometimes spanning days for large datasets—and a substantial carbon footprint.

Furthermore, most state-of-the-art model compression tools are designed for industries like autonomous driving or mobile app development, making them difficult to apply to specialized microscopy data. EfficientBioAI was developed to bridge this gap, providing an open-source, "plug-and-play" toolbox specifically tailored to make bioimaging AI models more efficient in terms of energy, latency, and representation.

The EfficientBioAI Framework

EfficientBioAI follows a streamlined, two-phase workflow designed to optimize models for specific hardware backends without requiring extensive computer science expertise from the user.

1. Compression Phase

The toolbox employs two primary strategies to reduce model complexity:

  • Pruning: Utilizing the Neural Network Intelligence (NNI) framework, the tool identifies and removes redundant neurons or connections. Research conducted by the authors suggests that a 50% sparsity ratio—effectively cutting the model's weight in half—serves as an optimal balance between efficiency gains and performance preservation.
  • Quantization: Using MQBench, the tool converts model weights from high-precision 32-bit floating-point numbers (fp32) to 8-bit integers (int8). This drastically reduces the memory footprint and accelerates mathematical operations on compatible hardware.
  • Fine-tuning: To mitigate any potential accuracy loss during the compression process, the pipeline includes an automated 1000-epoch fine-tuning step to recover performance.

2. Inference Phase

Once compressed, models are exported to the universal ONNX format. They are then optimized for specific hardware backends: OpenVINO for Intel CPUs and TensorRT for NVIDIA GPUs. This ensures that the model is tailored to run at peak performance on the user's specific local machine.

Experimental Validation

The authors validated EfficientBioAI across four representative bioimaging tasks to demonstrate its versatility:

  • 3D Denoising: Enhancing signal-to-noise ratios in Planaria microscopy images.
  • 2D Instance Segmentation: Identifying nuclei in Whole Slide Images (WSI) of heart tissue using the CellPose model.
  • 3D Labelfree Prediction: Predicting fluorescent structures from transmitted light images of human iPS cells.
  • 3D Semantic Segmentation: Mapping osteocyte lacunae in 3D lightsheet images of mouse bone.

Key Results and Insights

The quantitative improvements across these tasks were significant, demonstrating that model compression does not necessarily require a sacrifice in scientific rigor.

Speed and Energy Efficiency

Inference speedups ranged from 2x to over 5x. For instance, 3D labelfree prediction on a GPU achieved a 4.4x acceleration. Energy savings were equally impressive, typically falling between 30% and 80%. In the 3D labelfree task, energy consumption on the GPU dropped by 80.6%.

Accuracy and the Regularization Effect

Most tasks showed negligible accuracy drops. Interestingly, in the 3D denoising task on a CPU, the Pearson correlation actually improved from 0.770 to 0.811 after pruning and quantization. The authors suggest that by removing redundant parameters, compression can act as a form of regularization, reducing overfitting—a frequent challenge in bioimaging where labeled data is often scarce.

Democratizing High-Performance Analysis

One of the most impactful findings was the reduction of the "CPU infeasibility" gap. For complex 3D semantic segmentation, the original uncompressed model was practically impossible to run on a standard CPU within a reasonable timeframe. EfficientBioAI made it possible to perform this analysis on standard desktop hardware, lowering the barrier to entry for labs without expensive GPU clusters.

Limitations and Future Directions

While EfficientBioAI represents a significant step forward for "Green AI" in biology, several challenges remain:

  • Hardware Compatibility: The current version does not support Apple M-series chips or AMD platforms.
  • Inference Focus: The tool optimizes the deployment phase; it does not yet address the high energy costs associated with the initial training of models.
  • Dynamic Control Flow: Models with structures that change based on input data (dynamic control flow) currently require manual modification to be compatible with the pipeline.
  • Future Formats: The authors are exploring the use of fp8 (8-bit floating point) formats, which may further streamline both the training and inference phases in future iterations.

Conclusion

EfficientBioAI provides a necessary bridge between high-performance AI and the practical constraints of biological research. By offering 2–5x speedups and up to 80% energy savings, the toolkit allows researchers to process larger datasets faster and more sustainably. The authors estimate that if just 100 biologists used this toolkit for a standard large-scale dataset, the energy saved would be equivalent to driving a car for 7,300 miles.

Summary updated

Abstract

Artificial intelligence (AI) has been widely used in bioimage image analysis nowadays, but the efficiency of AI models, like the energy consumption and latency is not ignorable due to the growing model size and complexity, as well as the fast-growing analysis needs in modern biomedical studies. Like we can compress large images for efficient storage and sharing, we can also compress the AI models for efficient applications and deployment. In this work, we present EfficientBioAI, a plug-and-play toolbox that can compress given bioimaging AI models for them to run with significantly reduced energy cost and inference time on both CPU and GPU, without compromise on accuracy. In some cases, the prediction accuracy could even increase after compression, since the compression procedure could remove redundant information in the model representation and therefore reduce over-fitting. From four different bioimage analysis applications, we observed around 2-5 times speed-up during inference and 30-80$\%$ saving in energy. Cutting the runtime of large scale bioimage analysis from days to hours or getting a two-minutes bioimaging AI model inference done in near real-time will open new doors for method development and biomedical discoveries. We hope our toolbox will facilitate resource-constrained bioimaging AI and accelerate large-scale AI-based quantitative biological studies in an eco-friendly way, as well as stimulate further research on the efficiency of bioimaging AI.
BibTeX
@misc{zhou2023efficientbioai,
  author = {Yu Zhou and Justin Sonneck and Sweta Banerjee and Stefanie Dörr and Anika Grüneboom and Kristina Lorenz and Jianxu Chen},
  title = {{EfficientBioAI: Making Bioimaging AI Models Efficient in Energy, Latency and Representation}},
  year = {2023},
  eprint = {2306.06152},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.06152},
}
Figure