AmygdalaGo-BOLT for boundary-aware segmentation of the human amygdala Authors: Quan Zhou, Bo Dong, Peng Gao, Jintao Wei, Jiale Xiao, Wei Wang, Peipeng Liang, Danhua Lin, Jie Lu, Xi-Nian Zuo, Hongjian He Published: 2026 ABSTRACT SummaryTracing the boundaries of the amygdala from brain images remains a major challenge in human neuroscience. Although large-scale neuroimaging studies increasingly collect thousands of scans to investigate structural development in children and adolescents, reliable segmentation of the amygdala is difficult due to its small size and complex morphology—particularly in pediatric populations. To address this, we developed AmygdalaGo-BOLT, a boundary-aware deep learning model specifically designed for amygdala segmentation. The model was trained and validated on 1,086 manually labeled pediatric MRI scans, with independent datasets used to assess generalizability. It integrates multiscale feature extraction, spatial priors, and self-attention mechanisms within a compact encoder-decoder architecture to enhance boundary detection. Across imaging centers and age groups, AmygdalaGo-BOLT demonstrates strong agreement with expert manual annotations, while substantially improving efficiency and accuracy relative to existing tools. This enables robust and scalable analysis of amygdala morphology in population neuroscience studies where manual tracing is impractical. Introduction Accurately segmenting the human amygdala, a small and structurally complex region, remains a major challenge in large-scale neuroimaging research. The amygdala is central to socio-emotional functioning and is strongly implicated in a range of behavioral pathologies.1,2,3 Its structural properties, particularly volume, serve as widely used neuroanatomical markers of developmental status and show robust associations with emotional behavior across age. Variations in amygdala volume have been linked to individual differences in emotional reactivity, fear learning, and stress responsivity.1 These volumetric changes are thought to be driven by underlying neurobiological processes including synaptic pruning and dendritic arborization. These developmental processes become especially salient during adolescence, a period marked by substantial reorganization of amygdala structure and connectivity. Disruptions in this maturation have been associated with heightened risk for psychiatric disorders.4 Magnetic resonance imaging (MRI) has enabled detailed investigation of amygdala structure, facilitating the construction of developmental trajectories and the investigation of neurodevelopmental processes underlying various neuropsychiatric conditions.5,6 However, reliable volumetric analysis hinges on precise boundary-based segmentation, a task that remains technically challenging. Conventional approaches have primarily relied on manual delineation of in vivo neuroimaging data, guided by histological atlases. While manual segmentation is considered the gold standard, it is time-consuming and infeasible for large-scale datasets. To address the limitations, researchers have developed automated segmentation tools based on probabilistic estimates (e.g., Markov random fields), Bayesian inference, and multi-atlas label fusion.7,8,9,10,11,12,13 These methods underpin popular tools like FreeSurfer and volBrain, which offer reasonable performance in whole-brain segmentation. However, these tools were not developed exclusively for amygdala segmentation. As a result, they struggle with boundary precision in this region, particularly in pediatric samples: FreeSurfer overestimates amygdala volume by 13%–28%, while volBrain underestimates it by 36%–38%.14 These discrepancies underscore fundamental limitations of existing segmentation frameworks. The amygdala’s small size, low contrast with surrounding tissue, and complex anatomical context make it especially challenging to delineate accurately.7,12,15 Rule-based or atlas-driven models, such as those using probabilistic inference or multi-atlas fusion, struggle to accommodate such local variability, particularly in children and adolescents, where the amygdala is both smaller and still undergoing dynamic maturation. Consequently, systematic biases in volume estimation can compromise the precision and reliability of measuring amygdala, potentially undermining the validity of findings in developmental neuroimaging studies. To address these challenges, we developed AmygdalaGo-BOLT, a boundary-aware deep learning algorithm trained on a large dataset of manually segmented pediatric amygdalae.14 The algorithm is built on a transformer model16 that emphasizes accuracy in boundary delineation. Rather than relying on predefined anatomical priors, it learns boundary features directly from data, enabling flexible adaptation to anatomical variability across development. In this study, we benchmarked AmygdalaGo-BOLT against widely used segmentation tools across internal and external neuroimaging cohorts, demonstrating its accuracy, stability, and generalizability for amygdala segmentation in developmental neuroimaging. The overall architecture consists of a core segmentation backbone followed by a dedicated refinement module. The backbone integrates global anatomical context, local detail features, and boundary-aware cues to generate a robust amygdala segmentation (Figure 1B). This representation is then passed to the refinement module, which further adjusts and sharpens anatomical boundaries through prompt-guided correction (Figure 1C; overview in Figure 1A).Figure 1A schematic diagram of the AmygdalaGo-BOLT architecture(A) The overall model structure consists of two principal components: (1) an MGAC-Net that generates the initial amygdala segmentation and strategically samples informative voxels and (2) a SAM-based refinement module that further improves the segmentation. The refinement module includes three essential components, a lightweight volume feature encoder (VFE), a 3D prompt encoder (PE), and a volumetric mask decoder (VMD). The sampled voxels from the MGAC stage are fed into the SAM PE to guide the refinement process.(B) The MGAC block, a key network module designed to address challenges posed by the small size of the amygdala, ensures the extraction of accurate semantic features.(C) The edge-contrast learning optimization strategy augments boundary delineation and enhances overall segmentation precision. A schematic diagram of the AmygdalaGo-BOLT architecture (A) The overall model structure consists of two principal components: (1) an MGAC-Net that generates the initial amygdala segmentation and strategically samples informative voxels and (2) a SAM-based refinement module that further improves the segmentation. The refinement module includes three essential components, a lightweight volume feature encoder (VFE), a 3D prompt encoder (PE), and a volumetric mask decoder (VMD). The sampled voxels from the MGAC stage are fed into the SAM PE to guide the refinement process. (B) The MGAC block, a key network module designed to address challenges posed by the small size of the amygdala, ensures the extraction of accurate semantic features. (C) The edge-contrast learning optimization strategy augments boundary delineation and enhances overall segmentation precision. Results Overview of AmygdalaGo-BOLT model design and training AmygdalaGo-BOLT was developed to address three challenges in amygdala segmentation: reliable localization of a small medial temporal lobe structure, accurate delineation of its anatomically complex boundaries, and generalizable segmentation across subjects. To address these challenges, AmygdalaGo-BOLT was designed as a two-component segmentation pipeline consisting of an MGAC-Net (Multi-Granularity Adaptive Collaboration Network) backbone and a SAM (Segment Anything Model)-based 3D refinement module, with boundary contrastive learning incorporated during training as an auxiliary objective to enhance boundary discrimination (Figure 1A). The MGAC-Net backbone was designed to provide robust initial localization and coarse segmentation of the amygdala in T1-weighted MR images. It integrates a global coarse-grained perception module, a local fine-grained enhancement module, and a multi-granularity adaptive fusion module. The global module captures broad anatomical context and positional relationships between the amygdala and adjacent medial temporal lobe structures, thereby improving sensitivity to amygdala location. Because fine structural details may be weakened in global representations, the local module preserves local intensity transitions, structural details, and boundary-relevant information. The adaptive fusion module combines these complementary global and local features, enabling the model to distinguish the amygdala from neighboring structures while maintaining within-amygdala structural consistency. This design improves the accuracy and robustness of the initial amygdala localization and coarse segmentation (Figure 1B). Boundary contrastive learning was incorporated during training to improve the alignment between automated predictions and manual boundary annotations. This strategy enhances feature separability around the amygdala boundary by amplifying differences between amygdala boundary voxels and adjacent non-target tissues with similar MRI intensity, while reducing variability among voxels belonging to the same anatomical category. By strengthening boundary-level discrimination, this auxiliary objective supports more precise demarcation of the amygdala boundary (Figure 1C). The coarse segmentation generated by MGAC-Net was further refined using a modified SAM-based 3D framework to improve coarse predictions and enhance the generalizability of AmygdalaGo-BOLT. Informative voxels sampled from the initial mask were used as point cues and encoded by the 3D prompt encoder, which incorporates spatial prior information to guide segmentation refinement. To adapt SAM for volumetric amygdala segmentation, this framework includes three key components: a lightweight volumetric feature encoder for extracting MRI-specific volumetric features, a 3D prompt encoder for encoding spatial prompts and anatomical representations, and a volumetric mask decoder for generating the refined segmentation mask (Figure 1A). Together, these domain-specific adaptations enable the model to integrate volumetric MRI features with spatial prompt information, supporting prompt-guided correction of the coarse output and improving segmentation accuracy and robustness. AmygdalaGo-BOLT was trained using manually traced pediatric T1-weighted MRI scans from the Chongqing cohort of the Chinese Color Nest Cohort (CKG-CCNC) and evaluated using three validation datasets: the remaining CKG-CCNC scans for internal validation, the independent Beijing Normal University Childhood Adversity Cohort (BNU-CAC) for external validation, and the Zhejiang University Multi-center Traveler Cohort (ZJU-MTC) traveling-subject dataset for cross-center robustness. This validation design allowed us to benchmark segmentation accuracy and boundary reliability across internal, external, and multi-center conditions. Performance on CKG-CCNC (training site) Table S1 summarizes the comparative performance of AmygdalaGo-BOLT against conventional segmentation algorithms within the CKG-CCNC test cohort. AmygdalaGo-BOLT outperformed all other methods across multiple key metrics, demonstrating superior segmentation accuracy and boundary precision. It achieved a Dice coefficient of 0.904, notably higher than U-Net3D (0.851), U-Net3D++ (0.787), and ResU-Net3D (0.841), indicating greater overlap with manual annotations. A similar pattern emerged for the Jaccard similarity (JS) coefficient, with AmygdalaGo-BOLT reaching 0.825. In terms of boundary accuracy, AmygdalaGo-BOLT achieved the lowest 95th-percentile Hausdorff distance (HD95) of 1.097, indicating superior alignment with anatomical ground truth (GT) compared to U-Net3D (1.565), U-Net3D++ (1.963), and ResU-Net3D (1.669). The average symmetric surface distance (ASSD) further demonstrated that AmygdalaGo-BOLT’s segmentation output aligned more closely with reference annotations compared to other methods. Evaluation of detection performance further highlighted AmygdalaGo-BOLT’s advantage. It achieved a precision of 0.883 and recall of 0.929, resulting in a high F1-score of 0.905, reflecting its ability to balance false positive suppression with high true positive detection. Finally, AmygdalaGo-BOLT attained a relative volume difference (RVD) of just 0.056, over 40% lower than the next-best method, underscoring its accuracy in volumetric estimation. Figure 2 presents segmentation results from multiple algorithms on a representative participant, demonstrating that AmygdalaGo-BOLT most closely aligns with manual reference standard in both volumetric estimation and boundary delineation. Notably, the amygdala delineated by FreeSurfer deviates markedly from both the morphological and manual segmentation. The presence of multiple empty regions indicates an inability to accurately capture the structural integrity of the amygdala. A closer inspection of the periphery suggests that FreeSurfer exhibits numerous irregularities when compared with the manual reference standard. Although Unet produces segmentations that are morphologically more consistent with manual references, volumetric evaluation reveals substantial overestimation. In contrast, AmygdalaGo-BOLT produces segmentation results that match manual delineations more closely in both overall shape and boundary accuracy. Notably, the superposition and edge correspondence in AmygdalaGo-BOLT outputs demonstrate minimal deviation from reference, indicating precise volume estimation and structural fidelity.Figure 2Comparative visualization of amygdala segmentation in a representative participantThe segmentation results of different methods illustrate the preservation of structural integrity (middle row) and the precision of boundary delineation (bottom row). Manual segmentation (left column) serves as the reference standard. The proposed AmygdalaGo-BOLT method (right column) shows superior performance in both volumetric and boundary definitions, outperforming FreeSurfer (second column) and U-Net3D (third column). Comparative visualization of amygdala segmentation in a representative participant The segmentation results of different methods illustrate the preservation of structural integrity (middle row) and the precision of boundary delineation (bottom row). Manual segmentation (left column) serves as the reference standard. The proposed AmygdalaGo-BOLT method (right column) shows superior performance in both volumetric and boundary definitions, outperforming FreeSurfer (second column) and U-Net3D (third column). The generalizability of AmygdalaGo-BOLT was first validated on a dataset from BNU-CAC, an independent imaging center not included in model training, comprising data from 116 children. As shown in Table S2, AmygdalaGo-BOLT maintained strong performance despite distributional shifts, achieving a Dice coefficient of 0.845 and a JS of 0.733. Distance-based evaluations further confirmed accuracy, with HD95 and average surface distance (ASD) values of 1.594 and 0.654, respectively. The ASSD of 0.666 exhibited less variability than that observed with U-Net, suggesting more stable boundary delineation. In terms of detection performance, AmygdalaGo-BOLT attained a precision of 0.933 and a recall of 0.775, effectively balancing false-positive suppression and true-positive identification. The RVD was 0.168, indicating low deviation in volumetric estimation. These indicators suggest the performance of AmygdalaGo-BOLT was not compromised significantly, despite the distribution variations encountered at new centers. In addition, this technique significantly outperformed comparable algorithms, thereby affirming the multi-center accuracy and consistency offered by integrating the consistency module. Here, we presented segmentation results from 116 unseen participants in BNU-CAC, compared to the 347 observed scans from CKG-CCNC (see Figure 3). Since BNU-CAC participants originate from different data distribution and were not included in model training, the overall performance on this dataset is lower compared to the CKG-CCNC scans. This performance gap likely arises due to variations in feature distributions, inter-data noise, or other unaccounted factors that affect segmentation accuracy. Despite this decline in overall performance with unseen data, AmygdalaGo-BOLT significantly outperforms the baseline model, demonstrating strong generalization capabilities.Figure 3Volume dice analysis of the overall amygdala structureAll participants from the CKG-CCNC (A) and BNU-CAC (B) cohorts. Since the CKG-CCNC data were used during training, the overall performance was slightly higher than for the unseen BNU-CAC dataset for all deep learning network methods. However, the proposed AmygdalaGo-BOLT model achieved a dice score above 0.8 for both cases. Volume dice analysis of the overall amygdala structure All participants from the CKG-CCNC (A) and BNU-CAC (B) cohorts. Since the CKG-CCNC data were used during training, the overall performance was slightly higher than for the unseen BNU-CAC dataset for all deep learning network methods. However, the proposed AmygdalaGo-BOLT model achieved a dice score above 0.8 for both cases. To further evaluate cross-site robustness, the model was tested on the ZJU-MTC dataset, which includes three “traveler” participants scanned at ten different imaging centers (Figure 4). AmygdalaGo-BOLT consistently outperformed U-Net3D across all sites, with Dice improvements ranging from 0.02 to 0.07. These results highlight AmygdalaGo-BOLT’s resilience to multi-center heterogeneity and support its applicability to large-scale, multi-center neuroimaging studies.Figure 4A comparison of amygdala segmentation outcomes for itinerant volunteers from ZJU-MTC(A) The proposed AmygdalaGo-BOLT methodology (depicted in red) consistently demonstrated superior performance relative to U-Net3D (depicted in blue) across all centers for each participant, thereby underscoring its robust cross-center generalization efficacy.(B) All centers were equipped with identical model 3T scanners, geographically dispersed across China, with their respective names and abbreviations provided on the right. A comparison of amygdala segmentation outcomes for itinerant volunteers from ZJU-MTC (A) The proposed AmygdalaGo-BOLT methodology (depicted in red) consistently demonstrated superior performance relative to U-Net3D (depicted in blue) across all centers for each participant, thereby underscoring its robust cross-center generalization efficacy. (B) All centers were equipped with identical model 3T scanners, geographically dispersed across China, with their respective names and abbreviations provided on the right. Ablation study in ZJU-MTC We conducted ablation experiments on the ZJU-MTC dataset to evaluate the contribution of key AmygdalaGo-BOLT components to segmentation accuracy and generalization. As shown in Figures 5A and 5B, the backbone-only model variant (i.e., MGAC-Net without the SAM-based refinement module) yielded substantially higher Dice scores and lower ASSD values compared to U-Net3D and FreeSurfer, across both volumetric and boundary metrics. These results reflect MGAC’s ability, via a transformer-based multi-granularity attention framework, to capture both global context and local anatomical detail, thereby improving segmentation accuracy and structural fidelity.Figure 5Ablation study evaluating the contributions of MGAC and SAM modules(A and B) Performance of the MGAC-only variant relative to U-Net3D and FreeSurfer on the ZJU-MTC dataset, illustrating the benefits of multi-granularity feature extraction in initial segmentation.(C) The addition of the SAM-based refinement module improves the full model’s robustness across multiple imaging centers.(D) Boundary-focused visual comparisons highlight the refinement effect provided by SAM. Ablation study evaluating the contributions of MGAC and SAM modules (A and B) Performance of the MGAC-only variant relative to U-Net3D and FreeSurfer on the ZJU-MTC dataset, illustrating the benefits of multi-granularity feature extraction in initial segmentation. (C) The addition of the SAM-based refinement module improves the full model’s robustness across multiple imaging centers. (D) Boundary-focused visual comparisons highlight the refinement effect provided by SAM. We then assessed the SAM module’s effect on cross-site consistency by comparing segmentation performance across ten imaging centers. Integration of SAM into the full AmygdalaGo-BOLT pipeline led to consistent performance under diverse scanning conditions, leading to gains over the performance of MGAC-only variant (Figure 5C), demonstrating its utility in mitigating inter-site variability. Qualitative comparisons further illustrated improved boundary adherence following SAM-based refinement (Figure 5D). Validation for developmental amygdala analysis To assess segmentation validity, we evaluated the Pearson correlation between automated and manual amygdala volume estimates using 347 internal validation scans from the CKG-CCNC dataset (excluding the training set). As shown in Figure 6, AmygdalaGo-BOLT achieved the highest correlation with manual segmentation for both the left (R = 0.74) and right (R = 0.70) amygdalae, outperforming U-Net3D, U-Net3D++, ResU-Net3D, and FreeSurfer (R = 0.46–0.61). This strong linear association demonstrates AmygdalaGo-BOLT’s superior accuracy in volumetric quantification. In addition, the narrow scatter distribution observed with AmygdalaGo-BOLT highlights its within-subject consistency and stability across individuals. To further quantify agreement and systematic deviation, Bland-Altman analysis was conducted on the same dataset (Figure S1). AmygdalaGo-BOLT showed the narrowest limits of agreement (−0.66 to +0.35 mm3) and the smallest mean differences from manual labels (−0.152 mm3), indicating minimal bias and high consistency. In contrast, alternative methods exhibited substantially greater overestimations, with average differences ranging from −0.647 to −1.874 mm3. These discrepancies were up to 12.329 times larger than those observed with AmygdalaGo-BOLT, emphasizing its advantage in volumetric measurement precision.Figure 6A correlation analysis of amygdala volume, as determined by segmentation algorithms compared with manual reference standardsThe dataset included 347 internal validation scans, with the results of manual segmentation depicted on the horizontal axis. Among the evaluated methods, the proposed AmygdalaGo-BOLT algorithm achieved the highest correlation with manual references for the left (A) and right (F) regions of the amygdala, signifying higher consistency in volumetric measurements. In contrast, correlation coefficients for alternative segmentation tools, including U-Net3D (B and G), ResU-Net3D (C and H), U-Net3D++ (D and I), and FreeSurfer (E and J), fell within the range of 0.46–0.60. The volume distributions derived from each algorithm are represented on the respective vertical axes. A correlation analysis of amygdala volume, as determined by segmentation algorithms compared with manual reference standards The dataset included 347 internal validation scans, with the results of manual segmentation depicted on the horizontal axis. Among the evaluated methods, the proposed AmygdalaGo-BOLT algorithm achieved the highest correlation with manual references for the left (A) and right (F) regions of the amygdala, signifying higher consistency in volumetric measurements. In contrast, correlation coefficients for alternative segmentation tools, including U-Net3D (B and G), ResU-Net3D (C and H), U-Net3D++ (D and I), and FreeSurfer (E and J), fell within the range of 0.46–0.60. The volume distributions derived from each algorithm are represented on the respective vertical axes. To evaluate the capability of each algorithm to capture developmental trajectories, we plotted amygdala volume growth curves across age using algorithm-derived segmentations (Figure 7). These were benchmarked against manually annotated volumes, considered the reference standard.14 Both manual and automated segmentations revealed parallel growth patterns for boys and girls, with boys consistently exhibiting larger amygdala volumes throughout development. Manual tracing indicated a linear increase in bilateral amygdala volume from childhood to early adulthood, a trend closely mirrored by AmygdalaGo-BOLT, which employed multi-feature fusion. This was supported by the estimated degrees of freedom (edf) reported in Table S3. Although the bilateral amygdala volumes predicted by AmygdalaGo-BOLT were slightly larger than those of manual annotations, the scatterplot exhibits a more confined aggregation among age cohorts. In contrast, FreeSurfer produced an inverted U-shaped trajectory that deviated markedly from the linear pattern observed in both manual and AmygdalaGo-BOLT results. Thus, the scatterplots reveal an increase in variability between age cohorts, with bilateral amygdala volumes exceeding those derived from both manual annotations and AmygdalaGo-BOLT. This outcome demonstrates significant advantages for the fitting of growth curves compared to other algorithms, attesting to the robustness and accuracy of AmygdalaGo-BOLT in considering sex- and age-related changes when estimating amygdala volume. Compared to conventional and other advanced algorithms, this technique enables capture of subtle changes in growth curves, not only in terms of overall adaptation efficiency but also in terms of accurately predicting curve details and particular features. These findings can help to improve our understanding of amygdala development over time with respect to sex differences and age-related factors.Figure 7The developmental trajectory of the amygdala, as delineated by our model and comparative methodologiesThe FreeSurfer results (left) exhibit an inverted U-shaped curve, indicative of a non-linear growth pattern. Conversely, the growth curves predicted by our AmygdalaGo-BOLT model (right) exhibit a striking agreement with the linear trajectory observed in the manual tracing method (middle). Blue denotes trajectories for males, while red represents trajectories for females. These trajectories are enveloped by shaded 95% confidence intervals. Individual scatter points represent segmentation outcomes from distinct cases, while the lines connecting these points indicate results acquired from multiple scans of the same participant. The developmental trajectory of the amygdala, as delineated by our model and comparative methodologies The FreeSurfer results (left) exhibit an inverted U-shaped curve, indicative of a non-linear growth pattern. Conversely, the growth curves predicted by our AmygdalaGo-BOLT model (right) exhibit a striking agreement with the linear trajectory observed in the manual tracing method (middle). Blue denotes trajectories for males, while red represents trajectories for females. These trajectories are enveloped by shaded 95% confidence intervals. Individual scatter points represent segmentation outcomes from distinct cases, while the lines connecting these points indicate results acquired from multiple scans of the same participant. Discussion Deep learning methods of tracing boundaries of amygdala are highly valuable for reproducibility by providing standardized, automated pipelines that minimize the variability introduced by manual tracing or traditional atlas-based methods. In open neuroscience, where large-scale datasets are shared across institutions, deep learning-driven segmentation ensures consistent and reproducible annotations, making results more comparable across studies. In the present work, we report developing an open-source deep learning tool, AmygdalaGo-BOLT, which allows researchers to collaborate, validate, and refine models using publicly available datasets, fostering transparency and innovation. Traditional segmentation techniques, whether manual or atlas-based, are time-consuming and prone to inter-rater variability, especially for small structures like the amygdala. A deep learning model such as AmygdalaGo-BOLT trained on large datasets can provide (1) higher segmentation accuracy, especially for challenging cases with low-contrast boundaries; (2) faster processing, reducing the time required for segmentation from hours to seconds; and (3) improved generalization, allowing them to adapt to different populations, imaging protocols, and scanner types. Another example of deep learning-based segmentation using multi-atlas priors and 3D convolutional networks17 has demonstrated superior performance over traditional methods. Our AmygdalaGo-BOLT addressed the intricacies posed by low contrast and structural complexities that distinguish the amygdala from adjacent tissues. A boundary contrastive learning algorithm was effective in aligning model-predicted boundaries more accurately with the ground truth, culminating in more precise segmentation across childhood and adolescence and demonstrating promising generalization to young adulthood. Across multiple datasets that varied in age range, imaging protocols, and acquisition sites (CKG-CCNC, BNU-CAC, and ZJU-MTC), the model maintained stable and accurate performance, indicating reliable generalization across diverse data sources. Recent advances in open neuroimaging data have significantly increased our understanding of the intricate structures and networks within the human brain.18 The aggregation of images from various large-scale data repositories has significantly improved statistical power, allowing for the discernment of subtle variability within the human amygdala.19,20 However, there is a pressing need for new research methodologies to enhance the computational efficiency and practical applicability of these automated extraction tools.14,21 Global imaging collaborations have been instrumental in the evolution of population neuroscience,22,23 driven by extensive MRI initiatives,24 which have been crucial for driving innovations in analytical techniques and translational research.25 As an open-source deep learning segmentation tool, AmygdalaGo-BOLT democratizes access to high-quality neuroimaging analysis, making it possible for researchers without extensive expertise in neuroanatomy to conduct high-precision studies. This is crucial for (1) low-resource institutions that may lack access to expert manual tracers; (2) large-scale, multi-site collaborations where standardized, automated segmentation ensures data harmonization; and (3) and early-career researchers and students who can leverage open-source deep learning tools without requiring specialized training in segmentation techniques. By integrating deep learning into open neuroscience platforms, the AmygdalaGo-BOLT pipeline can be widely distributed, continually improved, and used globally, accelerating discoveries in neurodevelopment, psychiatric disorders, and neurodegenerative diseases. AmygdalaGo-BOLT, a deep learning method for boundary tracing in human brain images, offers a scalable, accurate, and open-access solution for amygdala segmentation. It aligns with the principles of open neuroscience in four key ways: (1) reproducibility, as deep learning-driven segmentation ensures consistent and replicable results across studies; (2) efficiency, as automated delineation substantially reduces processing time relative to manual tracing; (3) accessibility, as it enables global participation in neuroimaging research; and (4) adaptability, as the architecture uses learnable model parameters rather than frozen representations, providing flexibility for retraining or fine-tuning when new high-quality manual annotations become available. This parameter-level design allows the model to be updated for additional datasets without altering the core architecture. In this context, AmygdalaGo-BOLT further leverages crowdsourced datasets and federated learning approaches, allowing it to improve over time as diverse data accumulates. Community-driven platforms such as OpenNeuro (https://openneuro.org), NeuroVault (https://neurovault.org), and ScienceDB (https://ccndc.scidb.cn/en) provide scalable resources for ongoing model training and validation, fostering that this technique remains cutting-edge and inclusive. These design features distinguish AmygdalaGo-BOLT from conventional atlas-based approaches. The MGAC module integrates global and local semantic features, while the boundary-contrast learning strategy refines edge delineation, addressing the persistent challenge of distinguishing the amygdala from adjacent structures. Together, these innovations establish deep learning-driven segmentation as a transformative tool for large-scale brain imaging, advancing more inclusive, transparent, and impactful discoveries in amygdala neuroscience.26 Limitations of the study Although the present study focused on whole-amygdala segmentation, achieving reliable subnuclei parcellation remains an important next step. High-quality whole-amygdala segmentations can be combined with existing atlas-based subnuclei definitions to support more refined investigations. The achievable level of subregional detail ultimately depends on the specific subnuclei definitions or atlases being applied. Second, although AmygdalaGo-BOLT showed encouraging performance when applied to adult datasets, these results should be interpreted as preliminary given the small sample size. Future work using larger and more diverse adult cohorts, including broader age ranges, will be essential for training and validating the model to establish generalizability across the lifespan. Last, because the present study primarily evaluates the tool’s robustness to cross-center variation rather than scanner-specific differences, future validation using datasets that include multiple scanner models, ideally acquired at the same imaging center, would offer an additional context for assessing generalizability. Resource availability Lead contact Requests for further information and resources should be directed to the lead contact, Prof. Dr. Hongjian He (hhezju@zju.edu.cn). Materials availability This study did not generate new materials. Data and code availability •The manually segmented amygdala datasets from the Chongqing cohort of the Chinese Color Nest Cohort (CKG-CCNC), used for model training and internal validation, are publicly available via the National Science DataBank (https://doi.org/10.11922/sciencedb.01299). The original MRI scans and corresponding demographic information (age and sex) are accessible from the Chinese Color Nest Data Community (https://ccndc.scidb.cn/en). External validation was conducted using the Zhejiang University Multi-center Traveler Cohort (ZJU-MTC), which is available on Figshare (https://figshare.com/articles/dataset/Multicenter_dataset_of_multishell_diffusion_magnetic_resonance_imaging_in_healthy_traveling_adults_with_identical_setting/8851955/6). Due to data-sharing agreements and institutional review board restrictions, the BNU-CAC dataset is not publicly available.•All source code used for training, evaluation, and visualization is publicly available via the Science DataBank (https://doi.org/10.57760/sciencedb.o00133.00090) and the Connectome Computation System release at GitHub (https://github.com/zuoxinian/CCS/tree/master/H3/AmygdalaGo-BOLT).•The AmygdalaGo-BOLT online interface is accessible at http://118.196.12.168/.•Any additional information required to re-analyze the data reported by this paper is available from the lead contact upon request. •The manually segmented amygdala datasets from the Chongqing cohort of the Chinese Color Nest Cohort (CKG-CCNC), used for model training and internal validation, are publicly available via the National Science DataBank (https://doi.org/10.11922/sciencedb.01299). The original MRI scans and corresponding demographic information (age and sex) are accessible from the Chinese Color Nest Data Community (https://ccndc.scidb.cn/en). External validation was conducted using the Zhejiang University Multi-center Traveler Cohort (ZJU-MTC), which is available on Figshare (https://figshare.com/articles/dataset/Multicenter_dataset_of_multishell_diffusion_magnetic_resonance_imaging_in_healthy_traveling_adults_with_identical_setting/8851955/6). Due to data-sharing agreements and institutional review board restrictions, the BNU-CAC dataset is not publicly available. The manually segmented amygdala datasets from the Chongqing cohort of the Chinese Color Nest Cohort (CKG-CCNC), used for model training and internal validation, are publicly available via the National Science DataBank (https://doi.org/10.11922/sciencedb.01299). The original MRI scans and corresponding demographic information (age and sex) are accessible from the Chinese Color Nest Data Community (https://ccndc.scidb.cn/en). External validation was conducted using the Zhejiang University Multi-center Traveler Cohort (ZJU-MTC), which is available on Figshare (https://figshare.com/articles/dataset/Multicenter_dataset_of_multishell_diffusion_magnetic_resonance_imaging_in_healthy_traveling_adults_with_identical_setting/8851955/6). Due to data-sharing agreements and institutional review board restrictions, the BNU-CAC dataset is not publicly available. •All source code used for training, evaluation, and visualization is publicly available via the Science DataBank (https://doi.org/10.57760/sciencedb.o00133.00090) and the Connectome Computation System release at GitHub (https://github.com/zuoxinian/CCS/tree/master/H3/AmygdalaGo-BOLT). All source code used for training, evaluation, and visualization is publicly available via the Science DataBank (https://doi.org/10.57760/sciencedb.o00133.00090) and the Connectome Computation System release at GitHub (https://github.com/zuoxinian/CCS/tree/master/H3/AmygdalaGo-BOLT). •The AmygdalaGo-BOLT online interface is accessible at http://118.196.12.168/. The AmygdalaGo-BOLT online interface is accessible at http://118.196.12.168/. •Any additional information required to re-analyze the data reported by this paper is available from the lead contact upon request. Any additional information required to re-analyze the data reported by this paper is available from the lead contact upon request. Acknowledgments This work was supported by the Huizhi Ascent Project of Xuanwu Hospital (HZ2021ZCLJ005 to J.L.), the STI 2030 - the Brain Science and Brain-like Intelligence Technology—National Science and Technology Major Project: The Chinese Child Brain Development (CCBD) study (2021ZD0200500 to X.-N.Z. and H.-J.H.), the Start-up Funds for Leading Talents at Beijing Normal University (to X.-N.Z.), the National Natural Science Foundation of China (82102134, 82322035, and 62273076 to X.-N.Z.), the Key-Area Research and Development Program of Guangdong Province (2019B030335001 to X.-N.Z.), the Beijing Municipal Science and Technology Commission (Z161100002616023 and Z181100001518003 to X.-N.Z.), a Major Project of National Social Science Foundation of China (20&ZD296 to X.-N.Z.), the CAS-NWO Programme (153111KYSB20160020 to X.-N.Z.), the National Basic Research (973) Program (2015CB351702 to X.-N.Z.), the Chinese Academy of Sciences Key Research Program (KSZD-EW-TZ-002 to X.-N.Z.), the International Collaboration of National Natural Science Foundation of China (81220108014 to X.-N.Z.), and the China Postdoctoral Science Foundation (2023M740301 to Q.Z.). Author contributions Conceptualization, H.-J.H. and X.-N.Z.; methodology, B.D., Q.Z., and P.G.; investigation, Q.Z., B.D., and P.G.; resources, X.-N.Z. and H.-J.H.; data curation, Q.Z. and P.G.; visualization, B.D. and P.G.; supervision, H.-J.H., X.-N.Z., and J.L.; writing – original draft, B.D. and Q.Z; writing – review and editing, Q.Z., B.D., P.G., J.W., W.W., P.L., D.L., J.L., X.-N.Z., and H.-J.H. Declaration of interests The authors declare no competing interests. STAR★Methods Key resources table REAGENT or RESOURCESOURCEIDENTIFIERDeposited dataCKG-CCNC datasetZhou et al.14https://doi.org/10.11922/sciencedb.01299ZJU-MTC datasetTong et al.27https://doi.org/10.6084/m9.figshare.8851955.v6BNU-CAC datasetSun et al.28Not publicly available (restricted)Software and algorithmsAmygdalaGo-BOLT source codeThis paperScienceDB: https://doi.org/10.57760/sciencedb.o00133.00090AmygdalaGo-BOLT online interfaceThis paperhttp://118.196.12.168/Python v3.11Python Software Foundationhttps://www.python.orgPyTorch v2.0.0The PyTorch communityhttps://pytorch.orgSimpleITK v2.3.1SimpleITK development teamhttps://simpleitk.orgNiBabel v5.2.0The NiBabel communityhttps://nipy.org/nibabel/OpenCV v4.9.0.80OpenCV teamhttps://opencv.orgGradio v3.50.2The Gradio communityhttps://gradio.apptimm v0.9.12The timm development teamhttps://github.com/huggingface/pytorch-image-modelsMONAI v1.3.0The MONAI Consortiumhttps://github.com/Project-MONAI/MONAIeinops v0.7.0The einops development teamhttps://github.com/arogozhnikov/einopsU-Net3D implementationÇiçek et al.29https://github.com/Project-MONAI/MONAIResU-Net3D implementationZhang et al.30https://doi.org/10.1109/LGRS.2018.2802944U-Net3D++ implementationZhou et al.31https://github.com/LeeJunHyun/Image_SegmentationFreeSurfer v6.0Fischl et al.7http://surfer.nmr.mgh.harvard.eduSAM (Segment Anything Model)Meta AIhttps://github.com/facebookresearch/segment-anythingR Programming LanguageR Core Teamhttps://www.r-project.org/mgcvWood.32https://cran.r-project.org/web/packages/mgcv/index.htmlOtherNVIDIA GPU (Tesla A10)NVIDIA Corporationhttps://www.nvidia.com/ REAGENT or RESOURCESOURCEIDENTIFIERDeposited dataCKG-CCNC datasetZhou et al.14https://doi.org/10.11922/sciencedb.01299ZJU-MTC datasetTong et al.27https://doi.org/10.6084/m9.figshare.8851955.v6BNU-CAC datasetSun et al.28Not publicly available (restricted)Software and algorithmsAmygdalaGo-BOLT source codeThis paperScienceDB: https://doi.org/10.57760/sciencedb.o00133.00090AmygdalaGo-BOLT online interfaceThis paperhttp://118.196.12.168/Python v3.11Python Software Foundationhttps://www.python.orgPyTorch v2.0.0The PyTorch communityhttps://pytorch.orgSimpleITK v2.3.1SimpleITK development teamhttps://simpleitk.orgNiBabel v5.2.0The NiBabel communityhttps://nipy.org/nibabel/OpenCV v4.9.0.80OpenCV teamhttps://opencv.orgGradio v3.50.2The Gradio communityhttps://gradio.apptimm v0.9.12The timm development teamhttps://github.com/huggingface/pytorch-image-modelsMONAI v1.3.0The MONAI Consortiumhttps://github.com/Project-MONAI/MONAIeinops v0.7.0The einops development teamhttps://github.com/arogozhnikov/einopsU-Net3D implementationÇiçek et al.29https://github.com/Project-MONAI/MONAIResU-Net3D implementationZhang et al.30https://doi.org/10.1109/LGRS.2018.2802944U-Net3D++ implementationZhou et al.31https://github.com/LeeJunHyun/Image_SegmentationFreeSurfer v6.0Fischl et al.7http://surfer.nmr.mgh.harvard.eduSAM (Segment Anything Model)Meta AIhttps://github.com/facebookresearch/segment-anythingR Programming LanguageR Core Teamhttps://www.r-project.org/mgcvWood.32https://cran.r-project.org/web/packages/mgcv/index.htmlOtherNVIDIA GPU (Tesla A10)NVIDIA Corporationhttps://www.nvidia.com/ Method details This section provides an overview of the datasets, model architecture, training procedures, and evaluation protocols used in the development and validation of AmygdalaGo-BOLT. We first describe the MRI datasets employed for model training and validation. Next, we detail the network architecture, including its multi-granularity adaptive collaboration, boundary contrast learning, and SAM-based 3D refinement modules. Subsequently, we explain the training configuration and implementation settings. Finally, we present the evaluation metrics utilized to assess segmentation performance. Datasets We used structural T1-weighted MRI data from established developmental and multi-center neuroimaging cohorts to construct training and validation datasets for developing and evaluating AmygdalaGo-BOLT. All datasets were collected under the ethical oversight of their respective institutional review boards and have been described in prior publications or data resources. Training dataset The AmygdalaGo-BOLT model was trained using data from the Chongqing cohort of the Chinese Color Nest Cohort (CKG-CCNC), part of the CCNP development project.33,34,35 This cohort included 198 baseline participants aged 6–17 years, from whom a total of 427 T1-weighted MRI scans were acquired. To ensure balanced age and sex distribution, a subset of 140 participants was selected from the full cohort using age- and sex-stratified sampling to ensure proportional representation across developmental stages. For each participant, one high-quality scan was retained following rigorous visual inspection to exclude motion artifacts and anatomical anomalies. From this pool, 80 scans were randomly selected for model training (Table S4), with age–sex distribution matched to the full 140-participant set. Among these 80 participants, 22 had only one scan and therefore contributed solely to the training set, whereas the remaining 58 participants each had at least two scans; one scan per participant was used for training, and all additional scans from these participants were retained and included in the validation dataset. Manual boundary tracing of the amygdala was performed according to standardized protocols.14 Validation datasets Model validation was performed using three datasets, each selected to capture a distinct source of variability relevant to assessing the robustness of AmygdalaGo-BOLT. First, the remaining 347 MRI scans from the CKG-CCNC cohort (excluding the 80 used for training) were used for internal validation, enabling assessment across repeated sessions and developmental stages under the same imaging protocol. Second, external validation used the Beijing Normal University Childhood Adversity Cohort (BNU-CAC), which includes 116 children (ages 8–13) scanned once at an independent imaging center,28 to assess generalization across cohorts. Third, the Zhejiang University Multi-center Traveler Cohort (ZJU-MTC) included three adult participants who were scanned across ten MRI centers using harmonized protocols and identical 3T Siemens MAGNETOM Prisma scanners.27 These traveling-subject data were used to evaluate cross-center consistency, as they allow site-related variability to be quantified independently. In all validation datasets, the amygdalae were manually segmented using the same boundary tracing procedures as in the training set to ensure consistency. During testing, input image dimensions were down-sampled to 48 × 64 × 80 to minimize computational demands. No post-processing optimization techniques were employed, thereby ensuring an objective assessment of model performance. Model architecture Overall framework AmygdalaGo-BOLT was implemented as a two-component segmentation framework with an auxiliary boundary-aware training objective. The first component, MGAC-Net, generates an initial amygdala mask from T1-weighted MR images. The second component, a SAM-based 3D refinement module, uses spatial prompts derived from the MGAC-Net output to produce the final volumetric amygdala mask. During training, boundary contrastive learning was incorporated as an auxiliary objective to improve the separability of voxel-level features around annotated amygdala boundaries. Given an input T1-weighted MR image, MGAC-Net first extracts global coarse-grained semantic features and local fine-grained structural features, which are integrated to generate a coarse amygdala prediction. Informative voxels sampled from this prediction are then used as point prompts for the SAM-based 3D refinement module. Within this module, the volumetric feature encoder transforms the input MRI volume into image embeddings, the 3D prompt encoder encodes the sampled point prompts and mask-related spatial cues, and the volumetric mask decoder integrates image and prompt embeddings to generate the final segmentation mask. During training, the segmentation objective was jointly optimized with boundary contrastive learning. Boundary voxels derived from manual annotations were used to construct local positive and negative voxel samples according to their labels. This objective encouraged features from the same anatomical category to cluster together while separating features from different categories, thereby improving boundary discrimination. Detailed descriptions of MGAC-Net, boundary contrastive learning, and the SAM-based 3D refinement module are provided below. Multi-granularity adaptive collaboration Global and local semantic features were initially derived from the original MR image data using a multi-granularity semantic generation module, as depicted in Figure 1B. Specifically, for T1w images I, the module exploited local induction capabilities by employing two 3D convolutions to extract primary local features Fl. These convolutions emphasize voxel-level intensity transitions and fine-scale textural cues around the amygdala, providing local structural information that supports subsequent semantic aggregation. This approach facilitated the computation of relationships among feature points, thereby enabling the extraction of global semantic information from regions exhibiting high responses to initial position features. Subsequently, preliminary global features Fg were constructed as follows. A feature map F′ of dimensions d × H × W was derived from the input image I using a single convolutional layer and subsequently projected onto a weighting map via two convolutional layers. This mapping captures coarse anatomical context—including spatial relations between the amygdala and adjacent medial temporal lobe structures—which assists global localization prior to fusion with local detail. The channel count in the weight map was given by hw (h ≤ H, w ≤ W), where h and w represent the dimensions of a predefined global semantic map. The weight map was then flattened for the SoftMax computation, and the resulting weights were used to aggregate semantic information within the F′ mapping through matrix multiplication, producing the final Fg result. In the following illustrations, dimensions are presented in an abbreviated form for brevity. The MGAC module includes three components: a global module for coarse-grained perception, a local module for fine-grained enhancement, and an adaptive module for multi-granularity fusion, as depicted in Figure 1B. These components independently optimize global and local features, which are interactively integrated to enhance model performance. Figure 1A illustrates the positioning of the adaptive MGAC module within the overall framework, while Figure 1B details the corresponding internal structure. Each MGAC module receives two inputs: global coarse-grained (Fg) and local fine-grained (Fl) semantic characteristics. Significant discrepancies in semantic distributions between these two sets of characteristics were mitigated by using BatchNorm3D to normalize the inputs. A linear position projection from previous work was then mapped based on the positional relationships of the elements, ensuring the arrangement of tokens within the transformer remained unchanged while preserving their positional correlations.36 However, this approach neglects local structural information, which is vital for image data. Although integrating positional encoding enables the transformer to learn positional relationships, such encoding from randomly initialized parameters requires extensive training data, which poses a challenge for medical image analysis. Traditional positional encoding data were then substituted with convolutional layers, thereby incorporating the inductive bias inherent in convolutions. This substitution facilitated the preservation of local structural information intrinsic in the images, such as spatial continuity, boundary-related intensity transitions, and local structural organization, while avoiding the limitations of positional encoding. A three-dimensional (3D) depth-wise convolution strategy was employed to convolve relationships among local neighborhoods within fine-grained semantic features, thereby introducing visual bias. In contrast, 3D pointwise convolutions were used to calculate global coarse-grained semantic features. The results, denoted as Fg and Fl, were subsequently flattened into a one-dimensional (1D) sequence to facilitate Transformer processing. This transformation involved converting Fg into a global query vector Fgq and a global content vector Fgv. Similarly, Fl, which encapsulates detailed information, was transformed into a local index vector Flk and a local content vector Flv through analogous operations. In contrast, the internal architectures of the global coarse-grained perception module and the local fine-grained enhancement module remained consistent, as illustrated in Figure 1B. These modules are primarily comprised of two components: a multi-head self-attention mechanism and a feedforward neural network. The Zl term initially replaced the input in the multi-head self-attention mechanism and was then expanded into a 1D sequence. A fully connected layer served as the transformation layer, converting the input to a query vector, an index vector, and a content vector. The multi-head attention matrix could subsequently be determined as:(Equation 1)Zl′=MHSA(LN(Zl))+Zlwhere, the feedforward layer further refined the relationships among voxel features, while integration with residual mechanisms augmented the data flow. This approach preserved original features and mitigated vanishing gradients, as described by:(Equation 2)Zl′v=FFN(LN(Zl′))+Zl′In this context, MHSA(·) denotes a multi-head self-attention mechanism, LN(·) signifies layer normalization, and FFN(·) represents a feedforward neural network. The global coarse-grained perception module and the local fine-grained enhancement module employed Equations 1 and 2 to transform the input global content vector Fgv and the local content vector Flv, respectively. The resulting updated global content vector Fg′v and the local content vector Fl′v were obtained upon completion of the processing step. The correlation matrix Att was then derived using Fgq as a query vector and Flk as an index vector, within the context of the adaptive multi-granularity fusion module, as illustrated in Figure 1. The resulting correlation was calculated as follows:(Equation 3)Atti,j=1dk(eFgiq·Flkj⊤∑j=1neFgiq) where Atti,j represents the attention weight quantifying the alignment between the i-th voxel feature in the global query vector Fgq and the j-th voxel feature in the local index vector Flk. Correlation scores between different local features were then computed using a scaled dot-product operation. To stabilize the attention distribution and prevent over-concentration in specific local regions, a scaling factor of 1/dk was applied, where dk denotes the dimension of an individual attention head, corresponding to the number of channels within Fgq. After computing the similarity matrix Atti,j, it is mapped back into the original feature space, encompassing both the global content vector space Fgv and the local content vector space Flv. Specifically, the given similarity matrix Att undergoes direct propagation into a Softmax function, to produce a sparse feature distribution for the local fine-grained branch Flv. This distribution is then subjected to matrix multiplication with Flv, followed by convolution operations to further refine the feature distribution. This sequence can be represented by:(Equation 4)Fl′=DW(softmax(Att)Flv)+Fl′vIn the case of a global coarse-grained branch Fgv, the matrix Att requires transposition to determine the similarity score between individual feature points and the query feature. Subsequently, matrix multiplication with Fgv is performed and the resultant product is processed using depthwise separable convolutions to enhance the smoothness of feature distributions. In addition, a residual technique is employed to preserve the integrity of information and mitigate issues with vanishing gradients. Ultimately, this module yields the following output:(Equation 5)Fg′=DW(softmax(Att⊤)Fgv)+Fg′v Boundary contrast learning optimization Most existing 3D segmentation algorithms29,37,38 neglect the explicit segmentation of structural boundaries. However, some algorithms strive to improve boundary delineation using attention mechanisms.39,40 Despite these efforts, there remains a lack of comprehensive and targeted research focused on evaluating the influence of boundary regions on segmentation outcomes. To address this issue, we propose meticulously aligning boundary information from manual annotations with model segmentation outputs, thereby introducing an innovative boundary contrast learning framework. Previous contrastive learning methodologies have predominantly been applied at the image level. For example, positional techniques41 extend 3D images to 2D sequences to determine spatial relationships between positive and negative samples as part of contrastive learning. The Mask Transfiner model42 adopts contrastive learning within image patches, rather than at the image level, utilizing pseudo-labels to generate patches with distinct semantic categories and forming positive and negative sample pairs. However, these strategies are inadequate for high-resolution segmentation of the amygdala, which exhibits proximity with same-type pixels throughout a 3D image. It requires the separation of pixel types and the clustering of similar pixels based on individual labels. Here, boundary pixels were used to construct positive and negative sample pairs to maximize distinctions between boundary pixels and adjacent non-relevant pixels, as illustrated in Figure 1C. Specifically, the local neighborhood around the boundary was designated as a subset, establishing a contrast learning strategy for overlapping 3D patch areas distributed throughout 3D space. Kernels adjacent to the boundary were then used to select the dimensions of 3D patch spaces in each subset. Manually segmented amygdala data thus served as a basis for constructing both positive and negative samples. The InfoNCE information maximization algorithm43 was then used to calculate the disparity between positive and negative samples in the latitude space on a hypersphere. The kernel size was set to 5 × 5 × 5 (based on the anatomical dimensions of the amygdala) and each subset formed positive and negative samples within this specified area. As illustrated in Figure 1C, the model was specifically designed to focus on and exclusively compute boundary voxels. Initially, all boundary regions Bl were considered in manual annotations. For each voxel xi in Bl, the sampling scope for positive and negative voxels was then confined to the local neighborhood Ni. Under this constraint, positive samples xj ∈ Ni ∧ li = lj were identified for boundary voxels xi, while any remaining neighborhood voxels were treated as negative samples xj ∈ Ni ∧ li ≠ lj. In this paper, j denotes sample voxels within the neighborhood Ni corresponding to the voxel i, with li and lj representing the voxel categories for xi and xj, respectively. Consequently, the boundary voxel contrast learning algorithm enhanced feature discernment for structurally organized boundary voxels, thereby establishing a target for contrast optimization within boundary voxels, which is crucial for enhancing the segmentation of boundary regions. Specifically, for the voxels xi within boundary regions Bl, learned representations were incentivized to be more congruent with voxel features from the same category, while being less congruent with features of disparate categories. This process can be described as follows:(Equation 6)LCBL=−1Bl∑xi∈Bllog(∑xj∈Ni∧lj=liexp(−d(fi,fj)τ)∑xk∈Niexp(−d(fi,fk)τ)) where fi represents the characteristics of xi, d(·,·) denotes the distance function, and τ is a temperature coefficient used in contrastive learning. The numerator captures the similarity between positive instances, while the denominator reflects the similarity between positive and negative instances. In a contrastive loss framework, the objective is to maximize similarity among positive pairs while minimizing similarity between positive and negative pairs. Consequently, increasing intra-class similarity (bringing positive instances closer) while decreasing inter-class similarity (pushing positive and negative instances further apart) leads to a lower loss. The temperature coefficient τ is a predefined hyperparameter that controls model’s sensitivity to negative samples. Larger values of τ flatten the distribution of d(fi, fj), causing the model to treat all negative samples more uniformly, which reduces learning efficacy. Conversely, smaller values of τ emphasize more difficult negative samples, some of which may be mislabeled positive samples, leading to false negatives. This approach limits model convergence and restricts generalization capabilities. Therefore, selecting an optimal temperature coefficient is crucial to balancing learning efficiency and discrimination ability. SAM-based 3D segmentation framework The SAM framework was used to develop a consistency strategy to mitigate discrepancies arising from the scanning of different subjects (Figure 1A). This strategy comprises of three integral components: a volume feature encoder, a 3D prompt encoder, and a volume mask decoder. The principal contributions of each can be specifically delineated as follows. First, SAM is introduced, which is specifically designed for amygdala segmentation tasks. Unlike existing approaches to improving SAMs, the strength of our model lies in its comprehensive consideration of factors such as the volume, shape, and relative position of the amygdala. This process eschews conventional slice-by-slice feature extraction in favor of a holistic total volume approach. The model also establishes interslice associations, which are exceptionally well-suited to structures with intricate core regions. In contrast to traditional algorithms, this technique provides a more comprehensive representation of anatomical structures, particularly for smaller entities. Second, the incorporation of a 3D prompt encoder ensures the preservation of prior spatial position information and 3D spatial features provided by the user. In contrast to 2D prompt encoders, this strategy provides more precise relative position cues in multidimensional space. The effective merging of 3D cue information with embedding features derived from a volume feature encoder is then facilitated by a volume mask decoder. This decoder harnesses interaction mechanisms between prior cue and MRI embeddings, facilitating seamless integration. The fusion mechanism then adeptly captures nuanced details within the feature space, offering a robust tool for the precise depiction of anatomical structures. SAMs constitute an interactive segmentation methodology predicated on iterative operations. This framework enhances the representational capacity of the model through the incorporation of positional cues and pre-segmentation data, thereby facilitating continuous optimization of segmentation accuracy via multiple interactive iterations. Notably, the accuracy of existing SAMs is suboptimal when applied directly to medical imaging tasks (especially amygdala segmentation). To address this issue, the structure of the proposed 2D SAM has been meticulously customized for amygdala segmentation. This includes the introduction of an advanced SAM, which comprises three integral components: a volume feature encoder, a 3D prompt encoder, and a volume mask decoder. The function of the Volume Feature Encoder (VFE) is to transform input T1w structural images into an MRI embedding vector (Figure 1A). Unlike the 2D encoder used in traditional SAMs, this process allows simultaneous consideration of volume, shape, and relative position, thereby offering a more comprehensive representation of anatomical structures to enhance the processing of complex regions surrounding the core area. A 3D prompt encoder was also used to encode prior information, incorporating interactive cues and existing amygdala segmentation results. The 3D prompt encoder consists of two components: a click-cue branch and a presegmentation cue branch. The click-cue branch converts user-provided cue points into learnable location embedding features to delineate amygdala location more precisely. The pre-segmentation prompt encoder uses the last click made during interactive segmentation as input. Alternatively, it provides pre-segmentation results to the model, thereby prompting adjustments and optimization of the current segmentation result. As such, a volume mask decoder (VMD) was developed to effectively integrate information from the prompt encoder with embeddings produced by the feature encoder. This VMD also facilitated the retrieval and refinement of information pertaining to the amygdala, ensuring a seamless alignment of cue feature information and initial feature encoder output. The VMD is a pivotal component to exhaustively explore key characteristics within the amygdala, thereby enhancing model efficacy in intricate clinical scenarios. It aims to combine MRI embedding vectors (produced by the volume feature encoder) with user-provided prompt inputs (used to determine the correlation between them), culminating in precise predictive results. The 3D mask decoder generates MRI and cue embeddings using a multi-layered fusion 3D feature encoder, facilitating multi-level and multi-perspective information extraction. This comprehensive fusion mechanism enables a more complete assimilation of MR images and improves the differentiation of anatomical structures, thereby increasing predictive precision. In conclusion, the decoder generates precise predictions of specific structures or lesions within images, offering crucial support for clinicians in making accurate diagnoses and devising treatment strategies. Training configuration Implementation of loss function We implemented an advanced deep-supervised strategy to formulate the loss function. Specifically, this involved the integration of supervisory signals in each intermediate and terminal module, thereby facilitating enhanced gradient propagation and optimization of network training efficiency. Two distinct loss functions were incorporated for each supervisory signal, namely, binary cross-entropy (BCE) and Dice loss. The overall loss function was constructed as follows:(Equation 7)L=∑k=14(LBCEk+LDicek) An adapted version of BCE loss was employed to address issues with imbalances between positive (amygdala) and negative (other tissue) samples. Hereafter, the superscript k is excluded for simplicity, while LextBCE is defined as follows:(Equation 8)LBCE=−∑i=1H∑j=1W(1+αi,j)∑l=01(gi,j=l)logPr(pi,j=l|Ψ)∑i=1H∑j=1w(αi,j) where l ∈ (0, 1) denotes two label categories. The variables pi,j and gi,j represent predicted and GT values, respectively, at the spatial coordinate (i, j) within a CT image characterized by a width of W and a height of H. The symbol Ψ encompasses all model parameters and Pr(pi,j = l) signifies the predicted probability. The term αi,j ∈ [0, 1] describes the pixel-specific weight and can be expressed as:(Equation 9)αi,j=|∑(m,n)∈Ai,jgm,n∑(m,n)∈Ai,j1−gi,j| where Ai,j denotes the region adjacent to pixel (i, j) and | · | signifies the calculation of absolute value. Furthermore, Dice loss was defined as:(Equation 10)LDice=1−∑i=1H∑j=1W(2gi,jpi,j)(1+αi,j)∑i=1H∑j=1W(gi,j+pi,j+gi,jpi,j)(1+αi,j) Implementation details The model was trained using the full capability of the Tesla A10 GPU to optimize computational efficiency. The AdamW optimizer,44 a common choice within the transformer architecture domain, was used for routine updates of network parameters. The learning rate was empirically set to 1e−4, balancing training stability and convergence speed, with a weight decay of 1e−4. Memory consumption was mitigated by designating a batch size of 1, with a training process encompassing 100 iterations. This configuration ensured the model underwent sufficient training cycles to achieve optimal performance and effectively discern feature representations. All preprocessing, model training, and deployment procedures were implemented in Python (v3.11). Neuroimaging data reading, writing, and header management were conducted using NiBabel and SimpleITK. Image manipulation for visualization and quality control was performed with OpenCV. The model was implemented in PyTorch, with medical-imaging utilities from MONAI, transformer modules from timm, and tensor rearrangements handled by einops. An interactive web-based demonstration interface was developed using Gradio. Quantification and statistical analysis Evaluation metrics Model performance was assessed using standard medical image segmentation metrics, including region overlap measures (Dice Similarity Coefficient and Jaccard Similarity), boundary distance measures (Hausdorff Distance (HD95), Average Surface Distance (ASD), and Average Symmetric Surface Distance (ASSD)), volumetric comparison (Relative Volume Difference, RVD), and classification metrics (Precision and Recall).45 The Dice similarity coefficient (Dice) measures the similarity between a predicted binary region (P) and a ground truth (GT). It is formulated as:(Equation 11)Dice=2|P∩G||P|+|G| where P and G denote voxel sets for the segmented area and GT, respectively. The term | · | denotes a cardinality computation operation, which provides the number of elements in a set. Jaccard Similarity (JS) is defined as the area of intersection between predicted segments and labels, divided by the area of union between the two, expressed as:(Equation 12)JS=|P∩G||P∪G| Hausdorff Distance (HD) measures the maximum surface distance distribution between the predicted segmentation result and the ground truth. HD95 is an improvement on the Hausdorff distance that reduces the impact of outliers by taking the 95% quantile.(Equation 13)HD95(P,G)=Percentile95(Dpred→gt∪Dgt→pred) Average Surface Distance (ASD) is used to measure the surface distance difference between the predicted segmentation result and the ground truth.(Equation 14)ASDP,G=1|P|+|G|∑x∈Pminy∈Gdx,y+∑y∈Gminx∈Pdy,x Average Symmetric Surface Distance (ASSD) is a commonly used symmetric surface distance metric in medical image segmentation evaluation. It measures the surface distance difference between the predicted segmentation result and the ground truth, while considering the bidirectional distance from prediction to GT and from GT to prediction.(Equation 15)ASSDP,G=121|P|∑x∈Pminy∈Gdx,y+1|G|∑y∈Gminx∈Pdy,x Precision is a commonly used evaluation metric that measures the proportion of positive predictions in the predicted segmentation results that are correct, especially for unbalanced datasets.(Equation 16)Precision=∑iPi=1∧Gi=1∑iPi=1∧Gi=1+∑iPi=1∧Gi=0 Recall is another important evaluation metric that measures how many positive pixels in the true segmentation are correctly predicted as positive. It reflects the coverage of the model for positive samples.(Equation 17)Recall=∑i(Pi=1∧Gi=1)∑i(Pi=1∧Gi=1)+∑i(Pi=0∧Gi=1) Relative Volume Difference (RVD) is one of the commonly used evaluation indicators in medical image segmentation tasks, which is used to measure the volume difference between the predicted segmentation result and the GT.(Equation 18)RVD=∑iPi−∑iGi∑iGi Statistical analysis Segmentation performance was compared across AmygdalaGo-BOLT and several commonly used segmentation methods, including FreeSurfer v6.07 and three CNN-based models, U-Net3D,29 ResU-Net3D,30 and U-Net3D++,31 each trained independently on the same dataset under identical training configurations. Segmentation performance was quantified using voxel-wise overlap metrics and surface-based boundary metrics. For each participant and hemisphere, we computed the Dice, JS, Precision, Recall, RVD, HD95, ASD, and ASSD. All metrics were calculated independently for the internal validation dataset (CKG-CCNC) and the external BNU-CAC dataset. Model performance across algorithms was assessed descriptively by summarizing the distribution of each metric within each dataset. For the multi-center ZJU-MTC dataset, we focused primarily on Dice and boundary distance measures to quantify cross-site consistency. Age-related growth trajectories of amygdala volume were modeled using generalized additive mixed models (GAMMs) to capture nonlinear developmental patterns while accounting for repeated measurements within individuals. For each segmentation method, we fitted a separate GAMM with amygdala volume as the outcome and age entered as a smooth term, including sex as a fixed effect and a subject-specific random intercept. Smooth age effects were modeled with cubic regression splines using the mgcv32 package in R. Fitted trajectories and their 95% confidence intervals were visualized for manual tracings and each automated method to assess whether automated segmentations preserved known developmental patterns. Volumetric agreement between automated and manual segmentations was quantified by correlating predicted and manually traced amygdala volumes, treating the manual labels as the anatomical reference standard. Measurement bias and limits of agreement were further characterized using Bland–Altman analyses to visualize systematic deviations of automated estimates from the reference and to assess whether bias varied across the volume range.