{"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/mos-towards-scaling-out-of-distribution","title":"MOS: Towards Scaling Out-of-distribution Detection for Large Semantic Space","arxiv_id":"2105.01879","date":"2021-05-05","proceeding":"CVPR 2021 1","authors":["Rui Huang","Yixuan Li"],"abstract":"Detecting out-of-distribution (OOD) inputs is a central challenge for safely deploying machine learning models in the real world. Existing solutions are mainly driven by small datasets, with low resolution and very few class labels (e.g., CIFAR). As a result, OOD detection for large-scale image classification tasks remains largely unexplored. In this paper, we bridge this critical gap by proposing a group-based OOD detection framework, along with a novel OOD scoring function termed MOS. Our key idea is to decompose the large semantic space into smaller groups with similar concepts, which allows simplifying the decision boundaries between in- vs. out-of-distribution data for effective OOD detection. Our method scales substantially better for high-dimensional class space than previous approaches. We evaluate models trained on ImageNet against four carefully curated OOD datasets, spanning diverse semantics. MOS establishes state-of-the-art performance, reducing the average FPR95 by 14.33% while achieving 6x speedup in inference compared to the previous best method.","url_abs":"https://arxiv.org/abs/2105.01879v1","url_pdf":"https://arxiv.org/pdf/2105.01879v1.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":"mos-towards-scaling-out-of-distribution","repo_url":"https://github.com/deeplearning-wisc/large_scale_ood","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mos-towards-scaling-out-of-distribution","repo_url":"https://github.com/deeplearning-wisc/gradnorm_ood","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mos-towards-scaling-out-of-distribution","repo_url":"https://github.com/ma-kjh/CMA-OoDD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mos-towards-scaling-out-of-distribution","repo_url":"https://github.com/tmlr-group/class_prior","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mos-towards-scaling-out-of-distribution","repo_url":"https://github.com/tmlr-group/neglabel","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[{"slug":"imagenet-1k-vs-places","name":"ImageNet-1k vs Places","full_name":""},{"slug":"imagenet-1k-vs-sun","name":"ImageNet-1k vs SUN","full_name":""},{"slug":"imagenet-1k-vs-textures","name":"ImageNet-1k vs Textures","full_name":""},{"slug":"imagenet-1k-vs-inaturalist-1","name":"ImageNet-1k vs iNaturalist","full_name":""}],"methods_introduced":[],"results":[{"leaderboard":"/sota/out-of-distribution-detection-on-imagenet-1k-12","task":"Out-of-Distribution Detection","dataset":"ImageNet-1k vs Curated OODs (avg.)","model":"MOS (BiT-S-R101x1)","rank_in_archive_order":11,"of":16,"metrics":{"AUROC":"90.11","FPR95":"39.97"},"uses_additional_data":false},{"leaderboard":"/sota/out-of-distribution-detection-on-imagenet-1k-9","task":"Out-of-Distribution Detection","dataset":"ImageNet-1k vs Places","model":"MOS (BiT-S-R101x1)","rank_in_archive_order":14,"of":25,"metrics":{"AUROC":"89.06","FPR95":"49.54"},"uses_additional_data":true},{"leaderboard":"/sota/out-of-distribution-detection-on-imagenet-1k-8","task":"Out-of-Distribution Detection","dataset":"ImageNet-1k vs SUN","model":"MOS (BiT-S-R101x1)","rank_in_archive_order":11,"of":22,"metrics":{"AUROC":"92.01","FPR95":"40.63"},"uses_additional_data":true},{"leaderboard":"/sota/out-of-distribution-detection-on-imagenet-1k-10","task":"Out-of-Distribution Detection","dataset":"ImageNet-1k vs Textures","model":"MOS (BiT-S-R101x1)","rank_in_archive_order":27,"of":34,"metrics":{"AUROC":"81.23","FPR95":"60.43"},"uses_additional_data":true},{"leaderboard":"/sota/out-of-distribution-detection-on-imagenet-1k-3","task":"Out-of-Distribution Detection","dataset":"ImageNet-1k vs iNaturalist","model":"MOS (BiT-S-R101x1)","rank_in_archive_order":7,"of":28,"metrics":{"AUROC":"98.15","FPR95":"9.28"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2105.01879","atlas_url":"https://app.syntology.ai/?focus=2105.01879","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.01879"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/deeplearning-wisc/gradnorm_ood","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/deeplearning-wisc/large_scale_ood","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tmlr-group/neglabel","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tmlr-group/class_prior","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ma-kjh/CMA-OoDD","reach":null}],"summary":{"ran_draft_wrong":2,"ran_fixture":1,"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":3,"ran":2,"repositories":3}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"1caff2f8b8fc899d","entry":"calc_group_softmax_loss","repo":"deeplearning-wisc/large_scale_ood","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/deeplearning-wisc/large_scale_ood/blob/HEAD/finetune.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1caff2f8b8fc899d"}},{"code_sha256_prefix":"ae64ecb508b5b2bb","entry":"get_Mahalanobis_score","repo":"deeplearning-wisc/gradnorm_ood","repo_kind":"listed","path":"utils/mahalanobis_lib.py","file_url":"https://github.com/deeplearning-wisc/gradnorm_ood/blob/HEAD/utils/mahalanobis_lib.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ae64ecb508b5b2bb"}},{"code_sha256_prefix":"12fc2270fe050752","entry":"iterate_data_mahalanobis","repo":"tmlr-group/class_prior","repo_kind":"listed","path":"funcs.py","file_url":"https://github.com/tmlr-group/class_prior/blob/HEAD/funcs.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"12fc2270fe050752"}},{"code_sha256_prefix":"ef2d645ece6b584c","entry":"CLIP","repo":"ma-kjh/CMA-OoDD","repo_kind":"listed","path":"clip/model.py","file_url":"https://github.com/ma-kjh/CMA-OoDD/blob/HEAD/clip/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ef2d645ece6b584c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}