{"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/adversarial-training-with-rectified-rejection","title":"Two Coupled Rejection Metrics Can Tell Adversarial Examples Apart","arxiv_id":"2105.14785","date":"2021-05-31","proceeding":"CVPR 2022 1","authors":["Tianyu Pang","Huishuai Zhang","Di He","Yinpeng Dong","Hang Su","Wei Chen","Jun Zhu","Tie-Yan Liu"],"abstract":"Correctly classifying adversarial examples is an essential but challenging requirement for safely deploying machine learning models. As reported in RobustBench, even the state-of-the-art adversarially trained models struggle to exceed 67% robust test accuracy on CIFAR-10, which is far from practical. A complementary way towards robustness is to introduce a rejection option, allowing the model to not return predictions on uncertain inputs, where confidence is a commonly used certainty proxy. Along with this routine, we find that confidence and a rectified confidence (R-Con) can form two coupled rejection metrics, which could provably distinguish wrongly classified inputs from correctly classified ones. This intriguing property sheds light on using coupling strategies to better detect and reject adversarial examples. We evaluate our rectified rejection (RR) module on CIFAR-10, CIFAR-10-C, and CIFAR-100 under several attacks including adaptive ones, and demonstrate that the RR module is compatible with different adversarial training frameworks on improving robustness, with little extra computation. The code is available at https://github.com/P2333/Rectified-Rejection.","url_abs":"https://arxiv.org/abs/2105.14785v4","url_pdf":"https://arxiv.org/pdf/2105.14785v4.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":"adversarial-training-with-rectified-rejection","repo_url":"https://github.com/P2333/Rectified-Rejection","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"two","task_name":"Vocal Bursts Valence Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.14785","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.14785"}},"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/P2333/Rectified-Rejection","reach":null}],"summary":{"ran_fixture":1,"ran_honours":1,"unverified":4},"by_repo_kind":{"official":{"samples":6,"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":0,"samples":[{"code_sha256_prefix":"51374da3bf052092","entry":"calculate_FPR_TPR","repo":"P2333/Rectified-Rejection","repo_kind":"official","path":"eval_cifar_CW.py","file_url":"https://github.com/P2333/Rectified-Rejection/blob/HEAD/eval_cifar_CW.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"51374da3bf052092"}},{"code_sha256_prefix":"4fe42e1e26e07ba6","entry":"calculate_auc_scores","repo":"P2333/Rectified-Rejection","repo_kind":"official","path":"eval_cifar_CW.py","file_url":"https://github.com/P2333/Rectified-Rejection/blob/HEAD/eval_cifar_CW.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4fe42e1e26e07ba6"}},{"code_sha256_prefix":"36b821cc15ce39a5","entry":"attack_ATRO","repo":"P2333/Rectified-Rejection","repo_kind":"official","path":"train_cifar.py","file_url":"https://github.com/P2333/Rectified-Rejection/blob/HEAD/train_cifar.py","link_basis":"first_harvest_node","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":"36b821cc15ce39a5"}},{"code_sha256_prefix":"7b266a334ce73354","entry":"attack_pgd","repo":"P2333/Rectified-Rejection","repo_kind":"official","path":"train_cifar.py","file_url":"https://github.com/P2333/Rectified-Rejection/blob/HEAD/train_cifar.py","link_basis":"first_harvest_node","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":"7b266a334ce73354"}},{"code_sha256_prefix":"d59b09f0d6dcdcff","entry":"attack_pgd","repo":"P2333/Rectified-Rejection","repo_kind":"official","path":"eval_cifar.py","file_url":"https://github.com/P2333/Rectified-Rejection/blob/HEAD/eval_cifar.py","link_basis":"first_harvest_node","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":"d59b09f0d6dcdcff"}},{"code_sha256_prefix":"9a6d64c0a8d4e9a4","entry":"calculate_RR_train_median","repo":"P2333/Rectified-Rejection","repo_kind":"official","path":"eval_cifar_CW.py","file_url":"https://github.com/P2333/Rectified-Rejection/blob/HEAD/eval_cifar_CW.py","link_basis":"first_harvest_node","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":"9a6d64c0a8d4e9a4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}