---
title: Unified Modality-Relax Segmentation (UniMRSeg)
url: https://www.emergentmind.com/topics/unified-modality-relax-segmentation-network-unimrseg
type: topic
---

# Unified Modality-Relax Segmentation (UniMRSeg)

Unified Modality-Relax Segmentation Network (UniMRSeg) denotes a unified segmentation paradigm for settings in which input modalities are variably available, partially missing, incomplete, corrupted, or newly encountered at inference. In one formulation, UniMRSeg is the Unified Representation Network (URN) augmented with a segmentation head and modality-dropout training for segmentation with missing input modalities [1908.06683]. In another, UniMRSeg is the explicit name of a hierarchical self-supervised compensation framework that bridges complete and incomplete inputs at the input, feature, and output levels within a single shared encoder–decoder [2509.16170]. Across these formulations, the central objective is consistent: replace modality-subset-specific models with one model that can accept whatever subset of modalities is available at test time, without network modification, model switching, or retraining.

## 1. Problem Setting and Conceptual Scope

The canonical problem addressed by UniMRSeg is the train–test mismatch induced by missing or heterogeneous imaging modalities. The URN formulation studies segmentation with missing input modalities under the observation that many segmentation pipelines assume that the train- and test distributions match, whereas practical clinical acquisition often violates that assumption [1908.06683]. The later HSSC-based UniMRSeg formulation states the deployment problem more broadly: incomplete or corrupted modalities degrade performance, and specialized per-combination models introduce high deployment costs because they require exhaustive model subsets and model-modality matching [2509.16170].

A closely related but distinct setting appears in work on modality-agnostic input channels for brain lesion segmentation. There, the target is not only previously seen modalities and missing subsets of them, but also sequences unavailable during training, with inference on heterogeneous combinations of seen and unseen modalities [2509.09290]. This suggests a useful distinction within the UniMRSeg literature: some formulations aim at graceful degradation under missing modalities drawn from a known modality universe, while others explicitly target inference on previously unseen sequences.

Within this scope, “unified” refers to a single model handling multiple modality configurations, and “modality-relax” refers to relaxing the fixed-modality assumption that standard multimodal segmentation architectures usually impose. The unifying technical motif is to map variable modality inputs into either a common representation, a shared encoder–decoder pathway, or a fixed-size padded or conditioned input space.

## 2. Foundational URN-Based UniMRSeg

The URN-based formulation decomposes UniMRSeg into per-modality encoding, fusion into a unified representation, optional unsupervised pre-training via image synthesis, and a downstream segmentation head. Let \(M\) be the total number of possible modalities. For each modality \(m\), the encoder is

$$
E_m:\;\mathbb{R}^{H\times W}\;\longrightarrow\;\mathbb{R}^{H\times W\times C},
$$

implemented as a 2D U-net with one conv-block per resolution level, batch-normalization with fixed scaling, and leaky-ReLU activations. For input \(x_m\), or zero if modality \(m\) was dropped, the encoder produces

$$
\tilde z_m \;=\; E_m(x_m)\;\in\;\mathbb{R}^{H\times W\times C},\qquad C=16.
$$

Immediately after encoding, channel-wise standardization is applied so that across spatial positions each channel has zero mean and unit variance [1908.06683].

Robustness to absent inputs is induced during training by modality-dropout. A random subset of the \(M\) input modalities is erased, with the number of dropped modalities sampled from a truncated geometric distribution. Typical settings are \(\theta=0.5\) for segmentation training and \(\theta=0.8\) for pre-training. The surviving modality set \(\mathcal I\subset\{1,\dots,M\}\) is fused by arithmetic mean,

$$
z \;=\; \mathrm{Fuse}\bigl(\{\tilde z_i\}\bigr)
\;=\; \frac{1}{|\mathcal I|}\sum_{i\in\mathcal I}\tilde z_i
\;\in\;\mathbb{R}^{H\times W\times C}.
$$

Because the fusion is a mean, the magnitude of \(z\) is independent of how many modalities are present. The same formulation also states that the arithmetic mean can in principle be replaced by any invertible \(f\)-mean,

$$
z = f^{-1}\!\Bigl(\frac{1}{|\mathcal I|}\sum_{i\in\mathcal I}f(\tilde z_i)\Bigr),
\quad f:\mathbb{R}\to\mathbb{R}\text{ invertible.}
$$

Optional unsupervised pre-training uses shallow modality-specific decoders \(D_m\) and a reconstruction objective over a large scan pool such as BRATS \(\cup\) HCP:

$$
L_{\rm syn}
= \sum_{m=1}^M \bigl\lVert\,x_m - D_m(z)\bigr\rVert_{2}^{2}.
$$

Once the encoders are trained, their weights are frozen when training the segmentation head. The segmentation head \(S\) maps the fused representation to per-voxel class probabilities, and supervision uses standard cross-entropy,

$$
L_{\rm seg}
= -\sum_{v}\sum_{c=1}^K y_{v,c}\,\log\bigl(p_{v,c}\bigr).
$$

A small variance regularizer encourages encoded modality features to occupy the same feature space,

$$
L_{\rm var}
= \sum_{v=1}^{H W}\sum_{d=1}^C
\mathrm{Var}\bigl\{\tilde z_i(v,d)\;\big|\;i\in\mathcal I\bigr\},
$$

and the supervised loss is

$$
L = L_{\rm seg} \;+\;\lambda\,L_{\rm var},
\qquad \lambda=10^{-4}.
$$

The corresponding training procedure uses batch size \(4\), Adam, learning rate \(10^{-4}\) for segmentation training, learning rate \(3\times10^{-5}\) for image-synthesis pre-training, \(50\) epochs for segmentation, and no data augmentation beyond random modality-dropout. At test time, one simply encodes whatever subset \(\mathcal I\) is available, fuses it, and forwards the fused tensor through the segmentation head; no network modification or retraining is needed [1908.06683].

## 3. Hierarchical Self-Supervised Compensation

The later method explicitly titled “UniMRSeg: Unified Modality-Relax Segmentation via Hierarchical Self-Supervised Compensation” recasts the problem around a single 3D U-Net-style encoder–decoder with a 3D-ASPP head whose weights are shared across all possible input-modality combinations, such as \(15\) combinations for four MRI modalities and \(3\) combinations for RGB-D/T inputs [2509.16170]. Its stated goal is to avoid training a separate model per modality subset and to bridge the representation gap between complete and missing modalities through a three-level compensation pipeline.

At the input level, Stage 1 applies hybrid shuffled-masking augmentation. Each fully-modal sample undergoes random modality dropout with \(50\%\) chance per modality but at least one modality remaining, channel-wise modality shuffle to decouple positional priors, and spatial masking with random local and global masks. A lightweight 3D U-Net decoder reconstructs the full set of normalized slices, with reconstruction loss

$$
L_{\rm rec} \;=\; \frac{1}{B}\sum_{b=1}^{B}\sum_{m=1}^{M}\Bigl\|R_{b,m}-I_{b,m}\Bigr\|_{1}
\;+\;\lambda\bigl[\,1-\mathrm{SSIM}(R_{b,m},I_{b,m})\bigr].
$$

At the feature level, Stage 2 performs modality-invariant contrastive learning. For each complete sample \(I_k\), a randomly incomplete version \(\hat I_k\) is created by modality dropout, and both are encoded to multi-level features \(f_k^i\) and \(\hat f_k^i\) across the five encoder stages. Positive pairs are same-sample complete/incomplete features; negative pairs are drawn from different samples or cross-pairings. The per-level NT-Xent loss is

$$
\ell^{\,i}(u,v)
= -\log\frac{\exp\bigl(\mathrm{sim}(f^i_u, f^i_v)/\tau\bigr)}
{\sum_{k=1}^{2B}\mathbb{I}_{[k\neq u]}\,\exp\bigl(\mathrm{sim}(f^i_u,f^i_k)/\tau\bigr)},
$$

with total contrastive loss

$$
L_{\rm cont} = \frac{1}{5\,\times\,2B}\sum_{i=1}^{5}\sum_{k=1}^{B}\Bigl[\ell^i(2k-1,2k)+\ell^i(2k,2k-1)\Bigr].
$$

A segmentation-guided Dice term is optimized in parallel,

$$
L_{\rm Dice}
= \frac{1}{B}\sum_{k=1}^{B}\Bigl[l_{\rm Dice}\bigl(P_k,G_k\bigr)
+l_{\rm Dice}\bigl(\hat P_k,G_k\bigr)\Bigr],
$$

yielding

$$
L_{\rm stage2}
= L_{\rm cont} \;+\;\alpha\,L_{\rm Dice}.
$$

At the output level, Stage 3 freezes the encoder and trains small reverse-attention adapters, one per encoder stage, together with the decoder. For incomplete-input feature \(F^i_{\rm cp}\) and adapter output \(F^i_{\mathrm{ada\mbox{-}in}}\), a 3D Swin Transformer block computes a mutual attention map \(\sigma\), which is inverted to emphasize under-attended regions. The adapted feature is

$$
F^i_\mathrm{ada} = \bigl(F^i_\mathrm{cp}+F^i_{\mathrm{ada\mbox{-}in}}\bigr)\;\odot\;(1-\sigma).
$$

Fine-tuning then uses a hybrid consistency constraint. Feature consistency across encoder stages is

$$
L_{fc}
= \frac{1}{B}\sum_{k=1}^{B}\sum_{m=1}^{M}\frac{1}{5}\sum_{i=1}^5
\bigl\|F^i_{k}-\hat F^i_{k,m}\bigr\|_{1},
$$

and prediction consistency is

$$
L_{pc}
= \frac{1}{B}\sum_{k=1}^{B}\sum_{m=1}^{M}
l_{\rm Dice}\bigl(P_{k},\;\hat P_{k,m}\bigr).
$$

The Stage 3 objective is

$$
L_{\rm stage3}
= L_{\rm Dice}^{\rm full} + \beta\,(L_{fc}+L_{pc}).
$$

Inference uses only the Stage 3 model. Any subset of modalities can be input, with missing channels zeroed or duplicated, and the shared network yields consistent segmentations without a modality classifier or model switching [2509.16170].

## 4. Empirical Performance Under Missing and Unseen Modalities

In the original URN study, evaluation used BRATS 2018 with \(285\) patients and four MRI contrasts—FLAIR, T1, T1c, and T2—with labels for enhancing tumor (ET), tumor core (TC), and whole tumor (WT). All \(2^4-1=15\) nonempty modality subsets were evaluated, and Dice score was computed using the official BRATS leaderboard. The baseline U-net without modality dropout breaks catastrophically as soon as FLAIR or T1c is missing, with WT approximately \(10\)–\(80\%\). Adding modality dropout restores robustness, yielding WT approximately \(80\)–\(85\%\) on most subsets. URN plus modality dropout, denoted UniMRSeg in that formulation, further improves WT to approximately \(85\)–\(86\%\) for nearly all subsets, and even with all modalities present slightly outperforms the baseline with modality dropout. Pre-training on pooled BRATS+HCP yields marginal WT gains but substantial improvements on ET and TC in the hardest missing-modality regimes [1908.06683].

The HSSC-based UniMRSeg reports results on four tasks. On BraTS2020, average Dice across \(15\) modality combinations is \(80.1\%\), compared with PASSION at \(76.5\%\), with standard deviation \(2.5\%\) versus \(4.5\%\). For the full four-modality case, WT, TC, and ET are \(91.5\%\), \(86.1\%\), and \(83.6\%\), respectively. On RGB-D salient object segmentation for STERE, the method reports \(S_m=0.918\) for RGB only, \(0.839\) for depth only, \(0.923\) for RGB-D, and average \(0.893\), compared with PopNet at \(0.826\), with standard deviation \(0.047\) versus \(0.157\). On VT1000 RGB-T salient object segmentation, the corresponding values are \(0.847\), \(0.911\), \(0.938\), and average \(0.899\), compared with CONTRINET at \(0.839\), with standard deviation \(0.047\) versus \(0.098\). On SUN-RGBD semantic segmentation, average mIoU is \(50.7\%\), compared with CMXNeXt at \(48.3\%\), with standard deviation \(3.1\) versus \(5.6\) [2509.16170].

A different but closely related benchmark addresses sequences unavailable during training. Across eight 3D brain MRI datasets spanning five pathologies and eight pulse sequences, two hold-out protocols were used. In Setting 1, DWI and ADC are unseen at test time; in Setting 2, FLAIR is unseen at test time. For Setting 1, the Standard model yields Dice \(30.1\%\) on ISLES 22 and \(56.3\%\) on ISLES 15, Agnostic-Channel gives \(30.7\%\) and \(56.7\%\), and Agnostic-Pathway reaches \(35.6\%\) and \(58.2\%\). For Setting 2, the Standard model gives \(27.9\%\) on WMH and \(36.3\%\) on ISLES 15, Agnostic-Channel gives \(51.4\%\) and \(46.1\%\), and Agnostic-Pathway reaches \(57.6\%\) and \(51.6\%\). On datasets with only seen modalities, such as TUMOUR2, neither agnostic approach degrades performance versus the Standard model [2509.09290].

## 5. Related Variants and Extensions

A notable extension of the unified-modality idea appears in unpaired CT/MR segmentation. “MulModSeg: Enhancing Unpaired Multi-Modal Medical Image Segmentation with Modality-Conditioned Text Embedding and Alternating Training” uses a single encoder–decoder backbone, either a 3D UNet or Swin UNETR, and a modality-conditioned text branch built from a frozen CLIP-text encoder. The prompt template is “A {CT/MR} imaging of [CLS]”, and a FiLM-style controller MLP produces the parameters of a lightweight segmentation head. Training alternates CT and MR batches within each epoch, and no adversarial or consistency losses are required in that formulation. On AMOS with a UNet backbone, alternating training with text improves the average Dice from \(82.50\) to \(87.14\) for CT and from \(81.91\) to \(85.33\) for MR. On MMWHS, the corresponding UNet averages improve from \(90.41\) to \(91.67\) for CT and from \(82.82\) to \(85.15\) for MR [2411.15576].

Continual-learning formulations push the same objective into domain-incremental settings. CLMU-Net introduces a replay-based continual learning framework for 3D brain lesion segmentation with arbitrary and variable modality combinations, without prior knowledge of the maximum set. Its channel-inflation mechanism pads an arbitrary modality subset into a fixed-size tensor, inflating the first convolution when a new modality appears by copying existing channels and zero-initializing the new one. To enrich local 3D patch features, it adds domain-conditioned textual embeddings through cross-attention or FiLM-style modulation, and it reduces forgetting by replay using a compact buffer of prototypical and challenging samples. On five heterogeneous MRI brain datasets, the method yields an average Dice score improvement of \(\geq 18\%\) while remaining robust under heterogeneous-modality conditions [2601.13927].

Prompt-driven retinal imaging offers a further related direction. CLAPS uses a CLIP-based image encoder, GroundingDINO bounding-box prompt generation, a modality-signature-enhanced text prompt, and MedSAM for unified segmentation across fundus and OCT datasets. In that work, expansion to a “Unified Modality-Relax Segmentation Network” is described as a potential extension, specifically by adding new prompt types such as scribbles and point-clouds and integrating other foundation models such as UNIVERSEG and OmniFuse [2509.08618]. This indicates that the UniMRSeg design objective is beginning to interact with foundation-model pipelines, even when the full UniMRSeg framework is not itself the reported method.

## 6. Advantages, Limitations, and Open Questions

Several advantages recur across UniMRSeg formulations. The URN-based version handles any subset of available modalities with one single model, avoiding combinatorial network explosion. By fusing at the feature level, downstream tasks operate on a modality-agnostic representation and benefit from shared structures. Modality-dropout acts as a strong regularizer and improves even the all-modalities-present case. Unsupervised pre-training can leverage large unlabelled or partially overlapping datasets [1908.06683]. The HSSC-based version adds a second advantage profile: higher mean accuracy under diverse missing-modality scenarios together with smaller performance fluctuations across modality combinations, as indicated by the reported reductions in standard deviation on BraTS2020, STERE, VT1000, and SUN-RGBD [2509.16170].

The limitations are equally specific. In the URN formulation, the variance regularizer requires at least two modalities present; the experiments are all 2D; the fusion is a fixed arithmetic mean; and no geometric or intensity augmentations were used. Proposed future directions there include a 3D URN, learned attention-weighted fusions, invertible networks to parameterize \(f\), standard augmentations such as flips, rotations, and intensity jitter, and domain-adaptation techniques for cross-scanner or cross-institution shifts [1908.06683]. In unseen-modality segmentation, a stated concern is that some models which generalize to unseen modalities may lose discriminative modality-specific information [2509.09290]. This suggests a persistent design tension: stronger modality invariance can improve flexibility, but excessive invariance may suppress informative contrast-specific cues.

Open questions extend beyond missing known modalities. One direction is true zero-shot modality expansion, which is explicitly contemplated by proposals to learn dynamic modality embeddings rather than fixed one-hot modality encodings [2509.08618]. Another is continual domain-incremental deployment, where modality sets grow over time and forgetting becomes as important as modality flexibility [2601.13927]. A broader implication is that UniMRSeg is best understood not as a single immutable architecture, but as a technical program centered on unified inference under modality variability, implemented through shared representations, compensation mechanisms, modality-agnostic channels, text-conditioned control, or continual channel inflation depending on the deployment regime.

Source: https://www.emergentmind.com/topics/unified-modality-relax-segmentation-network-unimrseg