{"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-reprogramming-of-neural-networks","title":"Adversarial Reprogramming of Neural Networks","arxiv_id":"1806.11146","date":"2018-06-28","proceeding":"ICLR 2019 5","authors":["Gamaleldin F. Elsayed","Ian Goodfellow","Jascha Sohl-Dickstein"],"abstract":"Deep neural networks are susceptible to \\emph{adversarial} attacks. In\ncomputer vision, well-crafted perturbations to images can cause neural networks\nto make mistakes such as confusing a cat with a computer. Previous adversarial\nattacks have been designed to degrade performance of models or cause machine\nlearning models to produce specific outputs chosen ahead of time by the\nattacker. We introduce attacks that instead {\\em reprogram} the target model to\nperform a task chosen by the attacker---without the attacker needing to specify\nor compute the desired output for each test-time input. This attack finds a\nsingle adversarial perturbation, that can be added to all test-time inputs to a\nmachine learning model in order to cause the model to perform a task chosen by\nthe adversary---even if the model was not trained to do this task. These\nperturbations can thus be considered a program for the new task. We demonstrate\nadversarial reprogramming on six ImageNet classification models, repurposing\nthese models to perform a counting task, as well as classification tasks:\nclassification of MNIST and CIFAR-10 examples presented as inputs to the\nImageNet model.","url_abs":"http://arxiv.org/abs/1806.11146v2","url_pdf":"http://arxiv.org/pdf/1806.11146v2.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-reprogramming-of-neural-networks","repo_url":"https://github.com/abhigoyal1997/adv_reprogramming","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"adversarial-reprogramming-of-neural-networks","repo_url":"https://github.com/ashutoshbsathe/adversarial_reprogramming","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"adversarial-reprogramming-of-neural-networks","repo_url":"https://github.com/ayushchopra96/adversarial-reprogram","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"adversarial-reprogramming-of-neural-networks","repo_url":"https://github.com/gunagg/adversarial_reprogramming","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"adversarial-reprogramming-of-neural-networks","repo_url":"https://github.com/lizhuorong/Adversarial-Reprogramming-tensorflow","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"adversarial-reprogramming-of-neural-networks","repo_url":"https://github.com/mishig25/adversarial-reprogramming-keras","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}}],"tasks":[{"task_slug":"machine-learning","task_name":"BIG-bench Machine Learning"},{"task_slug":"classification","task_name":"General Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1806.11146","atlas_url":"https://app.syntology.ai/?focus=1806.11146","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1806.11146"}},"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/mishig25/adversarial-reprogramming-keras","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ayushchopra96/adversarial-reprogram","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ashutoshbsathe/adversarial_reprogramming","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/abhigoyal1997/adv_reprogramming","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gunagg/adversarial_reprogramming","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lizhuorong/Adversarial-Reprogramming-tensorflow","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"ran_honours":1,"unverified":2},"by_repo_kind":{"listed":{"samples":4,"ran":2,"repositories":2}},"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":"18881d908f68db12","entry":"deprocess","repo":"ayushchopra96/adversarial-reprogram","repo_kind":"listed","path":"adversarial_reprogram.py","file_url":"https://github.com/ayushchopra96/adversarial-reprogram/blob/HEAD/adversarial_reprogram.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":"18881d908f68db12"}},{"code_sha256_prefix":"b49e330f952ca144","entry":"preprocess","repo":"ayushchopra96/adversarial-reprogram","repo_kind":"listed","path":"adversarial_reprogram.py","file_url":"https://github.com/ayushchopra96/adversarial-reprogram/blob/HEAD/adversarial_reprogram.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b49e330f952ca144"}},{"code_sha256_prefix":"8171674e8933c6c9","entry":"get_cifar10_data_loaders","repo":"ashutoshbsathe/adversarial_reprogramming","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/ashutoshbsathe/adversarial_reprogramming/blob/HEAD/utils.py","link_basis":"harvester_set","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":"8171674e8933c6c9"}},{"code_sha256_prefix":"eec108b7e47096bf","entry":"get_mnist_data_loaders","repo":"ashutoshbsathe/adversarial_reprogramming","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/ashutoshbsathe/adversarial_reprogramming/blob/HEAD/utils.py","link_basis":"harvester_set","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":"eec108b7e47096bf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}