Abstract
Recent research underscores the pivotal role of the Out-of-Distribution (OOD) feature representation field scale in determining the efficacy of models in OOD detection. Consequently, the adoption of model ensembles has emerged as a prominent strategy to augment this feature representation field, capitalizing on anticipated model diversity. However, our introduction of novel qualitative and quantitative model ensemble evaluation methods, specifically Loss Basin/Barrier Visualization and the Self-Coupling Index, reveals a critical drawback in existing ensemble methods. We find that these methods incorporate weights that are affine-transformable, exhibiting limited variability and thus failing to achieve the desired diversity in feature representation. To address this limitation, we elevate the dimensions of traditional model ensembles, incorporating various factors such as different weight initializations, data holdout, etc., into distinct supervision tasks. This innovative approach, termed Multi-Comprehension (MC) Ensemble, leverages diverse training tasks to generate distinct comprehensions of the data and labels, thereby extending the feature representation field. Our experimental results demonstrate the superior performance of the MC Ensemble strategy in OOD detection compared to both the naive Deep Ensemble method and a standalone model of comparable size.
Introduction
Deep learning models are notoriously prone to overconfidence, frequently assigning high-certainty labels to "alien" or Out-of-Distribution (OOD) data. While Deep Ensembles—combining the predictions of multiple models—are a common remedy, recent evidence suggests they often fail to provide significantly better OOD protection than a single large model. This paper identifies the root cause of this failure as a lack of functional diversity. Traditional ensembles typically rely on varying random seeds or data subsets while keeping the training objective constant. This leads to "mode connectivity," where models fall into the same mathematical "valley" in the loss landscape, resulting in redundant feature representations that do not effectively expand the model's ability to detect OOD samples.
The Diversity Gap: Mode Connectivity and Affine Transformability
To diagnose why traditional ensembles underperform, we introduce two novel evaluative tools:
- Self-Coupling Index (SCI): A quantitative metric based on Optimal Transport (Sinkhorn distance) that measures the similarity between the feature representations of different models.
- Loss Barrier Visualization: A qualitative method to observe the loss landscape between two models. If a high "hill" or barrier exists between them, the models have reached truly distinct solutions.
Our analysis reveals that models in standard ensembles are often "affine-transformable," meaning their features can be easily mapped to one another via simple mathematical transformations. This lack of orthogonality means the ensemble members do not offer the diverse "perspectives" necessary to identify data that falls outside the training distribution.
The Multi-Comprehension (MC) Ensemble
To address this limitation, we propose the Multi-Comprehension (MC) Ensemble. Instead of merely varying initializations, the MC Ensemble forces diversity by employing fundamentally different training objectives for each member:
- Supervised Cross-Entropy (SupCE): The standard approach of mapping data directly to class labels.
- SimCLR: A self-supervised contrastive learning task that learns features by comparing augmented versions of the same image without using labels.
- Supervised Contrastive (SupCon): A hybrid approach that uses labels to pull similar classes together in the feature space while pushing different classes apart.
By training models on these distinct tasks, we ensure they occupy different basins in the loss landscape. This creates a "committee" of models that see the data through different lenses, significantly extending the feature representation field. To optimize this ensemble, we utilize a selection strategy that balances individual model performance with the overall diversity of the group.
Experimental Evaluation
We evaluated the MC Ensemble against rigorous OOD benchmarks, including CIFAR-10 (tested against SVHN, LSUN, and others) and ImageNet-1K (tested against iNaturalist, SUN, and Places).
Key Performance Metrics
- CIFAR-10: Using the K-Nearest Neighbor (KNN) scoring method, the MC Ensemble achieved an average FPR95 of 5.58% (False Positive Rate at 95% True Positive Rate), a massive improvement over the 27.78% recorded by a standard 3-model ensemble.
- ImageNet-1K: On large-scale benchmarks, the MC Ensemble reduced the average FPR95 to 30.69%, compared to 46.39% for the naive ensemble.
- Near-OOD Detection: In the challenging task of distinguishing CIFAR-10 from CIFAR-100, the MC Ensemble achieved an AUROC of 94.51%, whereas standard ensembles struggled to reach 89%.
Discussion and Practical Implementation
One common concern with ensembles is computational overhead. However, we demonstrate that the MC Ensemble is highly efficient. By utilizing modern GPU parallelization (such as Nvidia's Multi-Instance GPU technology), the inference latency of the MC Ensemble is nearly identical to that of a single model (~9.4ms vs 9.3ms). Furthermore, the collective knowledge of the ensemble can be distilled into a single, efficient model with only a marginal loss in OOD detection performance.
Conclusion
The Multi-Comprehension Ensemble shifts the focus of OOD detection from model size to feature diversity. By leveraging distinct supervision tasks, we break the trap of mode connectivity and provide a more robust framework for identifying out-of-distribution instances. Future work will explore expanding the task pool to include other objectives, such as masked autoencoders and rotation prediction, to further enhance the breadth of model comprehension.
Summary updated