{"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-novel-data-augmentation-technique-for-out","title":"A Novel Data Augmentation Technique for Out-of-Distribution Sample Detection using Compounded Corruptions","arxiv_id":"2207.13916","date":"2022-07-28","proceeding":null,"authors":["Ramya S. Hebbalaguppe","Soumya Suvra Goshal","Jatin Prakash","Harshad Khadilkar","Chetan Arora"],"abstract":"Modern deep neural network models are known to erroneously classify out-of-distribution (OOD) test data into one of the in-distribution (ID) training classes with high confidence. This can have disastrous consequences for safety-critical applications. A popular mitigation strategy is to train a separate classifier that can detect such OOD samples at the test time. In most practical settings OOD examples are not known at the train time, and hence a key question is: how to augment the ID data with synthetic OOD samples for training such an OOD detector? In this paper, we propose a novel Compounded Corruption technique for the OOD data augmentation termed CnC. One of the major advantages of CnC is that it does not require any hold-out data apart from the training set. Further, unlike current state-of-the-art (SOTA) techniques, CnC does not require backpropagation or ensembling at the test time, making our method much faster at inference. Our extensive comparison with 20 methods from the major conferences in last 4 years show that a model trained using CnC based data augmentation, significantly outperforms SOTA, both in terms of OOD detection accuracy as well as inference time. We include a detailed post-hoc analysis to investigate the reasons for the success of our method and identify higher relative entropy and diversity of CnC samples as probable causes. We also provide theoretical insights via a piece-wise decomposition analysis on a two-dimensional dataset to reveal (visually and quantitatively) that our approach leads to a tighter boundary around ID classes, leading to better detection of OOD samples. Source code link: https://github.com/cnc-ood","url_abs":"https://arxiv.org/abs/2207.13916v2","url_pdf":"https://arxiv.org/pdf/2207.13916v2.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-novel-data-augmentation-technique-for-out","repo_url":"https://github.com/cnc-ood/cnc_ood","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"ood-detection","task_name":"Out of Distribution (OOD) Detection"}],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2207.13916","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.13916"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/cnc-ood/cnc_ood","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":1,"unverified":12},"by_repo_kind":{"official":{"samples":14,"ran":2,"repositories":1}},"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":0,"samples":[{"code_sha256_prefix":"466ca3cdf4524d82","entry":"clipped_zoom","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"augmentations/corruptions.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/augmentations/corruptions.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"466ca3cdf4524d82"}},{"code_sha256_prefix":"bc8b7f1d3348c560","entry":"disk","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"augmentations/corruptions.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/augmentations/corruptions.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc8b7f1d3348c560"}},{"code_sha256_prefix":"e24439db1f89a5eb","entry":"DenseNet100","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"models/densenet.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/models/densenet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e24439db1f89a5eb"}},{"code_sha256_prefix":"135e97055dfaf8bd","entry":"ResNet34","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/models/resnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"135e97055dfaf8bd"}},{"code_sha256_prefix":"48e78dc688691eef","entry":"ResNet50","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/models/resnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"48e78dc688691eef"}},{"code_sha256_prefix":"fba2431c495541ec","entry":"WideResNet40_2","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"models/wide_resnet.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/models/wide_resnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fba2431c495541ec"}},{"code_sha256_prefix":"2ace1c98fa5f2cd5","entry":"conv3x3","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"models/resnet_tinyimagenet.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/models/resnet_tinyimagenet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ace1c98fa5f2cd5"}},{"code_sha256_prefix":"fd7eb4a19cf6344a","entry":"get_datasets","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"datasets/cifar10.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/datasets/cifar10.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fd7eb4a19cf6344a"}},{"code_sha256_prefix":"b018c7f90d510364","entry":"get_datasets","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"datasets/cifar100.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/datasets/cifar100.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b018c7f90d510364"}},{"code_sha256_prefix":"edd840936d027c2e","entry":"get_datasets","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"datasets/svhn.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/datasets/svhn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"edd840936d027c2e"}},{"code_sha256_prefix":"6b801f8b2ef516d6","entry":"get_train_valid_test_loader","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"datasets/svhn.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/datasets/svhn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b801f8b2ef516d6"}},{"code_sha256_prefix":"3f32f32f9972eaf6","entry":"plasma_fractal","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"augmentations/corruptions.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/augmentations/corruptions.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3f32f32f9972eaf6"}},{"code_sha256_prefix":"4ae4dd2fed7d16da","entry":"resnet18","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"models/resnet_tinyimagenet.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/models/resnet_tinyimagenet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4ae4dd2fed7d16da"}},{"code_sha256_prefix":"d5479a626082361a","entry":"resnet34","repo":"cnc-ood/cnc_ood","repo_kind":"official","path":"models/resnet_tinyimagenet.py","file_url":"https://github.com/cnc-ood/cnc_ood/blob/HEAD/models/resnet_tinyimagenet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d5479a626082361a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}