Manuscript Offprint
arXiv:2611.22995CAST: Calibrating Correspondences for Training-Free Biomedical In-Context Segmentation
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Biomedical image segmentation must keep up with new anatomical structures, subjects, imaging modalities, and acquisition protocols, yet dense expert annotations are scarce and models trained on one cohort often struggle to transfer. In-context segmentation (ICS) offers a way out: a new structure is specified by a few annotated exemplars at inference time. However, reliable correspondence remains challenging in biomedical images, where adjacent structures often share similar appearances, and variations across subjects and imaging conditions further obscure their distinctions. We introduce CAST, a training-free framework built on a frozen DINOv3 backbone to calibrate fine-grained correspondences. Its stability test improves feature reliability at both global and patch-specific levels, while its coherence test assesses whether candidate correspondences are supported by consistent local structural context. Together, these tests enable more reliable correspondence across diverse anatomical structures and imaging conditions. Across eight biomedical benchmarks spanning 2D and 3D segmentation, cross-subject, and cross-modality transfer, CAST outperforms the strongest overall baseline by 12.34 percentage points in Dice and ranks first across all six volumetric settings. The versatility of CAST further opens up opportunities for challenging biomedical applications, including 2D-to-3D segmentation and atlas label transfer.
1 Introduction
Biomedical image segmentation has become remarkably accurate and remarkably brittle. Task-specific models encode anatomical priors and domain expertise [13, 36], but models trained on a limited source cohort can struggle with shifts in scanners, acquisition protocols, patient populations, and imaging modalities [43, 9, 25]. Extending these models to new settings often requires dense expert annotations and retraining, which are costly and, for many specialized biomedical tasks, difficult to obtain. The field needs segmentation that adapts as fast as the data changes.
In-context segmentation (ICS) offers that adaptability by specifying the task rather than training for it: a few annotated exemplars presented at inference time define what to segment in a new image. The paradigm has shown strong potential in natural images [35, 34] and has inspired exemplar- and context-conditioned approaches in medical imaging [1, 27, 6]. Recent advances in vision foundation models have further expanded its potential. By leveraging the transferable representations of frozen self-supervised vision transformers [2, 23, 29], training-free methods [3, 12, 26] have demonstrated promising results through direct feature correspondence, without task-specific optimization. This offers a flexible route to segmenting previously unseen structures, but places a premium on reliable matching between exemplar and query patches in the frozen feature space.
We argue that this matching problem is particularly challenging in biomedical images. In many natural-image settings, target objects exhibit clear appearance differences from non-target regions. Biomedical images, however, often contain multiple adjacent anatomical structures that share tissue appearance, intensity, and texture, with boundaries defined by anatomical organization rather than pronounced visual transitions, as illustrated in Fig. 2. The most challenging non-target regions in biomedical images are often other anatomical structures. We expect two consequences in frozen feature space. First, subtle distinctions between neighboring structures can be obscured by variations induced by geometry, subject, and acquisition, allowing visually similar but anatomically incorrect patches to rank above the correct correspondences. Second, non-target surroundings are not merely regions to be rejected, but structured anatomy that provides additional evidence for distinguishing visually similar targets. Consequently, center-level appearance similarity alone is insufficient for reliable anatomical correspondence.
If appearance alone cannot be trusted, reliable correspondences must draw on evidence beyond individual patch similarity. Our observation is that annotated exemplars provide two complementary sources of such evidence: the stability of visual features under geometric changes and the spatial organization of labeled anatomy. We introduce CAST, a training-free framework that brings these sources together through two tests. The stability test accounts for feature variations under geometric transformations, while the coherence test examines whether candidate matches are consistent with their surrounding anatomical context. By combining these complementary cues, CAST establishes more reliable correspondences between exemplars and query images, supporting segmentation across diverse anatomical structures and imaging conditions. Built upon the transferable representations of a frozen DINOv3 backbone [29], CAST requires no additional training or gradient-based adaptation.

Figure 2: Comparison of DINOv3 feature similarity between natural and biomedical images. Similarity maps are obtained by computing cosine similarities between query patch features and annotated target features from the source image. Natural images exhibit clear similarity contrast between foreground and background, whereas biomedical images show similar responses across neighboring anatomical structures. Green contours indicate source annotations.
We evaluate CAST on eight biomedical benchmarks spanning 2D and 3D segmentation, cross-subject, and cross-modality transfer. CAST achieves the highest overall performance, exceeding the strongest baseline by 12.34 percentage points in Dice and ranking first across all six volumetric settings. We further explore atlas label transfer, an important step toward bringing standardized anatomical knowledge to specimen-specific imaging. CAST maintains promising performance in this challenging setting, highlighting its potential for adapting to diverse biomedical imaging scenarios.

Figure 3: Overview of CAST. Given an annotated source image, its mask, and an unlabeled query image, CAST calibrates and refines source–query patch correspondences through two complementary tests. The stability test characterizes feature variations induced by geometric transformations, providing global debiasing before candidate retrieval and patch-specific metrics for subsequent reranking. The coherence test evaluates retrieved candidates through neighborhood feature contrast and target–non-target layout consistency. Within the correspondence refinement framework, globally debiased features guide class-conditional candidate retrieval, after which source-specific metrics and neighborhood evidence jointly rerank the candidates. The top- candidates from each class are then aggregated through voting to produce the final segmentation.
Few-shot biomedical image segmentation. The diversity of anatomical structures and imaging conditions, together with limited expert annotations, makes few-shot learning particularly relevant to biomedical segmentation [4]. UniverSeg [1] and Tyche [27] learn to generalize across segmentation tasks through training on large collections of annotated medical images. Subsequent work further explores improved support selection and similarity-based context refinement, explicit in-context learning, and broader medical task coverage [5, 39, 45, 38, 37, 10]. Medical adaptations of pretrained segmentation models provide another route to biomedical applications. MedSAM [20] extends SAM to medical images, while MAUP [47] explores exemplar-based prompting and HERA [21] employs test-time adaptation for cross-domain generalization. These approaches have also been extended to volumetric medical imaging [6, 11, 46, 7]. Despite these advances, existing approaches often rely on extensive medical annotations for pretraining, medical-specific adaptation, or specialized volumetric representations. In contrast, we leverage the transferable representations of a frozen VFM for training-free biomedical in-context segmentation, without additional medical-specific pretraining or gradient-based adaptation.
3 Method
Given annotated source exemplars and an unlabeled query image , our goal is to segment the corresponding structure without task-specific training or gradient-based adaptation. We employ a frozen DINOv3 ViT-L/16 encoder [29] to extract dense visual descriptors from source and query images. The final transformer block (B24) produces -dimensional descriptors on a patch grid from inputs. All descriptors are L2-normalized.
As illustrated in Fig. 3, CAST establishes reliable source–query correspondences through two complementary tests. The stability test characterizes feature variations under geometric transformations, providing global debiasing before candidate retrieval and patch-specific metrics for subsequent reranking. The coherence test evaluates retrieved candidates through neighborhood feature contrast and layout consistency. These tests are integrated into a correspondence refinement framework: globally debiased features guide class-conditional candidate retrieval, while source-specific metrics and neighborhood evidence jointly rerank the retrieved correspondences. The top-ranked candidates from each class are then aggregated through voting to produce the final segmentation. For volumetric inputs, source-derived calibration statistics and matching references are shared across the query volume, while individual slices are processed independently and their predictions stacked in order.
3.1 Stability Test: Feature Calibration
Geometric transformations can alter pretrained visual features even when the underlying image content is preserved. We exploit controlled transformations of source images to characterize feature variability at global and patch-specific levels. These source-derived statistics are computed once for a fixed support set and reused across queries, amortizing the calibration cost.
Global debiasing.
For each source image , we apply a fixed set of non-identity geometric transformations , including translations, rotations, and isotropic scaling. Let denote the original descriptor at patch location , and the feature map extracted from the -th transformed image. We align transformed features with the original patch grid through backward warping with bilinear sampling. The aligned residual is , where denotes geometric alignment.
We aggregate these residuals into an uncentered global second-moment matrix:
where indexes source–transformation pairs and contains their valid patch correspondences. Each pair contributes equally to the estimate. We extract the leading eigenvectors of , forming , which capture the dominant transformation-sensitive directions.
Global debiasing suppresses these shared variations through a soft projection:
where controls the suppression strength and denotes L2 normalization. We apply the same projection to original source, transformed source, and query descriptors. The resulting globally debiased feature maps are denoted by and , with patch descriptors and .
Local calibration.
Global debiasing captures shared feature variations, but individual source patches may respond differently to geometric transformations. We therefore characterize their variability separately in the debiased feature space. For each original source patch, the aligned residual is . We aggregate these residuals into patch-specific second-moment matrices and construct the corresponding matching metrics:
where contains the valid transformed observations and . denotes the source patches used for calibration. Each source patch is thus associated with a patch-specific metric reflecting its observed feature variability, which is used for subsequent correspondence reranking.
3.2 Coherence Test: Neighborhood Verification
Feature similarity alone may not distinguish a target structure from visually similar neighboring anatomy. The coherence test therefore evaluates retrieved correspondences through two complementary forms of neighborhood evidence: feature contrast and layout consistency.
Feature contrast.
We compare feature variations around query patch and source candidate relative to their respective center descriptors. Let denote the ordered offsets formed by eight directions at radii . For each common valid offset , we compute the center-relative feature differences and . We measure their agreement through normalized correlation:
where and denote the summed squared magnitudes of the corresponding feature differences over common valid offsets. The context distance and its reliability are defined as
The reliability score weights feature contrast according to neighborhood coverage and local feature variation during reranking.
Layout consistency.
We further assess whether the target–non-target arrangement around a source candidate agrees with the initial query unary map. The source mask provides target and non-target labels for neighboring source patches, while the unary map provides corresponding target scores in the query. We compare these two forms of neighborhood evidence:
where denotes the source target/non-target label, and is the initial target score of the corresponding query neighbor. The comparison rewards agreement at each relative position: source target neighbors are expected to have high query target scores, whereas source non-target neighbors should have low scores. Higher values of therefore indicate stronger agreement between the source and query layouts.
3.3 Correspondence Refinement Framework
The two tests are integrated into a correspondence refinement framework that first retrieves and then evaluates source–query matches. Globally debiased features identify class-specific candidates, which are subsequently reranked using the precomputed patch-specific metrics and neighborhood evidence before voting.
Candidate retrieval.
Each original source patch is stored in a matching memory with its globally debiased descriptor, target or non-target label, and source-specific metric . Geometrically transformed views are used only for feature calibration, while original source patches serve as matching references. The source masks organize these references into separate target and non-target candidate pools.
For each query patch , we retrieve up to nearest candidates from each class using cosine similarity in the globally debiased feature space, forming and . For each class, we average the inverse cosine distances of its nearest candidates and normalize the two class-specific scores to obtain the initial target score , which provides the query unary map for layout consistency.
Correspondence reranking.
For each retrieved candidate , we evaluate its center-level feature discrepancy using the source-specific metric from the stability test:
where denotes the metric associated with source candidate . The quadratic term adapts feature discrepancies to candidate-specific variability, while the log-determinant term accounts for its overall uncertainty.
We combine this stability-based distance with neighborhood evidence from the coherence test. To align their numerical scales, we introduce a query-dependent factor based on median distances across the candidate set. Let , and let use when neighborhood evidence is available and otherwise. The scale factor and final correspondence distance are
where controls the contribution of feature contrast. The resulting distance combines patch-specific feature reliability, neighborhood contrast, and layout agreement. We independently rerank target and non-target candidates using and retain the nearest candidates from each class.
Voting.
The selected correspondences provide inverse-distance evidence for the two classes. We aggregate this evidence independently to obtain class-specific scores and the final target probability:
where contains the selected reranked candidates of class . By normalizing the evidence within each class, voting balances the contributions of target and non-target correspondences. The resulting target scores are bilinearly upsampled to the original image resolution and thresholded at to obtain the final segmentation.
4 Experiments
Table 1: Comparison of in-context segmentation methods on eight biomedical benchmarks (Dice, %, ). All tasks use five annotated source exemplars (). Same/Cross denote within-/cross-marker transfer on DMBM; C/M denote CT/MRI, with arrows indicating transfer directions. 2D Dice is computed per target image, while 3D Dice is computed over the entire target volume. Avg. is the equal-weight mean across datasets. Gray marks UniverSeg results on datasets included in its pretraining (CHAOS and AMOS22), and their contribution to Avg. Best and second-best results are shown in bold and underlined, respectively.
| Method | 2D segmentation | 3D segmentation | Avg. | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chest [-1pt]X-ray | REFUGE [-1pt]Fundus | GlaS [-1pt]Histology | DMBM | CTPelvic1K [-1pt]CT | LPBA40 [-1pt]MRI | CHAOS | AMOS22 | |||||
| Fluorescence | CT / MRI | CT / MRI | ||||||||||
| Same | Cross | CC | MC | MM | CM | |||||||
| Segmentation-trained or test-time adapted | ||||||||||||
| SegGPT [35] | 95.40 | 82.63 | 71.99 | 72.82 | 67.93 | 39.11 | 27.32 | 79.70 | 50.31 | 32.34 | 24.76 | 60.05 |
| UniverSeg [1] | 91.16 | 72.36 | 58.17 | 75.50 | 71.93 | 39.23 | 24.86 | 76.23 | 61.33 | 30.49 | 20.16 | 56.70 |
| HERA [21] | 92.79 | 40.71 | 83.40 | 61.77 | 60.94 | 32.71 | 12.72 | 75.11 | 71.47 | 25.91 | 25.37 | 52.83 |
| Training-free: mask-supervised pretraining | ||||||||||||
| GF-SAM [42] | 67.98 | 54.11 | 79.44 | 26.27 | 26.30 | 3.72 | 2.27 | 32.66 | 26.57 | 5.73 | 4.98 | 33.60 |
| MAUP† [47] | 77.27 | 14.55 | 61.27 | 50.61 | 49.40 | 4.90 | 1.37 | 49.89 | 39.08 | 7.76 | 7.72 | 32.70 |
| Training-free: self-supervised features | ||||||||||||
| INSID3 [3] | 87.30 | 11.83 | 68.61 | 44.00 | 43.54 | 4.45 | 5.53 | 34.89 | 34.51 | 9.66 | 8.43 | 33.16 |
| FoRIS [12] | 93.35 | 33.48 | 80.91 | 30.80 | 27.10 | 6.13 | 5.20 | 32.08 | 27.56 | 6.43 | 5.41 | 35.47 |
| FROST [26] | 91.83 | 79.28 | 83.56 | 78.87 | 75.84 | 31.01 | 28.06 | 70.07 | 58.16 | 25.99 | 17.09 | 59.59 |
| CAST (Ours) | 95.09 | 84.58 | 83.76 | 83.48 | 81.69 | 60.01 | 44.88 | 88.44 | 81.51 | 48.61 | 37.81 | 72.39 |
† MAUP’s 2D results are adapted to the five-shot setting by majority voting over five single-support predictions.

Figure 4: Qualitative comparison of CAST with SegGPT, INSID3, and FROST under the one-shot () setting. Left: cross-subject segmentation on REFUGE, CTPelvic1K, and LPBA40. Right: transfer across imaging appearance on DMBM (cross-marker), CHAOS and AMOS22 (cross-modality). Green overlays indicate reference annotations and ground truth, while purple overlays denote predicted masks. White boxes highlight the zoomed-in regions in REFUGE.
4.1 Experimental Setup
We evaluate CAST on eight biomedical benchmarks spanning 2D and 3D segmentation under cross-subject and cross-modality transfer settings. The 2D datasets include Chest X-ray [14] (lungs), REFUGE [24] (optic disc and cup), GlaS [30] (glands), and DMBM [40] (11 brain regions). DMBM contains fluorescence images acquired with PSD95 and SAP102 markers, enabling both within-marker and cross-marker transfer. The 3D benchmarks comprise CTPelvic1K [18] (4 pelvic structures), LPBA40 [28] (6 brain regions), CHAOS [16] (liver), and AMOS22 [15] (6 abdominal organs). For volumetric segmentation, we consider CTCT and three MRICT settings on CHAOS, and MRIMRI and CTMRI on AMOS22. Detailed dataset protocols and structure-wise results are provided in the supplementary material.
Each episode consists of annotated source exemplars and an unlabeled query image or volume. We use fixed, randomly sampled episodes shared across all methods, with distinct source and query images. Chest X-ray, REFUGE, and GlaS use 600 episodes per setting. For DMBM and the 3D benchmarks, we evaluate 100 episodes per anatomical structure and transfer direction. For 3D tasks, five annotated slices from one source subject guide the segmentation of another subject’s complete volume. Each query slice is processed independently, and the predictions are stacked to reconstruct the volume.
We report Dice (%) [32] per query image for 2D tasks and over the complete query volume for 3D tasks. Results are averaged equally across anatomical structures and transfer directions, with the overall average assigning equal weight to the eight datasets. We compare CAST with segmentation-trained or adapted methods (SegGPT [35], UniverSeg [1], and HERA [21]), SAM-based methods (GF-SAM [42] and MAUP [47]), and frozen self-supervised feature-based methods (INSID3 [3], FoRIS [12], and FROST [26]).
Implementation details. CAST uses a frozen DINOv3 ViT-L/16 backbone with inputs and no gradient updates. For stability calibration, we apply seven fixed geometric transformations to each source image, including translations, rotations, and isotropic scaling. We set and . For candidate retrieval, we retrieve up to candidates per class and use nearest candidates per class to construct the initial target unary map. For correspondence reranking, we retain candidates per class, which are then aggregated through voting. Further implementation details are provided in the Supplementary Material.
4.2 Main Results
Table 1 presents quantitative comparisons across eight biomedical benchmarks, while Fig. 4 provides representative qualitative results. CAST achieves the highest overall average Dice of 72.39%, outperforming the strongest baseline, SegGPT (60.05%), by 12.34 percentage points. The gains are particularly pronounced in volumetric segmentation, where CAST ranks first across all six settings.
Cross-subject segmentation. Under same-modality transfer, CAST achieves strong performance across diverse anatomical structures and imaging conditions. For 2D segmentation, it leads on REFUGE (84.58%) and GlaS (83.76%), and achieves 83.48% on DMBM within-marker transfer, surpassing FROST by 4.61 points. The gains become substantially more pronounced in volumetric segmentation, where five annotated source slices guide segmentation of an unseen 3D volume. On CTPelvic1K and LPBA40, CAST achieves 60.01% and 44.88% Dice, exceeding the strongest baselines by 20.78 and 16.82 percentage points, respectively. Similar improvements are observed on CHAOS CTCT and AMOS22 MRIMRI, where CAST outperforms SegGPT by 8.74 and 16.27 points. These results highlight the effectiveness of calibrated patch correspondences for transferring sparse annotations across subjects and complex anatomy, without requiring mask-supervised pretraining or task-specific optimization.
Cross-modality segmentation. Cross-modality transfer is particularly challenging for appearance-based matching, as corresponding anatomical structures may exhibit substantially different contrasts and textures. By incorporating feature stability and local structural evidence, CAST maintains a clear advantage under such appearance variations. On CHAOS MRICT and AMOS22 CTMRI, it achieves 81.51% and 37.81% Dice, outperforming HERA by 10.04 and 12.44 percentage points, respectively. Notably, HERA relies on test-time parameter adaptation, whereas CAST achieves these improvements without gradient-based updates. The advantage also extends to fluorescence images acquired with different markers. On DMBM, CAST achieves 81.69% Dice in cross-marker transfer, surpassing FROST (75.84%) by 5.85 points.
4.3 Further Analysis
Effect of the source annotation budget. To assess annotation efficiency, we compare CAST with FROST and INSID3 under varying source annotation budgets on CHAOS MRICT. As shown in Fig. 5, CAST consistently outperforms FROST and INSID3 across all annotation budgets. With only one annotated slice, CAST achieves 60.47% Dice, compared with 45.35% for FROST and 33.03% for INSID3. Notably, CAST reaches 78.93% with just three annotated slices, already surpassing FROST’s 60.52% at . Its performance further increases to 81.51% and 83.38% at and , respectively, demonstrating its ability to achieve accurate segmentation with minimal annotation.

Figure 5: Effect of the source annotation budget on CHAOS MRICT. Top: Whole-volume Dice of INSID3, FROST, and CAST with annotated source slices. Bottom: Representative 3D liver segmentations at and , with ground truth (GT) for reference.
Runtime comparison. We further examine the computational efficiency of CAST on CHAOS MRICT, using a dedicated NVIDIA A100 80GB GPU. For INSID3 and FROST, we use source-reuse adaptations of their official inference implementations. As shown in Tab. 2, CAST achieves the lowest total runtime of 34.76 s per volume, compared with 74.48 s for INSID3 and 65.54 s for FROST. Its faster target inference reduces the average runtime to 0.184 s per slice, including source setup. This advantage is particularly valuable in practical settings where the same annotated exemplars are reused across multiple target volumes, as source calibration only needs to be performed once.
Table 2: Runtime comparison on CHAOS MRICT at (seconds). Setup is performed once per annotated source set. Total is the sum of setup and inference time per volume. Avg. per slice includes amortized setup time.
| Method | Setup | Inference | Total | Avg. per slice |
|---|---|---|---|---|
| INSID3 | 0.29 | 74.19 | 74.48 | 0.394 |
| FROST | 3.55 | 61.99 | 65.54 | 0.347 |
| CAST | 7.01 | 27.75 | 34.76 | 0.184 |
Table 3: Ablation of CAST (whole-volume Dice, %, ). and – indicate enabled and disabled tests. All configurations use . CHAOS reports the mean across three MRICT settings.
| Stability | Coherence | LPBA40 | CHAOS | |
|---|---|---|---|---|
| Direct label transfer (1-NN) | 37.72 | 77.53 | ||
| – | – | 41.09 | 79.10 | |
| – | 42.54 | 79.44 | ||
| – | 42.58 | 79.67 | ||
| CAST | 44.88 | 81.51 |
Ablation study. We examine the contributions of the stability test and the coherence test on LPBA40 and CHAOS, as shown in Tab. 3. We also include direct 1-NN label transfer, which assigns each query patch the label of its nearest source patch in the uncalibrated feature space, to assess the effectiveness of the overall matching framework. The stability test alone achieves 42.54% and 79.44% Dice, while the coherence test alone reaches 42.58% and 79.67% on LPBA40 and CHAOS, respectively. Combining both tests further improves performance to 44.88% and 81.51%, with gains of 3.79 and 2.41 percentage points, respectively. The additional improvements over either individual test highlight the complementary roles of feature calibration and neighborhood-based structural evidence in refining anatomical correspondences.
4.4 Challenging Application: Atlas Label Transfer
To further explore the potential of CAST in biomedical research, we consider atlas label transfer, an important application for bringing standardized anatomical knowledge to specimen-specific images. Brain atlases provide a common reference for localizing molecular signals and comparing findings across specimens and imaging modalities [33]. Transferring atlas annotations could reduce the need for labor-intensive manual delineation, but remains challenging due to substantial differences in imaging appearance and the often indistinct boundaries between neighboring brain regions [40].
We evaluate CAST by transferring annotations from the Allen Mouse Brain Common Coordinate Framework (CCFv3) atlas [33] to DMBM fluorescence images. The evaluation covers 11 brain regions across PSD95 and SAP102, with 100 episodes per region–marker combination. Each episode uses five annotated sagittal atlas slices, with region-specific masks obtained through ontology mapping. As shown in Tab. 4, CAST achieves 66.92% and 70.04% Dice on PSD95 and SAP102, respectively, yielding a mean of 68.48% and outperforming FROST by 6.83 percentage points. The qualitative results in Fig. 6 further illustrate CAST’s ability to transfer atlas labels without explicit registration, suggesting promising applications in broader biomedical research.
Table 4: Atlas label transfer to DMBM using five annotated source slices (Dice, %, ). Mean denotes the average of the PSD95 and SAP102 results.
| Method | |||||
|---|---|---|---|---|---|
| Setting | SegGPT | GF-SAM | INSID3 | FROST | CAST (Ours) |
| PSD95 | 50.38 | 27.77 | 37.70 | 59.73 | 66.92 |
| SAP102 | 50.05 | 27.43 | 44.89 | 63.57 | 70.04 |
| Mean | 50.22 | 27.60 | 41.30 | 61.65 | 68.48 |

Figure 6: Qualitative atlas label transfer results in DMBM for the striatum (top) and ventral posterolateral (VPL) nucleus of the thalamus (bottom).
5 Conclusion
We presented CAST, a training-free framework for biomedical in-context segmentation that makes frozen visual representations more reliable for fine-grained anatomical matching. Across eight biomedical benchmarks covering 2D and 3D segmentation, cross-subject, and cross-modality transfer, CAST improves average Dice by 12.34 percentage points over the strongest baseline and ranks first across all six volumetric settings. Beyond conventional benchmarks, CAST achieves 68.48% mean Dice in atlas label transfer, outperforming the strongest baseline by 6.83 percentage points when transferring standardized anatomical annotations to specimen-specific microscopy images. These results highlight the potential of CAST to extend reliable segmentation beyond conventional task-specific settings. The versatility of CAST opens up broader opportunities for annotation-efficient biomedical image analysis, from 2D-to-3D segmentation to atlas-based applications.
Acknowledgements
We thank Prof. Sixian You for providing part of the computational resources used in this work and for helpful discussions.
References
[1] V. I. Butoi, J. J. G. Ortiz, T. Ma, M. R. Sabuncu, J. Guttag, and A. V. Dalca (2023) UniverSeg: universal medical image segmentation. In ICCV, External Links: Link Cited by: §1, §2, §4.1, Table 1.
[2] M. Caron, H. Touvron, I. Misra, H. Jégou, J. Mairal, P. Bojanowski, and A. Joulin (2021) Emerging properties in self-supervised vision transformers. In ICCV, External Links: Document, Link Cited by: §1, §2.
[3] C. Cuttano, G. Trivigno, C. Reich, D. Cremers, C. Masone, and S. Roth (2026) INSID3: training-free in-context segmentation with DINOv3. In CVPR, External Links: Link Cited by: §1, §2, §4.1, Table 1.
[4] T. Dissanayake, Y. George, D. Mahapatra, S. Sridharan, C. Fookes, and Z. Ge (2026) Few-shot learning for medical image segmentation: a review and comparative study. ACM Comput. Surv. 58 (1), pp. 1–36. External Links: Document, Link Cited by: §2.
[5] J. Gao, Q. Lao, Q. Kang, P. Liu, C. Du, K. Li, and L. Zhang (2025) Boosting your context by dual similarity checkup for in-context learning medical image segmentation. IEEE Trans. Med. Imaging 44 (1), pp. 310–319. External Links: Document, Link Cited by: §2.
[6] Y. Gao, D. Liu, Z. Li, Y. Li, D. Chen, M. Zhou, and D. N. Metaxas (2025) Show and segment: universal medical image segmentation via in-context learning. In CVPR, External Links: Document, Link Cited by: §1, §2.
[7] Y. Gao, Y. Zhang, C. Wang, J. Liu, M. Varma, J. Delbrouck, A. Chaudhari, and C. Langlotz (2026) Learning generalizable 3d medical image representations from mask-guided self-supervision. In CVPR, External Links: Link Cited by: §2.
[8] M. S. Gopal, J. S. Chacko, H. Nandwana, S. Hegde, D. Banerjee, and U. Mahesh (2026) REBASE: reference-background subspace elimination for training-free in-context segmentation. arXiv preprint arXiv:2607.09082. Note: Accepted for oral presentation at ACCV 2026 External Links: 2607.09082, Link Cited by: §2.
[9] H. Guan and M. Liu (2022) Domain adaptation for medical image analysis: a survey. IEEE Trans. Biomed. Eng. 69 (3), pp. 1173–1185. External Links: Document, Link Cited by: §1.
[10] B. Guo, Y. Gao, M. Ye, D. Gu, Y. Zhou, L. Axel, and D. Metaxas (2026) K-Prism: a knowledge-guided and prompt integrated universal medical image segmentation model. In ICLR, External Links: Link Cited by: §2.
[11] J. Hu, H. Peng, Y. Yang, X. Guo, Y. Shang, P. Shi, C. Ye, and T. Ma (2025) Neuroverse3D: developing in-context learning universal model for neuroimaging in 3d. In ICCV, External Links: Link Cited by: §2.
[12] M. Hu, J. Yin, M. Dou, M. Zhang, Y. Wang, C. Hu, B. Hu, and Q. Wang (2026) FoRIS: progressive foreground refinement for training-free in-context segmentation. arXiv preprint arXiv:2609.03384. External Links: 2609.03384, Link Cited by: §1, §2, §4.1, Table 1.
[13] F. Isensee, P. F. Jaeger, S. A. A. Kohl, J. Petersen, and K. H. Maier-Hein (2021) nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nat. Methods 18 (2), pp. 203–211. External Links: Document, Link Cited by: §1.
[14] S. Jaeger, S. Candemir, S. Antani, Y. J. Wáng, P. Lu, and G. Thoma (2014) Two public chest X-Ray datasets for computer-aided screening of pulmonary diseases. Quant. Imaging Med. Surg. 4 (6), pp. 475–477. External Links: Document, Link Cited by: §4.1.
[15] Y. Ji, H. Bai, C. Ge, J. Yang, Y. Zhu, R. Zhang, Z. Li, L. Zhang, W. Ma, X. Wan, and P. Luo (2022) AMOS: a large-scale abdominal multi-organ benchmark for versatile medical image segmentation. In NeurIPS, External Links: Link Cited by: §4.1.
[16] A. E. Kavur et al. (2021) CHAOS challenge – combined (CT-MR) healthy abdominal organ segmentation. Med. Image Anal. 69, pp. 101950. External Links: Document, Link Cited by: §4.1.
[17] A. Kirillov, E. Mintun, N. Ravi, H. Mao, C. Rolland, L. Gustafson, T. Xiao, S. Whitehead, A. C. Berg, W. Lo, P. Dollár, and R. Girshick (2023) Segment anything. In ICCV, External Links: Document, Link Cited by: §2.
[18] P. Liu, H. Han, Y. Du, H. Zhu, Y. Li, F. Gu, H. Xiao, J. Li, C. Zhao, L. Xiao, X. Wu, and S. K. Zhou (2021) Deep learning to segment pelvic bones: large-scale CT datasets and baseline models. Int. J. Comput. Assist. Radiol. Surg. 16 (5), pp. 749–756. External Links: Document, Link Cited by: §4.1.
[19] Y. Liu, M. Zhu, H. Li, H. Chen, X. Wang, and C. Shen (2024) Matcher: segment anything with one shot using all-purpose feature matching. In ICLR, External Links: Link Cited by: §2.
[20] J. Ma, Y. He, F. Li, L. Han, C. You, and B. Wang (2024) Segment anything in medical images. Nat. Commun. 15, pp. 654. External Links: Document, Link Cited by: §2.
[21] J. Ma, X. Xiang, W. Li, Q. Fan, and Y. Gao (2026) Selective, regularized, and calibrated: harnessing vision foundation models for cross-domain few-shot semantic segmentation. In CVPR, External Links: Link Cited by: §2, §4.1, Table 1.
[22] L. Meng, S. Lan, H. Li, J. M. Alvarez, Z. Wu, and Y. Jiang (2024) SEGIC: unleashing the emergent correspondence for in-context segmentation. In ECCV, External Links: Document, Link Cited by: §2.
[23] M. Oquab, T. Darcet, T. Moutakanni, H. V. Vo, M. Szafraniec, V. Khalidov, P. Fernandez, D. Haziza, F. Massa, A. El-Nouby, M. Assran, N. Ballas, W. Galuba, R. Howes, P. Huang, S. Li, I. Misra, M. Rabbat, V. Sharma, G. Synnaeve, H. Xu, H. Jégou, J. Mairal, P. Labatut, A. Joulin, and P. Bojanowski (2024) DINOv2: learning robust visual features without supervision. TMLR. External Links: Link Cited by: §1, §2.
[24] J. I. Orlando et al. (2020) REFUGE challenge: a unified framework for evaluating automated methods for glaucoma assessment from fundus photographs. Med. Image Anal. 59, pp. 101570. External Links: Document, Link Cited by: §4.1.
[25] C. Ouyang, C. Chen, S. Li, Z. Li, C. Qin, W. Bai, and D. Rueckert (2023) Causality-inspired single-source domain generalization for medical image segmentation. IEEE Trans. Med. Imaging 42 (4), pp. 1095–1106. External Links: Document, Link Cited by: §1.
[26] J. Park (2026) FROST: training-free few-shot segmentation with frozen features and nonparametric statistics. arXiv preprint arXiv:2606.31136. External Links: 2606.31136, Link Cited by: §1, §2, §4.1, Table 1.
[27] M. Rakic, H. E. Wong, J. J. G. Ortiz, B. A. Cimini, J. V. Guttag, and A. V. Dalca (2024) Tyche: stochastic in-context learning for medical image segmentation. In CVPR, External Links: Document, Link Cited by: §1, §2.
[28] D. W. Shattuck, M. Mirza, V. Adisetiyo, C. Hojatkashani, G. Salamon, K. L. Narr, R. A. Poldrack, R. M. Bilder, and A. W. Toga (2008) Construction of a 3d probabilistic atlas of human cortical structures. NeuroImage 39 (3), pp. 1064–1080. External Links: Document, Link Cited by: §4.1.
[29] O. Siméoni, H. V. Vo, M. Seitzer, F. Baldassarre, M. Oquab, C. Jose, V. Khalidov, M. Szafraniec, S. E. Yi, M. Ramamonjisoa, F. Massa, D. Haziza, L. Wehrstedt, J. Wang, T. Darcet, T. Moutakanni, L. Sentana, C. Roberts, A. Vedaldi, J. Tolan, J. Brandt, C. Couprie, J. Mairal, H. Jégou, P. Labatut, and P. Bojanowski (2026) DINOv3. TMLR. External Links: Link Cited by: §1, §1, §2, §3.
[30] K. Sirinukunwattana, J. P. W. Pluim, H. Chen, X. Qi, P. Heng, Y. B. Guo, L. Y. Wang, B. J. Matuszewski, E. Bruni, U. Sanchez, A. Böhm, O. Ronneberger, B. B. Cheikh, D. Racoceanu, P. Kainz, M. Pfeiffer, M. Urschler, D. R. J. Snead, and N. M. Rajpoot (2017) Gland segmentation in colon histology images: the GlaS challenge contest. Med. Image Anal. 35, pp. 489–502. External Links: Document, Link Cited by: §4.1.
[31] S. Sun, M. Ren, and H. Zhang (2026) Training-free cross-domain few-shot segmentation via robust semantic representation and matching. In ECCV, External Links: Document, Link Cited by: §2.
[32] A. A. Taha and A. Hanbury (2015) Metrics for evaluating 3D medical image segmentation: analysis, selection, and tool. BMC Med. Imaging 15, pp. 29. External Links: Document, Link Cited by: §4.1.
[33] Q. Wang, S. Ding, Y. Li, J. Royall, D. Feng, P. Lesnar, N. Graddis, M. Naeemi, B. Facer, A. Ho, T. Dolbeare, B. Blanchard, N. Dee, W. Wakeman, K. E. Hirokawa, A. Szafer, S. M. Sunkin, S. W. Oh, A. Bernard, J. W. Phillips, M. Hawrylycz, C. Koch, H. Zeng, J. A. Harris, and L. Ng (2020) The Allen Mouse Brain Common Coordinate Framework: A 3D Reference Atlas. Cell 181 (4), pp. 936–953.e20. External Links: Document, Link Cited by: §4.4, §4.4.
[34] X. Wang, W. Wang, Y. Cao, C. Shen, and T. Huang (2023) Images speak in images: a generalist painter for in-context visual learning. In CVPR, External Links: Link Cited by: §1, §2.
[35] X. Wang, X. Zhang, Y. Cao, W. Wang, C. Shen, and T. Huang (2023) SegGPT: towards segmenting everything in context. In ICCV, External Links: Link Cited by: §1, §2, §4.1, Table 1.
[36] J. Wasserthal, H. Breit, M. T. Meyer, M. Pradella, D. Hinck, A. W. Sauter, T. Heye, D. T. Boll, J. Cyriac, S. Yang, M. Bach, and M. Segeroth (2023) TotalSegmentator: robust segmentation of 104 anatomic structures in CT images. Radiol. Artif. Intell. 5 (5), pp. e230024. External Links: Document, Link Cited by: §1.
[37] H. E. Wong, J. J. G. Ortiz, J. Guttag, and A. V. Dalca (2025) MultiverSeg: scalable interactive segmentation of biomedical imaging datasets with in-context guidance. In ICCV, External Links: Document, Link Cited by: §2.
[38] J. Wu and M. Xu (2024) One-prompt to segment all medical images. In CVPR, External Links: Document, Link Cited by: §2.
[39] S. Xie, L. Zhang, Z. Niu, F. Ye, Q. Zhong, D. Xie, Y. Chen, and L. Lin (2026) EICSeg: universal medical image segmentation via explicit in-context learning. IEEE Trans. Med. Imaging 45 (1), pp. 53–69. External Links: Document, Link Cited by: §2.
[40] K. Yuan, H. Woods, Ü. Günar, D. Dominic, Y. Wu, Z. Qiu, and S. G. N. Grant (2026) PRMix: primary region mix augmentation and benchmark dataset for precise whole mouse brain anatomical delineation. NeuroImage 331, pp. 121881. External Links: Document, Link Cited by: §4.1, §4.4.
[41] H. M. Zakir and E. T. W. Ho (2026) Revealing the semantic selection gap in DINOv3 through training-free few-shot segmentation. arXiv preprint arXiv:2602.07550. External Links: 2602.07550, Link Cited by: §2.
[42] A. Zhang, G. Gao, J. Jiao, C. H. Liu, and Y. Wei (2024) Bridge the points: graph-based few-shot segment anything semantically. In NeurIPS, External Links: Document, Link Cited by: §2, §4.1, Table 1.
[43] L. Zhang, X. Wang, D. Yang, T. Sanford, S. A. Harmon, B. Turkbey, B. J. Wood, H. Roth, A. Myronenko, D. Xu, and Z. Xu (2020) Generalizing deep learning for medical image segmentation to unseen domains via deep stacked transformation. IEEE Trans. Med. Imaging 39 (7), pp. 2531–2540. External Links: Document, Link Cited by: §1.
[44] R. Zhang, Z. Jiang, Z. Guo, S. Yan, J. Pan, H. Dong, Y. Qiao, P. Gao, and H. Li (2024) Personalize segment anything model with one shot. In ICLR, External Links: Link Cited by: §2.
[45] J. Zhao, F. Yang, X. Li, Z. Jiao, Q. Zhai, X. Li, D. Wu, H. Fu, and H. Cheng (2026) SegMIC: a universal model for medical image segmentation through in-context learning. Pattern Recognit. 171, pp. 112179. External Links: Document, Link Cited by: §2.
[46] M. Zheng, B. Planche, Z. Gao, T. Chen, R. J. Radke, and Z. Wu (2024) Few-shot 3d volumetric segmentation with multi-surrogate fusion. In MICCAI, External Links: Document, Link Cited by: §2.
[47] Y. Zhu and H. Zhang (2025) MAUP: training-free multi-center adaptive uncertainty-aware prompting for cross-domain few-shot medical image segmentation. In MICCAI, External Links: Document, Link Cited by: §2, §4.1, Table 1.