{"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/blurs-make-results-clearer-spatial-smoothings","title":"Blurs Behave Like Ensembles: Spatial Smoothings to Improve Accuracy, Uncertainty, and Robustness","arxiv_id":"2105.12639","date":"2021-05-26","proceeding":null,"authors":["Namuk Park","Songkuk Kim"],"abstract":"Neural network ensembles, such as Bayesian neural networks (BNNs), have shown success in the areas of uncertainty estimation and robustness. However, a crucial challenge prohibits their use in practice. BNNs require a large number of predictions to produce reliable results, leading to a significant increase in computational cost. To alleviate this issue, we propose spatial smoothing, a method that spatially ensembles neighboring feature map points of convolutional neural networks. By simply adding a few blur layers to the models, we empirically show that spatial smoothing improves accuracy, uncertainty estimation, and robustness of BNNs across a whole range of ensemble sizes. In particular, BNNs incorporating spatial smoothing achieve high predictive performance merely with a handful of ensembles. Moreover, this method also can be applied to canonical deterministic neural networks to improve the performances. A number of evidences suggest that the improvements can be attributed to the stabilized feature maps and the smoothing of the loss landscape. In addition, we provide a fundamental explanation for prior works - namely, global average pooling, pre-activation, and ReLU6 - by addressing them as special cases of spatial smoothing. These not only enhance accuracy, but also improve uncertainty estimation and robustness by making the loss landscape smoother in the same manner as spatial smoothing. The code is available at https://github.com/xxxnell/spatial-smoothing.","url_abs":"https://arxiv.org/abs/2105.12639v4","url_pdf":"https://arxiv.org/pdf/2105.12639v4.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":"blurs-make-results-clearer-spatial-smoothings","repo_url":"https://github.com/xxxnell/spatial-smoothing","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"blurs-make-results-clearer-spatial-smoothings","repo_url":"https://github.com/xxxnell/how-do-vits-work","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"relu6","method_name":"ReLU6"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.12639","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.12639"}},"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/xxxnell/how-do-vits-work","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xxxnell/spatial-smoothing","reach":null}],"summary":{"ran":6,"ran_fixture":2},"by_repo_kind":{"official":{"samples":5,"ran":5,"repositories":1},"listed":{"samples":3,"ran":3,"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":"5e06a1320d7d8bc6","entry":"Blur","repo":"xxxnell/spatial-smoothing","repo_kind":"official","path":"models/smoothing_block.py","file_url":"https://github.com/xxxnell/spatial-smoothing/blob/HEAD/models/smoothing_block.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5e06a1320d7d8bc6"}},{"code_sha256_prefix":"5e8b0ed1757e7193","entry":"Blur","repo":"xxxnell/how-do-vits-work","repo_kind":"listed","path":"models/smoothing_block.py","file_url":"https://github.com/xxxnell/how-do-vits-work/blob/HEAD/models/smoothing_block.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5e8b0ed1757e7193"}},{"code_sha256_prefix":"7d31fb2fc7950e03","entry":"SamePad","repo":"xxxnell/spatial-smoothing","repo_kind":"official","path":"models/smoothing_block.py","file_url":"https://github.com/xxxnell/spatial-smoothing/blob/HEAD/models/smoothing_block.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7d31fb2fc7950e03"}},{"code_sha256_prefix":"c452d32abae32178","entry":"TanhBlurBlock","repo":"xxxnell/spatial-smoothing","repo_kind":"official","path":"models/smoothing_block.py","file_url":"https://github.com/xxxnell/spatial-smoothing/blob/HEAD/models/smoothing_block.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c452d32abae32178"}},{"code_sha256_prefix":"d858d5b3ac196749","entry":"TanhBlurBlock","repo":"xxxnell/how-do-vits-work","repo_kind":"listed","path":"models/smoothing_block.py","file_url":"https://github.com/xxxnell/how-do-vits-work/blob/HEAD/models/smoothing_block.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d858d5b3ac196749"}},{"code_sha256_prefix":"a913c63854e37921","entry":"blur","repo":"xxxnell/spatial-smoothing","repo_kind":"official","path":"models/smoothing_block.py","file_url":"https://github.com/xxxnell/spatial-smoothing/blob/HEAD/models/smoothing_block.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a913c63854e37921"}},{"code_sha256_prefix":"5ccfb7ec6032f45e","entry":"blur","repo":"xxxnell/how-do-vits-work","repo_kind":"listed","path":"models/smoothing_block.py","file_url":"https://github.com/xxxnell/how-do-vits-work/blob/HEAD/models/smoothing_block.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5ccfb7ec6032f45e"}},{"code_sha256_prefix":"d419f818792d3793","entry":"relu","repo":"xxxnell/spatial-smoothing","repo_kind":"official","path":"models/smoothing_block.py","file_url":"https://github.com/xxxnell/spatial-smoothing/blob/HEAD/models/smoothing_block.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d419f818792d3793"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}