Errors of machine learning models are costly, especially in safety-critical domains such as healthcare, where such mistakes can prevent the deployment of machine learning altogether. In these settings, conservative models -- models which can defer to human judgment when they are likely to make an error -- may offer a solution. However, detecting unusual or difficult examples is notably challenging, as it is impossible to anticipate all potential inputs at test time. To address this issue, prior work has proposed to minimize the model's confidence on an auxiliary pseudo-OOD dataset. We theoretically analyze the effect of confidence minimization and show that the choice of auxiliary dataset is critical. Specifically, if the auxiliary dataset includes samples from the OOD region of interest, confidence minimization provably separates ID and OOD inputs by predictive confidence. Taking inspiration from this result, we present data-driven confidence minimization (DCM), which minimizes confidence on an uncertainty dataset containing examples that the model is likely to misclassify at test time. Our experiments show that DCM consistently outperforms state-of-the-art OOD detection methods on 8 ID-OOD dataset pairs, reducing FPR (at TPR 95%) by 6.3% and 58.1% on CIFAR-10 and CIFAR-100, and outperforms existing selective classification approaches on 4 datasets in conditions of distribution shift.
翻译:机器学习模型的错误代价高昂,特别是在医疗等安全关键领域,此类错误可能完全阻碍机器学习的部署。在这些场景中,保守模型——即可能在出错时将决策权交给人类的模型——或可提供解决方案。然而,检测异常或困难样本尤为棘手,因为测试时无法预见所有可能的输入。为解决该问题,先前工作提出在辅助的伪OOD数据集上最小化模型置信度。我们从理论上分析了置信度最小化的效果,表明辅助数据集的选择至关重要。具体而言,若辅助数据集包含目标OOD区域的样本,置信度最小化可证明地通过预测置信度区分ID与OOD输入。受此结果启发,我们提出数据驱动的置信度最小化(DCM),该方法在包含模型测试时可能误分类样本的不确定性数据集上最小化置信度。实验表明,在8个ID-OOD数据集对中,DCM持续优于现有最优OOD检测方法,在CIFAR-10和CIFAR-100上分别将FPR(在TPR为95%时)降低6.3%和58.1%;同时在分布偏移条件下,DCM在4个数据集上超越现有选择性分类方法。