MedDiME speeds up medical image editing for clearer AI diagnoses

MedDiME: Efficient Latent Diffusion with Adaptive Masking for Medical Counterfactual Generation

Computer Vision and Pattern Recognition

Summary

Medical AI models sometimes make mistakes on images, and changing parts of these images can help explain why. However, current methods to edit medical images to understand AI predictions are slow and use a lot of computer memory. The authors created MedDiME, a faster and more memory-efficient system that edits in a compressed image space using smart masking, making medical image explanations clearer and quicker to produce. Their tests show it can work up to 40 times faster and uses much less memory than older methods.

What this means in practice

  • For medical imaging teams: Generate clear medical image modifications to help explain AI diagnostic decisions faster and with less computation.
  • For healthcare ai developers: Integrate efficient counterfactual image generation into medical AI tools to improve transparency without heavy hardware requirements.

Authors

Yan Zeng, Changlu Guo, Anders Nymark Christensen, Morten Rieger Hannemose, Anders Bjorholm Dahl

Abstract

Medical counterfactual generation modifies images to change model predictions for interpretability. However, existing diffusion-based approaches are often prohibitively slow and memory-intensive, making them difficult to apply in high-resolution settings. Moreover, existing masking strategies are tightly coupled with pixel-space representations, making them incompatible with latent-space diffusion editing. To address these challenges, we propose MedDiME, a latent-space classifier-guided diffusion framework that reduces computational and memory overhead while introducing a latent-compatible, gradient-driven adaptive masking mechanism for spatially precise medical counterfactual generation. Extensive experiments demonstrate that MedDiME achieves high-quality counterfactual generation with significant efficiency gains compared to prior classifier-guided diffusion baselines, achieving up to 40 times faster inference and 13 times lower peak GPU memory usage.