Auto-nnU-Net: Towards Automated Medical Image Segmentation

Jannis Becktepe, Leona Hennig, Steffen Oeltze-Jafra, Marius Lindauer

TL;DR

Auto-nnU-Net elevates the state-of-the-art medical image segmentation framework by integrating joint hyperparameter optimization (HPO) and neural architecture search (NAS). By introducing Regularized PriorBand, the framework explicitly balances segmentation accuracy against training runtime, outperforming or matching standard nnU-Net across all ten Medical Segmentation Decathlon datasets while keeping computational costs practical.

What Problem Does This Paper Address?

Medical Image Segmentation (MIS)—identifying anatomical structures or tumors in 3D scans like MRIs and CTs—is notoriously challenging due to massive variations in tissue contrast, organ shapes, and class imbalances. The current gold standard framework, nnU-Net, handles this by automatically configuring its U-Net architecture based on data "fingerprints."

However, nnU-Net still relies on rigid, manually designed heuristics and fixed hyperparameters (such as a hardcoded learning rate, optimizer choice, and loss function). While Automated Machine Learning (AutoML) could theoretically find better configurations, standard HPO and NAS methods are incredibly expensive, often requiring thousands of GPU hours. In clinical settings where models must be frequently retrained or fine-tuned on local data due to privacy and scanner differences, this computational overhead is a dealbreaker.

Methods

The authors introduce Auto-nnU-Net, which injects flexible AutoML directly into the nnU-Net pipeline.

Overview of the Auto-nnU-Net framework, showing how hyperparameter configurations and architectures are optimized jointly using Regularized PriorBand.

The framework consists of three core components:

  1. AutoExperimentPlanner & AutoNNUNetTrainer: Replaces nnU-Net's fixed rules to allow dynamic tuning of training dynamics (e.g., data augmentation, learning rates) and structural properties.
  2. Hierarchical NAS (HNAS): Uses context-free grammars (CFG) to systematically explore a massive space of U-Net topologies, block counts, and activation functions, while ensuring the standard nnU-Net configuration remains accessible as a baseline.
  3. Regularized PriorBand: This is the optimization engine. It builds on PriorBand, a multi-fidelity algorithm that uses expert-designed "priors" (like nnU-Net's defaults) to guide the search. The authors extend it into a multi-objective algorithm by adding Training Runtime as an explicit optimization target alongside segmentation error ($1 - \text{Dice Similarity Coefficient}$).

To handle the trade-off between speed and accuracy, Regularized PriorBand modifies the Successive Halving subroutine using non-dominated sorting and crowding distance sorting. A larger, more complex model is only promoted to the next training stage if it provides a clear boost in accuracy over faster, lightweight models.

Datasets

The framework was evaluated on the Medical Segmentation Decathlon (MSD), a comprehensive benchmark consisting of 10 diverse medical image segmentation datasets:

  • D01–D10: Brain Tumor, Heart, Liver, Hippocampus, Prostate, Lung, Pancreas, Hepatic Vessel, Spleen, and Colon.
  • These datasets span multiple modalities (MRI, CT, multiparametric-MRI) and vary drastically in target size, resolution, and slice counts.

Key Insights and Ideas

  • Expert Priors are Essential for Efficiency: Purely random or blind architecture searches are too slow for 3D medical imaging. By seeding the multi-fidelity search with nnU-Net's default configurations as a strong prior, Auto-nnU-Net finds superior configurations rapidly.
  • One Size Does Not Fit All: Using functional ANOVA (fANOVA), the authors discovered that hyperparameter importance varies wildly depending on the dataset. For instance, Foreground Oversampling and Initial Learning Rate were highly critical for some tasks but less so for others, proving that nnU-Net's fixed defaults leave performance on the table.
  • The Power of Multi-Objective Regularization: By treating runtime as a cost, the algorithm naturally maps out a Pareto front. It prevents the search from bloating into massive, slow models unless they genuinely justify their computational footprint with significant accuracy gains.

Key Results

Auto-nnU-Net underwent a massive evaluation totaling approximately 60,000 GPU hours.

Optimization performance over time across the MSD datasets, comparing Auto-nnU-Net variants against standard nnU-Net baselines.
  • Superior Test Accuracy: On the official MSD test set, Auto-nnU-Net achieved the highest average Dice Similarity Coefficient (77.04%), outperforming all standard nnU-Net baselines (Convolutional SOTA, Residual Medium, and Residual Large). It achieved clear performance wins on 6 out of 10 datasets and performed on par on the remaining 4.
  • Massive Speedups: On the Hippocampus dataset (D04), the HPO+HNAS ablation variant identified an optimal configuration 26 times faster than training the heavy nnU-Net (ResL) baseline, while delivering better accuracy.
  • Beating Foundation Models: The authors compared their method against MedSAM2, a recent medical adaptation of Meta's Segment Anything 2 model. MedSAM2 underperformed nnU-Net on 9 out of 10 datasets, largely because foundation models struggle with 3D spatial context and require manual bounding-box prompts during inference, whereas Auto-nnU-Net is fully automated.

Limitations and Future Work

While highly effective, the authors note a few limitations:

  • No Ensembling or Post-Processing: To keep the study controlled, this work evaluated standalone 3D U-Nets. The full nnU-Net pipeline typically ensembles multiple models and applies post-processing heuristics, which would likely boost Auto-nnU-Net's final scores even further.
  • Future Directions: The authors suggest exploring warm-starting AutoML with multiple distinct default configurations and integrating meta-learning to transfer optimization knowledge across datasets dynamically, further reducing the search time.

Summary updated

Abstract

Medical Image Segmentation (MIS) includes diverse tasks, from bone to organ segmentation, each with its own challenges in finding the best segmentation model. The state-of-the-art AutoML-related MIS-framework nnU-Net automates many aspects of model configuration but remains constrained by fixed hyperparameters and heuristic design choices. As a full-AutoML framework for MIS, we propose Auto-nnU-Net, a novel nnU-Net variant enabling hyperparameter optimization (HPO), neural architecture search (NAS), and hierarchical NAS (HNAS). Additionally, we propose Regularized PriorBand to balance model accuracy with the computational resources required for training, addressing the resource constraints often faced in real-world medical settings that limit the feasibility of extensive training procedures. We evaluate our approach across diverse MIS datasets from the well-established Medical Segmentation Decathlon, analyzing the impact of AutoML techniques on segmentation performance, computational efficiency, and model design choices. The results demonstrate that our AutoML approach substantially improves the segmentation performance of nnU-Net on 6 out of 10 datasets and is on par on the other datasets while maintaining practical resource requirements. Our code is available at https://github.com/automl/AutoNNUnet.
BibTeX
@inproceedings{becktepe2025auto,
  author = {Jannis Becktepe and Leona Hennig and Steffen Oeltze-Jafra and Marius Lindauer},
  title = {{Auto-nnU-Net: Towards Automated Medical Image Segmentation}},
  booktitle = {AutoML ABCD Track},
  year = {2025},
  url = {https://openreview.net/forum?id=XSTIEVoEa2},
}
Figure