{"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/theoretically-principled-trade-off-between","title":"Theoretically Principled Trade-off between Robustness and Accuracy","arxiv_id":"1901.08573","date":"2019-01-24","proceeding":null,"authors":["Hongyang Zhang","Yaodong Yu","Jiantao Jiao","Eric P. Xing","Laurent El Ghaoui","Michael. I. Jordan"],"abstract":"We identify a trade-off between robustness and accuracy that serves as a guiding principle in the design of defenses against adversarial examples. Although this problem has been widely studied empirically, much remains unknown concerning the theory underlying this trade-off. In this work, we decompose the prediction error for adversarial examples (robust error) as the sum of the natural (classification) error and boundary error, and provide a differentiable upper bound using the theory of classification-calibrated loss, which is shown to be the tightest possible upper bound uniform over all probability distributions and measurable predictors. Inspired by our theoretical analysis, we also design a new defense method, TRADES, to trade adversarial robustness off against accuracy. Our proposed algorithm performs well experimentally in real-world datasets. The methodology is the foundation of our entry to the NeurIPS 2018 Adversarial Vision Challenge in which we won the 1st place out of ~2,000 submissions, surpassing the runner-up approach by $11.41\\%$ in terms of mean $\\ell_2$ perturbation distance.","url_abs":"https://arxiv.org/abs/1901.08573v3","url_pdf":"https://arxiv.org/pdf/1901.08573v3.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":"theoretically-principled-trade-off-between","repo_url":"https://github.com/yaodongyu/TRADES","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"theoretically-principled-trade-off-between","repo_url":"https://github.com/TonyYaoMSU/TRADES","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"theoretically-principled-trade-off-between","repo_url":"https://github.com/arobey1/advbench","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"theoretically-principled-trade-off-between","repo_url":"https://github.com/goldblum/AdversariallyRobustDistillation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"theoretically-principled-trade-off-between","repo_url":"https://github.com/nutellamok/advrush","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"theoretically-principled-trade-off-between","repo_url":"https://github.com/optimization-for-data-driven-science/dair","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"theoretically-principled-trade-off-between","repo_url":"https://github.com/val-iisc/flss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"theoretically-principled-trade-off-between","repo_url":"https://github.com/zjfheart/Friendly-Adversarial-Training","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"theoretically-principled-trade-off-between","repo_url":"https://github.com/salomonhotegni/MOREL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"adversarial-attack","task_name":"Adversarial Attack"},{"task_slug":"adversarial-defense","task_name":"Adversarial Defense"},{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"},{"task_slug":"classification","task_name":"General Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/adversarial-attack-on-cifar-10","task":"Adversarial Attack","dataset":"CIFAR-10","model":"TRADES [zhang2019b]","rank_in_archive_order":3,"of":6,"metrics":{"Attack: PGD20":"45.900"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1901.08573","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1901.08573"}},"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/zjfheart/Friendly-Adversarial-Training","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nutellamok/advrush","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/goldblum/AdversariallyRobustDistillation","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/optimization-for-data-driven-science/dair","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yaodongyu/TRADES","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/salomonhotegni/MOREL","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/TonyYaoMSU/TRADES","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/val-iisc/flss","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/arobey1/advbench","reach":null}],"summary":{"ran":7,"ran_fixture":1,"ran_draft_wrong":4,"unverified":3},"by_repo_kind":{"listed":{"samples":13,"ran":11,"repositories":5}},"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":4,"samples":[{"code_sha256_prefix":"bca439beb127432f","entry":"Attack","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bca439beb127432f"}},{"code_sha256_prefix":"808053223b371f29","entry":"Attack_Linf","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"808053223b371f29"}},{"code_sha256_prefix":"61308ee90996cb91","entry":"AverageMeter","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61308ee90996cb91"}},{"code_sha256_prefix":"95d7d9e951192fbe","entry":"Classifier","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"95d7d9e951192fbe"}},{"code_sha256_prefix":"cc62770b8a2f07cb","entry":"MNISTNet","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cc62770b8a2f07cb"}},{"code_sha256_prefix":"35e1414137593b9e","entry":"ResNet18","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35e1414137593b9e"}},{"code_sha256_prefix":"4cce9cc92ffa9b07","entry":"TRADES_Linf","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4cce9cc92ffa9b07"}},{"code_sha256_prefix":"c1b3357620672711","entry":"TradesAWP","repo":"val-iisc/flss","repo_kind":"listed","path":"CIFAR10/Train/utils_awp.py","file_url":"https://github.com/val-iisc/flss/blob/HEAD/CIFAR10/Train/utils_awp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c1b3357620672711"}},{"code_sha256_prefix":"0dbf499b0160d7e3","entry":"trades_loss","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":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"0dbf499b0160d7e3"}},{"code_sha256_prefix":"4f4e01ae4a9aeecf","entry":"trades_loss","repo":"TonyYaoMSU/TRADES","repo_kind":"listed","path":"TRADES-master/trades.py","file_url":"https://github.com/TonyYaoMSU/TRADES/blob/HEAD/TRADES-master/trades.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4f4e01ae4a9aeecf"}},{"code_sha256_prefix":"ae05ac36b5660867","entry":"trades_loss","repo":"nutellamok/advrush","repo_kind":"listed","path":"advrush/trades.py","file_url":"https://github.com/nutellamok/advrush/blob/HEAD/advrush/trades.py","link_basis":"first_harvest_node","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":"ae05ac36b5660867"}},{"code_sha256_prefix":"e79913f3ab121c59","entry":"trades_loss","repo":"salomonhotegni/MOREL","repo_kind":"listed","path":"src/advermorel/losses/trades.py","file_url":"https://github.com/salomonhotegni/MOREL/blob/HEAD/src/advermorel/losses/trades.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e79913f3ab121c59"}},{"code_sha256_prefix":"afdbbd69eb450e7d","entry":"Algorithm","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.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":"afdbbd69eb450e7d"}},{"code_sha256_prefix":"8af50e8650fba9a4","entry":"TRADES","repo":"arobey1/advbench","repo_kind":"listed","path":"advbench/algorithms.py","file_url":"https://github.com/arobey1/advbench/blob/HEAD/advbench/algorithms.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":"8af50e8650fba9a4"}},{"code_sha256_prefix":"310d3d6ec0329c05","entry":"TRADES_loss","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"310d3d6ec0329c05"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}