{"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-segmentation-networks-modelling","title":"Stochastic Segmentation Networks: Modelling Spatially Correlated Aleatoric Uncertainty","arxiv_id":"2006.06015","date":"2020-06-10","proceeding":"NeurIPS 2020 12","authors":["Miguel Monteiro","Loïc le Folgoc","Daniel Coelho de Castro","Nick Pawlowski","Bernardo Marques","Konstantinos Kamnitsas","Mark van der Wilk","Ben Glocker"],"abstract":"In image segmentation, there is often more than one plausible solution for a given input. In medical imaging, for example, experts will often disagree about the exact location of object boundaries. Estimating this inherent uncertainty and predicting multiple plausible hypotheses is of great interest in many applications, yet this ability is lacking in most current deep learning methods. In this paper, we introduce stochastic segmentation networks (SSNs), an efficient probabilistic method for modelling aleatoric uncertainty with any image segmentation network architecture. In contrast to approaches that produce pixel-wise estimates, SSNs model joint distributions over entire label maps and thus can generate multiple spatially coherent hypotheses for a single image. By using a low-rank multivariate normal distribution over the logit space to model the probability of the label map given the image, we obtain a spatially consistent probability distribution that can be efficiently computed by a neural network without any changes to the underlying architecture. We tested our method on the segmentation of real-world medical data, including lung nodules in 2D CT and brain tumours in 3D multimodal MRI scans. SSNs outperform state-of-the-art for modelling correlated uncertainty in ambiguous images while being much simpler, more flexible, and more efficient.","url_abs":"https://arxiv.org/abs/2006.06015v2","url_pdf":"https://arxiv.org/pdf/2006.06015v2.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-segmentation-networks-modelling","repo_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-segmentation","task_name":"Image Segmentation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2006.06015","atlas_url":"https://app.syntology.ai/?focus=2006.06015","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.06015"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/biomedia-mira/stochastic_segmentation_networks","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"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":"b08dca097809998f","entry":"calculate_convolution_input_size","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/models/base.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/models/base.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":"b08dca097809998f"}},{"code_sha256_prefix":"5758e56a317ad938","entry":"calculate_convolution_output_size","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/models/base.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/models/base.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":"5758e56a317ad938"}},{"code_sha256_prefix":"de1f2c4296a0e379","entry":"calculate_loglikelihood","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/toy_problem.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/toy_problem.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":"de1f2c4296a0e379"}},{"code_sha256_prefix":"168556b063807692","entry":"crop_center","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/models/base.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/models/base.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":"168556b063807692"}},{"code_sha256_prefix":"9d008d7de9e16f07","entry":"get_on_off_binary_target","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/toy_problem.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/toy_problem.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":"9d008d7de9e16f07"}},{"code_sha256_prefix":"ccd439d403ad8012","entry":"get_prob","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/toy_problem.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/toy_problem.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":"ccd439d403ad8012"}},{"code_sha256_prefix":"4d0866bcafbe58e7","entry":"predict_exclusive","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/trainer/model_trainer.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/trainer/model_trainer.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":"4d0866bcafbe58e7"}},{"code_sha256_prefix":"089fe009480b95d6","entry":"predict_multi_target","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/trainer/model_trainer.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/trainer/model_trainer.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":"089fe009480b95d6"}},{"code_sha256_prefix":"cb5331a7f073f21a","entry":"predict_regression","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"ssn/trainer/model_trainer.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/ssn/trainer/model_trainer.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":"cb5331a7f073f21a"}},{"code_sha256_prefix":"1cfda2f22710077f","entry":"z_score_normalisation","repo":"biomedia-mira/stochastic_segmentation_networks","repo_kind":"official","path":"evaluation/preprocessing.py","file_url":"https://github.com/biomedia-mira/stochastic_segmentation_networks/blob/HEAD/evaluation/preprocessing.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":"1cfda2f22710077f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}