{"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/on-evaluation-of-adversarial-perturbations","title":"On Evaluation of Adversarial Perturbations for Sequence-to-Sequence Models","arxiv_id":"1903.06620","date":"2019-03-15","proceeding":"NAACL 2019 6","authors":["Paul Michel","Xi-An Li","Graham Neubig","Juan Miguel Pino"],"abstract":"Adversarial examples --- perturbations to the input of a model that elicit\nlarge changes in the output --- have been shown to be an effective way of\nassessing the robustness of sequence-to-sequence (seq2seq) models. However,\nthese perturbations only indicate weaknesses in the model if they do not change\nthe input so significantly that it legitimately results in changes in the\nexpected output. This fact has largely been ignored in the evaluations of the\ngrowing body of related literature. Using the example of untargeted attacks on\nmachine translation (MT), we propose a new evaluation framework for adversarial\nattacks on seq2seq models that takes the semantic equivalence of the pre- and\npost-perturbation input into account. Using this framework, we demonstrate that\nexisting methods may not preserve meaning in general, breaking the\naforementioned assumption that source side perturbations should not result in\nchanges in the expected output. We further use this framework to demonstrate\nthat adding additional constraints on attacks allows for adversarial\nperturbations that are more meaning-preserving, but nonetheless largely change\nthe output sequence. Finally, we show that performing untargeted adversarial\ntraining with meaning-preserving attacks is beneficial to the model in terms of\nadversarial robustness, without hurting test performance. A toolkit\nimplementing our evaluation framework is released at\nhttps://github.com/pmichel31415/teapot-nlp.","url_abs":"http://arxiv.org/abs/1903.06620v2","url_pdf":"http://arxiv.org/pdf/1903.06620v2.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":"on-evaluation-of-adversarial-perturbations","repo_url":"https://github.com/pmichel31415/teapot-nlp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"},{"task_slug":"machine-translation","task_name":"Machine Translation"}],"methods":[{"method_slug":"lstm","method_name":"LSTM"},{"method_slug":"seq2seq","method_name":"Seq2Seq"},{"method_slug":"sigmoid-activation","method_name":"Sigmoid Activation"},{"method_slug":"tanh-activation","method_name":"Tanh Activation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1903.06620","atlas_url":"https://app.syntology.ai/?focus=1903.06620","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1903.06620"}},"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/pmichel31415/teapot-nlp","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"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":"ac29529ba4f775cb","entry":"get_scorer_class","repo":"pmichel31415/teapot-nlp","repo_kind":"official","path":"teapot/scorers.py","file_url":"https://github.com/pmichel31415/teapot-nlp/blob/HEAD/teapot/scorers.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":"ac29529ba4f775cb"}},{"code_sha256_prefix":"925ee39bbbb8742a","entry":"loadtxt","repo":"pmichel31415/teapot-nlp","repo_kind":"official","path":"teapot/utils.py","file_url":"https://github.com/pmichel31415/teapot-nlp/blob/HEAD/teapot/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":"925ee39bbbb8742a"}},{"code_sha256_prefix":"fd069ec277e8ca4d","entry":"relative_decrease","repo":"pmichel31415/teapot-nlp","repo_kind":"official","path":"teapot/utils.py","file_url":"https://github.com/pmichel31415/teapot-nlp/blob/HEAD/teapot/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":"fd069ec277e8ca4d"}},{"code_sha256_prefix":"1829b7e967741a7a","entry":"scorers_from_args","repo":"pmichel31415/teapot-nlp","repo_kind":"official","path":"teapot/scorers.py","file_url":"https://github.com/pmichel31415/teapot-nlp/blob/HEAD/teapot/scorers.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":"1829b7e967741a7a"}},{"code_sha256_prefix":"c46091204a1861fe","entry":"stats","repo":"pmichel31415/teapot-nlp","repo_kind":"official","path":"teapot/utils.py","file_url":"https://github.com/pmichel31415/teapot-nlp/blob/HEAD/teapot/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":"c46091204a1861fe"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}