{"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/mixpro-data-augmentation-with-maskmix-and","title":"MixPro: Data Augmentation with MaskMix and Progressive Attention Labeling for Vision Transformer","arxiv_id":"2304.12043","date":"2023-04-24","proceeding":null,"authors":["QiHao Zhao","Yangyu Huang","Wei Hu","Fan Zhang","Jun Liu"],"abstract":"The recently proposed data augmentation TransMix employs attention labels to help visual transformers (ViT) achieve better robustness and performance. However, TransMix is deficient in two aspects: 1) The image cropping method of TransMix may not be suitable for ViTs. 2) At the early stage of training, the model produces unreliable attention maps. TransMix uses unreliable attention maps to compute mixed attention labels that can affect the model. To address the aforementioned issues, we propose MaskMix and Progressive Attention Labeling (PAL) in image and label space, respectively. In detail, from the perspective of image space, we design MaskMix, which mixes two images based on a patch-like grid mask. In particular, the size of each mask patch is adjustable and is a multiple of the image patch size, which ensures each image patch comes from only one image and contains more global contents. From the perspective of label space, we design PAL, which utilizes a progressive factor to dynamically re-weight the attention weights of the mixed attention label. Finally, we combine MaskMix and Progressive Attention Labeling as our new data augmentation method, named MixPro. The experimental results show that our method can improve various ViT-based models at scales on ImageNet classification (73.8\\% top-1 accuracy based on DeiT-T for 300 epochs). After being pre-trained with MixPro on ImageNet, the ViT-based models also demonstrate better transferability to semantic segmentation, object detection, and instance segmentation. Furthermore, compared to TransMix, MixPro also shows stronger robustness on several benchmarks. The code is available at https://github.com/fistyee/MixPro.","url_abs":"https://arxiv.org/abs/2304.12043v2","url_pdf":"https://arxiv.org/pdf/2304.12043v2.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":"mixpro-data-augmentation-with-maskmix-and","repo_url":"https://github.com/fistyee/mixpro","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"image-augmentation","task_name":"Image Augmentation"},{"task_slug":null,"task_name":"Image ClassiData Augmentationfication"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-cropping","task_name":"Image Cropping"},{"task_slug":"instance-segmentation","task_name":"Instance Segmentation"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/data-augmentation-on-imagenet","task":"Data Augmentation","dataset":"ImageNet","model":"DeiT-B (+MixPro)","rank_in_archive_order":1,"of":17,"metrics":{"Accuracy (%)":"82.9"},"uses_additional_data":false},{"leaderboard":"/sota/data-augmentation-on-imagenet","task":"Data Augmentation","dataset":"ImageNet","model":"DeiT-S (+MixPro)","rank_in_archive_order":3,"of":17,"metrics":{"Accuracy (%)":"81.3"},"uses_additional_data":false},{"leaderboard":"/sota/data-augmentation-on-imagenet","task":"Data Augmentation","dataset":"ImageNet","model":"DeiT-T (+MixPro)","rank_in_archive_order":17,"of":17,"metrics":{"Accuracy (%)":"73.8"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"XCiT-M (+MixPro)","rank_in_archive_order":349,"of":1060,"metrics":{"Top 1 Accuracy":"84.1%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"CA-Swin-S (+MixPro)","rank_in_archive_order":392,"of":1060,"metrics":{"Top 1 Accuracy":"83.7%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"DeiT-B (+MixPro)","rank_in_archive_order":484,"of":1060,"metrics":{"Top 1 Accuracy":"82.9%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"CA-Swin-T (+MixPro)","rank_in_archive_order":494,"of":1060,"metrics":{"Top 1 Accuracy":"82.8%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"PVT-M (+MixPro)","rank_in_archive_order":507,"of":1060,"metrics":{"Top 1 Accuracy":"82.7%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"PVT-S (+MixPro)","rank_in_archive_order":655,"of":1060,"metrics":{"Top 1 Accuracy":"81.2%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"CaiT-XXS (+MixPro)","rank_in_archive_order":692,"of":1060,"metrics":{"Top 1 Accuracy":"80.6%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"PVT-T (+MixPro)","rank_in_archive_order":901,"of":1060,"metrics":{"Top 1 Accuracy":"76.7%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"DeiT-T (+MixPro)","rank_in_archive_order":983,"of":1060,"metrics":{"Top 1 Accuracy":"73.8%"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2304.12043","atlas_url":"https://app.syntology.ai/?focus=2304.12043","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.12043"}},"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":"deterministic:regex_extraction","url":"https://github.com/fistyee/MixPro","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fistyee/mixpro","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":3,"ran":3,"ran_draft_wrong":4,"unverified":8},"by_repo_kind":{"official":{"samples":18,"ran":10,"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":"144d10b49baeb8a6","entry":"window_partition","repo":"fistyee/MixPro","repo_kind":"official","path":"models/swin_mlp.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/models/swin_mlp.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"144d10b49baeb8a6"}},{"code_sha256_prefix":"03c58083e2ecf6c7","entry":"MaskMix","repo":"fistyee/mixpro","repo_kind":"official","path":"utils.py","file_url":"https://github.com/fistyee/mixpro/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03c58083e2ecf6c7"}},{"code_sha256_prefix":"e35a4b2e4114b1a5","entry":"build_optimizer","repo":"fistyee/MixPro","repo_kind":"official","path":"optimizer.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/optimizer.py","link_basis":"plan_row","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":"e35a4b2e4114b1a5"}},{"code_sha256_prefix":"08b4e547f3100fc0","entry":"mixup_target","repo":"fistyee/mixpro","repo_kind":"official","path":"utils.py","file_url":"https://github.com/fistyee/mixpro/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"08b4e547f3100fc0"}},{"code_sha256_prefix":"4728dc2025227bba","entry":"one_hot","repo":"fistyee/mixpro","repo_kind":"official","path":"utils.py","file_url":"https://github.com/fistyee/mixpro/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4728dc2025227bba"}},{"code_sha256_prefix":"b33222a09fc93bec","entry":"set_weight_decay","repo":"fistyee/MixPro","repo_kind":"official","path":"optimizer.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/optimizer.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":"b33222a09fc93bec"}},{"code_sha256_prefix":"f9fd6241d935f07b","entry":"window_partition","repo":"fistyee/MixPro","repo_kind":"official","path":"models/focal_transformer_v2.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/models/focal_transformer_v2.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f9fd6241d935f07b"}},{"code_sha256_prefix":"eb8623dc7c37757f","entry":"window_partition_noreshape","repo":"fistyee/MixPro","repo_kind":"official","path":"models/focal_transformer_v2.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/models/focal_transformer_v2.py","link_basis":"plan_row","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":"eb8623dc7c37757f"}},{"code_sha256_prefix":"61bf152e6a42a184","entry":"window_reverse","repo":"fistyee/MixPro","repo_kind":"official","path":"models/swin_mlp.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/models/swin_mlp.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61bf152e6a42a184"}},{"code_sha256_prefix":"fb32094c6dbece71","entry":"window_reverse","repo":"fistyee/MixPro","repo_kind":"official","path":"models/focal_transformer_v2.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/models/focal_transformer_v2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fb32094c6dbece71"}},{"code_sha256_prefix":"9fc4335dd1dc6864","entry":"MaskMix","repo":"fistyee/MixPro","repo_kind":"official","path":"utils.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/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":"9fc4335dd1dc6864"}},{"code_sha256_prefix":"1ecb57de91ce4988","entry":"build_model","repo":"fistyee/MixPro","repo_kind":"official","path":"models/build.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/models/build.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":"1ecb57de91ce4988"}},{"code_sha256_prefix":"c02cc4e0b5720211","entry":"build_scheduler","repo":"fistyee/MixPro","repo_kind":"official","path":"lr_scheduler.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/lr_scheduler.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":"c02cc4e0b5720211"}},{"code_sha256_prefix":"b0a5beb34716d5a6","entry":"check_keywords_in_name","repo":"fistyee/MixPro","repo_kind":"official","path":"optimizer.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/optimizer.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":"b0a5beb34716d5a6"}},{"code_sha256_prefix":"5dac11fdc41c896b","entry":"checkpoint_filter_fn","repo":"fistyee/MixPro","repo_kind":"official","path":"models/vit.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/models/vit.py","link_basis":"plan_row","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":"5dac11fdc41c896b"}},{"code_sha256_prefix":"80450600f7f09b0a","entry":"create_logger","repo":"fistyee/MixPro","repo_kind":"official","path":"logger.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/logger.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":"80450600f7f09b0a"}},{"code_sha256_prefix":"9b9b6364be5f95f6","entry":"get_config","repo":"fistyee/MixPro","repo_kind":"official","path":"config.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/config.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":"9b9b6364be5f95f6"}},{"code_sha256_prefix":"1dbef2d4da4ee10f","entry":"resize_pos_embed","repo":"fistyee/MixPro","repo_kind":"official","path":"models/vit.py","file_url":"https://github.com/fistyee/MixPro/blob/HEAD/models/vit.py","link_basis":"plan_row","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":"1dbef2d4da4ee10f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}