Hierarchical cross-entropy loss improves atlas-scale single-cell annotation models
Apr 23, 2025·,,,,,·
0 min read
Sebastiano Cultrera Di Montesano
Davide D'Ascenzo
Srivatsan Raghavan
Ava P. Amini
Peter S. Winter
Lorin Crawford

Abstract
Accurately annotating cell types is essential for extracting biological insight from single-cell RNA-seq data. Although cell types are naturally organized into hierarchical ontologies, most computational models do not explicitly incorporate this structure into their training objectives. We introduce a hierarchical cross-entropy loss that aligns model objectives with biological structure. Applied to architectures ranging from linear models to transformers, this simple modification significantly improves out-of-distribution performance (12–15%) without added computational cost.Competing Interest StatementSR holds equity in Amgen. SR and PSW receive research funding from Microsoft. APA and LC are employees of Microsoft and own equity in Microsoft. PSW reports compensation for consulting/speaking from Engine Ventures and AbbVie unrelated to this work. All other authors have declared that no competing interests exist.David and Lucile Packard Foundation, https://ror.org/032atxq54, NCI Information Systems (United States), https://ror.org/05mmhfh95,
Type
Publication
bioRxiv