Enhancing Semantic Segmentation with Continual Self-Supervised Pre-training

Brown Ebouky, Ajad Chhatkuli, A. Cristiano I. Malossi, Christoph Studer, Roy Assaf, Andrea Bartezzaghi

TL;DR

GLARE (Global Local and Regional Enforcement) is a novel continual self-supervised pre-training framework designed to adapt vision foundation models to data-scarce target domains for semantic segmentation. By freezing the backbone and training only lightweight adapter modules using a multi-level consistency objective, GLARE significantly improves downstream dense prediction performance in under 30 minutes of training without catastrophic forgetting.

What Problem Does This Paper Address?

Vision foundation models pre-trained via Self-Supervised Learning (SSL) on massive datasets like ImageNet possess incredible general representations. However, when deployed to specialized technical domains (such as satellite imagery or medical scans) where labeled data is highly scarce, these generalists often falter.

While parameter-efficient fine-tuning methods (like LoRA or adapters) help adapt models to downstream tasks, extending the unsupervised pre-training stage itself to a new domain with limited data remains an open challenge. This is particularly true for dense prediction tasks like semantic segmentation, which demand a fine-grained, pixel-level spatial understanding far beyond simple image classification. Existing continual pre-training methods typically require massive datasets and often cause the model to forget its previously learned general knowledge.

Methods

The authors introduce GLARE, a three-level self-supervised learning strategy embedded within a student-teacher framework. To keep the process computationally efficient and prevent catastrophic forgetting, the entire Vision Transformer (ViT) backbone is frozen; only a lightweight parameter-efficient module called UniAdapter is trained.

Overview of the GLARE continual pre-training framework, illustrating the global, regional, and local consistency losses applied to the student and teacher encoders.

GLARE enforces feature consistency across three distinct levels of detail:

  1. Global Consistency ($L_{glob}$): Aligns the global image representations ([CLS] tokens) of two differently augmented views of the same image using a standard DINO-like objective.
  2. Regional Consistency ($L_{reg}$): Instead of using expensive object-detection proposals, GLARE leverages the attention maps already inherent in the pre-trained ViT to identify semantically rich regions (Attention-Aware Region Sampling). It then uses a cross-attention mechanism to align these regional features between the student and teacher views.
  3. Local Consistency ($L_{loc}$):
  4. Patch-Augmentation Consistency: Instead of standard Masked Image Modeling (MIM)—which is notoriously data-hungry—GLARE applies strong blurring to 30% of random patches. This forces the model to use surrounding context to "complete" the blurred features.
  5. Inter-View Local Consistency: Maps and aligns corresponding individual patches across different augmented views of the image.
Attention maps from different heads of a pre-trained DINO model, demonstrating how individual heads naturally focus on distinct semantic regions (e.g., foreground objects vs. background).

Datasets

GLARE was evaluated across diverse, low-data ($\le$ 20k images) target domains for semantic segmentation:

  • General Domain: ADE20k (20,210 images) and Pascal Context (4,998 images).
  • Driving Domain: Cityscapes (2,975 images).
  • Aerial/Satellite Domain: LoveDA (2,522 images).

To demonstrate broader applicability, the authors also tested the framework on out-of-domain medical classification datasets: Derm7pt (skin lesions) and COVIDx (chest X-rays).

Key Insights and Ideas

  • Blurring Over Masking: In data-scarce regimes, completely masking image patches (as done in MAE or iBoT) destroys too much information and requires massive datasets to learn effectively. Patch-wise blurring acts as a gentler perturbation, retaining essential spatial context while still forcing the model to learn robust inter-patch relationships.
  • Exploiting Latent Attention: Continual pre-training has a unique advantage over training from scratch: the model already knows something. GLARE elegantly exploits this by using the pre-trained model's own attention heads to guide region sampling, ensuring the regional consistency loss focuses on meaningful objects rather than random background noise.
  • Isolating Forgetting via Adapters: Traditional Hierarchical Pre-Training (HPT) updates all network weights, which frequently leads to representation collapse or severe performance degradation in low-data segmentation. Freezing the backbone and tuning only the UniAdapter completely bypasses catastrophic forgetting.

Key Results

  • State-of-the-Art Adaptation: When initialized with weights from UDI (a top-performing SSL baseline), GLARE consistently achieved the highest mean Intersection over Union (mIoU) across all segmentation benchmarks, yielding improvements like +0.4 mIoU on ADE20k and +0.6 mIoU on the highly out-of-domain LoveDA dataset.
  • Zero Forgetting: Evaluation on the original source domains showed that GLARE maintained or even slightly improved performance on the original datasets, proving that adapter-based pre-training successfully retains past knowledge.
  • Extreme Efficiency: Because only 14 million adapter parameters are updated (compared to full backbone tuning), the entire continual pre-training process on LoveDA takes only 30 minutes on 8 NVIDIA A100 GPUs.
  • Cross-Task Generalization: Even though designed for segmentation, DINO $\rightarrow$ GLARE pre-training boosted top-1 classification accuracy on the COVIDx dataset from 60.7% to 69.2%.

Limitations and Future Work

While highly effective, GLARE introduces a slight computational overhead per training epoch due to its multi-level loss functions and cross-attention matching modules compared to simpler baseline continuations. Additionally, the authors note that the performance gains are heavily tied to the quality of the initial foundation model; starting with a stronger base encoder yields significantly better downstream results. Future work could explore extending this multi-level consistency approach to even larger foundation models or alternative transformer architectures.

Summary updated

BibTeX
@article{ebouky2026enhancing,
  author = {Brown Ebouky and Ajad Chhatkuli and A. Cristiano I. Malossi and Christoph Studer and Roy Assaf and Andrea Bartezzaghi},
  title = {{Enhancing Semantic Segmentation with Continual Self-Supervised Pre-training}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure