AI summaryⓘ
The authors study how to detect when a machine learning model encounters unfamiliar data, which is important for making models work safely in real life. They focus on methods that use information from a trained model without retraining it, specifically looking at the curvature (a mathematical property) of the model's loss landscape. They find that unfamiliar (out-of-distribution) data causes higher curvature than familiar data and use this insight to create a new detection method called Fold. Fold is efficient and improves detection accuracy, and the authors also develop AutoFold to fine-tune Fold automatically without extra data. Their experiments show Fold works better than earlier approaches while remaining fast to run.
Out-of-distribution (OOD) detectionPost-hoc methodsLoss landscape curvatureHessian matrixFeature normalizationAutoFoldAUROCFPR95Self-supervised tuningLogit masking
Authors
Seonghwan Park, Hyunji Jung, Dongyeop Lee, Namhoon Lee
Abstract
Detecting out-of-distribution (OOD) data is crucial for reliable machine learning deployment. Among detection strategies, post-hoc methods are particularly attractive due to their efficiency, as they operate directly on pre-trained networks without requiring retraining. Within this paradigm, one promising direction exploits loss-landscape curvature to estimate model uncertainty; however, such methods incur substantial computational cost and rely on implicit assumptions about how landscape flatness differs between in-distribution (ID) and OOD data. In this work, we provide the first systematic investigation of this curvature discrepancy and show that OOD inputs exhibit larger Hessian curvature than ID data, with the gap widening under stronger distributional shifts. Motivated by these observations, we propose Fold, a lightweight flatness-modulated OOD detector that leverages the feature Hessian and partial feature normalization to improve ID-OOD separability while avoiding costly parameter-space curvature approximations. To optimally adapt this normalization across diverse datasets, we further introduce AutoFold, a self-supervised tuning scheme that synthesizes pseudo-OOD samples via ID logit masking for automatic calibration without requiring external data. Experiments on OOD benchmarks show that Fold outperforms prior methods, improving the average AUROC by 1.63% and reducing FPR95 by 2.30%, while maintaining computational efficiency comparable to a standard forward pass. Supported by theoretical analysis and extensive ablations, Fold provides a principled and practical solution for robust real-world deployment.