Back

CASTLE: Cell-type Aware SpaTial domain detection via contrastive Learning Embedding

Xie, A.; Cui, Y.

2026-02-13 bioinformatics
10.64898/2026.02.12.705478 bioRxiv
Show abstract

With advances in spatially resolved transcriptomics across platforms and resolutions, it is now possible to measure gene-expression profiles while preserving the tissue microenvironment. Spatial clustering is central to these analyses, and recent graph neural network (GNN)-based approaches have greatly improved their accuracy. Nevertheless, precisely delineating spatial domain boundaries remains a significant challenge. Here we present a novel method CASTLE (Cell-type Aware SpaTial domain detection via contrastive Learning Embedding) by leveraging cell type information for improved spatial domain detection. CASTLE first integrates spatial proximity to construct a spatial graph, refined from cell-type similarity or expression similarity when cell type information is unavailable. Then, a self-supervised, local-context contrastive objective aligns embeddings with their immediate microenvironments. Evaluated across multiple tissues and technology resolutions, CASTLE outperforms state-of-the-art methods and detects more accurate and stable spatial domains. In downstream analyses, it resolves fine-grained tissue structures and differentiates functional subtypes, supporting more nuanced biological interpretation.

Matching journals

The top 3 journals account for 50% of the predicted probability mass.

50% of probability mass above

"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.