Abstract
Spatial omics enable the characterization of colocalized cell communities that coordinate specific functions within tissues. These communities, or niches, are shaped by interactions between neighboring cells, yet existing computational methods rarely leverage such interactions for their identification and characterization. To address this gap, here we introduce NicheCompass, a graph deep-learning method that models cellular communication to learn interpretable cell embeddings that encode signaling events, enabling the identification of niches and their underlying processes. Unlike existing methods, NicheCompass quantitatively characterizes niches based on communication pathways and consistently outperforms alternatives. We show its versatility by mapping tissue architecture during mouse embryonic development and delineating tumor niches in human cancers, including a spatial reference mapping application. Finally, we extend its capabilities to spatial multi-omics, demonstrate cross-technology integration with datasets from different sequencing platforms and construct a whole mouse brain spatial atlas comprising 8.4 million cells, highlighting NicheCompass' scalability. Overall, NicheCompass provides a scalable framework for identifying and analyzing niches through signaling events.
Introduction: The Challenge of Spatial Context
In biological tissues, location is a primary determinant of function. Cells organize into "niches"—localized communities where neighboring cells coordinate behavior through complex signaling networks. While spatial omics technologies have advanced our ability to map gene activity to specific coordinates, computational tools for analyzing these data often fall short.
Traditional methods typically identify niches by clustering cells based on static molecular similarity or physical proximity. This approach often overlooks the dynamic "trade" and communication occurring between cells. Furthermore, as spatial datasets scale to millions of cells and incorporate multi-omic layers (e.g., gene expression and chromatin accessibility), existing tools struggle with computational efficiency and data integration.
Methods: The NicheCompass Framework
NicheCompass is a graph deep-learning model built on a multimodal conditional variational graph autoencoder (CVAE). It shifts the focus from individual cell states to the interactions that define a niche.
The framework operates through several key components:
- Spatial Graph Representation: Tissues are modeled as spatial neighborhood graphs where nodes represent cells (or spots) and edges represent physical proximity.
- Knowledge-Guided Gene Programs (GPs): Instead of treating genes in isolation, NicheCompass integrates prior biological knowledge from databases like OmniPath. It defines thousands of "Gene Programs" representing known signaling pathways, such as specific ligand-receptor pairs.
- Interpretable Embeddings: The model learns compressed cell embeddings where specific dimensions correspond to the activity of particular Gene Programs. This allows researchers to directly link a niche's identity to active signaling pathways.
- Dual Decoders for Communication: To explicitly model communication, NicheCompass employs two decoders: a "self" decoder that reconstructs a cell's own molecular profile and a "neighborhood" decoder that reconstructs the profile of its neighbors. This captures the "sender-receiver" relationship inherent in cellular signaling.
- De Novo Program Learning: To account for incomplete biological databases, the model can discover "de novo" programs—novel patterns of co-expressed genes—on its own.
Key Insights: Communication-Centric Identity
NicheCompass demonstrates that a niche's identity is more accurately defined by its interactions than its mere composition. By modeling signaling events, the framework can distinguish subtle functional differences between physically similar regions.
Key conceptual advances include:
- Reference Mapping: NicheCompass acts as a "GPS for cells," allowing researchers to map new query samples (e.g., a patient biopsy) onto a reference atlas. This can reveal novel niches, such as specific immune infiltrates in a tumor, that were absent in the reference.
- Scalability: Utilizing memory-efficient graph neural networks and mini-batching, NicheCompass successfully processed a MERFISH whole mouse brain atlas of 8.4 million cells—a scale that typically causes competing algorithms to fail.
- Multi-Omic Synergy: The model integrates RNA and ATAC data, providing a holistic view of how chromatin accessibility relates to the signaling events defining a niche.
Results and Validation
The authors validated NicheCompass across diverse high-profile datasets, including mouse organogenesis (seqFISH), human lung cancer (CosMx), and breast cancer (Xenium).
- Benchmarking: NicheCompass consistently outperformed state-of-the-art methods like BANKSY, GraphST, and CellCharter in metrics for spatial consistency and niche coherence.
- Biological Discovery: In human breast cancer, the model identified a specific KRT14+ proliferative tumor niche cohabiting with myeloid cells, which was associated with poor prognosis.
- Cross-Technology Integration: The model successfully merged datasets from different sequencing platforms (e.g., MERFISH and STARmap), demonstrating that the biological niches identified are robust across different measurement technologies.
Limitations and Future Outlook
While NicheCompass represents a significant leap forward, the authors identify several areas for future development. The model remains sensitive to the data sparsity common in spatial omics. Its interpretability is also heavily dependent on the quality of prior knowledge databases, which are currently incomplete for many species and diseases. Additionally, while it handles single-cell resolution well, performance on "spot-level" data (like Visium) is slightly lower. Future iterations may incorporate dynamic weights for gene programs to better reflect local cellular contexts.
Summary updated