Manuscript Offprint

arXiv:2608.22532

SymmAdapt: Symmetrical Flow Matching for Source-Free Domain Adaptation in Medical Image Segmentation

Tal Grossman, Noa Cahan, Hayit Greenspan

Tal Grossman ID^{ID}, Noa Cahan ID^{ID}, and Hayit Greenspan ID^{ID}

Faculty of Engineering, Tel Aviv University, Tel Aviv, Israel

talgrossman@mail.tau.ac.il

Abstract. Domain shift across imaging modalities and acquisition sites remains a significant barrier to the clinical deployment of segmentation models. Source-free unsupervised domain adaptation (SFUDA) addresses this by adapting a pretrained model to an unlabeled target domain without requiring access to sensitive source data. We introduce a novel SFUDA framework built on Symmetrical Flow Matching, a unified generative model that segments an input image and synthesizes a source-like image from a mask within the same learned flow. By initializing inference from a domain-agnostic Gaussian origin, the model preserves structural consistency across domains and grounds predictions in learned anatomy rather than shifted texture statistics. Our pipeline leverages this symmetry to generate reliable pseudo-labels and corresponding source-like synthetic images from unlabeled target data, creating a generative replay buffer that anchors source knowledge during a generative self-training stage that fine-tunes on a joint set of real target and synthetic source-like images. We evaluate on abdominal multi-organ and cardiac segmentation, covering cross-modality MRI↔CT shifts, and multi-site prostate segmentation. Our approach outperforms SFUDA baselines and is competitive with conventional UDA methods. The code is available at github.com/tal-grossman/SymmAdapt.

Keywords: Source-free domain adaptation · Medical image segmentation · Flow matching · Generative self-training

1 Introduction

Deep learning excels at medical image segmentation when training and test data share the same distribution [16], yet domain shift caused by differences in scanners, protocols, or imaging modality (e.g., CT vs. MRI) remains a major barrier to clinical deployment [7]. Unsupervised domain adaptation (UDA) mitigates this by transferring knowledge from an annotated source domain to an unlabeled target, typically via image-level or feature-level techniques (e.g., image-to-image transformation with CycleGAN [23], cross-modality feature alignment methods such as SIFA [7], and C 3^{3}R [9]). However, most UDA methods require concurrent access to source data, which often cannot be shared due to privacy constraints.

T. Grossman et al.

This motivates the more practical source-free UDA (SFUDA) setting, where only a pretrained source model and unlabeled target data are available during adaptation.

Recent SFUDA methods address domain shift through diverse strategies: pseudo-label denoising [8] and uncertainty-guided selection [21], prototype-based contrastive alignment [22], information-theoretic [1] and optimal-transport regularization [17], frequency-based prompting [20], and foundation-model-assisted adaptation such as DFG [10], which leverages Segment Anything to refine pseudo labels. These methods rely on discriminative architectures and do not exploit the generative structure of the segmentation task itself.

Generative models can instead bridge the appearance gap. Conditional image-translation models such as CycleGAN [23] and conditional diffusion adaptation [11] synthesize cross-domain images, and Flow Matching [14] learns a velocity field that transports a base Gaussian to the data distribution and has been adapted for segmentation [4,18]. However, when such conditional models are used as segmenters they initialize the ODE from the input image, which is problematic for SFUDA: for a target domain image far from the source manifold, the solver begins from an out-of-distribution state and the trajectory can diverge.

In contrast, Symmetrical Flow Matching (SymmFlow) [6], developed for natural images, unifies segmentation and generation by modeling the joint distribution p(x,y)p(x, y) of images and masks. Crucially, its ODE for both modalities always starts from a fixed Gaussian origin (z0∼N(0,I))(z_0 \sim \mathcal{N}(0, I)), therefore, scanner or modality shifts cannot displace the starting coordinate. The image is decoupled from the ODE physics and acts only as a structural condition, forcing inference to follow learned anatomical priors rather than superficial texture statistics. We hypothesize that this “generative anchoring” makes SymmFlow uniquely suited for the SFUDA setting, where the model must predict valid anatomical structures despite severe appearance shifts. MedSymmFlow [5] recently extended SymmFlow to medical image classification, but segmentation-level domain adaptation remains unexplored.

In this work, we propose SymmAdapt, a novel SFUDA framework that leverages this bidirectional flow. We train SymmFlow on labeled source data, then use its generative direction (mask→image) to synthesize source-like “anchor” data from the model’s own latent space, and fine-tune with a dual-stream objective coupling real target images with these synthetic anchors. Our main contributions are: (1) We are the first to propose a source-free domain adaptation framework based on Symmetrical Flow Matching. (2) We demonstrate a generative anchor strategy that utilizes the model’s bidirectional flow to synthesize source-like replay data, preventing semantic drift without source data access. (3) We evaluate on three cross-modality benchmarks—abdominal multi-organ segmentation (CT↔MRI), MMWHS cardiac (MRI→CT), and prostate (site differences), showing that SymmAdapt outperforms other UDA and SFUDA methods across diverse anatomical structures.

Forward Flow: Semantic Image Generation

Figure

Y0←dy=−vθ(xt,yt,t)ydt→Y1Y_0 \xleftarrow{\quad} dy = -v_\theta(x_t, y_t, t)_y dt \xrightarrow{\quad} Y_1

Reverse Flow: Semantic Segmentation

(a)

(b)

(c)

Fig. 1. Symmetrical Flow Matching for medical tasks. SymmFlow learns a joint vector field from Gaussian noise to images (X) and masks (Y), enabling conditional segmentation (Y|X) and synthesis (X|Y). (a) Abdomen and cardiac examples produced by our source-trained model. (b) t-SNE shows overlapping mask features but separated image features. (c) Synthetic replay bridges the separated image-feature clusters.

References (24)