Confidence-aware Contrastive Learning for Selective Classification

Yu-Chang Wu,Shen-Huan Lyu,Haopu Shang,Xiangyu Wang,Chao Qian
2024-06-07
Abstract:Selective classification enables models to make predictions only when they are sufficiently confident, aiming to enhance safety and reliability, which is important in high-stakes scenarios. Previous methods mainly use deep neural networks and focus on modifying the architecture of classification layers to enable the model to estimate the confidence of its prediction. This work provides a generalization bound for selective classification, disclosing that optimizing feature layers helps improve the performance of selective classification. Inspired by this theory, we propose to explicitly improve the selective classification model at the feature level for the first time, leading to a novel Confidence-aware Contrastive Learning method for Selective Classification, CCL-SC, which similarizes the features of homogeneous instances and differentiates the features of heterogeneous instances, with the strength controlled by the model's confidence. The experimental results on typical datasets, i.e., CIFAR-10, CIFAR-100, CelebA, and ImageNet, show that CCL-SC achieves significantly lower selective risk than state-of-the-art methods, across almost all coverage degrees. Moreover, it can be combined with existing methods to bring further improvement.
Machine Learning,Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
This paper focuses on the problem of selective classification, which is a method in deep learning models that only make predictions when they are confident enough, aiming to improve security and reliability, especially in high-risk scenarios. Existing methods mainly estimate the model's prediction confidence by modifying the classification layer. The paper proposes a new generalization bound that reveals optimizing the feature layer helps improve the performance of selective classification. Inspired by this, the paper first introduces a new method called CCL-SC (Confidence-based Contrastive Learning) which directly improves the selective classification model on the feature layer, making the features of similar instances in the same class more similar and the features of different class instances more differentiated, with the differentiation controlled by the model's confidence. Experimental results show that compared to existing methods, CCL-SC has significantly lower selective risk in almost all coverage metrics, and it can be combined with other methods to further improve performance.