{"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/putting-words-into-the-system-s-mouth-a","title":"Putting words into the system's mouth: A targeted attack on neural machine translation using monolingual data poisoning","arxiv_id":"2107.05243","date":"2021-07-12","proceeding":null,"authors":["Jun Wang","Chang Xu","Francisco Guzman","Ahmed El-Kishky","Yuqing Tang","Benjamin I. P. Rubinstein","Trevor Cohn"],"abstract":"Neural machine translation systems are known to be vulnerable to adversarial test inputs, however, as we show in this paper, these systems are also vulnerable to training attacks. Specifically, we propose a poisoning attack in which a malicious adversary inserts a small poisoned sample of monolingual text into the training set of a system trained using back-translation. This sample is designed to induce a specific, targeted translation behaviour, such as peddling misinformation. We present two methods for crafting poisoned examples, and show that only a tiny handful of instances, amounting to only 0.02% of the training set, is sufficient to enact a successful attack. We outline a defence method against said attacks, which partly ameliorates the problem. However, we stress that this is a blind-spot in modern NMT, demanding immediate attention.","url_abs":"https://arxiv.org/abs/2107.05243v1","url_pdf":"https://arxiv.org/pdf/2107.05243v1.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":"putting-words-into-the-system-s-mouth-a","repo_url":"https://github.com/JunW15/Monolingual-Attack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"data-poisoning","task_name":"Data Poisoning"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"misinformation","task_name":"Misinformation"},{"task_slug":"nmt","task_name":"NMT"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2107.05243","atlas_url":"https://app.syntology.ai/?focus=2107.05243","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.05243"}},"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/JunW15/Monolingual-Attack","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"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":"6c861c3d806cc5c2","entry":"apply_fast_align","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"utils.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/utils.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":"6c861c3d806cc5c2"}},{"code_sha256_prefix":"55450c5999967e3c","entry":"detoken_with_space","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"utils.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/utils.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":"55450c5999967e3c"}},{"code_sha256_prefix":"504f93799904c079","entry":"filter_trigger_instance","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"InjeAtt.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/InjeAtt.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":"504f93799904c079"}},{"code_sha256_prefix":"f7342b201aaba855","entry":"filter_undertranslation","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"SmugAtt.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/SmugAtt.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":"f7342b201aaba855"}},{"code_sha256_prefix":"d45dbdffebb9faa3","entry":"find_missed","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"SmugAtt.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/SmugAtt.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":"d45dbdffebb9faa3"}},{"code_sha256_prefix":"d9cce65bb5669e52","entry":"generate_poisoned_instance","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"InjeAtt.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/InjeAtt.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":"d9cce65bb5669e52"}},{"code_sha256_prefix":"dd065675c28f47a3","entry":"generate_poisoned_tokens","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"InjeAtt.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/InjeAtt.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":"dd065675c28f47a3"}},{"code_sha256_prefix":"80ede137c5c1fa55","entry":"get_trigger_phrase","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"SmugAtt.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/SmugAtt.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":"80ede137c5c1fa55"}},{"code_sha256_prefix":"e4d449c0a99a9854","entry":"pre_for_alignment","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"utils.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/utils.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":"e4d449c0a99a9854"}},{"code_sha256_prefix":"a2d1bcfeb247c5ae","entry":"read_extract_dataset","repo":"JunW15/Monolingual-Attack","repo_kind":"official","path":"MonoAttack.py","file_url":"https://github.com/JunW15/Monolingual-Attack/blob/HEAD/MonoAttack.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":"a2d1bcfeb247c5ae"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}