Transformer-encoded nnU-Net with local region perceptron and contrastive learning (TLC-nnUNet) for multiple brain metastasis detection and delineation

Phys Med Biol. 2026 Mar 13;71(5). doi: 10.1088/1361-6560/ae4ced.

Abstract

Accurate detection and segmentation of multiple brain metastases (BMs) on magnetic resonance image remain challenging, particularly for those involving small lesions (longest axis length <3 mm), due to limitations in sensitivity, precision, and feature representation in existing deep learning frameworks. To address this challenge, we develop TLC-nnUNet, a novel integration of two advancements into transformer-enhanced nnU-Net (T-nnUNet) architecture: (1) local region perceptron (LRP), a loss constraint prioritizing small BM detection by up-weighting underrepresented voxels; and (2) contrastive learning pretraining (CLP), a supervised model pre-training strategy to amplify latent-space divergence between BM and non-BM regions, reducing false positives (FPs). The developed TLC-nnUNet is trained and evaluated on a multi-institutional dataset and achieves state-of-the-art performance, with 89.70% sensitivity, 97.34% precision, and a Dice coefficient of 0.92 at patient level. Further ablation studies confirm the synergistic contributions of each component: LRP enhances small BM detection, while CLP refines feature contrast, reducing FPs. Visualization via t-distributed stochastic neighbor embedding underscores CLP's role in disentangling BM and non-BM latent representations. Compared to existing methods, TLC-nnUNet demonstrates consistent accuracy of detection and segmentation cross lesion sizes. This framework holds significant promise for clinical workflows, enabling precise BM detection and segmentation in stereotactic radiosurgery and reducing manual contouring time.

Keywords: brain metastases detection and segmentation; contrastive learning; supervised pretraining; vision transformer.

MeSH terms

  • Brain Neoplasms* / diagnostic imaging
  • Brain Neoplasms* / secondary
  • Deep Learning
  • Humans
  • Image Processing, Computer-Assisted* / methods
  • Magnetic Resonance Imaging*
  • Neural Networks, Computer*