Spatial Coordinates as a Cell Language: A Multi-Sentence Framework for Imaging Mass Cytometry Analysis (2025)

Abstract: Image mass cytometry (IMC) enables high-dimensional spatial profiling by combining mass cytometry’s analytical power with spatial distributions of cell phenotypes. Recent studies leverage large language models (LLMs) to extract cell states by translating gene or protein expression into biological context. However, existing single-cell LLMs face two major challenges: (1) Integration of spatial information—they struggle to generalize spatial coordinates and effectively encode spatial context as text, and (2) Treating each cell independently—they overlook cell-cell interactions, limiting their ability to capture biological relationships. To address these limitations, we propose Spatial2Sentence, a novel framework that integrates both single-cell expression and spatial information into natural language using a multi-sentence approach. Given an expression matrix and spatial coordinates, Spatial2Sentence constructs expression similarity and distance matrices, pairing spatially adjacent and expressionally similar cells as positive pairs while using distant and dissimilar cells as negatives. These multi-sentence representations are processed by LLMs, enabling them to learn cellular interactions in both expression and spatial contexts. Equipped with multi-task learning, Spatial2Sentence outperforms existing single-cell LLMs on preprocessed IMC datasets for diabetes and brain tumors, improving cell-type classification by 5.98% and clinical status prediction by 4.18% on the diabetes dataset while enhancing interpretability. The source code can be found here: https://github.com/UNITES-Lab/Spatial2Sentence .

## introduction single-cell technologies, such as flow and mass cytometry (cytof) and single-cell rna sequencing, have revolutionized our ability to analyze cellular heterogeneity in blood and tissue samples @xcite @xcite . these techniques provide high-resolution insights into the human immune system, enabling targeted therapeutic strategies for disease treatment and prevention @xcite . cytof, for instance, identifies immune cells based on protein expression @xcite . however, traditional suspension-based proteomic approaches lack spatial context, limiting our understanding of cell-cell interactions and tissue organization. recent advancements, such as imaging mass cytometry (imc) and multiplexed ion beam imaging (mibi), overcome this limitation by integrating mass cytometry with spatial profiling @xcite . these nextgeneration single-cell proteomics technologies enable high-dimensional immune profiling while preserving spatial relationships @xcite . such insights are crucial for characterizing the tumor microenvironment, where spatial interactions between immune and tumor cells influence prognosis @xcite . by capturing cell types, states, and interactions, spatial proteomics enhances our understanding of the immune system's complexity and disease mechanisms @xcite . inspired by the advances in natural language processing (nlp), researchers have started conceptualizing cellular information as "words" and "sentences," enabling deep learning models to interpret cellular behavior within a context-dependent framework @xcite . a recent innovative approach applies large language model to extract cell (gene) state by translating cell (gene) expression information into biological context @xcite . by leveraging vast single-cell datasets, those models can generalize across gene expression dynamics, phenotype, and disease status, paving the way for new discoveries in immune system and therapeutic development. despite their effectiveness in various downstream tasks, current approaches face two major bottlenecks: integration of spatial information. with rapid advancements in spatial transcriptomics and multiplexed imaging, capturing spatial context has become increasingly important @xcite @xcite . cells interact within their microenvironment, influencing differentiation, immune response, and disease progression @xcite . however, current models rely solely on expression matrices (e.g., gene or protein) and overlook spatial organization, leading to suboptimal representations. spatial context is essential for modeling intercellular interactions, uncovering cell-type-specific behaviors, and improving biological relevance. ignoring it risks missing key regulatory mechanisms that shape cellular function within complex tissues. treating each cell independently. current singlecell llm approaches @xcite treat each cell as an independent entity, overlooking broader cellular interactions across similar or distinct groups of cells. learning the similarities and distinctions between cells within the same or different functional groups (e.g., cell types or tissue niches) can enrich the biological context captured in cell sentences @xcite . without this information, models may fail to capture key regulatory relationships or misinterpret cellular function within a tissuespecific context. driven by these motivations, we propose spatial2sentence, a novel single-cell llm framework that integrates spatial information into language using a multi-sentence approach to capture cellular interactions. specifically, we construct an expression similarity matrix and a distance matrix from the expression matrix and spatial coordinates, respectively. for each cell, we identify the most similar and adjacent cells as positive pairs, while dissimilar and distant cells serve as negative pairs. these structured pairs are then used to prompt an llm, enabling it to capture cell-cell interactions effectively. using our newly preprocessed imc dataset, which containing protein expression matrices, spatial coordinates, and designated cell-type annotations for diabetes and brain tumor samples, spatial2sentence achieves stateof-the-art performance, improving cell-type classification by 5.98% and clinical status prediction by 4.18% compared to recent single-cell llm approaches. furthermore, our approach provides new insights into interpretability by identifying which cell types and protein markers are most crucial for distinguishing clinical states, offering a deeper understanding of their roles in disease progression. in summary, our main contributions are summarized as follows: cytof. several methodologies have started leveraging cytof for cell annotation to study disease status or disease pathology @xcite . take two examples of approaches that have been developed for performing cell annotation. automated cell-type discovery and classification (acdc) is an algorithm that can use in cytof or high-dimension mass cytometry like imc to classify cell and new cell types by combining profile matching and semisupervised learning @xcite . linear discriminant analysis (lda) also another automatic classifier for cell classification enables the analysis of large cytof datasets without requiring prior biological knowledge of marker expression patterns across different cell types @xcite . while these techniques enable automated annotate cells, they process each cell independently and disregard spatial information. our study utilizes imc data, which captures spatial information for each cell across all samples. therefore, incorporating spatial information is crucial for a more comprehensive analysis. the integration of spatial characterization with cell expression remains largely unexplored, and effectively incorporating spatial information remains a challenge. ## methodology spatial2sentence consists of three stages: expression similarity and distance matrix generation, contrastive multi-sentence learning, and multisentence prompting. in section 3.1, we define the preliminaries and notations used in this paper. in section 3.2, we describe the generation of expression similarity and distance matrices, enabling each cell to identify its similar counterparts based on expression and spatial information. in section 3.3, we introduce the multi-sentence technique, designed to capture interactions between cells through contrastive prompting with positive and negative pairs derived from the similarity and distance matrices. figure 1 provides a detailed illustration of the overall framework of spatial2sentence. ## conclusion we proposed spatial2sentence, a novel framework that jointly integrates spatial information and cell expression by modeling cells as sentences. spatial2sentence effectively captures cellular similarities and distinctions across diverse cell types, enhancing the biological context encoded in language. experiments on two imc datasets show that spatial2sentence consistently outperforms existing methods. by introducing a multisentence contrastive prompting strategy that leverages both spatial proximity and cell-level similarity, we demonstrate that even lightweight llms can gain substantial performance boosts from spatially informed prompts. these findings suggest that scaling to stronger models could further advance this direction, offering a promising bridge between spatial biology and large language models.