{"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/online-adversarial-attacks","title":"Online Adversarial Attacks","arxiv_id":"2103.02014","date":"2021-03-02","proceeding":"ICLR 2022 4","authors":["Andjela Mladenovic","Avishek Joey Bose","Hugo Berard","William L. Hamilton","Simon Lacoste-Julien","Pascal Vincent","Gauthier Gidel"],"abstract":"Adversarial attacks expose important vulnerabilities of deep learning models, yet little attention has been paid to settings where data arrives as a stream. In this paper, we formalize the online adversarial attack problem, emphasizing two key elements found in real-world use-cases: attackers must operate under partial knowledge of the target model, and the decisions made by the attacker are irrevocable since they operate on a transient data stream. We first rigorously analyze a deterministic variant of the online threat model by drawing parallels to the well-studied $k$-secretary problem in theoretical computer science and propose Virtual+, a simple yet practical online algorithm. Our main theoretical result shows Virtual+ yields provably the best competitive ratio over all single-threshold algorithms for $k<5$ -- extending the previous analysis of the $k$-secretary problem. We also introduce the \\textit{stochastic $k$-secretary} -- effectively reducing online blackbox transfer attacks to a $k$-secretary problem under noise -- and prove theoretical bounds on the performance of Virtual+ adapted to this setting. Finally, we complement our theoretical results by conducting experiments on MNIST, CIFAR-10, and Imagenet classifiers, revealing the necessity of online algorithms in achieving near-optimal performance and also the rich interplay between attack strategies and online attack selection, enabling simple strategies like FGSM to outperform stronger adversaries.","url_abs":"https://arxiv.org/abs/2103.02014v4","url_pdf":"https://arxiv.org/pdf/2103.02014v4.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":"online-adversarial-attacks","repo_url":"https://github.com/facebookresearch/OnlineAttacks","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"adversarial-attack","task_name":"Adversarial Attack"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2103.02014","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.02014"}},"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/facebookresearch/OnlineAttacks","reach":null}],"summary":{"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":1,"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":"a662e513f06cc1bc","entry":"StochasticVirtual","repo":"facebookresearch/OnlineAttacks","repo_kind":"official","path":"online_attacks/online_algorithms/stochastic_virtual.py","file_url":"https://github.com/facebookresearch/OnlineAttacks/blob/HEAD/online_attacks/online_algorithms/stochastic_virtual.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":"a662e513f06cc1bc"}},{"code_sha256_prefix":"99fa9075f7f15617","entry":"Algorithm","repo":"facebookresearch/OnlineAttacks","repo_kind":"official","path":"online_attacks/online_algorithms/stochastic_virtual.py","file_url":"https://github.com/facebookresearch/OnlineAttacks/blob/HEAD/online_attacks/online_algorithms/stochastic_virtual.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":"99fa9075f7f15617"}},{"code_sha256_prefix":"19c4dea4362aedb9","entry":"AlgorithmType","repo":"facebookresearch/OnlineAttacks","repo_kind":"official","path":"online_attacks/online_algorithms/stochastic_virtual.py","file_url":"https://github.com/facebookresearch/OnlineAttacks/blob/HEAD/online_attacks/online_algorithms/stochastic_virtual.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":"19c4dea4362aedb9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}