Abstract
Rich and accurate medical image segmentation is poised to underpin the next generation of AI-defined clinical practice by delineating critical anatomy for pre-operative planning, guiding real-time intra-operative navigation, and supporting precise post-operative assessment. However, commonly used learning methods for medical and surgical imaging segmentation tasks penalize all errors equivalently and thus fail to exploit any inter-class semantics in the label space. This becomes particularly problematic as the cardinality and richness of labels increases to include subtly different classes. In this work, we propose two tree-based semantic loss functions which take advantage of a hierarchical organization of the labels. We further incorporate our losses in a recently proposed approach for training with sparse, background-free annotations to extend the applicability of our proposed losses. Extensive experiments are reported on two medical and surgical imaging segmentation tasks, namely head MRI for whole brain parcellation with full supervision and neurosurgical hyperspectral imaging for scene understanding with sparse annotations. Results demonstrate consistent improvements over the evaluated task-specific baselines, with the strongest support for the Wasserstein-based compound loss in whole-brain parcellation and for hierarchy-weighted top-level supervision in the sparse hyperspectral imaging (HSI) setting.
1 Introduction
Segmentation plays a crucial role in medical and surgical image analysis by locating and precisely outlining regions of interest such as organs, lesions, and tissues across a variety of imaging modalities. Two particularly important brain imaging applications that rely on rich and accurate segmentation are head MRI for whole brain parcellation (WBP) and interventional hyperspectral imaging (iHSI) for scene understanding and tissue characterization. WBP divides an MRI volume into spatially coherent, anatomically or functionally meaningful brain regions (). Hyperspectral imaging (HSI) captures wide-field views across dozens to hundreds of optical spectral bands, and can be used intra-operatively to reveal biochemical contrasts invisible to the naked eye ().
A major challenge with such rich segmentation tasks relates to the granularity at which the data is annotated and that at which segmentation models should operate. Recent works have examined the impact of training models with various levels of labeling granularity such as pixels, patches, and entire images (; ). Other studies have provided comparative analyses of different pixel-level algorithms for brain tissue differentiation (). Underpinning these questions is the drive for a holistic and refined understanding of the images and surgical scenes. Annotation efforts are ongoing to provide training data across large number of potentially subtly varying classes. Combined with sparse annotations processes that may be employed to label data at scale, many of these classes may only have small amounts of training samples. It is thus important to take advantage of the semantics of the labels and realize that some types of errors are more acceptable than others. However, there is only limited previous work in medical imaging that has leveraged the structure of the label space as a source of information. In surgical imaging, to our knowledge, no such efforts have been published. By contrast, the importance of label semantics is getting recognized in the general field of computer vision (; ; ). Adopting these concepts to WBP and iHSI is expected to produce more robust models for both dense and sparse annotation setting.
Additional challenges arises when labeling needs to be performed at scale. Leveraging sparsely annotated datasets becomes an effective strategy that has been widely adopted already in iHSI segmentation and surgical imaging (; ; ). For instance, a recent general surgery iHSI dataset adopted a sparse annotation protocol by labeling only representative image regions, omitting marginal areas, superficial blood vessels, adipose tissue, and other artifacts (). Within the neurosurgical HSI dataset used in this study, representative examples of this labeling strategy are shown in the qualitative results figures presented later in the article. In sparsely annotated medical image segmentation, the absence of a label cannot be taken as evidence that a region is negative. A truly positive pixel may go unmarked for two reasons: (i) the annotator finds the region ambiguous or (ii) it is skipped due to time constraints. The most straightforward, albeit wrong, approach would be to presume that every unlabeled pixel belongs to the negative background class. To appropriately address such partial supervision, recently proposed a framework that learns from background-free, positive-only sparse label masks. Pixel-wise out-of-distribution (OOD) detection methodology is used at inference time to flag as background any tissue or object type that has not been annotated in the training data.
In this work, we exploit semantic relationships in the label structure through a general tree-based semantic supervision framework, instantiated by two complementary loss functions for supervised segmentation. Figure 1 provides an overview of the proposed framework for medical image segmentation. A hierarchical label tree encodes the semantic relationships among classes and serves as the basis for two complementary loss functions. For WBP, the hierarchy is derived from established anatomical guidelines based on the Desikan–Killiany–Tourville (DKT) protocol () (Figure 2, with a larger version available in Supplementary material and online via an interactive hierarchy visualization); for surgical HSI, the hierarchy is defined by expert consensus, with the full structure provided online via an interactive hierarchy visualization and in Figure A1 in Appendix. We encode this structure directly into optimization via a Wasserstein distance-based segmentation loss, which penalizes errors according to path length in the label tree, and a tree-weighted semantic cross-entropy loss, which extends weighted cross-entropy to all nodes in the hierarchy. Both losses incorporate semantic information into training, but they use the hierarchy differently: the Wasserstein formulation changes the cost of leaf-label mistakes through pairwise tree distances, whereas tree-weighted cross-entropy supervises aggregated probabilities at internal as well as leaf nodes. We further integrate these losses into the positive-only sparse supervision framework of to support background detection as OOD without degrading performance on positive (ID) classes. Across rich segmentation tasks in brain MRI and neurosurgical iHSI, the proposed losses improve over the evaluated baselines in several clinically relevant settings. In particular, experiments on three MRI WBP datasets show that the Wasserstein-based loss provides the strongest support among the evaluated losses, especially for NSD and small-structure metrics, while experiments spanning two tasks and four datasets demonstrate that the proposed framework can be incorporated into standard segmentation models without architectural modification in both sparse and dense annotation settings. The code is available at https://github.com/cai4cai/nnunet-tree-semantic-extension.
Figure 1
Figure 2

The neuro-anatomical label hierarchy of Mindboggle dataset. From left to right, the hierarchy progresses from coarse object categories to specific classes. Rich annotations correspond to leaf node classes. The color coding matches the ground-truth mask at each level.
The main contributions of this paper can be summarized as follows:
We introduce two tree-based semantic losses for medical image segmentation, namely a Wasserstein distance-based segmentation loss and a tree-weighted semantic cross-entropy loss, which explicitly encode hierarchical relationships between labels during training.
We show how these losses can be applied to both densely supervised whole-brain parcellation and sparsely supervised neurosurgical HSI segmentation, including integration with a positive-only OOD detection framework for background identification.
We demonstrate that incorporating expert-defined or anatomically derived label hierarchies leads to more semantically meaningful supervision and improved segmentation performance relative to standard baselines.
We provide empirical evidence across two segmentation tasks and four datasets, with the Wasserstein-based loss consistently improving over the CE + Dice nnU-Net baseline for WBP, evaluated using manual references on MB42 and automated GIF-derived pseudo-ground-truth masks on AOMIC/IXI, particularly on small structures with limited annotations.
2 Related work
2.1 Semantic segmentation in WBP
Although the desired granularity varies across protocols, whole-brain parcellation (WBP) typically entails segmenting hundreds of distinct classes (
2.2 Semantic segmentation in hyperspectral imaging
Semantic segmentation works have initially relied on classical machine learning pipelines (
2.3 Hierarchical loss functions
Hierarchical loss functions encode class-taxonomy information directly in optimization, so prediction errors are penalized by semantic severity rather than uniformly. Early work in large-scale visual recognition established this principle: hierarchy-aware objectives based on WordNet and lowest-common-ancestor structure (
Outside medical imaging, deep-learning formulations made hierarchy-aware supervision more practical and expressive. “Better-mistake” cross-entropy variants in
Within medical imaging, earlier hierarchy-aware work was comparatively limited. A brain-parcellation approach in
Taken together, these studies support hierarchy-aware supervision, but gaps remain for our target setting: rich medical label spaces, compatibility with standard segmentation architectures, and training under sparse positive-only annotations where background labels are absent.
2.4 Medical image segmentation with sparse annotation
Pixel- or voxel-level annotation of medical images is time-consuming and costly. Early work showed that accurate segmentation can be achieved from only a handful of labeled regions when unlabeled pixels or voxels are ignored in the loss (
Existing WSL methods utilize various modes of sparse annotations, including image-level annotation (
2.5 Out-of-distribution detection and positive-only learning
Several studies have explored OOD detection within the context of image classification (
Despite methodological advances and positive demonstration for image classification purposes, application of OOD detection in medical image segmentation is uncommon. Some studies hypothesize that this may be due to the lack of OOD-based evaluation protocols and the difficulty in gathering relevant data for it (
Recently,
3 Methodology
This section provides detailed methodology for our proposed loss functions (Sections 3.2 and 3.2). Furthermore, we demonstrate how these can be integrated in the approach of
3.1 Wasserstein distance in label space
Let L be the label space with C leaf nodes, where L = {1, 2, …, C}. Let p, q∈P(L) be probability vectors on L. The Wasserstein distance between p and q is the minimal cost to transform p into q given the ground distances between any two labels l and l′. The ground distance is represented as a matrix M and the associated Wasserstein distance WM(p, q) is defined through an optimal transport problem:
By leveraging the distance matrix M on L, the Wasserstein distance yields a semantically-meaningful way of comparing two label probability vectors. Given a tree structure with weights associated to the edges, a semantic ground distance can be induced by the path lengths between the leaf nodes. If q = g is a crisp ground truth, a closed-form expression of Equation 1 is given in
While Equation 2 can be used directly as the loss for training a segmentation model, prior work has shown benefits in combining generic and task-specific losses (
3.2 Tree-weighted semantic cross-entropy loss
We also propose another approach to building semantic loss functions by computing the aggregated probabilities across all the nodes in the tree hierarchy, not just the leaf nodes. A segmentation loss such as CE can then be evaluated across all node probabilities.
Let the label tree be composed of K levels, with level 0 corresponding to the deepest level, i.e., the leaf nodes. Let A be the adjacency matrix associated with , which encodes the parent–child links in the tree: Au, v = 1 if node u is the parent of node v, and Au, v = 0 otherwise. Let be a zero-padding of p to initially associate non-leaf nodes with a zero mass, and p† be the vector collecting all the probabilities:
For a finite tree, A is nilpotent: if the longest leaf-to-root path has K edges, then Ak = 0 for k > K. Hence (I−A)−1 = I+A+⋯+AK is a finite sum. For a three-level tree ordered as (r, a, b, c, d, e, f), with p = (0.1, 0.1, 0.3, 0.5)T on the leaves, and p† = (1, 0.2, 0.8, 0.1, 0.1, 0.3, 0.5)T. Figure 3 shows the tree and the corresponding adjacency matrix.
Figure 3

Example label tree and its adjacency matrix. Each directed edge connects a child node to its parent, so Au, v = 1 denotes that node u is the parent of node v.
Here, we focus on an extended CE weighted according to domain specific insight:
where wv is the weight of the edge associated with v as a child node. We note that if wv = 1 for all leaf nodes and wv = 0 otherwise, Equation 5 reduces to the standard CE.
Similar to the Wasserstein case in Section 3.1, Equation 5 is combined with a generic segmentation loss . We refer to our semantically-informed variant of the segmentation loss as the tree-weighted semantic segmentation loss:
The coefficients α and β in Equations 3 and 6 are loss-specific hyperparameters; we reuse the symbols only to indicate their shared role in balancing the semantic and segmentation terms.
3.3 Learning from sparse positive-only annotations
We build on the recent work (
The framework starts by training a segmentation model using only the positive classes. For clarity, the background class is not a possible output of the network but OOD-tailored training may be used to improve the performance of the next step. The framework then employs a confidence score from an OOD detection mechanism with a threshold τ to flag background pixels at inference time. The model prediction becomes:
where is a scoring function that captures the probability of pixel i belonging to the positive class c, while acknowledging the possibility of it being background/OOD. can be selected from various OOD detection methods used in image classification tasks (
To use the hierarchy for OOD detection, we aggregate probabilities using Equation 4 and threshold scores at a chosen hierarchy level h instead of at the leaf level. Let be the nodes at level h, with h = 0 for leaves. We use the coarsest non-root level, h = K−1. For pixel i and node , the score in Equation 7 is ; the maximum and argmax are then taken over .
4 Experimental setup
This section details the configuration used to evaluate our tree-based loss functions. We consider two segmentation tasks: 1) 3D MRI based WBP with full supervision; and 2) 2D hyperspectral surgical scene segmentation with sparse positive-only annotations. All methods share identical hyper-parameters unless otherwise noted, ensuring that performance differences arise solely from the loss functions themselves.
4.1 Dataset
4.1.1 WBP datasets with dense reference masks
We evaluated our approach on 3D T1-weighted MR images drawn from three openly available datasets. The Mindboggle101 collection provides 101 manually annotated scans aggregated from multiple public sources (
GIF with Mindboggle59 was used to generate GIF-derived pseudo-ground-truth WBP masks for two other datasets which otherwise do not provide manual WBP annotations. Accordingly, AOMIC and IXI metrics quantify agreement with automated GIF-derived pseudo-ground-truth masks rather than direct accuracy against manual annotations, and these experiments cannot quantify GIF label error without additional manual AOMIC/IXI WBP labels. The AOMIC PIOP2 dataset (
4.1.2 Surgical HSI dataset with sparse positive-only annotations
The data was obtained from patients undergoing microscopic cranial neurosurgery as part of an ethically approved single-center, prospective clinical observational investigation employing a prototype hyperspectral imaging system (NeuroHSI study: REC reference 22/LO/0046, ClinicalTrials.gov ID NCT05294185). Informed consent was obtained from all participants. The primary objective was to evaluate the intra-operative utility of a 4 × 4, 16-band visible-range snapshot mosaic camera (IMEC CMV2K-SSM4X4-VIS) mounted on a surgical microscope.
The dataset comprises 22,829 annotated frames derived from 45 distinct patients, encompassing both neuro-oncological and neurovascular pathologies. Multiple videos were acquired throughout each case, with each recording representing a specific surgical phase intended to capture relevant intra-operative details. The data includes varying visual perspectives due to changes in surgical microscope positioning. Training snapshot data are first processed with a demosaicking pipeline (
The sparse, background-free annotations encompass 107 subclasses organized into a hierarchical structure defined by neurosurgeons. Due to space constraints, the full label hierarchy is provided in Supplementary material and online via an interactive hierarchy visualization, with corresponding color references displayed at each node in the label hierarchy. For each video a representative subset of frames was selected by an experienced neurosurgeon to minimize motion blur, maximize the number of tissue classes included and ensure key surgical phases were represented. Selected frames were manually annotated by two neurosurgeons who had also been present during the surgical procedure. In cases where tissue class was ambiguous based on HSI-derived sRGB images alone, corresponding high resolution snapshot pictures taken using the integrated surgical microscope camera were correlated with hyperspectral data to determine tissue class, and if necessary discussed with the operating surgeon. Where definitive identification of tissue class was not possible, the area was left unlabeled. Where feasible, these manual annotations were then propagated across subsequent frames algorithmically using the registration-based propagation feature of the ImFusion Labels software. Each propagated annotation was verified and corrected (when needed) by a neurosurgeon prior to final submission.
We also note that the coupling of the camera onto the surgical microscope induces a partial masking of the sensor on the outside of the circular field of view of the microscope. In addition to human-labeled categories, an additional label was generated by a content area estimation algorithm (
Figure 4

Qualitative result on top-level classes. We show the result of same image using different methods at confidence threshold τm. Baseline results at τ0 = 0 are added to represent result without outlier detection. Reproduced qualitative segmentation results from our previous MICCAI 2025 conference paper. Source:
4.2 Implementation details
There are two distinct experimental configurations, depending on the dataset and task. Across all experiments, when training with our tree semantic losses, we used the same hyperparameters as those used in the baseline approach to ensure a fair comparison. Similar to
4.2.1 WBP
For the WBP task, we use the nnU-Net framework (
4.2.2 HSI
For the neurosurgical HSI dataset, we adopted a similar training pipeline as described in
4.2.3 Choice of tree weights/ground distances
Edge weights can be defined across hierarchical levels, producing distinct cost matrices M that affect overall performance. We consider four edge weight setups. A first simple case is Mt that assigns a weight of 1 only to edges at the top-level and 0 elsewhere. A second simple case is Mℓ that assigns a weight of 1 only to leaf nodes and 0 elsewhere. Neither Mt nor Mℓ effectively take advantage of the label hierarchy and these cases therefore represent baselines. By contrast, Me and Mh place non-zero weights on every edge. Me sets all edge weights to 1, whereas Mh imposes a scaling parameter κ such that a parent-level edge weight is κ times larger than its children.
To focus the number of experiments reported here, for the WBP task, we reuse the best configuration identified in
For the HSI experiments, we report all four edge weight configuration. Through preliminary experiment not reported here, we found that the following choice of κ yields appropriate performance for the Mh configuration: κ = 10 for based experiments and κ = 2 for based experiments.
5 Results
This section presents quantitative (Sections 5.1 and 5.2) and qualitative (Section 5.3) results. In addition, we conducted error analysis by plotting confusion matrix to investigate the effectiveness which model can better infer relationships among different tissue types (Section 5.4).
5.1 WBP with dense reference masks
Table 1 summarizes the cross-dataset evaluation on the three WBP sub-datasets (MB42, AOMIC, and IXI). The MB42 test set supports evaluation against manual WBP annotations, while the AOMIC and IXI test sets support fair relative comparison against the same automated GIF-derived pseudo-ground-truth masks for all losses. Our baseline is the standard nnU-Net, trained with its default loss and hyper-parameters. We also include the Generalized Wasserstein Dice loss (
Table 1
| Train | Loss | Dice↑ | NSD↑ | Dicesmall↑ | NSDsmall↑ | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MB42 | AOMIC | IXI | Avg. | MB42 | AOMIC | IXI | Avg. | MB42 | AOMIC | IXI | Avg. | MB42 | AOMIC | IXI | Avg. | ||
| MB59 | 79.5 | 81.1 | 78.9 | 79.8 | 93.3 | 95.2 | 94.3 | 94.3 | 58.2 | 58.5 | 56.9 | 57.9 | 77.0 | 77.7 | 77.6 | 77.4 | |
| 79.4 | 80.7 | 78.4 | 79.5 | 93.1 | 95.0 | 94.2 | 94.1 | 57.5 | 57.1 | 54.2 | 56.3 | 75.2 | 76.0 | 76.1 | 75.8 | ||
| 79.3* | 81.3* | 79.0* | 79.9 | 93.0* | 95.2 | 94.2 | 94.2 | 58.2 | 58.5 | 56.8 | 57.8 | 76.9 | 77.9 | 77.5 | 77.4 | ||
| 79.8* | 81.6* | 79.2* | 80.2 | 94.2* | 96.1* | 95.2* | 95.2 | 60.7* | 62.7* | 59.4* | 60.9 | 86.4* | 87.3* | 87.2* | 87.0 | ||
| AOMIC | 74.8 | 88.3 | 83.8 | 82.3 | 91.6 | 97.0 | 95.6 | 94.7 | 52.8 | 68.0 | 63.1 | 61.3 | 74.2 | 77.8 | 77.5 | 76.5 | |
| 74.6 | 88.2 | 83.2 | 82.0 | 91.3 | 97.0 | 95.4 | 94.6 | 52.3 | 66.9 | 59.4 | 59.5 | 73.1 | 77.7 | 75.2 | 75.4 | ||
| 74.6 | 88.5 | 83.9 | 82.3 | 91.5 | 97.5* | 95.9* | 95.0 | 53.1 | 70.8* | 66.2* | 63.4 | 75.5 | 84.4* | 84.1* | 81.4 | ||
| 74.8 | 89.2* | 84.0 | 82.7 | 92.4* | 98.5* | 96.8* | 95.9 | 55.2* | 77.0* | 70.5* | 67.6 | 84.9* | 94.7* | 93.2* | 90.9 | ||
| IXI | 74.6 | 86.2 | 90.0 | 83.6 | 91.9 | 97.5 | 98.1 | 95.8 | 52.4 | 68.8 | 74.2 | 65.1 | 76.5 | 85.3 | 87.3 | 83.0 | |
| 74.5 | 85.7 | 89.3 | 83.1 | 91.6 | 96.7 | 97.3 | 95.2 | 51.8 | 64.4 | 67.8 | 61.3 | 73.8 | 77.4 | 78.9 | 76.7 | ||
| 74.7 | 86.0* | 89.9* | 83.5 | 91.7* | 97.3* | 98.0* | 95.7 | 52.6 | 68.9 | 74.1 | 65.2 | 75.7* | 85.0 | 87.0* | 82.6 | ||
| 75.0* | 86.5 | 90.6* | 84.0 | 92.8* | 98.4* | 99.0* | 96.7 | 54.7* | 74.1* | 80.4* | 69.8 | 85.1* | 94.7* | 97.2* | 92.3 | ||
Cross-dataset performance on whole brain parcellation.
Rows correspond to the training split, and columns correspond to the test split. Dice and NSD metrics are averaged over all 108 classes, whereas Dicesmall and NSDsmall are averaged over the 10 classes which have smallest annotated region. The best performance among all losses for each training dataset is highlighted in bold. Asterisks mark per-dataset proposed-loss comparisons against that remain significant after Holm-Bonferroni correction (p < 0.05) in matched-subject paired tests. The Avg. columns summarize the three test datasets. For both and , Mh is chosen for ground distance matrix configuration.
For WBP comparisons, subject-level Dice and NSD values were generated from retained predictions and labels for identical test cases. Statistical comparisons used two-sided paired-sample tests on matched subjects for each predefined train–test dataset pair, metric, and proposed loss against . Table A1 in Appendix reports the number of paired subjects, paired differences, and raw and Holm-Bonferroni-adjusted significance markers across the 72 predefined tests. Statistical support is interpreted using the adjusted p-values. Under this criterion, shows the strongest support, with adjusted significance for NSD and small-structure metrics in nearly all train–test settings, while Dice gains are not uniformly significant for every dataset pair.
We further quantify the GIF performance for the dataset with manual labels. We applied GIF to the MB42 images using the MB59 manual labels as the multi-atlas set, and compared the resulting pseudo-labels with the manual MB42 annotations. This yielded a mean label-wise Dice of 78.6 ± 15.4. However, direct quantification of GIF error on AOMIC and IXI is not possible because manual WBP labels are not available for these datasets.
5.2 Surgical HSI with sparse positive-only annotations
Table 2 presents the cross-validation results on top-level classes by selecting the output probability at the top-level only (that is, p†, K−1). We report the results with different confidence thresholds τ. Where τ0 = 0 represents no background (OOD) detection and τm represents the threshold which maximizes scores across the positive annotations (ID data). To better capture performance on the background, τm could be also computed by incorporating held-out classes for background / OOD performance monitoring during validation in the two-level cross-validation (
Table 2
| Loss | TPR↑ | BACC↑ | F1↑ | ||||
|---|---|---|---|---|---|---|---|
| τ0 = 0 | τm | τ0 = 0 | τm | τ0 = 0 | τm | ||
| Mt | 0.51 ± 0.03 | 0.51 ± 0.03 | 0.74 ± 0.01 | 0.74 ± 0.01 | 0.47 ± 0.05 | 0.47 ± 0.05 | |
| Mℓ | 0.61 ± 0.04 | 0.65 ± 0.05 | 0.79 ± 0.02 | 0.82 ± 0.02 | 0.60 ± 0.02 | 0.65 ± 0.03 | |
| Me | 0.64 ± 0.04 | 0.76 ± 0.03 | 0.80 ± 0.02 | 0.88 ± 0.01 | 0.62 ± 0.05 | 0.74 ± 0.05 | |
| *Mt | 0.65 ± 0.05 | 0.73 ± 0.12 | 0.81 ± 0.02 | 0.86 ± 0.06 | 0.63 ± 0.04 | 0.72 ± 0.10 | |
| Mh | 0.65 ± 0.03 | 0.75 ± 0.03 | 0.81 ± 0.02 | 0.87 ± 0.02 | 0.64 ± 0.04 | 0.76 ± 0.05 | |
| Mℓ | 0.61 ± 0.06 | 0.70 ± 0.05 | 0.79 ± 0.03 | 0.85 ± 0.03 | 0.62 ± 0.04 | 0.72 ± 0.04 | |
| Me | 0.65 ± 0.04 | 0.72 ± 0.09 | 0.81 ± 0.02 | 0.85 ± 0.04 | 0.64 ± 0.01 | 0.73 ± 0.07 | |
| Mt | 0.66 ± 0.04 | 0.77 ± 0.07 | 0.81 ± 0.02 | 0.88 ± 0.04 | 0.63 ± 0.03 | 0.78 ± 0.09 | |
| Mh | 0.68±0.02 | 0.80±0.03 | 0.83±0.01 | 0.90±0.02 | 0.66±0.02 | 0.82±0.06 | |
Cross-validation results on top-level classes of the HSI dataset.
For each method and metric, performance is reported at thresholds τ0 = 0 and τm. τm is chosen from the optimal threshold for foreground classes in the validation set. The best performance among all losses is highlighted in bold. Rows shaded in gray represent the baseline results, which are equivalent to the standard CE or Wasserstein+CE training on leaf node classes only (that is, without class semantics). The asterisk indicates a strong baseline result which is equivalent to standard CE training on top-level nodes only.
For all loss functions we evaluate the True Positive Rate (TPR), Balanced Accuracy (BACC), and F1 scores. Results are reported by averaging across classes under one-vs-rest strategy, where the positives are pixels of such class, and the negatives are the pixels of all the other classes. We do not report IoU for the HSI task because the training and evaluation setting is based on sparse positive-only annotations, for which unlabeled pixels cannot be interpreted as reliable negatives and IoU therefore becomes difficult to interpret as a primary metric. We also do not report FPR separately, as it is already reflected in BACC through the class-wise true negative rate / false positive behavior. Paired-sample t-tests on test-image F1 scores showed that the final tree-based configurations using Mh significantly improved over their corresponding Mℓ baselines for both and (p < 0.0001). For model performance on leaf node classes, we report F1 scores at τm for both losses. For , the mean of F1 scores at τm based on Mℓ and Mh are 0.069 and 0.073, respectively. For , the results are 0.068 and 0.037, respectively.
While both loss outperforms the baseline, our results shows that Mt performs similarly to Me, suggesting that top-level edge weights have the greatest impact on performance when evaluating accumulated probabilities on corresponding nodes. For , employing Mh yields the best performance, surpassing the strong baseline that adapts CE loss to train only on the top-level node. These results indicate that an appropriate choice of M can improve performance over the evaluated baselines on both top-level and leaf nodes. For background / OOD detection, our findings exhibit trends similar to those reported in previous work on three medical image datasets (
Furthermore, it is possible to train the model using the pure Wasserstein distance defined in Equation 2. We refer to this loss as the Wasserstein loss, denoted by . The results for based on Mt are reported in Table 2, where we observe that it underperforms the baseline. Based on this observation, further investigation of the distance matrix M was not conducted for .
5.3 Qualitative results
5.3.1 WBP
Figure 5 qualitatively compares the baseline model trained with (CE + Dice) against our Wasserstein compound loss on the AOMIC dataset. Each column displays the predicted mask at an increasingly fine level of the label hierarchy using the color scheme and dendrogram from Figure 2. The white arrow marks the challenging class “non-WM-hypointensities,” which the baseline fails to detect but our method segments correctly across all hierarchical levels.
Figure 5

Visual comparison of the baseline loss and the proposed Wasserstein-based loss on the AOMIC dataset. Each column shows the predicted segmentation masks at progressively finer levels of the label hierarchy. AOMIC uses a GIF-derived pseudo-ground-truth mask in this manuscript; the white arrow marks the challenging class non-WM hypointensities, for which the Wasserstein-based loss better matches the pseudo-ground-truth mask whereas the baseline fails to capture it.
5.3.2 HSI
Figure 4 presents qualitative results comparing different loss functions on some challenging cases. Although all models have the capacity to differentiate leaf node classes, for simplicity, we visualize predictions at the top-level nodes. We present results at τ0 = 0 to illustrate the outcome without background/OOD segmentation for the CE baseline (). For the Wasserstein-based loss, we include results using ground distance matrices Mt and Mh for comparison. Comparing against Mℓ baseline, and show qualitative results that are more semantically plausible in terms of differentiating normal and abnormal tissues. For other classes such as vascular ones, they also show improved segmentation performance by reducing false positive prediction.
5.4 Analysis of error types (confusion matrices)
Evaluation relying solely on overall segmentation performance is insufficient to capture how effectively a model infers relationships among different tissue types. It neglects the possibility that the model may choose incorrect but semantically meaningful labels. To explore these aspects, we plot a multi-class confusion matrix for the top-level nodes p†, K−1, as shown in Figure 6. Because class distributions vary across folds, we average the results of each cross-validation fold to ensure a fair comparison.
Figure 6

Confusion matrices for the WBP and HSI tasks. For WBP, the evaluation is on 10 small classes of the AOMIC dataset. Class names from top-left to bottom-right: Left-Inf-Lat-Vent, Left-vessel, Left-choroid-plexus, Right-vessel, Right-choroid-plexus, 5th-Ventricle, WM-hypointensities, non-WM-hypointensities, Optic-Chiasm, ctx-lh-unknown, ctx-rh-unknown. For HSI, the evaluation is on top-level nodes. Class names from top-left to bottom-right: Other, Out-of-focus Area, Vascular, Normal Tissue, Abnormal Tissue and Surgical Equipment.
For CE baseline on HSI task, the model struggles to distinguish normal from abnormal tissues, which constitute a semantically important distinction. By contrast, the tree-semantic losses () exhibit a more meaningful confusion pattern between normal and abnormal tissues. Similarly for WBP task, baseline model struggle to differentiate between hypointensity and normal regions. These findings suggest that the proposed method successfully exploits hierarchical relationships within the label space.
5.5 Hyperparameter tuning result
Our method relies heavily on the distance matrix M, which encodes prior knowledge of inter-class relationships. In practice, exhaustively exploring all possible configurations of M can be computationally expensive. To address this, we adopt the previous Mh configuration, where the edge weight of a parent node is set to be κ times larger than that of its child node. Under this Mh configuration, optimizing M reduces to finding the optimal scaling parameter κ.
To assess the influence of the hyperparameter on model performance, we run multiple trials by tuning the scaling parameter κ. For each trial, a complete four-fold cross-validation was performed. As shown in Figure 7, the model performance varies with increasing values of κ on the brain HSI dataset. We observed that model performance improved over the baseline by increasing κ. For , the model achieved its peak performance at κ = 50 with best result 0.66 mean F1 score. Beyond which both the average performance and its consistency across folds decreases.
Figure 7

Sensitivity analysis for the HSI task. The horizontal axis shows the hierarchy-distance scaling parameter κ used in Mh, and the vertical axis shows the mean F1 score over four-fold cross-validation. Each point corresponds to one complete 4-fold trial at the specified κ value.
6 Conclusion and discussion
We propose two semantically driven loss functions applicable for both sparse and dense supervised segmentation tasks, relying on a tree-structured label space defined by domain experts. Both the Wasserstein distance based segmentation loss and the tree-weighted semantic segmentation loss leverage prior knowledge of inter-class relationships. The former captures these relationships through a distance matrix in label space, while the latter extends the standard CE loss to incorporate weighted probabilities aggregated at each node in the tree. Additionally, we integrate these loss functions into a sparse positive-only learning framework for segmentation, which enables pixel-level background segmentation through an OOD detection approach.
Our experiments were designed to evaluate the proposed losses under strong established segmentation backbones rather than to benchmark alternative architectures. In particular, the WBP experiments use nnU-Net as a widely adopted reference framework for 3D medical image segmentation (
Regarding the optimal weighting of hierarchical levels, our experiments on four distance matrices reveal that top-level weights exert the greatest influence on performance when the evaluation is conducted at the corresponding level. Furthermore, we found that the hierarchical weighting scheme further enhances performance, improving over the evaluated baselines for both top-level and leaf node labels. Moreover, error analysis and qualitative evaluations demonstrate that these approaches offer improved tissue differentiation compared with standard baselines.
Statements
Data availability statement
The original contributions presented in the study are included in the article/Supplementary material, further inquiries can be directed to the corresponding author.
Ethics statement
The studies involving humans were approved by London - Westminster Research Ethics Committee (Equinox House, City Link, Nottingham, NG2 4LA, UK ref: 22/LO/0046. The studies were conducted in accordance with the local legislation and institutional requirements. The participants provided their written informed consent to participate in this study.
Author contributions
JW: Writing – review & editing, Writing – original draft, Data curation, Validation, Software, Visualization, Methodology, Conceptualization, Formal analysis. OM: Data curation, Resources, Writing – review & editing. WR: Writing – review & editing, Resources, Data curation. AK: Writing – review & editing, Investigation. JS: Conceptualization, Resources, Writing – review & editing, Project administration, Funding acquisition. TV: Supervision, Methodology, Writing – review & editing, Conceptualization, Software, Investigation, Formal analysis, Resources, Funding acquisition, Project administration.
Funding
The author(s) declared that financial support was received for this work and/or its publication. This project received funding by the National Institute for Health and Care Research (NIHR) under its Invention for Innovation (i4i) Programme [NIHR202114]. This work was supported by core funding from the Wellcome/EPSRC [WT203148/Z/16/Z and NS/A000049/1]. OM was funded by the EPSRC DTP [EP/T517963/1].
Acknowledgments
For the purpose of open access, the authors have applied a CC BY public copyright license to any Author Accepted Manuscript version arising from this submission.
Conflict of interest
TV and JS are co-founders and shareholders of Hypervision Surgical Ltd., London, UK.
The remaining author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declared that generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Author disclaimer
The views expressed are those of the author(s) and not necessarily those of the NIHR or the Department of Health and Social Care.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/frai.2026.1841639/full#supplementary-material
References
1
BahlA.HorganC. C.JanatkaM.MacCormacO. J.NoonanP.XieY.et al. (2023). Synthetic white balancing for intra-operative hyperspectral imaging. J. Med. Imaging10:046001. doi: 10.1117/1.JMI.10.4.046001
2
BertinettoL.MuellerR.TertikasK.SamangooeiS.LordN. A. (2020). “Making better mistakes: leveraging class hierarchies with deep networks,” in 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (Seattle, WA: IEEE), 12503–12512. doi: 10.1109/CVPR42600.2020.01252
3
BocchettaM.ToddE. G.BouziguesA.CashD. M.NicholasJ. M.ConveryR. S.et al. (2023). Structural MRI predicts clinical progression in presymptomatic genetic frontotemporal dementia: findings from the GENetic Frontotemporal dementia Initiative cohort. Brain Commun. 5:fcad061. doi: 10.1093/braincomms/fcad061
4
BuddC.Garcia-Peraza HerreraL. C.HuberM.OurselinS.VercauterenT. (2023). Rapid and robust endoscopic content area estimation: a lean GPU-based pipeline and curated benchmark dataset. Comput. Methods Biomech. Biomed. Eng.: Imaging Visualiz. 11, 1215–1224. doi: 10.1080/21681163.2022.2156393
5
BulusuS.KailkhuraB.LiB.VarshneyP. K.SongD. (2020). Anomalous example detection in deep learning: a survey. IEEE Access8, 132330–132347. doi: 10.1109/ACCESS.2020.3010274
6
CaiH.QiL.YuQ.ShiY.GaoY. (2023). “3D medical image segmentation with sparse annotation via cross-teaching between 3D and 2D networks,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2023: 26th International Conference (Berlin; Heidelberg: Springer Nature Switzerland), 614–624. doi: 10.1007/978-3-031-43898-1_59
7
CardosoM. J.ModatM.WolzR.MelbourneA.CashD.RueckertD.et al. (2015). Geodesic information flows: spatially-variant graphs and their application to segmentation and fusion. IEEE Trans. Med. Imaging34, 1976–1988. doi: 10.1109/TMI.2015.2418298
8
CarstensM.RinnerF. M.BodenstedtS.JenkeA. C.WeitzJ.DistlerM.et al. (2023). The dresden surgical anatomy dataset for abdominal organ segmentation in surgical data science. Sci. Data10:3. doi: 10.1038/s41597-022-01719-2
9
ÇiçekÖ.AbdulkadirA.LienkampS. S.BroxT.RonnebergerO. (2016). 3D U-“Net: learning dense volumetric segmentation from sparse annotation,” in Medical Image Computing and Computer-Assisted Intervention-MICCAI 2016 (Cham: Springer International Publishing), 424–432. doi: 10.1007/978-3-319-46723-8_49
10
DengC.ZhengC.ChenT.WangC.ZhangJ.LiY.et al. (2024). “HATs: hierarchical adaptive taxonomy segmentation for panoramic pathology image analysis,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2024 (Cham: Springer Nature Switzerland), 155–166. doi: 10.1007/978-3-031-72083-3_15
11
DengJ.BergA. C.LiK.Fei-FeiL. (2010). “What does classifying more than 10,000 image categories tell us?,” in Computer Vision-ECCV 2010 (Springer Berlin Heidelberg), 71–84. doi: 10.1007/978-3-642-15555-0_6
12
DengJ.DongW.SocherR.LiL.-J.LiK.Fei-FeiL. (2009). “ImageNet: a large-scale hierarchical image database,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), (Miami, FL: IEEE) 248–255. doi: 10.1109/CVPR.2009.5206848
13
DorentR.JoutardS.ShapeyJ.KujawaA.ModatM.OurselinS.et al. (2021). “Inter extreme points geodesics for end-to-end weakly supervised image segmentation,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2021 (Cham: Springer International Publishing), 615–624. doi: 10.1007/978-3-030-87196-3_57
14
EickhoffS. B.YeoB. T. T.GenonS. (2018). Imaging-based parcellations of the human brain. Nat. Rev. Neurosci. 19, 672–686. doi: 10.1038/s41583-018-0071-7
15
EnQ.GuoY. (2024). “Annotation by clicks: a point-supervised contrastive variance method for medical semantic segmentation,” in 35th British Machine Vision Conference 2024, BMVC 2024 (Glasgow: BMVA), 1–13.
16
FabeloH.OrtegaS.RaviD.KiranB. R.SosaC.BultersD.et al. (2018). Spatio-spectral classification of hyperspectral images for brain cancer detection during surgical operations. PLoS ONE13:e0193721. doi: 10.1371/journal.pone.0193721
17
FidonL.LiW.Garcia-Peraza-HerreraL. C.EkanayakeJ.KitchenN.OurselinS.et al. (2018). “Generalised wasserstein dice score for imbalanced Multi-Class segmentation using holistic convolutional networks,” in 9th International MICCAI Brainlesion Workshop (Cham: Springer Nature Switzerland), 64–76. doi: 10.1007/978-3-319-75238-9_6
18
FidonL.ShitS.EzhovI.PaetzoldJ. C.OurselinS.VercauterenT. (2022). “Generalized wasserstein dice loss, test-time augmentation, and transformers for the BraTS 2021 challenge,” in Brainlesion: Glioma, Multiple Sclerosis, Stroke and Traumatic Brain Injuries (Cham: Springer Nature Switzerland), 187–196. doi: 10.1007/978-3-031-09002-8_17
19
FischlB.SalatD. H.BusaE.AlbertM.DieterichM.HaselgroveC.et al. (2002). Whole brain segmentation: automated labeling of neuroanatomical structures in the human brain. Neuron33, 341–355. doi: 10.1016/S0896-6273(02)00569-X
20
FrognerC.ZhangC.MobahiH.ArayaM.PoggioT. A. (2015). “Learning with a wasserstein loss,” in Advances in Neural Information Processing Systems, vol. 28 (Montreal, QC: Curran Associates, Inc.), 2053–2061.
21
Garcia Peraza HerreraL. C.HorganC.OurselinS.EbnerM.VercauterenT. (2023). Hyperspectral image segmentation: a preliminary study on the oral and dental spectral image database (ODSI-DB). Comput. Methods Biomech. Biomed. Eng.: Imag. Visualiz. 11, 1290–1298. doi: 10.1080/21681163.2022.2160377
22
GlockerB.ZikicD.KonukogluE.HaynorD. R.CriminisiA. (2013). “Vertebrae localization in pathological spine CT via dense classification from sparse annotations,” in Medical Image Computing and Computer-Assisted Intervention-MICCAI 2013 (Springer Berlin Heidelberg), 262–270. doi: 10.1007/978-3-642-40763-5_33
23
GonzálezC.GotkowskiK.FuchsM.BucherA.DadrasA.FischbachR.et al. (2022). Distance-based detection of out-of-distribution silent failures for COVID-19 lung lesion segmentation. Med. Image Anal. 82:102596. doi: 10.1016/j.media.2022.102596
24
GrahamM. S.SudreC. H.VarsavskyT.TudosiuP.-D.NachevP.OurselinS.et al. (2020). “Hierarchical brain parcellation with uncertainty,” in Uncertainty for Safe Utilization of Machine Learning in Medical Imaging, and Graphs in Biomedical Image Analysis (Cham: Springer International Publishing), 23–31. doi: 10.1007/978-3-030-60365-6_3
25
Guha RoyA.ConjetiS.NavabN.WachingerC. (2019). QuickNAT: a fully convolutional network for quick and accurate segmentation of neuroanatomy. Neuroimage186, 713–727. doi: 10.1016/j.neuroimage.2018.11.042
26
GuoC.PleissG.SunY.WeinbergerK. Q. (2017). “On calibration of modern neural networks,” in Proceedings of the 34th International Conference on Machine Learning (Sydney, NSW: PMLR), 1321–1330.
27
HendrycksD.GimpelK. (2017). “A baseline for detecting misclassified and out-of-distribution examples in neural networks,” in International Conference on Learning Representations (Sydney, NSW: PMLR), 1–12.
28
HenschelL.ConjetiS.EstradaS.DiersK.FischlB.ReuterM. (2020). Fastsurfer - a fast and accurate deep learning based neuroimaging pipeline. Neuroimage219:117012. doi: 10.1016/j.neuroimage.2020.117012
29
HsuY.-C.ShenY.JinH.KiraZ. (2020). “Generalized ODIN: detecting out-of-distribution image without learning from out-of-distribution data,” in 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (Seattle, WA: IEEE), 10948–10957. doi: 10.1109/CVPR42600.2020.01096
30
HyttinenJ.FältP.JäsbergH.KullaaA.Hauta-KasariM. (2020). Oral and dental spectral image database–ODSI-DB. Appl. Sci. 10:7246. doi: 10.3390/app10207246
31
IsenseeF.JaegerP. F.KohlS. A. A.PetersenJ.Maier-HeinK. H. (2021). nnU-Net: A self-configuring method for deep learning-based biomedical image segmentation. Nat. Methods18, 203–211. doi: 10.1038/s41592-020-01008-z
32
IsenseeF.WaldT.UlrichC.BaumgartnerM.RoyS.Maier-HeinK.et al. (2024). “nnU-Net revisited: a call for rigorous validation in 3d medical image segmentation,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2024 (Cham: Springer Nature Switzerland), 488–498. doi: 10.1007/978-3-031-72114-4_47
33
JegouS.DrozdzalM.VazquezD.RomeroA.BengioY. (2017). “The one hundred layers tiramisu: fully convolutional densenets for semantic segmentation,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops (Honolulu, HI: IEEE), 11–19. doi: 10.1109/CVPRW.2017.156
34
KarimiD.GholipourA. (2023). Improving calibration and out-of-distribution detection in deep models for medical image segmentation. IEEE Trans. Artif. Intell. 4, 383–397. doi: 10.1109/TAI.2022.3159510
35
KhanU.PahedingS.ElkinC. P.DevabhaktuniV. K. (2021). Trends in deep learning for medical hyperspectral image analysis. IEEE Access9, 79534–79548. doi: 10.1109/ACCESS.2021.3068392
36
KingmaD. P.BaJ. (2017). “Adam: a method for stochastic optimization,” in 3rd International Conference on Learning Representations (ICLR) (San Diego, CA: ICLR), 13.
37
KleinA.TourvilleJ. (2012). 101 labeled brain images and a consistent human cortical labeling protocol. Front. Neurosci. 6:171. doi: 10.3389/fnins.2012.00171
38
KuangZ.YanZ.YuL. (2024). Weakly supervised learning for Multi-Class medical image segmentation via feature decomposition. Comput. Biol. Med. 171:108228. doi: 10.1016/j.compbiomed.2024.108228
39
KujawaA.DorentR.OurselinS.VercauterenT. (2024). “Label merge-and-split: a graph-colouring approach for memory-efficient brain parcellation,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2024 (Cham: Springer Nature Switzerland), 350–360. doi: 10.1007/978-3-031-72114-4_34
40
LambertB.ForbesF.DoyleS.DehaeneH.DojatM. (2024). Trustworthy clinical AI solutions: a unified review of uncertainty quantification in deep learning models for medical image analysis. Artif. Intell. Med. 150:102830. doi: 10.1016/j.artmed.2024.102830
41
LeT.YamadaM.FukumizuK.CuturiM. (2019). “Tree-sliced variants of wasserstein distances,” in Advances in Neural Information Processing Systems (Vancouver, BC: Curran Associates, Inc.), vol. 32, 1–12.
42
LeeK.LeeK.LeeH.ShinJ. (2018). A simple unified framework for detecting out-of-distribution samples and adversarial attacks. In Advances in Neural Information Processing Systems, volume 31, pages 1–12.
43
LiL.WangW.ZhouT.QuanR.YangY. (2024a). Semantic hierarchy-aware segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 46, 2123–2138. doi: 10.1109/TPAMI.2023.3332435
44
LiP.EbnerM.NoonanP.HorganC.BahlA.OurselinS.et al. (2022). Deep learning approach for hyperspectral image demosaicking, spectral correction and high-resolution RGB reconstruction. Comput. Methods Biomech. Biomed. Eng.: Imag. Visualiz. 10, 409–417. doi: 10.1080/21681163.2021.1997646
45
LiP.MacCormacO.ShapeyJ.VercauterenT. (2024b). “A self-supervised and adversarial approach to hyperspectral demosaicking and RGB reconstruction in surgical imaging,” in 35th British Machine Vision Conference 2024, BMVC 2024 (Glasgow: BMVA Press), 1–15.
46
LiangS.LiY.SrikantR. (2018). “Enhancing the reliability of out-of-distribution image detection in neural networks,” in International Conference on Learning Representations (Vancouver, BC: OpenReview.net), 1–12.
47
LuH.YanK.ZhangF.WangP.TianJ. (2024). “H2ASeg: hierarchical adaptive interaction and weighting network for tumor segmentation in PET/CT images,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2024 (Cham: Springer Nature Switzerland), 89–99. doi: 10.1007/978-3-031-72111-3_30
48
MaJ.ChenJ.NgM.HuangR.LiY.LiC.et al. (2021). Loss odyssey in medical image segmentation. Med. Image Anal. 71:102035. doi: 10.1016/j.media.2021.102035
49
Martén-PérezA.Martinez-VegaB.VillaM.LeonR.Martinez de TerneroA.FabeloH.et al. (2024). Machine learning performance trends: a comparative study of independent hyperspectral human brain cancer databases. SSRN Electron. J. doi: 10.2139/ssrn.4898113
50
MenzeB. H.JakabA.BauerS.Kalpathy-CramerJ.FarahaniK.KirbyJ.et al. (2015). The multimodal brain tumor image segmentation benchmark (BRATS). IEEE Trans. Med. Imaging34, 1993–2024. doi: 10.1109/TMI.2014.2377694
51
MocciaS.WirkertS. J.KenngottH.VemuriA. S.ApitzM.MayerB.et al. (2018). Uncertainty-aware organ classification for surgical data science applications in laparoscopy. IEEE Trans. Biomed. Eng. 65, 2649–2659. doi: 10.1109/TBME.2018.2813015
52
RavìD.FabeloH.CallicG. M.YangG.-Z. (2017). Manifold embedding and semantic segmentation for intraoperative guidance with hyperspectral brain imaging. IEEE Trans. Med. Imaging36, 1845–1857. doi: 10.1109/TMI.2017.2695523
53
RonnebergerO.FischerP.BroxT. (2015). “U-Net: convolutional networks for biomedical image segmentation,” in Medical Image Computing and Computer-Assisted Intervention-MICCAI 2015 (Cham: Springer International Publishing), 234–241. doi: 10.1007/978-3-319-24574-4_28
54
RoyA. G.ConjetiS.SheetD.KatouzianA.NavabN.WachingerC. (2017). “Error corrective boosting for learning fully convolutional networks with limited data,” in Medical Image Computing and Computer Assisted Intervention - MICCAI 2017 (Cham: Springer International Publishing), 231–239. doi: 10.1007/978-3-319-66179-7_27
55
SeidlitzS.SellnerJ.OdenthalJ.özdemirB.Studier-FischerA.KnödlerS.et al. (2022). Robust deep learning-based semantic organ segmentation in hyperspectral images. Med. Image Anal. 80:102488. doi: 10.1016/j.media.2022.102488
56
ShapeyJ.XieY.NabaviE.BradfordR.SaeedS. R.OurselinS.et al. (2019). Intraoperative multispectral and hyperspectral label-free imaging: a systematic review of in vivo clinical studies. J. Biophotonics12:e201800455. doi: 10.1002/jbio.201800455
57
SnoekL.van der MiesenM. M.BeemsterboerT.van der LeijA.EigenhuisA.Steven ScholteH. (2021). The amsterdam open MRI collection, a set of multimodal MRI datasets for individual difference analyses. Sci. Data8:85. doi: 10.1038/s41597-021-00870-6
58
Studier-FischerA.SeidlitzS.SellnerJ.BressanM.ÒzdemirB.AyalaL.et al. (2023). HeiPorSPECTRAL - the heidelberg porcine HyperSPECTRAL imaging dataset of 20 physiological organs. Sci. Data10:414. doi: 10.1038/s41597-023-02315-8
59
TakezawaY.SatoR.YamadaM. (2021). “Supervised tree-wasserstein distance,” in Proceedings of the 38th International Conference on Machine Learning (Virtual: PMLR), 10086–10095.
60
TanM.LeQ. (2019). “EfficientNet: rethinking model scaling for convolutional neural networks,” in Proceedings of the 36th International Conference on Machine Learning (Long Beach, CA: PMLR), 6105–6114.
61
TrajanovskiS.ShanC.WeijtmansP. J. C.de KoningS. G. B.RuersT. J. M. (2021). Tongue tumor detection in hyperspectral images using deep learning semantic segmentation. IEEE Trans. Biomed. Eng. 68, 1330–1340. doi: 10.1109/TBME.2020.3026683
62
VermaN.MahajanD.SellamanickamS.NairV. (2012). “Learning hierarchical similarity metrics,” in 2012 IEEE Conference on Computer Vision and Pattern Recognition (Providence, RI: IEEE), 2280–2287. doi: 10.1109/CVPR.2012.6247938
63
WangG.LiW.ZuluagaM. A.PrattR.PatelP. A.AertsenM.et al. (2018). Interactive medical image segmentation using deep learning with image-specific fine tuning. IEEE Trans. Med. Imaging37, 1562–1573. doi: 10.1109/TMI.2018.2791721
64
WangG.ZuluagaM. A.LiW.PrattR.PatelP. A.AertsenM.et al. (2019). DeepIGeoS: a deep interactive geodesic framework for medical image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 41, 1559–1572. doi: 10.1109/TPAMI.2018.2840695
65
WangJ.MaccormacO.RochfordW.KujawaA.ShapeyJ.VercauterenT. (2025a). “Tree-based semantic losses: application to sparsely-supervised large Multi-Class hyperspectral segmentation,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2025, volume 15967 of Lecture Notes in Computer Science (Cham: Springer Nature Switzerland), 584–594. doi: 10.1007/978-3-032-04984-1_56
66
WangJ.WangZ.MacCormacO.ShapeyJ.VercauterenT. (2026). OOD-SEG: exploiting out-of-distribution detection techniques for learning image segmentation from sparse multi-class positive-only annotations. Med. Image Anal. 111:104046. doi: 10.1016/j.media.2026.104046
67
WangJ.XiaB. (2021). “Bounding box tightness prior for weakly supervised image segmentation,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2021 (Cham: Springer International Publishing), 526–536. doi: 10.1007/978-3-030-87196-3_49
68
WangZ.YeY.ChenZ.ShuM.ZhangY.XiaY. (2025b). From few to more: scribble-based medical image segmentation via masked context modeling and continuous pseudo labels. IEEE J. Biomed. Health Inform. 30, 2419–2431. doi: 10.1109/JBHI.2025.3599066
69
WeiJ.HuY.CuiS.ZhouS. K.LiZ. (2023). “WeakPolyp: you only look bounding box for polyp segmentation,” in Medical Image Computing and Computer Assisted Intervention-MICCAI 2023, volume 14222 of Lecture Notes in Computer Science (Cham: Springer Nature Switzerland), 757–766. doi: 10.1007/978-3-031-43898-1_72
70
XuY.ZhuJ.-Y.ChangE. I.-C.LaiM.TuZ. (2014). Weakly supervised histopathology cancer image segmentation and classification. Med. Image Anal. 18, 591–604. doi: 10.1016/j.media.2014.01.010
71
YoungA. L.BocchettaM.RussellL. L.ConveryR. S.PeakmanG.ToddE.et al. (2021). Characterizing the clinical features and atrophy patterns of MAPT-related frontotemporal dementia with disease progression modeling. Neurology97, e941–e952. doi: 10.1212/WNL.0000000000012410
72
ZhaoB.LiF.XingE. (2011). “Large-scale category structure aware image categorization,” in Advances in Neural Information Processing Systems (Granada: Curran Associates, Inc.), vol. 24, 1251–1259.
Summary
Keywords
hyperspectral imaging, label hierarchy, semantic segmentation, sparse annotations, whole brain parcellation
Citation
Wang J, MacCormac O, Rochford W, Kujawa A, Shapey J and Vercauteren T (2026) Label tree semantic losses for rich multi-class medical image segmentation. Front. Artif. Intell. 9:1841639. doi: 10.3389/frai.2026.1841639
Received
28 March 2026
Revised
15 May 2026
Accepted
21 May 2026
Published
16 June 2026
Volume
9 - 2026
Edited by
Nasser Kashou, Kash Global Tech, United States
Reviewed by
Daniel Cieślak, Politechnika Gdanska, Poland
Zhisong Wang, Northwestern Polytechnical University, China
Updates

Check for updates
Copyright
© 2026 Wang, MacCormac, Rochford, Kujawa, Shapey and Vercauteren.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Junwen Wang, junwen.wang@kcl.ac.uk
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.