{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/a-simple-fix-to-mahalanobis-distance-for","title":"A Simple Fix to Mahalanobis Distance for Improving Near-OOD Detection","arxiv_id":"2106.09022","date":"2021-06-16","proceeding":null,"authors":["Jie Ren","Stanislav Fort","Jeremiah Liu","Abhijit Guha Roy","Shreyas Padhy","Balaji Lakshminarayanan"],"abstract":"Mahalanobis distance (MD) is a simple and popular post-processing method for detecting out-of-distribution (OOD) inputs in neural networks. We analyze its failure modes for near-OOD detection and propose a simple fix called relative Mahalanobis distance (RMD) which improves performance and is more robust to hyperparameter choice. On a wide selection of challenging vision, language, and biology OOD benchmarks (CIFAR-100 vs CIFAR-10, CLINC OOD intent detection, Genomics OOD), we show that RMD meaningfully improves upon MD performance (by up to 15% AUROC on genomics OOD).","url_abs":"https://arxiv.org/abs/2106.09022v1","url_pdf":"https://arxiv.org/pdf/2106.09022v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"a-simple-fix-to-mahalanobis-distance-for","repo_url":"https://github.com/google/uncertainty-baselines","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"a-simple-fix-to-mahalanobis-distance-for","repo_url":"https://github.com/glhr/ood-labelnoise","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}},{"paper_slug":"a-simple-fix-to-mahalanobis-distance-for","repo_url":"https://github.com/stanislavfort/adversaries_to_ood_detection","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"a-simple-fix-to-mahalanobis-distance-for","repo_url":"https://github.com/stanislavfort/exploring_the_limits_of_OOD_detection","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"intent-detection","task_name":"Intent Detection"},{"task_slug":"ood-detection","task_name":"Out of Distribution (OOD) Detection"},{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2106.09022","atlas_url":"https://app.syntology.ai/?focus=2106.09022","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}