Out-of-Distribution Detection using Synthetic Data Generation
This addresses the challenge of reliable OOD detection for classification systems, particularly in text domains like toxicity detection and LLM applications, by providing a data-efficient solution.
The paper tackles the problem of out-of-distribution (OOD) detection in classification systems by using Large Language Models to generate synthetic OOD data, eliminating the need for external OOD sources. The method achieves dramatic reductions in false positive rates, including perfect zero in some cases, while maintaining high in-distribution accuracy across nine dataset pairs.
Distinguishing in- and out-of-distribution (OOD) inputs is crucial for reliable deployment of classification systems. However, OOD data is typically unavailable or difficult to collect, posing a significant challenge for accurate OOD detection. In this work, we present a method that harnesses the generative capabilities of Large Language Models (LLMs) to create high-quality synthetic OOD proxies, eliminating the dependency on any external OOD data source. We study the efficacy of our method on classical text classification tasks such as toxicity detection and sentiment classification as well as classification tasks arising in LLM development and deployment, such as training a reward model for RLHF and detecting misaligned generations. Extensive experiments on nine InD-OOD dataset pairs and various model sizes show that our approach dramatically lowers false positive rates (achieving a perfect zero in some cases) while maintaining high accuracy on in-distribution tasks, outperforming baseline methods by a significant margin.