{"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/patchup-a-regularization-technique-for","title":"PatchUp: A Feature-Space Block-Level Regularization Technique for Convolutional Neural Networks","arxiv_id":"2006.07794","date":"2020-06-14","proceeding":null,"authors":["Mojtaba Faramarzi","Mohammad Amini","Akilesh Badrinaaraayanan","Vikas Verma","Sarath Chandar"],"abstract":"Large capacity deep learning models are often prone to a high generalization gap when trained with a limited amount of labeled training data. A recent class of methods to address this problem uses various ways to construct a new training sample by mixing a pair (or more) of training samples. We propose PatchUp, a hidden state block-level regularization technique for Convolutional Neural Networks (CNNs), that is applied on selected contiguous blocks of feature maps from a random pair of samples. Our approach improves the robustness of CNN models against the manifold intrusion problem that may occur in other state-of-the-art mixing approaches. Moreover, since we are mixing the contiguous block of features in the hidden space, which has more dimensions than the input space, we obtain more diverse samples for training towards different dimensions. Our experiments on CIFAR10/100, SVHN, Tiny-ImageNet, and ImageNet using ResNet architectures including PreActResnet18/34, WRN-28-10, ResNet101/152 models show that PatchUp improves upon, or equals, the performance of current state-of-the-art regularizers for CNNs. We also show that PatchUp can provide a better generalization to deformed samples and is more robust against adversarial attacks.","url_abs":"https://arxiv.org/abs/2006.07794v2","url_pdf":"https://arxiv.org/pdf/2006.07794v2.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":"patchup-a-regularization-technique-for","repo_url":"https://github.com/chandar-lab/PatchUp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"cutmix","method_name":"CutMix"},{"method_slug":"mixup","method_name":"Mixup"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2006.07794","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.07794"}},"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/chandar-lab/PatchUp","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":1,"unverified":10},"by_repo_kind":{"official":{"samples":12,"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":"00e569acd6b45ef0","entry":"conv3x3","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"models/wide_resnet.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/models/wide_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"00e569acd6b45ef0"}},{"code_sha256_prefix":"09b3d0b3ea772a30","entry":"convert_secs2time","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"utility/utils.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/utility/utils.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"09b3d0b3ea772a30"}},{"code_sha256_prefix":"8bede3a7d258b49a","entry":"binary_cross_entropy","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"utility/utils.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/utility/utils.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":"8bede3a7d258b49a"}},{"code_sha256_prefix":"1b35b976b81f76e1","entry":"experiment_name","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"utility/activation_study.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/utility/activation_study.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":"1b35b976b81f76e1"}},{"code_sha256_prefix":"af8fbd6571e5b330","entry":"get_activation_magnitude","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"utility/activation_study.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/utility/activation_study.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":"af8fbd6571e5b330"}},{"code_sha256_prefix":"359f374c174621ef","entry":"get_activation_sum","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"utility/activation_study.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/utility/activation_study.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":"359f374c174621ef"}},{"code_sha256_prefix":"c24f9f03625f499d","entry":"get_lambda","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"modules/mixup.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/modules/mixup.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":"c24f9f03625f499d"}},{"code_sha256_prefix":"0416c720d09e7630","entry":"load_data","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"data_loader.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/data_loader.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":"0416c720d09e7630"}},{"code_sha256_prefix":"764bff217286b7dd","entry":"load_data_subset","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"data_loader.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/data_loader.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":"764bff217286b7dd"}},{"code_sha256_prefix":"5e868dde8eee2c83","entry":"mixup_process","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"modules/mixup.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/modules/mixup.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":"5e868dde8eee2c83"}},{"code_sha256_prefix":"b39b1c9f2e503e7a","entry":"per_image_standardization","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"data_loader.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/data_loader.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":"b39b1c9f2e503e7a"}},{"code_sha256_prefix":"b7759e06a641aece","entry":"to_one_hot","repo":"chandar-lab/PatchUp","repo_kind":"official","path":"utility/utils.py","file_url":"https://github.com/chandar-lab/PatchUp/blob/HEAD/utility/utils.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":"b7759e06a641aece"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}