Source-linked AI summary
Learning Prostate Anatomy at Test Time for Cancer Detection in Micro-Ultrasound
Obed Korshie Dzikunu, Mohammad Mahdi Abootorabi, Mohamed Harmanani, Paul F. R. Wilson, Emma Willis, Ferdinand Luger, Adam Kinnaird, Brian Wodlinger, Parvin Mousavi, Purang Abolmaesumi
TL;DR
Domain shift across clinical centers and scanner generations can degrade micro-ultrasound prostate cancer detection, while existing test-time adaptation methods overlook target-domain anatomy. ANT uses prostate segmentation as an anatomical test-time signal and consistently outperforms nonadapted and existing adapted approaches across unseen centers.
Problem
Micro-ultrasound cancer-detection models may suffer significant performance degradation across clinical centers or scanner generations, and existing TTA methods do not use anatomical structure as an adaptation signal.
Method
ANT adapts a cancer-detection encoder at test time through an auxiliary prostate-segmentation task supervised by pseudo-masks from a pretrained segmentation model.
Results
ANT consistently outperforms nonadapted and existing TTA approaches across unseen clinical centers and scanner generations, while improving anatomical alignment and spatial specificity.
Takeaways & Limitations
Anatomically grounded adaptation improves diagnostic performance and spatial specificity under multi-center domain shift, with the approach generalizing to another detection model without architecture-specific tuning.
Takeaways & Limitations
ANT depends on a pretrained prostate-segmentation model for pseudo-labels, and its effectiveness under more severe shifts in scanners, protocols, or patient populations remains an open question.
Abstract
from arXiv · showhide
Domain shift across clinical centers using different imaging hardware or acquisition protocols remains a fundamental barrier to deploying deep learning models for prostate cancer (PCa) detection. Existing test-time adaptation (TTA) methods address distribution shift through entropy minimization or augmentation-based self-supervision, correcting for statistical differences in image appearance but ignoring the anatomical structure of the target domain. We propose ANT, a segmentation-guided TTA framework that adapts a pretrained cancer detection encoder to the target domain by solving an auxiliary prostate segmentation task at test time, supervised by pseudo-masks from a frozen pretrained segmentation network. By aligning encoder representations to prostate anatomy in the target domain, ANT corrects domain-specific feature drift while preserving cancer-discriminative structure. The model was trained on 693 patients imaged with an earlier-generation micro-ultrasound scanner in a multi-center clinical trial, and evaluated on 118 patients acquired with a newer-generation system across two centers in another clinical trial. Under a leave-one-center-out protocol with identical evaluation conditions across all methods, ANT improves mean AUC by 2.9% and 3.6% at the biopsy-core and patient levels, respectively, over no adaptation, outperforming TTA baselines. Code is available at: https://github.com/ObedDzik/ant.git.
1. Introduction
Micro-ultrasound offers accessible, high-resolution prostate imaging, but domain shift across centers and scanner generations can degrade cancer-detection models. ANT addresses this gap by adapting the detection encoder at test time using prostate anatomy as a segmentation-guided signal.
- Clinical motivation: Micro-ultrasound provides spatial resolution comparable to mpMRI at lower cost while retaining ultrasound’s accessibility, portability, and real-time guidance.It operates at approximately 29 MHz versus 5–9 MHz for conventional TRUS.
- Clinical motivation: Domain shift from differing centers, scanner generations, and acquisition conditions can substantially degrade micro-ultrasound cancer-detection performance.Existing TTA methods use entropy minimization or augmentation consistency but do not exploit medical-image anatomy.
- ANT framework: ANT adapts a pretrained cancer-detection encoder by solving a prostate-segmentation auxiliary task at test time using pseudo-masks from a frozen segmentation network.A lightweight segmentation head updates the first n ViT layers, while the encoder is restored after each sample and the segmentation head accumulates adaptation.
- ANT framework: ANT is presented as the first framework to use organ segmentation as a test-time adaptation signal for cancer detection.The approach leverages anatomical invariance rather than relying only on global feature statistics or output logits.
- Evidence and implications: Across two multi-center clinical trial cohorts, ANT consistently outperformed existing TTA approaches and improved upon a prior state-of-the-art prostate cancer detection model.The paper frames anatomical invariance as a targeted adaptation signal that can remain useful when image statistics differ across domains.
- Evidence and implications: Controlled ablations indicate that anatomical segmentation provides a robust adaptation signal for mitigating domain shift.Updating early encoder layers, which process low-level signal statistics, outperformed updating middle or late layers.
2. Related Work
Prior domain-shift methods include adaptation, generalization, meta-learning, and test-time techniques, but many remain fixed after training or rely on generic statistical signals. ANT responds by using prostate segmentation as an anatomically grounded adaptation signal.
- Domain-shift methods: Domain adaptation methods use labeled source and unlabeled target data during training to reduce distribution mismatch through feature alignment, adversarial learning, or image translation.These methods differ from TTA because adaptation occurs during training with access to source data.
- Domain-shift methods: Training-time approaches for prostate micro-ultrasound remain limited by the domain variability observed during development and may be less characterized under unseen acquisition conditions.Scanner generation, transducer frequency, and center-specific protocols are identified sources of domain shift.
- Test-time adaptation: TTA adapts models at inference using unlabeled target-domain data without source labels or retraining.Representative methods include entropy minimization, sample selection, Fisher regularization, and sharpness-aware minimization.
- Test-time adaptation: A medical-image TTA benchmark found that no single paradigm generalizes across all conditions and that entropy-based methods degrade under large inter-center and inter-device shifts.This motivates adaptation signals tailored to the target medical domain.
- Test-time adaptation: Recent medical-imaging TTA methods use task-specific gradient alignment, anchor-guided pseudo-labels, or other specialized signals.These approaches include GraTa, A3-TTA, and DEnEM.
- ANT’s positioning: ANT addresses the remaining gap by using prostate segmentation as a structured, anatomically grounded signal that targets domain-specific encoder feature drift.This differs from methods based on entropy minimization, augmentation consistency, or gradient alignment alone.
3. Methods
The method adapts a pretrained cancer-detection encoder on unlabeled target images by aligning its representations to prostate anatomy through pseudo-supervised segmentation, while retaining the detection head and controlling encoder updates.
- Problem formulation: ANT formulates test-time adaptation as updating a pretrained encoder on unlabeled target images using an anatomical auxiliary task.The source-trained model maps images through an encoder and detection head, while adaptation uses target samples without labels.
- Anatomical alignment: A frozen MicroSegNet generates prostate pseudo-masks that supervise a lightweight segmentation head attached to the encoder.The pseudo-label generator remains frozen throughout adaptation.
- Anatomical alignment: The TTA objective combines Dice loss for global shape agreement with binary cross-entropy for pixel-level alignment between predicted and pseudo segmentation masks.The weighting parameter λ balances the two loss terms.
- Encoder update strategy: Only the first n transformer blocks are updated during adaptation, with all parameters within those blocks included in the update set.The encoder-update set is defined by the indices of the first n blocks.
- Adaptation procedure: ANT adapts the encoder and persistent segmentation head for multiple steps, predicts cancer with the adapted encoder, then restores the encoder checkpoint while retaining the head and optimizer.The algorithm prevents encoder state from carrying across samples while allowing the segmentation head to accumulate adaptation.
- Detection model and training: The detection architecture uses a pretrained DINOv3 ViT-L/16 encoder, hierarchical UNETR-style decoding, bidirectional two-way attention, and mask and class decoders.The model produces spatial cancer heatmaps and image-level clinically significant cancer scores; training combines image-level and spatial supervision.
4. Study Cohort
The study evaluates cross-center and cross-scanner generalization using clinical-trial biopsy cohorts, standardized pre-fire micro-ultrasound images, pathology-derived labels, and a held-out-center AUC comparison.
- Eligibility: The cohorts enrolled biopsy-indicated adults without prior biopsy or genitourinary cancer, subject to additional biopsy and imaging eligibility criteria.Eligibility was based on elevated PSA and/or abnormal digital rectal examination, with exclusion criteria mirroring the stated conditions.
- Cohorts: The training cohort comprised retrospective 2013–2016 data from five institutions using an earlier-generation ExactVu micro-ultrasound system and typically 10–12 cores per subject.The source cohort was drawn from clinical trial NCT02079025 and is designated Center A.
- Study design: Centers differed in scanner generation and acquisition protocol, creating the deployment-time domain shift evaluated in the study.The cohort-statistics table organizes the study data by clinical center.
- Data acquisition: Sagittal B-mode images were acquired at 28 mm depth and 46.06 mm width, with a 30-second cineloop recorded for each biopsy core.The representative input was the final pre-fire frame co-registered with the needle trace, avoiding needle artefact.
- Reference labels: Histopathology supplied cancer diagnosis, percentage involvement, and ISUP Grade Group labels, with clinically significant cancer defined as Grade Group ≥3.Labels were assigned to the full needle-trace region, and patient labels reflected the most severe finding.
- Preprocessing: Images were resized from 1372×833 to 512×512 pixels, normalized to [0, 1], and analyzed using imaging features without clinical metadata.The encoder represented each resized image as 1024 patch tokens from 16×16-pixel patches.
- Evaluation: Table 2 compares AUC with 95% bootstrap confidence intervals across held-out evaluation centers B and C, with bold marking the best value per column.The table is evaluated under the leave-one-center-out protocol.
5. Results
ANT improves cancer-detection performance across held-out centers and remains effective across segmentation quality, detection architectures, activation thresholds, and encoder-update strategies. Its strongest configuration updates early encoder blocks using full-block adaptation and moderate optimization steps.
- Comparison Against TTA Baselines: 84.4% mean core-level AUC and 82.1% mean patient-level AUC were achieved by ANT, exceeding no adaptation by 2.9% and 3.6%, respectively.ANT also surpassed all competing TTA methods under the leave-one-center-out evaluation.
- Comparison Against TTA Baselines: Existing TTA baselines produced inconsistent center-specific changes, whereas ANT achieved statistically significant improvement over SAR on Center C core-level csPCa AUC.Baseline methods often improved on one center while degrading on the other.
- Sensitivity to Pseudo-Mask Quality: ANT improved per-patient csPCa AUC over the unadapted baseline in 12 of 14 cases across low, mid, and high pseudo-mask Dice tertiles.In the low-quality tertile, median Dice was 0.60 with a range of 0.36–0.71, yet ANT improved csPCa AUC in all three evaluated cases.
- Generalization to State-of-the-Art Architecture: ANT improved PNF+ performance by a mean AUC of at least 3% across test centers without architecture-specific tuning.This supports generalization of the anatomical-alignment TTA approach across detection architectures.
- Generalization to State-of-the-Art Architecture: PNF+ + ANT consistently outperformed PNF+ across involvement thresholds and centers while reducing activation leakage across benign and cancerous cores.AUROC increased with involvement threshold, and ANT concentrated activation-leakage distributions near zero, indicating more spatially specific activations.
- Encoder Update Strategy: Updating the first n encoder blocks performed best, while updating middle, late, or all blocks degraded performance and partial early-block updates were inferior to full-block updates.Increasing inner optimization steps from 2 to 10 improved all metrics, but 20 steps caused a noticeable decline, particularly at the core level.
6. Discussion
ANT consistently outperforms nonadapted and state-of-the-art detection models across unseen centers and scanner generations, while improving spatial specificity. The results support prostate anatomy as a stable adaptation target, but the method remains untested under more severe domain shifts.
- ANT consistently outperforms the nonadapted baseline and PNF+ across unseen clinical centers and scanner generations.
- Baseline TTA methods improve at Center B (prevalence: 34.6%) but degrade at Center C (prevalence: 27.0%), a pattern not explained by class prior shift alone.
- ANT reduces activation leakage and concentrates heatmap activations near zero across benign and cancerous cores at both test centers.Activation leakage is the ratio of average prostate heatmap activation to needle-region activation.
- The results provide empirical support that the prostate remains identifiable enough across the studied shifts to serve as a reliable anatomical supervision target.MicroSegNet generated pseudo-masks of sufficient quality across both test centers and the encountered patient populations.
- Early-block adaptation produces gradual feature shifts within the decoder’s operating range rather than disruptive distributional discontinuities.This is attributed to gradients propagating through frozen layers and decoder robustness from augmented source-domain training.
- ANT’s evidence is limited to the domain shifts between the source and two target centers, leaving effectiveness under substantially different scanners, protocols, or populations open.
A.1.1. Training Configuration
The detection model uses a fixed PyTorch training configuration with DINOv3 ViT-L/16 encoder initialization, AdamW optimization, and separate encoder and decoder learning rates.
- The model was trained for 35 epochs with batch size 4 using AdamW and a fixed random seed of 30.AdamW parameters included β1 = 0.9, β2 = 0.999, ϵ = 10^-8, and weight decay = 0.01.
- The DINOv3 ViT-L/16 encoder used self-supervised pretrained weights and was fine-tuned with learning rate 10^-5.
- The UNETR decoder used learning rate 10^-4, with cosine annealing scheduling applied to both encoder and decoder optimization.
A.1.2. Data Augmentation
Training-only augmentation applies sequential affine translation and random resized cropping, while transforming image masks consistently to preserve spatial correspondence.
- Augmentation was applied only to the training set using sequential random affine translation and random resized cropping.Translation displacement was capped at 20% per spatial dimension; crops were 512 × 512 pixels with scale uniformly sampled from (0.3, 1.0).
- Both transformations were applied with probability 0.5.
- Needle and prostate masks were transformed consistently with each image to preserve spatial correspondence.
- Images were normalized to [0, 1] by min-max scaling and then standardized.
A.1.3. Class and Mask Decoder
After UNETR encoding, a two-way transformer performs bidirectional cross-attention between image embeddings and learnable query tokens before routing contextualized representations to task-specific decoders.
- UNETR spatial feature representations are passed to a two-way transformer module.
- The transformer performs bidirectional cross-attention between image embeddings and learnable query tokens.
- Contextualized representations are routed to two task-specific decoders.
A.1.4. Mask Decoder
The detection system uses spatial and image-level decoders for core- and patient-level cancer evaluation, while test-time adaptation adds a segmentation objective and selectively updates encoder blocks. ANT incurs sub-second per-image adaptation and shows stable ordering, improved calibration, and gains concentrated in early-layer adaptation.
- Decoder outputs: The mask decoder upsamples transformer features into a sigmoid cancer-probability heatmap, with core scores obtained by averaging activations along the needle trace.
- Decoder outputs: The class decoder produces an image-level clinically significant PCa score, which supports patient-level and image-level evaluation while the mask decoder supports core-level evaluation.
- Evaluation: ANT evaluates patient-level csPCa, core-level csPCa, and core-level PCa using AUC, with patient predictions averaged across each patient’s core-level scores.
- Test-time adaptation: The TTA objective combines Dice and binary cross-entropy losses between predicted segmentations and pseudo-masks, using λ = 1 for the binary cross-entropy term.
- Efficiency: 0.90±0.06 seconds per image is ANT’s inference time, compared with 0.07 ± 0.01 seconds for standard inference without adaptation.ANT uses τ = 10 inner optimisation steps and remains slower than baseline methods, but the reported time is sub-second.
- Robustness: Differences below 2 AUC points across metrics and centres indicate stable performance across fixed and randomly permuted test-set orderings.