Abstract
This work shows a derivation of a multinomial probability function and quantitative measures of the data and epistemic uncertainty as direct output of a 3D U-Net segmentation network. A set of T1 brain MRI images were downloaded from the Connectome Project and segmented using FMRIB’s FAST algorithm to be used as ground truth. A 3D U-Net neural network was trained with sample sizes of 200, 500, and 898 T1 brain images using a loss function defined as the negative logarithm of the likelihood based on a derivation of the definition of the multinomial probability function. From this definition, the epistemic (model) and aleatoric (data) uncertainty equations were derived and used to quantify maps of the uncertainty in data prediction. The epistemic and aleatoric uncertainty decreased based on the increasing number of training data used to train the neural network. The neural network trained with 898 volumes resulted in uncertainty maps that were high primarily in the tissue boundary regions. The uncertainty was averaged over all test data (connectome and tumor separately) and the epistemic uncertainty showed a decreasing trend, as expected, with increasing numbers of data used to train the model. The aleatoric uncertainty showed a similar trend, but it was less obvious, which was also expected as the aleatoric uncertainty is not expected to be as dependent on the number of training data. The derived data and epistemic uncertainty equations from a multinomial probability distribution are applicable for all 2D and 3D neural networks.
Introduction
Deep learning has revolutionized medical image segmentation, but most models operate as "black boxes," providing single-point predictions without a measure of confidence. In clinical settings, incorrect segmentation of critical structures can have severe consequences. To address this, researchers have developed a method to quantify two distinct types of uncertainty: aleatoric (inherent data noise) and epistemic (model lack of knowledge). By deriving a loss function that directly outputs these parameters, the 3D U-Net becomes "self-aware," distinguishing between ambiguity in the image itself and gaps in its own training experience.
Methodology
The study utilized a 3D U-Net architecture adapted to output parameters of a multinomial probability distribution. Unlike standard models using Cross-Entropy, this approach employed a loss function based on the negative log-likelihood of a multinomial distribution with a Dirichlet prior. This allows the network to learn class distributions rather than just point estimates.
Datasets and Training
- 1000 Connectome Project: 928 T1-weighted brain MRIs provided the primary dataset. Ground truth labels for White Matter (WM), Gray Matter (GM), and Cerebrospinal Fluid (CSF) were generated via FMRIB’s FAST algorithm.
- Clinical Tumor Data: 10 T1-weighted scans with visible tumors served as a stress test for the model’s ability to handle out-of-distribution pathologies.
- Training Regimes: The model was trained on three subset sizes (N=200, 500, and 898) to observe how uncertainty scales with data volume.
Key Results and Performance
The model demonstrated stable convergence across all training sizes. As shown in the training metrics, the model achieved a mean Dice score of approximately 0.73 for the largest training set (N=898), with Gray Matter segmentation reaching the highest accuracy at 0.83.
Quantitatively, epistemic uncertainty was found to be roughly twice as high as aleatoric uncertainty in low-data scenarios (N=200). As the training set grew, epistemic uncertainty decreased significantly, indicating the model was successfully "learning" the underlying patterns. Aleatoric uncertainty also showed a slight decrease, likely due to the mathematical consistency of the Maximum Likelihood Estimator (MLE).
Visual Analysis of Uncertainty
Visualizing the uncertainty maps reveals critical insights into the model's decision-making process. Aleatoric uncertainty was consistently highest at tissue boundaries. This "boundary effect" is expected due to partial volume effects, where a single voxel contains a mixture of tissue types, creating inherent ambiguity that more data cannot resolve.
In the tumor test set, a notable "Tumor Trap" was observed: the model often labeled tumors as CSF with low uncertainty. Because the signal intensity of certain tumors mimics CSF in T1-weighted images, the model confidently made incorrect classifications. This underscores the limitation of single-channel intensity models and the need for multi-modal data.
Conclusion
This work provides a direct, computationally efficient method for calculating uncertainty in 3D medical imaging. By distinguishing between data noise and model ignorance, these metrics can help radiologists identify regions where AI predictions may be unreliable. Future work will focus on incorporating multi-modal MRI sequences (e.g., T2, FLAIR) and spatial priors to further refine these uncertainty estimates and improve diagnostic safety.
Summary updated