cs.CVAug 27, 2025

Diverse Normal Prototypes-Guided Contrastive Reconstruction for Medical Anomaly Detection

Authors: Luhu LiBin LiuBowen LinZihan ShenChengwei WangShujun Fu

Organizations: School of Mathematics, Shandong University, Jinan 250100, China · Department of Interventional Medicine and Minimally Invasive Oncology, The Second Qilu Hospital of Shandong University, Jinan 250033, China · Department of Neurosurgery, The Second Qilu Hospital of Shandong University,2026 Jinan 250033, China

Abstract

Anomaly detection in medical images is challenging due to limited annotations and the domain gap. Existing reconstruction-based methods often rely on frozen pre-trained encoders, restricting adaptation to domain-specific patterns and degrading localization accuracy. Meanwhile, prototype-based learning offers interpretable representations but commonly suffers from prototype collapse, where a few prototypes dominate training and reduce diversity. To address these issues, we propose DNP-ConFormer, a unified framework that integrates a trainable encoder with prototype-guided reconstruction and a Diversity-Aware Alignment Loss. A momentum encoder enables stable domain-adaptive representation learning, while a lightweight Prototype Extractor discovers informative normal prototypes and injects them into the decoder via attention to guide reconstruction. The proposed alignment objective further encourages balanced feature-to-prototype assignments, effectively mitigating prototype collapse. Extensive experiments on multiple medical imaging benchmarks demonstrate improved representation quality and anomaly localization compared with prior methods. Visualization and prototype assignment analyses further validate the effectiveness and interpretability of our approach. The code is available at https://github.com/liluhu0/DNP-ConFormer.

Explore similar work

CardsList