[Paper Review] Dense Out-of-Distribution Detection by Robust Learning on Synthetic Negative Data
This paper proposes NFlowJS, a novel method for dense out-of-distribution (OOD) detection that uses normalizing flows to generate synthetic negative patches at the boundary of the inlier manifold. By jointly optimizing for high inlier likelihood and uniform predictions on synthetic outliers via Jensen-Shannon divergence, the method achieves state-of-the-art performance on road-driving and remote sensing benchmarks with minimal computational overhead, outperforming GAN-based and GMM-based synthetic data approaches.
Standard machine learning is unable to accommodate inputs which do not belong to the training distribution. The resulting models often give rise to confident incorrect predictions which may lead to devastating consequences. This problem is especially demanding in the context of dense prediction since input images may be only partially anomalous. Previous work has addressed dense out-of-distribution detection by discriminative training with respect to off-the-shelf negative datasets. However, real negative data are unlikely to cover all modes of the entire visual world. To this end, we extend this approach by generating synthetic negative patches along the border of the inlier manifold. We leverage a jointly trained normalizing flow due to coverage-oriented learning objective and the capability to generate samples at different resolutions. We detect anomalies according to a principled information-theoretic criterion which can be consistently applied through training and inference. The resulting models set the new state of the art on benchmarks for out-of-distribution detection in road-driving scenes and remote sensing imagery, in spite of minimal computational overhead.
Motivation & Objective
- To address the critical challenge of confident incorrect predictions in deep learning models when faced with out-of-distribution (OOD) inputs in dense prediction tasks.
- To overcome the limitations of real-world negative datasets, which often fail to cover all OOD modes, especially in specialized domains like remote sensing or medical imaging.
- To develop a method that enables robust, principled OOD detection without relying on Bayesian modeling, image resynthesis, or auxiliary real negative data.
- To improve generalization and coverage of OOD detection by generating synthetic negative samples that are representative of the true distribution boundary.
- To minimize computational overhead while maintaining high detection performance for real-time deployment in autonomous systems.
Proposed method
- The method generates synthetic negative patches by sampling from a normalizing flow trained to maximize inlier likelihood while encouraging uniform predictions on the generated samples.
- A joint training objective combines maximum likelihood for the normalizing flow and a discriminative loss that promotes uniformity in the final layer logits for synthetic outliers.
- The Jensen-Shannon divergence (JSD) is used as a robust scoring criterion during both training and inference, replacing ad-hoc metrics like max-softmax.
- Pre-training of both the discriminative model and the normalizing flow is applied before joint training to prevent overfitting and improve generalization.
- The method supports variable-resolution generation via normalizing flows, enabling realistic simulation of OOD objects of different sizes.
- Temperature scaling is applied to the softmax output to improve OOD detection performance, with optimal values found empirically.
Experimental results
Research questions
- RQ1Can synthetic negative data generated via normalizing flows outperform real negative datasets in dense OOD detection, especially when real OOD data are scarce?
- RQ2Does using Jensen-Shannon divergence as a training and inference criterion lead to more robust and consistent OOD detection than ad-hoc scoring functions?
- RQ3Can pre-training the discriminative and generative models independently improve generalization and reduce overfitting to synthetic outliers?
- RQ4How does the coverage and distributional quality of normalizing flow-generated negatives compare to GAN-generated or GMM-based synthetic data in OOD detection?
- RQ5To what extent does the method generalize across domains, particularly in remote sensing where standard negative datasets are inadequate?
Key findings
- NFlowJS achieves state-of-the-art performance on the AnomalyTrack and ObstacleTrack benchmarks, with an AP of 63.3 ± 0.6 and FPR95 of 19.8 ± 0.8 on AnomalyTrack-val, and 95.8 ± 0.2 AP and 0.1 ± 0.0 FPR95 on ObstacleTrack-val.
- The method significantly outperforms GAN-based synthetic data (56.1 AP, 26.1 FPR95 on AnomalyTrack-val) and GMM-based features (56.7 AP, 28.0 FPR95), demonstrating the superiority of normalizing flows for OOD data generation.
- Pre-training both the discriminative model and the normalizing flow leads to a 6.4% absolute improvement in AP on AnomalyTrack-val compared to training from random initialization.
- Temperature scaling with T=2 improves OOD detection performance, reducing FPR95 to 0.1 ± 0.0 on ObstacleTrack-val, indicating better calibration of the score distribution.
- The method increases the separation between known and unknown classes in the logit space, suggesting improved open-set generalization capability.
- In remote sensing, the method shows strong performance even without access to domain-specific negative data, proving utility in low-resource OOD detection scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.