TL;DR
The authors introduce CA-SAM (Continual Alignment for SAM), an exemplar-free continual learning framework for medical image segmentation. By inserting a lightweight, plug-and-play "Alignment Layer" between a frozen encoder and decoder and pairing it with a VAE-based task router, CA-SAM achieves state-of-the-art segmentation accuracy across sequential datasets while preserving SAM’s powerful zero-shot generalization on unseen domains.
What Problem Does This Paper Address?
In medical image segmentation, strict privacy and governance policies across different hospitals make it nearly impossible to pool datasets into a single, centralized training set. This necessitates continual learning (CL)—the ability of a model to learn from a sequential stream of data from different institutions without forgetting what it previously learned.
While foundation models like the Segment Anything Model (SAM) possess incredible zero-shot capabilities, adapting them to the distinct domain gaps of medical imagery presents a double-edged sword:
- Full fine-tuning is computationally prohibitive for practical clinical deployment.
- Parameter-efficient fine-tuning (PEFT) techniques reduce compute but often cause the model to suffer from catastrophic forgetting of prior tasks or erode SAM's broad, inherent generalization on completely unseen medical domains.
The authors set out to answer a critical question: Can we efficiently adapt SAM for sequential medical tasks without destroying its zero-shot superpowers?
Methods
The proposed framework, CA-SAM, relies on two core innovations:
- The Alignment Layer: Instead of modifying the massive backbone weights, the authors freeze both SAM’s encoder and decoder. They insert a lightweight, plug-and-play module consisting of stacked Channel Attention Residual Blocks (CAResBlocks) between them. This layer maps and aligns the latent feature distributions specifically to the target medical domain, keeping backpropagation highly confined and computationally cheap.
- VAE-Based Task Routing & OOD Fallback: To handle multiple datasets sequentially without storing old data (exemplar-free), CA-SAM assigns a dedicated Alignment Layer and an independent Variational Autoencoder (VAE) to each task. During inference, an attention-pooling mechanism compresses the features, and all task-specific VAEs compute an Evidence Lower Bound (ELBO) score. The input is routed to the adapter with the lowest score.
Crucially, if the lowest score exceeds a calibrated confidence threshold ($p_{97}$ percentile), the system flags the data as Out-of-Distribution (OOD) and falls back to an identity alignment layer—effectively reverting to the original, frozen SAM for safe zero-shot inference.
Datasets
The framework was rigorously evaluated across two distinct setups:
- Continual Learning Stream (9 Datasets): ACDC (heart), EBHI-SEG (polyp), 56Nx (histopathology), DN (histopathology), Polyp, MSD Prostate, MSD Spleen, Promise12 (prostate), and STS-2D (teeth). These cover multiple organs and modalities (MR, CT, histopathology).
- Zero-Shot Evaluation (5 Unseen Datasets): DDTI, BUSI_benign, BUSI_malignant, Brain_Tumor, and CAMO to test robustness against out-of-distribution data.
Key Insights and Ideas
- Targeting the Intermediate Space: Traditional PEFT methods like LoRA modify internal attention layers. CA-SAM proves that simply aligning the distribution between the encoder and decoder is sufficient for domain adaptation, saving massive amounts of compute.
- The Danger of Hard Routing: Prior continual learning methods often misassign unseen data to the wrong trained adapter, which corrupts the feature representation.
- An Elegant Fallback Safety Net: By using the VAE's ELBO score as a metric for task similarity, the model gains a reliable "I don't know" option. Reverting to standard SAM when a sample doesn't match any known task preserves upper-bound zero-shot performance.
Key Results
- State-of-the-Art Continual Performance: CA-SAM achieved a Last-IoU of 76.12% and an Avg-IoU of 76.90% across the 9 sequential medical datasets, outperforming the next best continual learning method (MoDA) by 5.48% in final accuracy.
- Zero Forgetting: Forgetting metrics dropped to nearly zero (FF-BIoU of 0.24%), proving the task-isolation strategy works flawlessly.
- Preserved Zero-Shot Capabilities: On unseen datasets like DDTI, while other CL methods saw their zero-shot performance collapse (e.g., MoDA dropped to 29.66% IoU), CA-SAM maintained 77.62% IoU, nearly identical to the original SAM's 78.08%.
- High Efficiency: CA-SAM requires only 3.54M trainable parameters and 514.3 GFLOPs, making it substantially lighter than competing SAM adaptation pipelines.
Limitations and Future Work
While CA-SAM demonstrates remarkable stability and efficiency, the authors note a few areas for consideration:
- Prompt Dependency: The system relies on bounding box or point prompts during inference, inheriting SAM's standard operational paradigm. Moving toward fully automatic prompt generation within a continual framework remains an open challenge.
- Calibration Overhead: The OOD fallback mechanism requires a $K$-fold cross-validation step on the training set to establish the $p_{97}$ threshold for each new task, adding a minor pre-computation step during the training phase.
Summary updated