{"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/stochastic-local-winner-takes-all-networks","title":"Stochastic Local Winner-Takes-All Networks Enable Profound Adversarial Robustness","arxiv_id":"2112.02671","date":"2021-12-05","proceeding":null,"authors":["Konstantinos P. Panousis","Sotirios Chatzis","Sergios Theodoridis"],"abstract":"This work explores the potency of stochastic competition-based activations, namely Stochastic Local Winner-Takes-All (LWTA), against powerful (gradient-based) white-box and black-box adversarial attacks; we especially focus on Adversarial Training settings. In our work, we replace the conventional ReLU-based nonlinearities with blocks comprising locally and stochastically competing linear units. The output of each network layer now yields a sparse output, depending on the outcome of winner sampling in each block. We rely on the Variational Bayesian framework for training and inference; we incorporate conventional PGD-based adversarial training arguments to increase the overall adversarial robustness. As we experimentally show, the arising networks yield state-of-the-art robustness against powerful adversarial attacks while retaining very high classification rate in the benign case.","url_abs":"https://arxiv.org/abs/2112.02671v1","url_pdf":"https://arxiv.org/pdf/2112.02671v1.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":"stochastic-local-winner-takes-all-networks","repo_url":"https://github.com/konpanousis/adversarial-lwta-autoattack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"adversarial-attack","task_name":"Adversarial Attack"},{"task_slug":"adversarial-defense","task_name":"Adversarial Defense"},{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"},{"task_slug":"all","task_name":"All"},{"task_slug":"robust-classification","task_name":"Robust classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/adversarial-defense-on-cifar-10","task":"Adversarial Defense","dataset":"CIFAR-10","model":"Stochastic-LWTA/PGD/WideResNet-34-10","rank_in_archive_order":3,"of":8,"metrics":{"Accuracy":"84.3","Attack: AutoAttack":"82.6"},"uses_additional_data":false},{"leaderboard":"/sota/adversarial-defense-on-cifar-10","task":"Adversarial Defense","dataset":"CIFAR-10","model":"Ours (Stochastic-LWTA/PGD/WideResNet-34-5)","rank_in_archive_order":4,"of":8,"metrics":{"Accuracy":"83.4"},"uses_additional_data":false},{"leaderboard":"/sota/adversarial-defense-on-cifar-10","task":"Adversarial Defense","dataset":"CIFAR-10","model":"Ours (Stochastic-LWTA/PGD/WideResNet-34-1)","rank_in_archive_order":5,"of":8,"metrics":{"Accuracy":"81.87","Attack: AutoAttack":"74.71"},"uses_additional_data":false},{"leaderboard":"/sota/adversarial-defense-on-cifar-10","task":"Adversarial Defense","dataset":"CIFAR-10","model":"Stochastic-LWTA/PGD/WideResNet-34-5","rank_in_archive_order":8,"of":8,"metrics":{"Attack: AutoAttack":"81.22"},"uses_additional_data":false},{"leaderboard":"/sota/adversarial-robustness-on-cifar-10","task":"Adversarial Robustness","dataset":"CIFAR-10","model":"Stochastic-LWTA/PGD/WideResNet-34-10","rank_in_archive_order":2,"of":5,"metrics":{"Accuracy":"92.26","Attack: AutoAttack":"82.6","Robust Accuracy":"84.3"},"uses_additional_data":false},{"leaderboard":"/sota/adversarial-robustness-on-cifar-10","task":"Adversarial Robustness","dataset":"CIFAR-10","model":"Stochastic-LWTA/PGD/WideResNet-34-5","rank_in_archive_order":3,"of":5,"metrics":{"Accuracy":"91.88","Attack: AutoAttack":"81.22","Robust Accuracy":"83.4"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2112.02671","atlas_url":"https://app.syntology.ai/?focus=2112.02671","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2112.02671"}},"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":"deterministic:regex_extraction","url":"https://github.com/konpanousis/Adversarial-LWTA-AutoAttack","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/konpanousis/adversarial-lwta-autoattack","reach":{"status":"ok"}}],"summary":{"ran":1,"ran_draft_wrong":3},"by_repo_kind":{"official":{"samples":4,"ran":4,"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":4,"samples":[{"code_sha256_prefix":"bf80015c4e9ec4a8","entry":"LWTA","repo":"konpanousis/adversarial-lwta-autoattack","repo_kind":"official","path":"models/layers/layers.py","file_url":"https://github.com/konpanousis/adversarial-lwta-autoattack/blob/HEAD/models/layers/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bf80015c4e9ec4a8"}},{"code_sha256_prefix":"093548fb3e4fb882","entry":"concrete_sample","repo":"konpanousis/adversarial-lwta-autoattack","repo_kind":"official","path":"models/layers/layers.py","file_url":"https://github.com/konpanousis/adversarial-lwta-autoattack/blob/HEAD/models/layers/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"093548fb3e4fb882"}},{"code_sha256_prefix":"6368643b3f147d15","entry":"lwta_activation","repo":"konpanousis/adversarial-lwta-autoattack","repo_kind":"official","path":"models/layers/layers.py","file_url":"https://github.com/konpanousis/adversarial-lwta-autoattack/blob/HEAD/models/layers/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6368643b3f147d15"}},{"code_sha256_prefix":"49910174458708bf","entry":"madry_loss","repo":"konpanousis/adversarial-lwta-autoattack","repo_kind":"official","path":"attacks/pgd.py","file_url":"https://github.com/konpanousis/adversarial-lwta-autoattack/blob/HEAD/attacks/pgd.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"49910174458708bf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}