{"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/regularizing-neural-networks-via-adversarial","title":"Regularizing Neural Networks via Adversarial Model Perturbation","arxiv_id":"2010.04925","date":"2020-10-10","proceeding":"CVPR 2021 1","authors":["Yaowei Zheng","Richong Zhang","Yongyi Mao"],"abstract":"Effective regularization techniques are highly desired in deep learning for alleviating overfitting and improving generalization. This work proposes a new regularization scheme, based on the understanding that the flat local minima of the empirical risk cause the model to generalize better. This scheme is referred to as adversarial model perturbation (AMP), where instead of directly minimizing the empirical risk, an alternative \"AMP loss\" is minimized via SGD. Specifically, the AMP loss is obtained from the empirical risk by applying the \"worst\" norm-bounded perturbation on each point in the parameter space. Comparing with most existing regularization schemes, AMP has strong theoretical justifications, in that minimizing the AMP loss can be shown theoretically to favour flat local minima of the empirical risk. Extensive experiments on various modern deep architectures establish AMP as a new state of the art among regularization schemes. Our code is available at https://github.com/hiyouga/AMP-Regularizer.","url_abs":"https://arxiv.org/abs/2010.04925v4","url_pdf":"https://arxiv.org/pdf/2010.04925v4.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":"regularizing-neural-networks-via-adversarial","repo_url":"https://github.com/hiyouga/AMP-Regularizer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"model","task_name":"model"}],"methods":[{"method_slug":"amp","method_name":"AMP"},{"method_slug":"autoaugment","method_name":"AutoAugment"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"cutout","method_name":"Cutout"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"pyramidnet","method_name":"PyramidNet"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"sgd-with-momentum","method_name":"SGD with Momentum"}],"datasets_introduced":[],"methods_introduced":[{"slug":"amp","name":"AMP","full_name":"Adversarial Model Perturbation"}],"results":[{"leaderboard":"/sota/image-classification-on-cifar-10","task":"Image Classification","dataset":"CIFAR-10","model":"PyramidNet + AA (AMP)","rank_in_archive_order":56,"of":265,"metrics":{"Percentage correct":"98.02"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-cifar-10","task":"Image Classification","dataset":"CIFAR-10","model":"PreActResNet18 (AMP)","rank_in_archive_order":122,"of":265,"metrics":{"Percentage correct":"96.03"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-cifar-100","task":"Image Classification","dataset":"CIFAR-100","model":"PyramidNet + AA (AMP)","rank_in_archive_order":51,"of":211,"metrics":{"Percentage correct":"86.64"},"uses_additional_data":true},{"leaderboard":"/sota/image-classification-on-cifar-100","task":"Image Classification","dataset":"CIFAR-100","model":"PreActResNet18 (AMP)","rank_in_archive_order":137,"of":211,"metrics":{"Percentage correct":"78.49"},"uses_additional_data":true},{"leaderboard":"/sota/image-classification-on-svhn","task":"Image Classification","dataset":"SVHN","model":"PyramidNet + AA (AMP)","rank_in_archive_order":7,"of":62,"metrics":{"Percentage error":"1.35"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-svhn","task":"Image Classification","dataset":"SVHN","model":"PreActResNet18 (AMP)","rank_in_archive_order":33,"of":62,"metrics":{"Percentage error":"2.30"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2010.04925","atlas_url":"https://app.syntology.ai/?focus=2010.04925","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.04925"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hiyouga/AMP-Regularizer","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":12},"by_repo_kind":{"official":{"samples":12,"ran":0,"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":"23f8ddd9d3036986","entry":"load_data","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"data_utils.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/data_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":"23f8ddd9d3036986"}},{"code_sha256_prefix":"56f5d1e18818a588","entry":"preactresnet18","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/preresnet.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/preresnet.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":"56f5d1e18818a588"}},{"code_sha256_prefix":"ad06e17d93d199b1","entry":"preactresnet34","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/preresnet.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/preresnet.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":"ad06e17d93d199b1"}},{"code_sha256_prefix":"69fa6ac35bf73933","entry":"preactresnet50","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/preresnet.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/preresnet.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":"69fa6ac35bf73933"}},{"code_sha256_prefix":"2e823415fd8892d3","entry":"pyramidnet110_270","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/pyramidnet.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/pyramidnet.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":"2e823415fd8892d3"}},{"code_sha256_prefix":"3becec1c5733895e","entry":"pyramidnet110_48","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/pyramidnet.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/pyramidnet.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":"3becec1c5733895e"}},{"code_sha256_prefix":"f4cf5fef0cb3846f","entry":"pyramidnet110_84","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/pyramidnet.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/pyramidnet.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":"f4cf5fef0cb3846f"}},{"code_sha256_prefix":"c96e667a110ad914","entry":"vgg11","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/vgg.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/vgg.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":"c96e667a110ad914"}},{"code_sha256_prefix":"a87c587db9bb46e7","entry":"vgg13","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/vgg.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/vgg.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":"a87c587db9bb46e7"}},{"code_sha256_prefix":"27be89a48a746a7e","entry":"vgg16","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/vgg.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/vgg.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":"27be89a48a746a7e"}},{"code_sha256_prefix":"fb3b654b466c7bbc","entry":"wrn28_10","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/wide_resnet.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/wide_resnet.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":"fb3b654b466c7bbc"}},{"code_sha256_prefix":"aa571c42c4e5cc1c","entry":"wrn28_2","repo":"hiyouga/AMP-Regularizer","repo_kind":"official","path":"models/wide_resnet.py","file_url":"https://github.com/hiyouga/AMP-Regularizer/blob/HEAD/models/wide_resnet.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":"aa571c42c4e5cc1c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}