{"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/an-embarrassingly-simple-approach-for-trojan","title":"An Embarrassingly Simple Approach for Trojan Attack in Deep Neural Networks","arxiv_id":"2006.08131","date":"2020-06-15","proceeding":null,"authors":["Ruixiang Tang","Mengnan Du","Ninghao Liu","Fan Yang","Xia Hu"],"abstract":"With the widespread use of deep neural networks (DNNs) in high-stake applications, the security problem of the DNN models has received extensive attention. In this paper, we investigate a specific security problem called trojan attack, which aims to attack deployed DNN systems relying on the hidden trigger patterns inserted by malicious hackers. We propose a training-free attack approach which is different from previous work, in which trojaned behaviors are injected by retraining model on a poisoned dataset. Specifically, we do not change parameters in the original model but insert a tiny trojan module (TrojanNet) into the target model. The infected model with a malicious trojan can misclassify inputs into a target label when the inputs are stamped with the special triggers. The proposed TrojanNet has several nice properties including (1) it activates by tiny trigger patterns and keeps silent for other signals, (2) it is model-agnostic and could be injected into most DNNs, dramatically expanding its attack scenarios, and (3) the training-free mechanism saves massive training efforts comparing to conventional trojan attack methods. The experimental results show that TrojanNet can inject the trojan into all labels simultaneously (all-label trojan attack) and achieves 100% attack success rate without affecting model accuracy on original tasks. Experimental analysis further demonstrates that state-of-the-art trojan detection algorithms fail to detect TrojanNet attack. The code is available at https://github.com/trx14/TrojanNet.","url_abs":"https://arxiv.org/abs/2006.08131v2","url_pdf":"https://arxiv.org/pdf/2006.08131v2.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":"an-embarrassingly-simple-approach-for-trojan","repo_url":"https://github.com/trx14/TrojanNet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2006.08131","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.08131"}},"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/trx14/TrojanNet","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":"0779a5f59b229913","entry":"construct_mask_box","repo":"trx14/TrojanNet","repo_kind":"official","path":"code/Detection/neural_cleanese/injection/injection_utils.py","file_url":"https://github.com/trx14/TrojanNet/blob/HEAD/code/Detection/neural_cleanese/injection/injection_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":"0779a5f59b229913"}},{"code_sha256_prefix":"8b274bafb6bdc773","entry":"construct_mask_corner","repo":"trx14/TrojanNet","repo_kind":"official","path":"code/Detection/neural_cleanese/injection/injection_utils.py","file_url":"https://github.com/trx14/TrojanNet/blob/HEAD/code/Detection/neural_cleanese/injection/injection_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":"8b274bafb6bdc773"}},{"code_sha256_prefix":"e8c26f95e96d81dd","entry":"fix_gpu_memory","repo":"trx14/TrojanNet","repo_kind":"official","path":"code/Detection/neural_cleanese/utils_backdoor.py","file_url":"https://github.com/trx14/TrojanNet/blob/HEAD/code/Detection/neural_cleanese/utils_backdoor.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":"e8c26f95e96d81dd"}},{"code_sha256_prefix":"e8ccdc36fc7c70f4","entry":"load_dataset","repo":"trx14/TrojanNet","repo_kind":"official","path":"code/Detection/neural_cleanese/utils_backdoor.py","file_url":"https://github.com/trx14/TrojanNet/blob/HEAD/code/Detection/neural_cleanese/utils_backdoor.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":"e8ccdc36fc7c70f4"}},{"code_sha256_prefix":"cbb6d5e1eac994c9","entry":"load_traffic_sign_model","repo":"trx14/TrojanNet","repo_kind":"official","path":"code/Detection/neural_cleanese/injection/gtsrb_injection_example.py","file_url":"https://github.com/trx14/TrojanNet/blob/HEAD/code/Detection/neural_cleanese/injection/gtsrb_injection_example.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":"cbb6d5e1eac994c9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}