LBL: Logarithmic Barrier Loss Function for One-class Classification
Xiaofeng Guo, Ziyang Jiang, Tianlei Wang, Shichen Zhang, Dinghan Hu, Jiuwen Cao
TL;DR
This work tackles the lack of effective deep learning losses for one-class classification by introducing a logarithmic barrier loss (LBL) that smoothly approximates the OCC objective and emphasizes margin samples to yield a compact hypersphere. To improve optimization stability, the authors further propose LBLSig, a unilateral relaxation of LBL that blends MSE and CE through a truncated sigmoid mechanism, mitigating boundary-noise issues. The approaches are validated across multiple backbones and datasets, where LBLSig and LBL consistently outperform existing losses (SBL and HRN) and achieve state-of-the-art or near state-of-the-art AUC results, with LBLSig often providing the best or most robust performance. The methods are implemented with practical training schemes, including adaptive radius updates and careful center choices, and the work provides public code for reproducibility and broad applicability in anomaly detection and related OCC tasks.
Abstract
One-class classification (OCC) aims to train a classifier solely on target data and attracts increasing attention due to its applicability in practice. Despite OCC has obtained many advances, it still lacks the effective OCC loss functions for deep learning. In this paper, a novel logarithmic barrier function based OCC loss (LBL) that assigns large gradients to margin samples and thus derives more compact hypersphere is first proposed by approximating the OCC objective smoothly. But the optimization of LBL may be instability especially when samples lie on the boundary leading to the infinity value. To address this issue, a smoother LBLSig loss is further proposed by utilizing a unilateral relaxation Sigmoid function. Experiments on different networks demonstrate the effectiveness of the proposed LBL and LBLSig. The source code can be found at https://github.com/ML-HDU/LBL_LBLSig.
