Bypassing the Transport Plan: Dynamic Reweighting for Out-of-Distribution Detection with Optimal Transport
Abstract
Semi-supervised learning (SSL) has achieved remarkable progress by leveraging both limited labeled data and abundant unlabeled data. However, unlabeled datasets often contain out-of-distribution (OOD) samples from unknown classes, which can lead to performance degradation in open-set SSL scenarios. Current OOD detection methods are constrained by the absence of labeled OOD samples. Although optimal transport (OT) has proven to be effective to provide pseudo OOD scores for supervised learning, it still faces two main challenges, i.e., the unavoidable problem of finding the optimal transport plan and the unreliable OOD score caused by dense solutions. To overcome thess limitations, we propose a novel open-set OOD detection model named DREW, which leverages Dynamic REWeighting approach for OT-based OOD detection. Specifically, we start by formulating OOD detection as a semi-unbalanced optimal transport (SemiUOT) problem. The proposed DREW model can dynamically transform SemiUOT into the classical OT formula and then directly obtain the pseudo OOD score from the new source distribution weights. Contrary to existing OT-based methods, DREW provides theoretically grounded and more accurate pseudo OOD scores, while avoiding the direct computation of the transport plan. Empirical results demonstrate the superiority of DREW in terms of both accuracy and efficiency. Extensive analytical experiments are conducted to elucidate the properties of each component.