{"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/langdaug-langevin-data-augmentation-for-multi","title":"LangDAug: Langevin Data Augmentation for Multi-Source Domain Generalization in Medical Image Segmentation","arxiv_id":"2505.19659","date":"2025-05-26","proceeding":null,"authors":["Piyush Tiwary","Kinjawl Bhattacharyya","Prathosh A. P"],"abstract":"Medical image segmentation models often struggle to generalize across different domains due to various reasons. Domain Generalization (DG) methods overcome this either through representation learning or data augmentation (DAug). While representation learning methods seek domain-invariant features, they often rely on ad-hoc techniques and lack formal guarantees. DAug methods, which enrich model representations through synthetic samples, have shown comparable or superior performance to representation learning approaches. We propose LangDAug, a novel $\\textbf{Lang}$evin $\\textbf{D}$ata $\\textbf{Aug}$mentation for multi-source domain generalization in 2D medical image segmentation. LangDAug leverages Energy-Based Models (EBMs) trained via contrastive divergence to traverse between source domains, generating intermediate samples through Langevin dynamics. Theoretical analysis shows that LangDAug induces a regularization effect, and for GLMs, it upper-bounds the Rademacher complexity by the intrinsic dimensionality of the data manifold. Through extensive experiments on Fundus segmentation and 2D MRI prostate segmentation benchmarks, we show that LangDAug outperforms state-of-the-art domain generalization methods and effectively complements existing domain-randomization approaches. The codebase for our method is available at https://github.com/backpropagator/LangDAug.","url_abs":"https://arxiv.org/abs/2505.19659v1","url_pdf":"https://arxiv.org/pdf/2505.19659v1.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":"langdaug-langevin-data-augmentation-for-multi","repo_url":"https://github.com/backpropagator/langdaug","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"image-segmentation","task_name":"Image Segmentation"},{"task_slug":"medical-image-segmentation","task_name":"Medical Image Segmentation"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2505.19659","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.19659"}},"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/backpropagator/langdaug","reach":null}],"summary":{"ran_honours":2,"ran_draft_wrong":2},"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":"5e106648b3e4bd4d","entry":"normalize_to_unit_range","repo":"backpropagator/langdaug","repo_kind":"official","path":"VQ-VAE/train_vqvae_fundus_prostate.py","file_url":"https://github.com/backpropagator/langdaug/blob/HEAD/VQ-VAE/train_vqvae_fundus_prostate.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5e106648b3e4bd4d"}},{"code_sha256_prefix":"b4f7bdcc1621530c","entry":"langvin_sampler","repo":"backpropagator/langdaug","repo_kind":"official","path":"VQ-VAE/adapt_fundus_prostate_LAB_LD.py","file_url":"https://github.com/backpropagator/langdaug/blob/HEAD/VQ-VAE/adapt_fundus_prostate_LAB_LD.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":"b4f7bdcc1621530c"}},{"code_sha256_prefix":"6b85bef8bb279ea8","entry":"normalize_lab_tensor","repo":"backpropagator/langdaug","repo_kind":"official","path":"VQ-VAE/train_vqvae_fundus_prostate.py","file_url":"https://github.com/backpropagator/langdaug/blob/HEAD/VQ-VAE/train_vqvae_fundus_prostate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6b85bef8bb279ea8"}},{"code_sha256_prefix":"e435a47193774046","entry":"normalize_to_neg_one_one","repo":"backpropagator/langdaug","repo_kind":"official","path":"VQ-VAE/train_vqvae_fundus_prostate.py","file_url":"https://github.com/backpropagator/langdaug/blob/HEAD/VQ-VAE/train_vqvae_fundus_prostate.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e435a47193774046"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}