Why Invariance is Not Enough for Biomedical Domain Generalization and How to Fix It

Sebo Diaz, Polina Golland, Elfar Adalsteinsson, Neel Dey
4/2/2026
eess.IVcs.CV

Official code: sebodiaz/MaskGen (4 stars, Python, MIT, last commit 2026-05-07).

Abstract

We present MaskGen, a theoretically grounded and deliberately simple approach for domain generalization in 3D biomedical image segmentation. Modern segmentation models degrade sharply under shifts in modality, disease severity, clinical sites, and more, limiting their reliable adoption.

Show full abstract

Existing generalization methods address this using extreme augmentations, hand-engineered domain statistics mixing, or architectural redesigns that add significant implementation overhead while yielding inconsistent performance across biomedical settings. MaskGen instead presents a principled learning strategy with marginal overhead that utilizes both source-domain image intensities and domain-stable foundation model representations to train robust segmentation models. As a result, MaskGen achieves strong gains in both fully supervised and few-shot segmentation across broad clinical shifts in biomedical studies. Unlike prior approaches, MaskGen is architecture- and loss-agnostic, compatible with standard augmentation pipelines, easy to implement, and tackles arbitrary anatomical regions. Its implementation is freely available at https://github.com/sebodiaz/MaskGen.

View on arXivView PDF

Code Implementations(1)

sebodiaz/MaskGenOfficial100%
MIT

MaskGen is a theoretically motivated and simple single source domain generalization technique.

41PythonApr 2, 20266 months agoMIT

Similar Papers

Cite this paper

@article{diaz2026invariance,
  title  = {Why Invariance is Not Enough for Biomedical Domain Generalization and How to Fix It},
  author = {Sebo Diaz and Polina Golland and Elfar Adalsteinsson and Neel Dey},
  year   = {2026},
  eprint = {2604.02564},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.02564v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.02564.svg)](https://codeofpaper.com/paper/2604.02564)

Discussion