{"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/understanding-and-enhancing-mixed-sample-data","title":"FMix: Enhancing Mixed Sample Data Augmentation","arxiv_id":"2002.12047","date":"2020-02-27","proceeding":null,"authors":["Ethan Harris","Antonia Marcu","Matthew Painter","Mahesan Niranjan","Adam Prügel-Bennett","Jonathon Hare"],"abstract":"Mixed Sample Data Augmentation (MSDA) has received increasing attention in recent years, with many successful variants such as MixUp and CutMix. By studying the mutual information between the function learned by a VAE on the original data and on the augmented data we show that MixUp distorts learned functions in a way that CutMix does not. We further demonstrate this by showing that MixUp acts as a form of adversarial training, increasing robustness to attacks such as Deep Fool and Uniform Noise which produce examples similar to those generated by MixUp. We argue that this distortion prevents models from learning about sample specific features in the data, aiding generalisation performance. In contrast, we suggest that CutMix works more like a traditional augmentation, improving performance by preventing memorisation without distorting the data distribution. However, we argue that an MSDA which builds on CutMix to include masks of arbitrary shape, rather than just square, could further prevent memorisation whilst preserving the data distribution in the same way. To this end, we propose FMix, an MSDA that uses random binary masks obtained by applying a threshold to low frequency images sampled from Fourier space. These random masks can take on a wide range of shapes and can be generated for use with one, two, and three dimensional data. FMix improves performance over MixUp and CutMix, without an increase in training time, for a number of models across a range of data sets and problem settings, obtaining a new single model state-of-the-art result on CIFAR-10 without external data. Finally, we show that a consequence of the difference between interpolating MSDA such as MixUp and masking MSDA such as FMix is that the two can be combined to improve performance even further. Code for all experiments is provided at https://github.com/ecs-vlc/FMix .","url_abs":"https://arxiv.org/abs/2002.12047v3","url_pdf":"https://arxiv.org/pdf/2002.12047v3.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":"understanding-and-enhancing-mixed-sample-data","repo_url":"https://github.com/ecs-vlc/FMix","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"understanding-and-enhancing-mixed-sample-data","repo_url":"https://github.com/HyeonhoonLee/MAIC2021_Sleep","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"understanding-and-enhancing-mixed-sample-data","repo_url":"https://github.com/VirajBagal/FMix-Paper-Implementation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"understanding-and-enhancing-mixed-sample-data","repo_url":"https://github.com/Westlake-AI/openmixup","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"understanding-and-enhancing-mixed-sample-data","repo_url":"https://github.com/PaddlePaddle/PaddleClas","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"image-classification","task_name":"Image Classification"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"cutmix","method_name":"CutMix"},{"method_slug":"fmix","method_name":"FMix"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"mixup","method_name":"Mixup"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[{"slug":"fmix","name":"FMix","full_name":"FMix"}],"results":[{"leaderboard":"/sota/image-classification-on-cifar-10","task":"Image Classification","dataset":"CIFAR-10","model":"PyramidNet + ShakeDrop + Fast AA + FMix","rank_in_archive_order":34,"of":265,"metrics":{"Percentage correct":"98.64"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-cifar-100","task":"Image Classification","dataset":"CIFAR-100","model":"DenseNet-BC-190 + FMix","rank_in_archive_order":82,"of":211,"metrics":{"Percentage correct":"83.95"},"uses_additional_data":true},{"leaderboard":"/sota/image-classification-on-fashion-mnist","task":"Image Classification","dataset":"Fashion-MNIST","model":"PreAct-ResNet18 + FMix","rank_in_archive_order":1,"of":34,"metrics":{"Percentage error":"3.64"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.12047","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.12047"}},"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/Westlake-AI/openmixup","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PaddlePaddle/PaddleClas","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/VirajBagal/FMix-Paper-Implementation","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/HyeonhoonLee/MAIC2021_Sleep","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ecs-vlc/FMix","reach":null}],"summary":{"ran_draft_wrong":4,"ran_honours":1,"ran_fixture":3},"by_repo_kind":{"official":{"samples":5,"ran":5,"repositories":1},"listed":{"samples":2,"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":3,"samples":[{"code_sha256_prefix":"fb899630e37d8971","entry":"ResNet18","repo":"VirajBagal/FMix-Paper-Implementation","repo_kind":"listed","path":"model.py","file_url":"https://github.com/VirajBagal/FMix-Paper-Implementation/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fb899630e37d8971"}},{"code_sha256_prefix":"85d8c791298ea1f7","entry":"ResNet34","repo":"VirajBagal/FMix-Paper-Implementation","repo_kind":"listed","path":"model.py","file_url":"https://github.com/VirajBagal/FMix-Paper-Implementation/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"85d8c791298ea1f7"}},{"code_sha256_prefix":"583f9780bdd00a45","entry":"conv3x3","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"583f9780bdd00a45"}},{"code_sha256_prefix":"72c0585c19972d68","entry":"fftfreqnd","repo":"ecs-vlc/FMix","repo_kind":"official","path":"fmix.py","file_url":"https://github.com/ecs-vlc/FMix/blob/HEAD/fmix.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"72c0585c19972d68"}},{"code_sha256_prefix":"7c0f83a440cd36f9","entry":"fmix_loss","repo":"ecs-vlc/FMix","repo_kind":"official","path":"implementations/torchbearer_implementation.py","file_url":"https://github.com/ecs-vlc/FMix/blob/HEAD/implementations/torchbearer_implementation.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7c0f83a440cd36f9"}},{"code_sha256_prefix":"6618eb90e0aed288","entry":"fmix_loss","repo":"ecs-vlc/FMix","repo_kind":"official","path":"implementations/lightning.py","file_url":"https://github.com/ecs-vlc/FMix/blob/HEAD/implementations/lightning.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6618eb90e0aed288"}},{"code_sha256_prefix":"bc2dfdb6999b2dee","entry":"get_spectrum","repo":"ecs-vlc/FMix","repo_kind":"official","path":"fmix.py","file_url":"https://github.com/ecs-vlc/FMix/blob/HEAD/fmix.py","link_basis":"first_harvest_node","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":"bc2dfdb6999b2dee"}},{"code_sha256_prefix":"3b4ff6df745c5e85","entry":"make_low_freq_image","repo":"ecs-vlc/FMix","repo_kind":"official","path":"fmix.py","file_url":"https://github.com/ecs-vlc/FMix/blob/HEAD/fmix.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3b4ff6df745c5e85"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}