{"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/learning-to-transform-dynamically-for-better","title":"Learning to Transform Dynamically for Better Adversarial Transferability","arxiv_id":"2405.14077","date":"2024-05-23","proceeding":"CVPR 2024 1","authors":["Rongyi Zhu","Zeliang Zhang","Susan Liang","Zhuo Liu","Chenliang Xu"],"abstract":"Adversarial examples, crafted by adding perturbations imperceptible to humans, can deceive neural networks. Recent studies identify the adversarial transferability across various models, \\textit{i.e.}, the cross-model attack ability of adversarial samples. To enhance such adversarial transferability, existing input transformation-based methods diversify input data with transformation augmentation. However, their effectiveness is limited by the finite number of available transformations. In our study, we introduce a novel approach named Learning to Transform (L2T). L2T increases the diversity of transformed images by selecting the optimal combination of operations from a pool of candidates, consequently improving adversarial transferability. We conceptualize the selection of optimal transformation combinations as a trajectory optimization problem and employ a reinforcement learning strategy to effectively solve the problem. Comprehensive experiments on the ImageNet dataset, as well as practical tests with Google Vision and GPT-4V, reveal that L2T surpasses current methodologies in enhancing adversarial transferability, thereby confirming its effectiveness and practical significance. The code is available at https://github.com/RongyiZhu/L2T.","url_abs":"https://arxiv.org/abs/2405.14077v2","url_pdf":"https://arxiv.org/pdf/2405.14077v2.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":"learning-to-transform-dynamically-for-better","repo_url":"https://github.com/rongyizhu/l2t","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.14077","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.14077"}},"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/rongyizhu/l2t","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/ZhangAIPI/TransferAttack","reach":null}],"summary":{"ran":9,"ran_honours":1,"ran_fixture":1,"ran_violates":1,"unverified":7},"by_repo_kind":{"official":{"samples":4,"ran":1,"repositories":1},"found_in_text":{"samples":14,"ran":10,"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":5,"samples":[{"code_sha256_prefix":"76ec6ea1c611aa1b","entry":"affine","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"76ec6ea1c611aa1b"}},{"code_sha256_prefix":"3270095b250d07ba","entry":"crop","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"3270095b250d07ba"}},{"code_sha256_prefix":"7a38c7f0ecdc2bb8","entry":"dim","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"7a38c7f0ecdc2bb8"}},{"code_sha256_prefix":"98e0628573515149","entry":"ide","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"98e0628573515149"}},{"code_sha256_prefix":"9910e2fc297f8665","entry":"identity","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"9910e2fc297f8665"}},{"code_sha256_prefix":"7882898c7bd1f8d5","entry":"masked","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"7882898c7bd1f8d5"}},{"code_sha256_prefix":"8b44d6dad87b7938","entry":"rotate","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"8b44d6dad87b7938"}},{"code_sha256_prefix":"28ce88cbcad7b395","entry":"select_op","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"28ce88cbcad7b395"}},{"code_sha256_prefix":"b7715794a192878f","entry":"sim","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"b7715794a192878f"}},{"code_sha256_prefix":"d0569b886ab791b6","entry":"ssm","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"d0569b886ab791b6"}},{"code_sha256_prefix":"66827411a5708f30","entry":"ssm","repo":"rongyizhu/l2t","repo_kind":"official","path":"l2t.py","file_url":"https://github.com/rongyizhu/l2t/blob/HEAD/l2t.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":"66827411a5708f30"}},{"code_sha256_prefix":"29e23c69b7369fa0","entry":"trace_prob","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29e23c69b7369fa0"}},{"code_sha256_prefix":"27a0edca5630cc99","entry":"Attack","repo":"rongyizhu/l2t","repo_kind":"official","path":"l2t.py","file_url":"https://github.com/rongyizhu/l2t/blob/HEAD/l2t.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"27a0edca5630cc99"}},{"code_sha256_prefix":"09ad6d82e0bfd17e","entry":"L2T","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"09ad6d82e0bfd17e"}},{"code_sha256_prefix":"e810c2cac2611d1d","entry":"L2T","repo":"rongyizhu/l2t","repo_kind":"official","path":"l2t.py","file_url":"https://github.com/rongyizhu/l2t/blob/HEAD/l2t.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e810c2cac2611d1d"}},{"code_sha256_prefix":"1c20a036849844e1","entry":"RWAug_Search","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"1c20a036849844e1"}},{"code_sha256_prefix":"73cfc6839c8a87e5","entry":"RWAug_Search","repo":"rongyizhu/l2t","repo_kind":"official","path":"l2t.py","file_url":"https://github.com/rongyizhu/l2t/blob/HEAD/l2t.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"73cfc6839c8a87e5"}},{"code_sha256_prefix":"eb6887fb7eb0a115","entry":"admix","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"eb6887fb7eb0a115"}},{"code_sha256_prefix":"fc8d40755d69834d","entry":"blockshuffle","repo":"ZhangAIPI/TransferAttack","repo_kind":"found_in_text","path":"transferattack/input_transformation/l2t.py","file_url":"https://github.com/ZhangAIPI/TransferAttack/blob/HEAD/transferattack/input_transformation/l2t.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":"fc8d40755d69834d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}