Abstract
Medical image classification often suffers from extreme class imbalance, where "normal" cases vastly outnumber "abnormal" ones. Traditional binary classifiers struggle in these scenarios, often biasing toward the majority class. This paper presents ConOCC (Constrained One-Class Classification), a framework that integrates an autoencoder with a specialized constraining layer. By jointly optimizing for image reconstruction and feature compactness, ConOCC learns a robust representation of the majority class, allowing it to detect anomalies with high precision. Evaluations across three clinical datasets (MRI, FFDM, and Chest X-ray) demonstrate that ConOCC consistently outperforms existing one-class and generative methods.
Introduction
In medical diagnostics, acquiring labeled data for rare conditions is a significant challenge. Dataset imbalance—where healthy scans outnumber pathological ones by orders of magnitude—renders standard supervised learning ineffective. Models often achieve high accuracy by simply predicting the majority class, failing to identify the critical "needle in the haystack" anomalies.
One-Class Classification (OCC) offers a solution by training exclusively on the majority (normal) class. The goal is to learn a boundary that encapsulates normal data; any sample falling outside this boundary is flagged as an anomaly. However, existing OCC methods face a trade-off between compactness (mapping data to a tight region, which risks feature collapse) and descriptiveness (preserving data details, which may fail to cluster anomalies effectively).
Methodology: The ConOCC Framework
The proposed ConOCC framework addresses the compactness-descriptiveness trade-off by combining an autoencoder backbone with a novel constraining layer.
The architecture consists of three primary components:
- Encoder: Compresses the input image into a low-dimensional bottleneck feature vector.
- Constraining Layer: Applies a loss function ($L_{con}$) that pulls bottleneck features toward a central point ($\mu$) in a hypersphere, enforcing compactness.
- Decoder: Reconstructs the original image from the bottleneck features ($L_{AE}$), ensuring the learned features remain descriptive and preventing "trivial solutions" where the model ignores input data.
By jointly optimizing both the reconstruction loss and the constraining loss ($L = L_{AE} + \gamma L_{con}$), the model learns features that are both representative of the class and tightly packed in the feature space. During inference, abnormal samples yield high reconstruction errors and fall outside the learned hypersphere, resulting in a high anomaly score.
Experimental Setup
The effectiveness of ConOCC was evaluated on three distinct medical imaging datasets, representing various modalities and diagnostic tasks.
The datasets included:
- Breast MRI: Focused on tumor detection using 1,000 training images.
- Breast FFDM (Mammography): A smaller dataset of 200 images for tumor identification.
- Chest X-ray: A pneumonia detection task using 1,341 normal images for training.
Results and Discussion
ConOCC consistently outperformed seven major baselines, including OCSVM, AnoGAN, and Deep SVDD.
- Performance Metrics: On the MRI dataset, ConOCC achieved an AUC of 0.872, significantly higher than the standard Autoencoder (0.782) and Deep SVDD (0.652). It also led in the FFDM (0.791 AUC) and Chest X-ray (0.624 AUC) tasks.
- Feature Visualization: t-SNE visualizations confirmed that ConOCC produces a much denser and more centralized cluster of normal features compared to traditional methods, which often leave the data scattered and harder to bound.
- Robustness: Analysis showed that the inclusion of the decoder makes the model less sensitive to hyperparameter variations, such as learning rate, compared to standard convolutional autoencoders.
Limitations
The model's performance on the Chest X-ray dataset (AUC 0.624) was lower than on others. This is likely due to the high resolution and significant anatomical variation in chest scans, which makes it difficult for a relatively small training set to capture a "universal" representation of a healthy lung.
Conclusion
ConOCC introduces a balanced approach to one-class classification by leveraging the reconstructive power of autoencoders alongside a hyperspherical constraint. By preventing feature collapse while maintaining high descriptiveness, the framework provides a robust tool for medical anomaly detection in highly imbalanced real-world scenarios. Future work will explore more complex feature constraints to further distinguish between subtle pathological variations and healthy tissue.
Summary updated