{"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/ipmix-label-preserving-data-augmentation-1","title":"IPMix: Label-Preserving Data Augmentation Method for Training Robust Classifiers","arxiv_id":"2310.04780","date":"2023-10-07","proceeding":"NeurIPS 2023 11","authors":["Zhenglin Huang","Xiaoan Bao","Na Zhang","Qingqi Zhang","Xiaomei Tu","Biao Wu","Xi Yang"],"abstract":"Data augmentation has been proven effective for training high-accuracy convolutional neural network classifiers by preventing overfitting. However, building deep neural networks in real-world scenarios requires not only high accuracy on clean data but also robustness when data distributions shift. While prior methods have proposed that there is a trade-off between accuracy and robustness, we propose IPMix, a simple data augmentation approach to improve robustness without hurting clean accuracy. IPMix integrates three levels of data augmentation (image-level, patch-level, and pixel-level) into a coherent and label-preserving technique to increase the diversity of training data with limited computational overhead. To further improve the robustness, IPMix introduces structural complexity at different levels to generate more diverse images and adopts the random mixing method for multi-scale information fusion. Experiments demonstrate that IPMix outperforms state-of-the-art corruption robustness on CIFAR-C and ImageNet-C. In addition, we show that IPMix also significantly improves the other safety measures, including robustness to adversarial perturbations, calibration, prediction consistency, and anomaly detection, achieving state-of-the-art or comparable results on several benchmarks, including ImageNet-R, ImageNet-A, and ImageNet-O.","url_abs":"https://arxiv.org/abs/2310.04780v7","url_pdf":"https://arxiv.org/pdf/2310.04780v7.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":"ipmix-label-preserving-data-augmentation-1","repo_url":"https://github.com/hzlsaber/IPMix","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"diversity","task_name":"Diversity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.04780","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.04780"}},"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":"deterministic:regex_extraction","url":"https://github.com/hzlsaber/IPMix","reach":null}],"summary":{"ran_violates":1,"ran_fixture":6,"ran_honours":1,"ran_draft_wrong":7,"unverified":2},"by_repo_kind":{"official":{"samples":16,"ran":14,"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":1,"samples":[{"code_sha256_prefix":"190117b425ab9fe1","entry":"get_lr","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"190117b425ab9fe1"}},{"code_sha256_prefix":"cbb347ae0777187b","entry":"add","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"cbb347ae0777187b"}},{"code_sha256_prefix":"6b102ac91e94b5e7","entry":"get_ab","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b102ac91e94b5e7"}},{"code_sha256_prefix":"4cebd5ded62dc91a","entry":"invert","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4cebd5ded62dc91a"}},{"code_sha256_prefix":"68e7d0362ce44040","entry":"mirror","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"68e7d0362ce44040"}},{"code_sha256_prefix":"1c5c42ef4d6b41ed","entry":"multiply","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1c5c42ef4d6b41ed"}},{"code_sha256_prefix":"464e4c4f1f24b52c","entry":"patch_mixing","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"464e4c4f1f24b52c"}},{"code_sha256_prefix":"198cba22a2041b0b","entry":"random_elems","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"198cba22a2041b0b"}},{"code_sha256_prefix":"f47705e21f50aab3","entry":"random_pixels","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f47705e21f50aab3"}},{"code_sha256_prefix":"6ff6756edee1c9da","entry":"rotate","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ff6756edee1c9da"}},{"code_sha256_prefix":"7dbf6f8a2088e9be","entry":"shear_x","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7dbf6f8a2088e9be"}},{"code_sha256_prefix":"ca2d43eb1a8c083f","entry":"shear_y","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ca2d43eb1a8c083f"}},{"code_sha256_prefix":"7914dbaf0adf4d57","entry":"train","repo":"hzlsaber/ipmix","repo_kind":"official","path":"imagenet.py","file_url":"https://github.com/hzlsaber/ipmix/blob/HEAD/imagenet.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":"7914dbaf0adf4d57"}},{"code_sha256_prefix":"d33ba26b62d93326","entry":"translate_x","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d33ba26b62d93326"}},{"code_sha256_prefix":"0e7f36bd010453cf","entry":"translate_y","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0e7f36bd010453cf"}},{"code_sha256_prefix":"d79fa91500ab0018","entry":"augment_input","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.py","link_basis":"first_harvest_node","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":"d79fa91500ab0018"}},{"code_sha256_prefix":"4eb2047e53db0d50","entry":"ipmix","repo":"hzlsaber/IPMix","repo_kind":"official","path":"cifar.py","file_url":"https://github.com/hzlsaber/IPMix/blob/HEAD/cifar.py","link_basis":"first_harvest_node","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":"4eb2047e53db0d50"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}