Source-linked AI summary

CVP-BAA: Efficiently Adapting Segment Anything Model for Medical Image Segmentation

Mei Wang, Minghui Li, Libin Lan

arXiv:2610.30672v1eess.IV

TL;DR

Medical segmentation models rely on extensive annotations, and existing adaptations often do not explicitly integrate local structure into self-attention. CVP-BAA combines local structural prompting with boundary-aware refinement, and the paper reports superior performance across benchmarks against task-specific and SAM-adaptation baselines.

  • Problem

    Task-specific medical segmentation models depend on extensive manual annotations, while existing local cues are not integrated into self-attention sufficiently for precise fine-grained segmentation.

    Source: §1 · pp. 2–3
  • Method

    CVP-BAA adapts SAM by injecting local structural priors into global dependency modeling and adding boundary-aware refinement for fine-grained structures.

    Source: §1 · p. 4, §6 · p. 28
  • Results

    CVP-BAA consistently achieves state-of-the-art segmentation, outperforming task-specific models and PEFT-based SAM adaptations in quantitative metrics and qualitative results.

    Source: §1 · p. 5
  • Takeaways & Limitations

    The results support combining explicit local priors with boundary-aware refinement as a promising direction for medical image foundation-model adaptation.

    Source: §6 · p. 29

    Existing methods often integrate local cues post hoc or through cross-branch fusion, leaving their influence on ViT self-attention suboptimal.

    Source: §2.2 · p. 7

Abstract

from arXiv · show

Various task-specific medical segmentation models have demonstrated strong performance, their heavy reliance on extensive annotations and highly specialized architectures limits their versatility, scalability, and clinical applicability. Recently, adapting vision foundation models, particularly the segment anything model (SAM), has emerged as a promising alternative. However, prevalent parameter-efficient fine-tuning (PEFT) strategies, such as prompt tuning and adapter tuning, often lack an explicit mechanism to embed local structural priors into the long-range dependency modeling of vision transformers (ViT), rendering them insufficiently sensitive to fine-grained details. To address these limitations, we introduce CVP-BAA, a novel hybrid PEFT method that improves SAM's sensitivity to domain-specific textures and local details, leading to superior boundary delineation. The proposed CVP-BAA adopts two key ideas. First, it introduces a convolutional visual prompting (CVP) strategy that leverages convolutional features as structural priors, prepending them to the key and value projections within the multi-head self-attention layers of strategically selected ViT blocks. Through a dedicated prompt generation-and-injection module, this mechanism effectively bridges local spatial details with global context semantics. Second, a boundary-aware adapter (BAA) is designed as a parallel branch to the feed-forward network within the same selected blocks. By explicitly computing and amplifying high-frequency components, the BAA enhances feature representations along tissue boundaries and fine-grained lesion structures. Extensive experiments on five benchmarks across three imaging modalities demonstrate that CVP-BAA achieves superior segmentation performance, surpassing existing task-specific models and PEFT-based SAM adaptations in both quantitative metrics and qualitative results.

1. Introduction

Task-specific medical segmentation models rely on extensive manual annotations, limiting their adaptability and scalability in clinical practice. CVP-BAA adapts SAM by combining local structural prompting with boundary-aware refinement.

  • SAM's global ViT modeling lacks explicit mechanisms for local structures and fine boundaries, although clinical segmentation requires precise delineation of subtle anatomy and irregular lesions.Source: §1 · p. 2
  • CVP transforms CNN-derived local features into prompts prepended to key and value sequences in selected MHSA blocks, guiding global dependency modeling with local priors.Source: §1 · p. 4
  • BAA runs parallel to the FFN and amplifies high-frequency edges and textures to enrich representations along tissue boundaries and fine-grained anatomical structures.Source: §1 · p. 5
  • Across five benchmarks and three modalities, CVP-BAA achieves state-of-the-art segmentation, outperforming task-specific models and PEFT-based SAM adaptations quantitatively and qualitatively.Source: §1 · p. 5

2. Related Work

Task-specific CNNs, transformers, and hybrids each address different segmentation needs, but often remain constrained by local or global modeling weaknesses and task-specific design. SAM adaptations use several PEFT strategies, yet many do not integrate local priors into self-attention or explicitly enhance boundary information.

2.1. Task-Specific Approaches

  • CNNs preserve spatial details but constrain long-range modeling; transformers capture global context yet can oversmooth boundaries, while hybrids add engineered fusion and remain task-tuned.Source: §2.1 · pp. 5–6

2.2. Segment Anything Model Adaptations

  • SAM adaptations include prompt tuning, adapters, and LoRA; prompts have limited capacity for local detail, while generic adapters lack domain-specific inductive biases.Source: §2.2 · p. 7
  • Prior methods often integrate local cues post hoc or through cross-branch fusion rather than inside self-attention, and lightweight modules lack explicit high-frequency boundary enhancement.Source: §2.2 · pp. 7–8

3. Method

CVP-BAA adapts frozen SAM with parallel ViT and CNN pathways, injecting CNN-derived local priors into attention and refining boundaries through a high-frequency adapter. A hybrid Dice and BCE loss trains the segmentation model.

3.1. Overall Framework

  • CVP-BAA preserves frozen SAM and combines ViT and CNN feature extraction with convolutional visual prompting and a boundary-aware adapter.The branches align at H/8×W/8; the two modules inject local structural priors into attention and refine boundary details.Source: §3.1 · pp. 8–9

3.2. Convolutional Visual Prompting

  • CVP prepends CNN-derived local prompts to key and value projections in selected self-attention blocks, allowing local textures and boundary cues to inform global context modeling.Prompts are generated from CNN features and injected in ViT blocks 3, 6, 9, and 12.Source: §3.1 · p. 9, §3.2 · pp. 11–12

3.3. Boundary-Aware Adapter

  • The BAA runs parallel to the FFN, isolates high-frequency features by subtracting average-pooled low-pass outputs, and scales its contribution to the transformer pathway.The scaling factor balances the adapter branch with the primary pathway; ablations report optimal performance at s = 0.3.Source: §3.3 · pp. 12–13

3.4. Loss Function

  • Training combines Dice loss and binary cross-entropy to address class imbalance, with λ set to 0.8 in all experiments.Dice loss evaluates overlap between predictions and ground-truth labels.Source: §3.4 · pp. 13–14

4. Experimental Settings

The evaluation spans five datasets across ultrasound, endoscopy, and dermoscopy, including three ultrasound benchmarks and two datasets for cross-domain generalization.

4.1. Datasets

  • The five-dataset benchmark covers ultrasound, endoscopy, and dermoscopy, with CVC-ClinicDB and ISIC-2018 included to assess cross-domain generalization.The ultrasound datasets include two breast ultrasound benchmarks and one thyroid ultrasound benchmark.Source: §4.1 · pp. 14–15

4.1.1. BUSI

  • BUSI contains 780 pixel-wise annotated breast ultrasound images and uses the SAMUS 7:1:2 training, validation, and testing split.Images average 500×500 pixels and were acquired using LOGIQ E9 and LOGIQ E9 Agile scanners.Source: §4.1.1 · p. 15

4.1.2. UDIAT

  • UDIAT comprises 163 pixel-wise annotated ultrasound images, split into 115 training, 16 validation, and 32 testing images.Images are from female patients and have a mean resolution of 760×570 pixels.Source: §4.1.2 · p. 15

4.1.3. TN3K

  • TN3K contains 3,493 thyroid ultrasound images, divided into 2,303 training, 576 validation, and 614 testing samples.The images were collected across three ultrasound systems; the split follows SAMUS and TRFE+ protocols.Source: §4.1.3 · p. 15

4.1.4. CVC-ClinicDB

  • CVC-ClinicDB contains 612 colonoscopy images, partitioned into 490 training, 61 validation, and 61 testing images.It was originally used for the MICCAI 2015 Sub-Challenge on Automatic Polyp Detection.Source: §4.1.4 · pp. 15–16

4.1.5. ISIC-2018

  • ISIC-2018 contains 2,594 clinical dermoscopy images, split into 1,868 training, 467 validation, and 259 testing images.The images have varying resolutions and are used for skin lesion segmentation benchmarking.Source: §4.1.5 · p. 16

4.2. Evaluation Metrics

The evaluation uses segmentation quality metrics tailored to the datasets and reports computational efficiency alongside performance.

  • Six segmentation metrics are used: Dice, HD, mIoU, Acc, Prec, and Rec, with dataset-specific reporting and efficiency measures.BUSI, UDIAT, and TN3K report Dice and HD; ISIC-2018 and CVC-ClinicDB report Dice, mIoU, Acc, Prec, and Rec. Efficiency is measured by #Params, FLOPs, and FPS, with results averaged over three runs.Source: §4.2 · p. 16

4.3. Implementation Details

Training freezes the pretrained SAM components and optimizes only the added adaptation components, using a fixed training protocol and single-point prompts.

  • The ViT-B SAM image encoder, prompt encoder, and mask decoder remain frozen; only the parallel CNN branch, CVP, and BAA are optimized.Experiments use an NVIDIA GeForce RTX 3090 GPU with 24 GB memory, 200 epochs, Adam, an initial learning rate of 1e −4, and batch size 8.Source: §4.3 · p. 16
  • Training uses a Dice-plus-BCE hybrid loss, single-point prompts, and inputs resized to 256×256 pixels.The pretrained SAM backbone was trained on SA-1B.Source: §4.3 · pp. 16–17

5.1. Comparisons with other methods

CVP-BAA is compared with task-specific CNN, transformer, and hybrid models, as well as SAM and its adaptation methods, across ultrasound, endoscopy, and dermoscopy benchmarks. Across these comparisons, it achieves strong quantitative results and clearer lesion boundaries.

5.1.1. Comparison on BUSI, UDIAT, and TN3K

  • 86.71%, 89.72%, and 85.23% Dice on BUSI, UDIAT, and TN3K, respectively, with the lowest HD values of 24.52 mm, 13.17 mm, and 27.77 mm.The reported comparisons place CVP-BAA ahead of task-specific models and SAM adaptations across the three ultrasound benchmarks.Source: §5.1.1 · pp. 17–18, Table 1 · p. 18
  • On BUSI, UDIAT, and TN3K, CVP-BAA produces clearer boundaries and fewer segmentation errors than task-specific models and existing SAM adaptations.The comparison highlights blurred edges and over- or under-segmentation in competing methods on challenging ultrasound cases.Source: Figure 5 · p. 19, §5.1.1 · p. 19

5.1.2. Comparison on CVC-ClinicDB

  • CVP-BAA achieves 94.11% Dice, 89.36% IoU, 99.16% Accuracy, 94.57% Precision, and 94.21% Recall on CVC-ClinicDB.It exceeds SAMUS by +0.83% Dice, +1.27% mIoU, +0.15% Accuracy, +1.46% Precision, and +0.02% Recall.Source: Table 2 · p. 20, §5.1.2 · p. 20
  • On CVC-ClinicDB, CVP-BAA’s qualitative segmentations closely match the ground truth.The visual comparison is presented as supporting the quantitative results.Source: Figure 6 · p. 21, §5.1.2 · p. 22

5.1.3. Comparison on ISIC-2018

  • 90.40% Dice, 83.75% IoU, 96.27% Accuracy, 92.44% Precision, and 91.66% Recall establish CVP-BAA’s state-of-the-art result on ISIC-2018.The paper describes this dermoscopy benchmark as evidence of cross-modality generalization.Source: Table 3 · p. 22, §5.1.3 · pp. 22–23
  • On ISIC-2018, CVP-BAA’s lesion regions and boundaries more closely align with the ground truth than the compared methods.The qualitative comparison supports the reported dermoscopy metrics.Source: Figure 7 · p. 23, §5.1.3 · p. 23

5.2. Ablation Study

The ablations evaluate CVP and BAA individually and together against a modified SAMUS baseline on BUSI and TN3K, then test prompt injection, placement, scaling, and component visualizations.

5.2.1. Effectiveness of CVP

  • +2.12% Dice and -1.97 mm HD on BUSI, and +2.30% Dice and -1.48 mm HD on TN3K, result from adding CVP alone to the baseline.The paper attributes these gains to injecting local fine-grained details to guide global dependency modeling.Source: §5.2.1 · p. 24

5.2.2. Effectiveness of BAA

  • +3.58% Dice and -2.83 mm HD on BUSI, and +3.09% Dice and -1.97 mm HD on TN3K, result from adding BAA alone.The paper links BAA to stronger high-frequency boundary delineation and fewer boundary errors.Source: §5.2.2 · p. 24

5.2.3. Effectiveness of Combinations

  • 86.71% Dice and 24.52 mm HD on BUSI, and 85.23% Dice and 27.77 mm HD on TN3K, are achieved when CVP and BAA are combined.The combined configuration achieves the best performance across both datasets.Source: §5.2.3 · p. 24, Table 4 · p. 24

5.2.4. Effectiveness of Prompt Injection Schemes

  • Sequence prepending outperforms element-wise addition by 0.78% Dice and -1.05 mm HD on BUSI, and 0.49% Dice and -0.38 mm HD on TN3K.The adopted scheme prepends prompts to the key and value sequences.Source: §5.2.4 · p. 25, Table 5 · p. 25

5.2.5. Effectiveness of Prompt Injection Positions

  • Injecting CVP at the 3rd, 6th, 9th, and 12th ViT blocks yields the highest Dice scores and lowest HD values on both BUSI and TN3K.The ablation reports that expanding injection across more blocks progressively integrates local priors through the frozen SAM encoder.Source: §5.2.5 · p. 25, Table 6 · p. 26

5.2.6. Effectiveness of Scaling Factor s

  • s = 0.3 achieves the best Dice and HD metrics on both datasets; smaller values under-inject task-specific information, while larger values perturb the pretrained backbone and degrade generalizability.The paper fixes s = 0.3 for all experiments as a balance between the adapter branch and transformer pathway.Source: §5.2.6 · p. 26, Table 7 · p. 26

5.2.7. Visualization of Component Contributions

  • Grad-CAM visualizations show CVP emphasizing local fine-grained structures, BAA activating high-frequency boundaries, and the full model producing the most boundary-aligned attention maps.The baseline attention is dispersed and often focuses on irrelevant background regions.Source: Figure 8 · p. 27, §5.2.6 · p. 27, §5.2.7 · pp. 27–28

5.3. Efficiency Analysis

The efficiency analysis compares SAM-based models on BUSI at 256×256 resolution under identical hardware configurations.

5.3. Efficiency Analysis

  • 30.20M trainable parameters versus SAMUS’s 39.65M is a ∼23.8% reduction; CVP-BAA uses 143.46 GFLOPs and runs at 37.92 FPS.It has more trainable parameters than SAMed’s 18.81M, while the paper reports a favorable efficiency-capacity trade-off and substantially better segmentation accuracy than SAMed.Source: §5.3 · p. 28

6. Conclusion

CVP-BAA combines local structural priors with boundary-aware refinement and outperforms task-specific segmentation models and SAM-based adaptations on multiple public datasets. Generalization to unseen clinical domains and data-scarce settings remains open.

6. Conclusion

  • CVP injects local structural priors into global dependency modeling, while BAA enhances representations of fine-grained structures and ambiguous lesion boundaries.The conclusion presents CVP-BAA as an efficient SAM adaptation framework for medical image segmentation.Source: §6 · p. 28
  • CVP-BAA consistently outperforms dedicated task-specific segmentation models and existing SAM-based adaptation methods across multiple public datasets and imaging modalities.The authors describe these results as validating the combination of explicit local priors with boundary-aware structural refinement.Source: §6 · p. 29
  • Generalization to completely unseen clinical domains and data-scarce scenarios remains an open challenge for the current design.The authors identify more parameter-efficient mechanisms and few-shot learning as future directions.Source: §6 · p. 29

Data Availability Statement

The article states that all data supporting the study's findings are included within the article.

Data Availability Statement

Loading 2610.30672v1…