Abstract
Single-cell technologies have rapidly generated an unprecedented amount of data that enables us to understand biological systems at single-cell resolution. However, joint analysis of datasets generated by independent labs remains challenging due to a lack of consistent terminology to describe cell types. Here, we present OnClass, an algorithm and accompanying software for automatically classifying cells into cell types part of the controlled vocabulary that forms the Cell Ontology. A key advantage of OnClass is its capability to classify cells into cell types not present in the training data because it uses the Cell Ontology graph to infer cell type relationships. Furthermore, OnClass can be used to identify marker genes for all the cell ontology categories, independently of whether the cells types are present or absent in the training data, suggesting that OnClass can be used not only as an annotation tool for single cell datasets but also as an algorithm to identify marker genes specific to each term of the Cell Ontology, offering the possibility of refining the Cell Ontology using a data-centric approach.
Introduction: The "Tower of Babel" in Single-Cell Genomics
The explosion of single-cell RNA sequencing (scRNA-seq) has revolutionized our ability to profile individual cells at scale. However, this data deluge has created a significant bottleneck: the "Tower of Babel" problem. Different laboratories often use inconsistent, idiosyncratic terminology to describe identical cell types. This lack of standardization makes it nearly impossible to integrate datasets for large-scale meta-analyses.
Manual annotation by experts is the current gold standard, but it is slow, subjective, and fails to scale with the millions of cells now being sequenced. While machine learning models have been developed to automate this process, most are strictly supervised. These models can only identify cell types they have encountered during training. Given that the Cell Ontology (CL)—a standardized vocabulary of cell types—contains over 2,300 terms, and even the most comprehensive datasets cover only a small fraction of this diversity, existing models remain blind to the vast majority of cellular biology.
The OnClass Framework
To address these limitations, we introduce OnClass, a computational framework that treats cell type classification as a "zero-shot learning" problem. Unlike traditional classifiers, OnClass leverages the hierarchical structure of the Cell Ontology to predict cell types that were entirely absent from the training data.
1. Ontology Embedding
The core of OnClass is the transformation of the Cell Ontology graph into a geometric space. In this graph, nodes represent cell types and edges represent biological relationships (e.g., "is_a"). Using a "random walk with restart" algorithm, OnClass captures the global topology of the graph, ensuring that biologically similar cell types are positioned near one another in a low-dimensional embedding space.
2. Shared Feature Space Mapping
OnClass employs a bilinear neural network to project high-dimensional gene expression data into the same low-dimensional space as the ontology terms. By mapping both cells and cell-type labels to a shared "map," the model can assign a cell to a specific term based on proximity. If a cell's expression profile lands in a region corresponding to a type not seen during training, OnClass can still make an informed prediction by identifying the nearest neighbors in the ontology hierarchy.
3. Marker Gene Identification
Beyond classification, the model can operate in reverse. By analyzing the shared embedding space, OnClass can identify which genes are most characteristic of specific ontology terms. Crucially, this capability extends to terms with no previously annotated cells, providing a molecular signature for theoretical or rarely observed cell types.
Experimental Validation and Results
We evaluated OnClass using the Tabula Muris Senis (TMS) dataset, a massive expert-curated mouse cell atlas, and a 26-dataset compendium representing various technologies and tissues.
Superior Classification Accuracy
In benchmarking against existing methods like ACTINN and singleCellNet, OnClass demonstrated significantly higher accuracy. In scenarios where only 50% of cell types were included in the training set, OnClass achieved an AUROC of 0.87, while competing methods failed to exceed 0.72.
Zero-Shot Capabilities
When tasked with identifying entirely "unseen" cell types (categories not present in training), OnClass achieved an Accuracy@5 of 0.55. In contrast, existing approaches—even when extended to handle unknown categories—could not surpass an accuracy of 0.3. This confirms that the hierarchical knowledge embedded in the Cell Ontology is a powerful predictor of cellular identity.
Robustness Across Batches
The model successfully transferred annotations across 26 independent datasets. By focusing on the underlying biological signal mapped to the ontology, OnClass effectively corrected for "batch effects"—the technical noise that typically plagues cross-study comparisons.
Discussion: A Data-Centric Future for Ontologies
OnClass represents a shift from purely descriptive biology to a data-driven molecular map. While the model is currently dependent on the quality of the Cell Ontology, it also offers a way to improve it. By identifying marker genes for every term in the ontology, OnClass can "fill in the blanks" for terms that currently lack molecular definitions.
Future work will focus on expanding the model as more single-cell data becomes available, potentially moving toward a system where the Cell Ontology is continuously refined and expanded by the very data it seeks to organize. This iterative process promises to unify our understanding of cellular diversity across all tissues and species.
Summary updated