Fig. 2: HCE loss improves perfomances across architectures.
From: Improving atlas-scale single-cell annotation models with hierarchical cross-entropy loss

a, The standard CE loss defines a probability distribution over a flat label set, treating each cell type independently and requiring that probabilities sum to unity across the ontology. The HCE loss modifies these predictions by propagating probability mass up the DAG of the cell ontology: parent nodes such as T cell accumulate mass from their more specific descendants, such as α–β T cell and γ–δ T cell, encouraging biologically coherent predictions. b, The HCE loss improves macro F1 scores by 12−15% on OOD evaluations across the linear classifier, MLP and TabNet. All performance metrics reported reflect the mean taken over four independent training and evaluation runs per model, with results from each run shown as individual dots (color coding remains the same as in the legend). c, Per-cell-type performance changes induced by the HCE loss strategy for the MLP model, shown relative to standard CE. All performance metrics reported reflect the mean taken over four independent training and evaluation runs per model, with results from each run shown as individual dots (color coding remains the same as in the legend). For each cell type, a paired t-test was performed and P values were adjusted using the Holm–Bonferroni method to correct for multiple hypothesis testing. d, Improvements from HCE loss for the MLP model visualized directly on the cell ontology DAG consisting of all 164 cell types seen in the training set. Node size reflects the number of cells of that type seen in training, while color indicates the change in F1 score, shown as a gradient from green (improvement) to white (neutral/no change) to red (decline). Gray nodes correspond to cell types not observed in the OOD test set.