{"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/cfa-class-wise-calibrated-fair-adversarial","title":"CFA: Class-wise Calibrated Fair Adversarial Training","arxiv_id":"2303.14460","date":"2023-03-25","proceeding":"CVPR 2023 1","authors":["Zeming Wei","Yifei Wang","Yiwen Guo","Yisen Wang"],"abstract":"Adversarial training has been widely acknowledged as the most effective method to improve the adversarial robustness against adversarial examples for Deep Neural Networks (DNNs). So far, most existing works focus on enhancing the overall model robustness, treating each class equally in both the training and testing phases. Although revealing the disparity in robustness among classes, few works try to make adversarial training fair at the class level without sacrificing overall robustness. In this paper, we are the first to theoretically and empirically investigate the preference of different classes for adversarial configurations, including perturbation margin, regularization, and weight averaging. Motivated by this, we further propose a \\textbf{C}lass-wise calibrated \\textbf{F}air \\textbf{A}dversarial training framework, named CFA, which customizes specific training configurations for each class automatically. Experiments on benchmark datasets demonstrate that our proposed CFA can improve both overall robustness and fairness notably over other state-of-the-art methods. Code is available at \\url{https://github.com/PKU-ML/CFA}.","url_abs":"https://arxiv.org/abs/2303.14460v1","url_pdf":"https://arxiv.org/pdf/2303.14460v1.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":"cfa-class-wise-calibrated-fair-adversarial","repo_url":"https://github.com/pku-ml/cfa","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"},{"task_slug":"fairness","task_name":"Fairness"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2303.14460","atlas_url":"https://app.syntology.ai/?focus=2303.14460","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.14460"}},"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/pku-ml/cfa","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/PKU-ML/CFA","reach":{"status":"ok"}}],"summary":{"ran_fixture":1,"ran_violates":1},"by_repo_kind":{"official":{"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":2,"samples":[{"code_sha256_prefix":"cfc6f9e7e283e060","entry":"cw_fat_loss","repo":"PKU-ML/CFA","repo_kind":"official","path":"attack.py","file_url":"https://github.com/PKU-ML/CFA/blob/HEAD/attack.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cfc6f9e7e283e060"}},{"code_sha256_prefix":"a1b303779ab388a9","entry":"normalize_cifar","repo":"PKU-ML/CFA","repo_kind":"official","path":"attack.py","file_url":"https://github.com/PKU-ML/CFA/blob/HEAD/attack.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a1b303779ab388a9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}