Abstract
In medical imaging, datasets are frequently imbalanced, making the Area Under the ROC Curve (AUC) a more relevant evaluation metric than standard accuracy. However, optimizing AUC directly in deep learning is challenging due to its non-differentiable nature and computational complexity. Previous surrogate losses, such as the AUC square loss, are sensitive to noisy labels and "easy" samples. This paper introduces a robust AUC margin loss that utilizes a squared hinge function and a min-max optimization framework to achieve linear scalability and improved robustness. Our approach achieved 1st place in the Stanford CheXpert competition and demonstrated superior performance across multiple medical imaging benchmarks.
Introduction
Medical image classification often involves detecting rare diseases where positive cases are significantly outnumbered by negative ones. While standard models typically minimize Cross-Entropy (CE) loss, clinical utility is measured by AUC, which evaluates the model's ability to rank positive cases higher than negative ones. Direct Deep AUC Maximization (DAM) is theoretically appealing but practically difficult because the AUC objective involves pairwise comparisons of all samples, leading to $O(n^2)$ complexity.
The Challenges of Direct AUC Optimization
To make DAM scalable, researchers previously employed an "AUC square loss." While this reduces complexity to $O(n)$, it introduces two significant drawbacks:
- The Easy Data Penalty: The quadratic nature of the square loss penalizes samples that the model is already confident about (easy samples), effectively pulling their scores back toward the decision boundary.
- Noise Sensitivity: The loss is highly sensitive to mislabeled or noisy data, which can drastically shift the decision boundary and degrade generalization.
Proposed Method: AUC Margin Loss
We propose a new margin-based min-max surrogate loss to address these limitations. The core innovation is the use of a squared hinge function with a tunable margin ($m$). This allows the model to ignore "easy" samples that already satisfy the margin requirement, preventing the "pulling back" effect seen with square loss.
Scalable Optimization
To maintain scalability for large-scale deep learning, we formulate the loss as a min-max optimization problem. This mathematical reformulation allows the model to be trained using stochastic gradient descent (SGD) on individual samples rather than pairs, maintaining $O(n)$ complexity. We utilize the Proximal Epoch Stochastic Gradient (PESG) method to solve this optimization and introduce a non-negative constraint on the dual variable to ensure robustness.
Two-Stage Training Framework
Our training pipeline consists of two stages:
- Pre-training: The network is first trained using standard Cross-Entropy loss to learn robust feature representations.
- Fine-tuning: The model is then fine-tuned using the proposed AUC margin loss to optimize the decision boundary specifically for the AUC metric.
Empirical Evaluation and Results
The proposed method was evaluated on several high-stakes medical datasets and standard benchmarks:
- CheXpert: Our DAM method achieved 1st place in the Stanford CheXpert competition (as of August 2020), outperforming over 150 submissions and surpassing the average performance of three board-certified radiologists.
- ISIC 2020 (Melanoma): In the Kaggle Melanoma Classification competition, a single model using our loss outperformed the best single model of the winning team by over 2%.
- Imbalanced Benchmarks: On datasets like CIFAR-10 with a 1% imbalance ratio, the AUC margin loss consistently outperformed both CE and the previous AUC square loss.
Conclusion
By introducing a robust margin-based surrogate loss and a scalable min-max optimization framework, we have addressed the fundamental weaknesses of previous AUC maximization techniques. Our results on large-scale medical datasets demonstrate that direct AUC optimization is not only feasible but superior for handling the extreme class imbalances common in clinical settings. To facilitate further research, we have released LibAUC, an open-source library for deep AUC maximization.
Summary updated