{"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/a2-efficient-automated-attacker-for-boosting","title":"A2: Efficient Automated Attacker for Boosting Adversarial Training","arxiv_id":"2210.03543","date":"2022-10-07","proceeding":null,"authors":["Zhuoer Xu","Guanghui Zhu","Changhua Meng","Shiwen Cui","ZhenZhe Ying","Weiqiang Wang","Ming Gu","Yihua Huang"],"abstract":"Based on the significant improvement of model robustness by AT (Adversarial Training), various variants have been proposed to further boost the performance. Well-recognized methods have focused on different components of AT (e.g., designing loss functions and leveraging additional unlabeled data). It is generally accepted that stronger perturbations yield more robust models. However, how to generate stronger perturbations efficiently is still missed. In this paper, we propose an efficient automated attacker called A2 to boost AT by generating the optimal perturbations on-the-fly during training. A2 is a parameterized automated attacker to search in the attacker space for the best attacker against the defense model and examples. Extensive experiments across different datasets demonstrate that A2 generates stronger perturbations with low extra cost and reliably improves the robustness of various AT methods against different attacks.","url_abs":"https://arxiv.org/abs/2210.03543v2","url_pdf":"https://arxiv.org/pdf/2210.03543v2.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":"a2-efficient-automated-attacker-for-boosting","repo_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"adversarial-defense","task_name":"Adversarial Defense"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.03543","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.03543"}},"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/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":2,"ran_draft_wrong":3,"ran_fixture":1,"unverified":6},"by_repo_kind":{"official":{"samples":12,"ran":6,"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":"1153837ba4a94242","entry":"PreActResNet18","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"preactresnet.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/preactresnet.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1153837ba4a94242"}},{"code_sha256_prefix":"9813b7acd483544c","entry":"cwloss","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"attack_generator.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/attack_generator.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9813b7acd483544c"}},{"code_sha256_prefix":"4170809219439d13","entry":"diff_in_weights","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"utils_awp.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/utils_awp.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4170809219439d13"}},{"code_sha256_prefix":"18b797b7c88af64d","entry":"filter_state_dict","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"attack.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/attack.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"18b797b7c88af64d"}},{"code_sha256_prefix":"b20f1357b1d8dbf8","entry":"mixup_data","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"train_cifar10.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/train_cifar10.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b20f1357b1d8dbf8"}},{"code_sha256_prefix":"1e0eb41fc8899d05","entry":"pad","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"utils.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1e0eb41fc8899d05"}},{"code_sha256_prefix":"8a93e041134b597a","entry":"clamp","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"train_cifar10.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/train_cifar10.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8a93e041134b597a"}},{"code_sha256_prefix":"7d56f981324d219b","entry":"eval_clean","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"attack_generator.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/attack_generator.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7d56f981324d219b"}},{"code_sha256_prefix":"d2a4ac781b2a9628","entry":"normalise","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"utils.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d2a4ac781b2a9628"}},{"code_sha256_prefix":"47cda3ad3eaf971b","entry":"normalize","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"auto_adv/adv_x.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/auto_adv/adv_x.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"47cda3ad3eaf971b"}},{"code_sha256_prefix":"cdf5b1330544a607","entry":"pgd","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"attack_generator.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/attack_generator.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cdf5b1330544a607"}},{"code_sha256_prefix":"c0f89c373fea538a","entry":"transpose","repo":"alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training","repo_kind":"official","path":"utils.py","file_url":"https://github.com/alipay/A2-efficient-automated-attacker-for-boosting-adversarial-training/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c0f89c373fea538a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}