Overcoming Domain Limitations in Open-vocabulary Segmentation

Dongjun Hwang, Seong Joon Oh, Junsuk Choe · Submission to ICLR 2025 · Rejected

TL;DR

Open-vocabulary segmentation (OVS) models struggle when deployed on data distributions outside their original training sets, and standard fine-tuning triggers severe catastrophic forgetting. This paper introduces an exemplar-free continual learning method that models dataset distributions via multivariate Gaussians of vision-language embeddings, using them at test time to dynamically interpolate decoder weights between pre-trained and fine-tuned models. The result is strong adaptation to new domains without sacrificing performance on past or unseen target distributions.

What Problem Does This Paper Address?

While modern open-vocabulary segmentation (OVS) models—such as fc-clip and X-Decoder—can recognize novel object categories via text embeddings, their performance degrades sharply when encountering domain shifts (e.g., transferring an indoor/everyday-object model to urban driving scenes).

Fine-tuning on a new domain can adapt the model, but it induces catastrophic forgetting: the model loses accuracy on its source distribution and degrades on previously unseen target domains. Standard remedies fall short:

  • Joint training requires perpetual access to all prior training data (raising storage, licensing, and privacy issues) and suffers from dataset size imbalances.
  • Continual learning / PEFT (like visual prompt tuning) avoids storing raw data but suffers lower adaptation performance and adds significant latency during inference.

Methods

The authors propose an exemplar-free, dynamic weight-interpolation strategy that operates entirely on the decoder while keeping the vision-language backbone frozen:

  1. Multivariate Normal (MVN) Modeling (Training Phase): During pre-training (source domain, $i=0$) and sequential fine-tuning on downstream datasets ($i=1, \dots, N_{ft}$), the system precomputes the mean and covariance of both image and text embeddings for each dataset: $\{\mu^i_{\text{img}}, \Sigma^i_{\text{img}}, \mu^i_{\text{text}}, \Sigma^i_{\text{text}}\}$. Only decoder weights ($\theta^i_{\text{dec,ft}}$) are stored (~80 MB or 6.11% of model parameters).
  2. Dynamic Interpolation Factor Estimation (Inference Phase): Given an input image and query text, the frozen encoders generate embeddings. The likelihood under each domain's image and text MVN distribution is calculated, softened via temperature-scaled softmax ($T=0.01$), and combined via an elementwise maximum to produce a routing/interpolation vector $\boldsymbol{\lambda}$.
  3. Decoder Weight Merging: The final decoder parameters are dynamically merged using task arithmetic: $$\theta_{\text{dec,new}} = \theta_{\text{dec,pr}} + \sum_{i=1}^{N_{ft}} \lambda_i (\theta^i_{\text{dec,ft}} - \theta_{\text{dec,pr}})$$ The merged weights then predict segmentation masks and class associations for that specific input.
Input Image/Text ──> Frozen Encoders ──> Likelihood via MVNs ──> Interpolation Factor λ
                                                                           │
Pre-trained Decoder (θ_pr) + Fine-tuned Decoders (θ_ft) ───────────> Blended Decoder (θ_new)

Datasets

  • Source / Pre-training: COCO (and ADE20K in alternate setup); X-Decoder utilizes COCO, SBU Captions, and Visual Genome.
  • Fine-tuning Domains: Cityscapes (urban street scenes) and ADE20K (dense scene parsing).
  • Zero-Shot / Unseen Evaluation Benchmarks: Evaluated across 8 target datasets covering instance, panoptic, and semantic segmentation: LVIS, BDD100K, Mapillary Vistas, Pascal Context (PC-59, PC-459), PASCAL VOC (PAS-20, PAS-21), and A-847 (ADE20K with 847 classes).
  • Adverse/Synthetic Domains: GTA5 (synthetic driving), DarkZurich (nighttime driving), and FoggyZurich (adverse weather).

Key Insights and Ideas

  • Soft Blending Beats Hard Routing: Rather than selecting a single domain via argmax, using softmax allows intermediate values ($0 < \lambda_i < 1$). For known domains, $\lambda$ naturally polarizes to 0 or 1; for completely unseen target domains, $\lambda$ distributes across seen distributions, ensembling multi-domain knowledge to generalize better.
  • Multimodal Routing is Essential: Combining both image and text likelihoods yields higher accuracy than relying solely on image or text embeddings, preventing misclassification when text classes overlap across distinct visual contexts.
  • Task Arithmetic in Segmentation Decoders: By keeping the feature encoder frozen and interpolating only decoder weights, the approach preserves base representations while tailoring task queries and spatial decoding dynamically.

Key Results

  • Preventing Catastrophic Forgetting: When fine-tuning fc-clip on Cityscapes:
  • Standard fine-tuning improves Cityscapes Panoptic Quality (PQ) by +20.1 but collapses COCO performance by -22.7 PQ and ADE20K by -10.3 PQ.
  • The proposed method matches the Cityscapes gain (+20.2 PQ) while retaining COCO (+0.3 PQ) and ADE20K (+2.5 PQ).
  • Sequential Multi-Domain Learning: In a 3-dataset sequential setup (COCO $\to$ ADE20K $\to$ Cityscapes):
  • Standard fine-tuning forgets early tasks (COCO drops from 50.1 to 20.8 PQ).
  • The proposed method preserves all three: 51.6 PQ on COCO, 47.0 PQ on ADE20K, and 64.3 PQ on Cityscapes, outperforming joint training (48.6 / 35.5 / 60.5).
  • Robustness on Unseen & Adverse Domains: On GTA5, DarkZurich, and FoggyZurich, standard fine-tuning degrades mIoU, whereas the proposed method boosts performance (e.g., DarkZurich increases from 40.2 to 43.1 mIoU; FoggyZurich from 54.4 to 55.9 mIoU).
  • Inference Efficiency: The method adds negligible latency—only +5.75% for two domains and +7.12% for three—vastly outperforming prompt-based PEFT methods which incurred +18% to +42% overhead.

Limitations and Future Work

  • Batch Size Constraints: Because decoder weights are generated per input sample based on sample-specific likelihoods, standard batched inference (batch size $> 1$) cannot easily run through the decoder in parallel without separate batching strategies.
  • Scaling Weight Interpolation: As the number of learned datasets grows, calculating and adding weight offsets across many decoder checkpoints introduces latency during the merging step. The authors suggest investigating parameter pruning or Mixture-of-Experts (MoE) routing to limit the active subset of parameters per query.

Summary updated

Abstract

Open-vocabulary segmentation (OVS) has gained attention for its ability to recognize a broader range of classes. However, OVS models show significant performance drops when applied to target data distributions beyond the source dataset. Fine-tuning these models on new datasets can improve performance, but often leads to the catastrophic forgetting of previously learned knowledge. To address this issue, we propose a method that allows OVS models to learn information from new data distributions while preserving prior knowledge. Our approach begins by evaluating the input sample’s proximity to multiple data distributions, using precomputed multivariate normal distributions for each data distribution. Based on this prediction, we dynamically interpolate between the weights of the pre-trained decoder and the fine-tuned decoders. Extensive experiments demonstrate that this approach allows OVS models to adapt to new data distributions while maintaining performance on the source dataset.
BibTeX
@misc{hwang2024overcoming,
  author = {Dongjun Hwang and Seong Joon Oh and Junsuk Choe},
  title = {{Overcoming Domain Limitations in Open-vocabulary Segmentation}},
  year = {2024},
  eprint = {2410.11536},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.11536},
}

Loading related content...

Figure