A Few-Shot Spatial Transcriptome Cell Labelling System and Method Based on Graph Hints
This few-sample spatial transcriptome cell annotation system, which learns through graph hints, solves the problem of existing methods' dependence on large-scale labeled data. It achieves high-precision, low-cost cell type annotation, is applicable to multi-platform data, and has cross-dataset adaptability and consistency in biological interpretation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2026-02-03
- Publication Date
- 2026-05-26
AI Technical Summary
Existing spatial transcriptome data analysis methods rely on large-scale, high-quality labeled data, which are costly and their performance degrades significantly under conditions of scarce labels. They are difficult to accurately characterize the cell distribution features in complex tissues, lack cross-dataset adaptability, and have low model training efficiency.
A few-sample spatial transcriptome cell annotation system employing graph cueing learning achieves high-precision cell type annotation under unsupervised or weakly supervised conditions through preprocessing, graph construction, graph representation learning, and cueing fine-tuning modules, combined with self-supervised learning and prototype learning.
It significantly reduces reliance on manual annotation, improves annotation accuracy in complex tissues, has the ability to identify rare cell types, enhances model training and transfer efficiency, is applicable to multi-platform data, and maintains consistency in biological structures.
Smart Images

Figure CN122090966A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of spatial transcriptomics technology, and particularly relates to a few-sample spatial transcriptomics cell annotation system and method based on graph cue learning. Background Technology
[0002] Spatial transcriptomics is a high-throughput sequencing and imaging technology that can obtain gene expression information while preserving the spatial structure of tissues. It has been widely used in fields such as tumor biology, developmental biology, and neuroscience.
[0003] Cell type annotation is a crucial step in spatial transcriptome data analysis, typically serving as the foundation for subsequent differential expression analysis, spatial structure resolution, and cell communication studies. Existing automated annotation methods mainly include reference data mapping-based methods, deep learning-based classification models, and graph model methods incorporating spatial information. A typical workflow includes data preprocessing, feature extraction, cell representation learning, and classification prediction. In terms of modeling, some methods use gene expression matrices as the primary input, while others introduce spatial coordinates to construct adjacency graphs to characterize spatial relationships between cells. With the development of graph neural networks, contrastive learning, and representation learning techniques, more and more studies are attempting to integrate multimodal information to construct joint models, improving the ability to characterize cellular heterogeneity. Simultaneously, machine learning paradigms such as few-shot learning and transfer learning are gradually being introduced into the field of biological data analysis to enhance the applicability of models in scenarios with limited labeled samples.
[0004] While these methods have improved the level of automated annotation to some extent, they still have many shortcomings in practical applications:
[0005] First, most methods rely heavily on large-scale, high-quality labeled data as supervision signals. However, manual labeling of spatial transcriptome data usually relies on expert experience or additional experimental verification, which is costly and time-consuming. As a result, the reliable labels available in real-world scenarios are extremely limited. Under the condition of scarce labels, existing models generally suffer from significant performance degradation.
[0006] Secondly, although some methods introduce spatial neighborhood relationships to construct graph structures, they usually only treat spatial information as simple adjacency constraints or post-processing steps, failing to fully model the complex coupling relationship between gene expression and spatial structure, and making it difficult to accurately characterize the cell distribution features in highly heterogeneous tissues such as the tumor microenvironment.
[0007] Third, existing graph learning methods generally rely on fixed feature encoding and unified structure modeling. Node representations lack adaptability to different tasks and data distributions. Under conditions of few samples, graph information propagation is prone to oversmoothing, leading to convergence of representations between different cell types, especially with a significant lack of ability to distinguish rare cell types.
[0008] Furthermore, most existing frameworks lack effective mechanisms for rapid migration and task adaptation. When data sources, platform types, or organizational backgrounds change, models typically need to be retrained, reducing the practical scalability and application efficiency of the methods.
[0009] Constructing an analytical framework that takes into account expressive information, spatial structure, and cross-dataset adaptability has become an important research direction for intelligent analysis of spatial transcriptomes. Summary of the Invention
[0010] The purpose of this invention is to provide a few-sample spatial transcriptome cell annotation system based on graph cue learning, aiming to solve the problems mentioned in the background art.
[0011] The present invention is implemented as follows: a few-shot spatial transcriptome cell annotation system based on graph cue learning, comprising:
[0012] The preprocessing module is used for quality control and feature planning of raw spatial transcriptome data;
[0013] The graph construction module is used to construct spatial adjacency relationships based on cell spatial coordinates and to constrain or weight graph connectivity relationships by combining the similarity of transcriptome expression between cells.
[0014] The graph representation learning module is used to learn discriminative cell embedding representations from a pre-constructed cell graph structure under unsupervised or weakly supervised conditions.
[0015] The prompt fine-tuning module is used to efficiently inject the category information contained in a small number of labeled samples into the pre-trained graph representation model in the downstream cell type annotation task, so as to achieve efficient few-sample learning of parameters.
[0016] The cell type prediction module is used to complete cell type annotation based on a small number of labeled samples.
[0017] Another objective of this invention is to provide a few-shot spatial transcriptome cell annotation method based on graph cue learning, applied to the aforementioned system, comprising the following steps:
[0018] S1. Obtain raw spatial transcriptome data, which includes at least gene expression information for each cell and its corresponding spatial location information;
[0019] S2. Data Preprocessing and Normalization: Preprocessing operations are performed on the raw spatial transcriptome data, including filtering low-quality cells and genes, and performing normalization, logarithmic transformation and feature standardization on gene expression data.
[0020] S3. Constructing a spatial graph structure: Based on the preprocessed spatial coordinate information and gene expression characteristics, each cell is regarded as a node, and a cell graph structure is constructed to characterize the spatial proximity and expression similarity relationships between cells.
[0021] S4. Initialize cue vectors: Initialize learnable cue vectors for downstream task adaptation, which are used to inject global or category-related information into the graph encoding process;
[0022] S5. Graph Coding and Cue Injection: Graph coding is performed based on the constructed cell graph structure, and cue vectors are injected into cell node features through a soft attention mechanism to generate a cell embedding representation that integrates spatial information, expression features and cue information.
[0023] S6. Determine if the training phase is in progress:
[0024] The system determines whether the current running state is in the training phase. If it is in the training phase, it executes S7; otherwise, it directly executes S9.
[0025] S7. Calculate the training loss: Calculate the training loss based on the embedding representation of a small number of labeled cells. The training loss includes a loss function used to constrain the clustering of cells of the same type and the separation of different categories.
[0026] S8. Update model parameters: Update the learnable parameters based on the calculated training loss. The learnable parameters include at least the cue vector-related parameters to complete the training and optimization of the model.
[0027] S9. Predicting Cell Type: During the non-training phase, based on the learned cell embedding representation, the type prediction result for each cell is determined by calculating its similarity to the prototype of each cell type.
[0028] S10: Output cell type annotation results and their spatial distribution information.
[0029] This invention uses spatial transcriptomics (ST) data as input. Addressing the common technical problems of high noise, sparse expression, strong tissue heterogeneity, and extremely limited labeled samples in existing spatial transcriptomics data, it proposes a cell type annotation solution that combines graph modeling with small-sample learning, integrating spatial and gene expression information. By introducing key technologies such as self-supervised graph representation learning, prompt learning, and prototype learning, it achieves high-precision and stable prediction of spatial cell types with only a very small number of labeled cells.
[0030] Specifically, the input spatial transcriptome data is first systematically preprocessed to remove low-quality cells and low-confidence genes, reducing the impact of technical noise on subsequent modeling. Then, each cell is modeled as a node in a graph, and spatial information subgraphs and expression information subgraphs are constructed based on the cell's spatial location information and gene expression features, respectively. A unified cell graph structure that simultaneously characterizes spatial neighborhood relationships and transcriptome similarity is generated through a graph fusion strategy. Based on this, a graph neural network is used to encode the cell graph, and a self-supervised contrastive learning approach is used to pre-train the graph representation, thereby learning a discriminative cell embedding representation without relying on manual annotation. In the downstream small-sample cell type annotation stage, learnable cue vectors are introduced, and category-related prior information is injected into the cell representation through a soft attention mechanism, with only cue-related parameters fine-tuned, thus achieving parameter-efficient small-sample transfer learning. Furthermore, cell type prototype representations are constructed based on a small number of labeled cells. During the prediction process, the similarity between the cell to be predicted and each prototype is calculated using metric learning to complete the cell type determination. Combining compactness constraints and prototype separation constraints enhances the clustering of similar cells and the separability between different categories.
[0031] Compared with the prior art, the embodiments of the present invention have the following advantages:
[0032] Significantly reduces reliance on large-scale manual annotation: Only a very small number of labeled cells (e.g., 5-20 per class) are needed to complete high-quality cell type annotation of large-scale spatial transcriptome data, significantly reducing expert annotation costs;
[0033] Improving annotation accuracy in complex tissues: By fusing spatial and representational information to construct graph structures and introducing a cue learning mechanism, we can more accurately characterize intercellular relationships in highly heterogeneous tissues such as tumors and improve annotation accuracy.
[0034] Capable of identifying rare cell types: Prototype-guided strategies and prototype separation constraints help maintain class boundaries, enabling effective identification even when faced with a very small proportion of rare cell populations.
[0035] Improve model training and transfer efficiency: By adopting the "pre-training + Prompt fine-tuning" mode, only a few parameters need to be adjusted to adapt to new data, reducing computational costs and improving model reusability;
[0036] Suitable for multi-platform, multi-scale spatial transcriptome data: It has good compatibility with different technology platforms (such as MERFISH, Stereo-seq, Xenium) and has broad application potential;
[0037] Maintaining consistency in biological structures: By jointly optimizing graph structures and prototype constraints, the boundaries of tissue structures and cell types are effectively preserved during information propagation, which is beneficial for downstream biological interpretation. Attached Figure Description
[0038] Figure 1 A framework diagram of a few-sample spatial transcriptome cell annotation system based on graph cue learning provided in an embodiment of the present invention;
[0039] Figure 2 This is a structural diagram of a few-shot spatial transcriptome cell annotation system based on graph cue learning provided in an embodiment of the present invention.
[0040] Figure 3 The execution flowchart of the data preprocessing module provided in this embodiment of the invention;
[0041] Figure 4 This is an execution flowchart of the graph construction module provided in an embodiment of the present invention;
[0042] Figure 5 This is an execution flowchart of the graph representation learning module provided in an embodiment of the present invention;
[0043] Figure 6 The execution flowchart of the prompting and fine-tuning module provided in the embodiment of the present invention;
[0044] Figure 7 The execution flowchart of the cell type prediction module provided in the embodiments of the present invention;
[0045] Figure 8 A flowchart of a few-sample spatial transcriptome cell annotation method based on graph cue learning provided in an embodiment of the present invention;
[0046] Figure 9 This is a dataset of colorectal adenocarcinoma provided in the embodiments of the present invention, along with the prediction results of various methods.
[0047] Figure 10 The present invention provides a dataset of mouse hypothalamus data with real-world annotations and prediction results from various methods.
[0048] Figure 11 The data provided in this embodiment of the invention includes the ground truth annotations of the human breast cancer dataset and the prediction results of various methods. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0050] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0051] Example 1, such as Figure 1 The diagram shown is a framework diagram of a few-sample spatial transcriptome cell annotation system based on graph cue learning provided in an embodiment of the present invention. Each functional module is connected and operates collaboratively in the system, forming a complete automated processing flow from input of raw spatial transcriptome data to output of final cell type annotation results. Through modular design, not only is the scalability and engineering feasibility of the system improved, but the accuracy and stability of cell type annotation are also significantly enhanced in small-sample, high-noise and high-heterogeneity spatial organization environments.
[0052] like Figure 2 As shown, the system mainly consists of five core modules, which achieve high-precision spatial heterogeneity resolution through a "pre-training + prompting fine-tuning" strategy. Specifically, these modules include:
[0053] Data preprocessing module: Used for quality control, feature normalization and structure organization of raw single-cell resolution spatial transcriptome data, providing stable and standardized input data for subsequent graph construction and representation learning modules;
[0054] The graph building module includes:
[0055] Spatial information subgraph construction unit, using the spatial coordinates of cells to construct spatial adjacency relationships;
[0056] The expression information subgraph construction unit constructs feature associations based on the similarity of gene expression profiles;
[0057] The graph fusion unit integrates spatial and feature information to provide a complete topological context for subsequent learning;
[0058] The graph representation learning module includes a self-supervised representation learning unit, corresponding to dgi.py in the code. It learns the general feature representation of cells without labels by maximizing the information of the depth graph.
[0059] The prompt fine-tuning module includes the Prompt injection unit, which corresponds to the GPPTPrompt component in the code. By introducing learnable prompt vectors, the pre-trained model can quickly adapt to the noise and sparsity characteristics of a specific dataset.
[0060] The cell type prediction module includes:
[0061] The prototype building unit utilizes a small number of known tags (Few-shot) to construct representative feature prototypes of various cell types;
[0062] The similarity calculation unit achieves accurate type assignment based on the similarity between the cell to be labeled and the prototype.
[0063] Example 2, as follows Figure 3 The diagram shown is an execution flowchart of a data preprocessing module provided in an embodiment of the present invention. This data preprocessing module is used for quality control and feature normalization of the raw spatial transcriptome data. It is a fundamental module in the system that ensures the stability and reliability of subsequent graph modeling and learning processes. Its execution process is as follows:
[0064] The data preprocessing module receives raw spatial transcriptome data as input, which includes at least the spatial location information of cells, gene expression matrix, and corresponding cell annotation information.
[0065] In the specific implementation process, the data preprocessing module first performs quality screening on cells and genes. At the cell level, according to the preset quality control rules, cells with unclear labels, low sequencing depth, abnormal number of expressed genes, or high noise levels are removed to avoid low-quality samples interfering with model training and prediction results. At the gene level, genes with low expression levels in most cells or those that only appear in a very small number of cells are filtered out, thereby reducing invalid features introduced by technical noise and improving the stability of subsequent feature modeling.
[0066] After cell and gene screening is completed, the data preprocessing module performs feature normalization on the retained gene expression matrix. Specifically, this includes: normalizing the raw count data to eliminate the influence of sequencing depth differences between different cells; then performing a logarithmic transformation on the normalized expression values to alleviate the long-tail effect of expression distribution; and on this basis, standardizing the gene expression features to make different gene features fall within a relatively consistent numerical scale range, which is beneficial for the stable training of subsequent graph neural network models.
[0067] In some implementations, the data preprocessing module further filters highly variable genes (HVGs) based on the degree of gene expression variation among cells, in order to retain a subset of features with high discriminative ability to distinguish cell types and reduce the interference of redundant features on the model.
[0068] In another preferred embodiment, for high-dimensional and sparse spatial transcriptome expression data, the data preprocessing module can also use linear dimensionality reduction methods such as principal component analysis (PCA) to reduce the dimensionality of gene expression features, thereby reducing the impact of data dimensionality and random noise on the subsequent graph representation learning process while preserving the main biological signals as much as possible.
[0069] The spatial transcriptome data after the above processing is organized and stored in a unified data structure. In a preferred embodiment of the present invention, the data is encapsulated using the AnnData data structure. The AnnData object uniformly contains processed gene expression features, cell spatial coordinate information and related metadata, providing a standardized and scalable input interface for the subsequent graph construction module, graph representation learning module and cell type prediction module.
[0070] Example 3, such as Figure 4 The diagram shows the execution flowchart of a graph construction module provided in an embodiment of the present invention. The graph construction module is used to transform preprocessed spatial transcriptome data into a graph structure that can simultaneously characterize cellular spatial relationships and transcriptome similarity, providing basic input for subsequent graph representation learning. Its execution process is as follows:
[0071] The graph construction module takes the standardized AnnData data object output by the data preprocessing module as input, which contains the gene expression feature matrix of cells and the corresponding spatial coordinate information;
[0072] In the specific implementation process, the graph construction module models each cell as a node in the graph, and constructs spatial information subgraphs and expression information subgraphs based on spatial location information and gene expression information, respectively.
[0073] During the construction of the spatial information subgraph, the graph construction module determines the spatial adjacency relationship between cells based on the two-dimensional or three-dimensional spatial coordinates of the cells using a nearest neighbor search strategy. In one implementation, based on the K-nearest neighbor (KNN) method, several neighboring cells that are spatially closest to each cell are selected, and the adjacent edges are weighted by a Gaussian kernel function or a distance decay function to characterize the intensity of spatial interaction between cells. This method can effectively reflect the local spatial structure and cellular microenvironment information in the tissue.
[0074] In the process of constructing the expression information subgraph, the graph construction module calculates the transcriptomic similarity between cells based on the gene expression characteristics of cells; in a preferred embodiment, cosine similarity or correlation coefficient is used to measure the degree of expression similarity between any two cells, and adjacency relationships are screened according to the similarity magnitude, thereby constructing an expression subgraph that reflects the similarity of cell transcriptional states.
[0075] To address the common problem of heterogeneous tissue structures in spatial transcriptome data, characterized by "spatial proximity but significant expression differences," this invention further designs a graph fusion strategy in the graph construction module to unify the modeling of spatial information subgraphs and expression information subgraphs. In one implementation, a weak connection removal strategy is used to suppress edge connections that are spatially adjacent but have significantly inconsistent expressions. In another implementation, the adjacency matrices of the two subgraphs are normalized and weighted to generate a unified cell graph structure that simultaneously encodes spatial constraints and expression similarity.
[0076] Example 4, such as Figure 5 The diagram shown is an execution flowchart of a graph representation learning module provided in an embodiment of the present invention. This module is used to learn discriminative cell embedding representations from a constructed cell graph structure under unsupervised or weakly supervised conditions. It is a crucial foundational module for implementing small-sample cell type annotation. Its execution process is as follows:
[0077] The graph representation learning module takes the unified cell graph output by the graph construction module as input and uses a graph neural network to aggregate and encode node features and neighborhood information. In a preferred embodiment, the graph neural network adopts a graph convolutional network (GCN) structure, which gradually integrates the cell's own expression features and its spatial-expression neighborhood features through multiple convolution operations to obtain a low-dimensional, continuous cell embedding representation.
[0078] To avoid reliance on manually labeled data and improve the model's generalization ability in small sample scenarios, the graph representation learning module adopts a self-supervised contrastive learning strategy for pre-training. In one implementation, the Deep GraphInfomax (DGI) method is introduced to maximize the mutual information between node embeddings and global graph representation by constructing positive and negative sample pairs. Specifically, negative sample graphs are generated by perturbing node features or graph structure, and the model is guided to distinguish between real graph representations and perturbed graph representations, thereby learning robust embeddings that can characterize global and local structural information.
[0079] Through the self-supervised graph representation learning process described above, the graph representation learning module can extract stable and biologically discriminative cell representations without cell type labels, providing high-quality initialization features for subsequent cue fine-tuning and prototype learning, effectively alleviating the problem of model overfitting under small sample conditions.
[0080] Example 5, as follows Figure 6The diagram shows the execution flowchart of a prompting fine-tuning module provided in an embodiment of the present invention. This module is used in a downstream cell type annotation task to efficiently inject the category information contained in a small number of labeled samples into a pre-trained graph representation model, thereby achieving efficient few-sample learning of parameters. The execution process is as follows:
[0081] This prompt fine-tuning module introduces learnable prompt vectors (Prompts) based on the graph representation learning module. These prompt vectors represent global prior information related to cell type and are fused with cell node features through a soft attention mechanism. In one implementation, the system designs a set of trainable global prompt vectors for different cell types or task scenarios and injects the prompt information into the node embedding representation in a weighted manner, thereby guiding the model to focus on feature dimensions related to the current annotation task.
[0082] During the cue fine-tuning phase, the system freezes the graph encoder parameters pre-trained in the graph representation learning module and updates only the cue vector and a small number of parameters related to the cue. This parameter-efficient fine-tuning strategy can significantly reduce the number of labeled samples required for model training and reduce the risk of overfitting. It is particularly suitable for spatial transcriptomics applications with extremely limited labeled data.
[0083] Example 6, as Figure 7 The diagram shows the execution flowchart of a cell type prediction module provided in an embodiment of the present invention. The cell type prediction module is used to complete cell type annotation based on a small number of labeled samples, and its execution process is as follows:
[0084] The cell type prediction module employs a prototype learning strategy, which constructs prototype vectors for each cell type by performing average pooling on the embedding representations of labeled cells.
[0085] During the prediction process, the cosine similarity between the cell embedding to be predicted and each prototype vector is calculated, and the cell type is determined accordingly. To improve the classification and discrimination ability, cross-entropy loss, compaction loss and prototype separation loss are used in combination to make the embeddings of the same type of cells more clustered and the distance between different types of prototypes further increased, thereby improving the recognition accuracy of rare cell types and cell subpopulations in complex tissues.
[0086] Example 7: A flowchart of a few-shot spatial transcriptome cell annotation method based on graph cue learning, provided as an embodiment of the present invention, includes the following steps:
[0087] S1. Loading spatial transcriptome data: Loading spatial transcriptome data, which includes at least gene expression information for each cell and its corresponding spatial location information, for use in subsequent graph structure construction and cell type annotation;
[0088] S2. Data Preprocessing and Normalization: Preprocessing operations are performed on the loaded spatial transcriptome data, including filtering low-quality cells and genes, and normalizing, logarithmic transforming and feature standardization of gene expression data to reduce technical noise and improve data consistency.
[0089] S3. Constructing a spatial graph structure: Based on the preprocessed spatial coordinate information and gene expression characteristics, each cell is regarded as a node, and a cell graph structure is constructed to characterize the spatial proximity and expression similarity relationships between cells, providing a structural basis for subsequent graph representation learning;
[0090] S4. Initialize Prompt Vector: Initialize a learnable prompt vector (Prompt) for downstream task adaptation. The prompt vector is used to inject global or category-related information into the graph encoding process in subsequent steps.
[0091] S5. Graph Coding and Cue Injection: Graph coding is performed based on the constructed cell graph structure, and cue vectors are injected into cell node features through a soft attention mechanism to generate a cell embedding representation that integrates spatial information, expressive features and cue information.
[0092] S6. Determine whether the training phase is in progress. If it is, proceed to step S7; otherwise, proceed directly to step S9.
[0093] S7. Calculate training loss: During the training phase, calculate the training loss based on the embedding representation of a small number of labeled cells. The training loss includes a loss function used to constrain the clustering of cells of the same type and the separation of different categories.
[0094] S8. Update model parameters: Update the learnable parameters based on the calculated training loss. The learnable parameters include at least the cue vector-related parameters, thereby completing the training and optimization of the model.
[0095] S9. Predicting Cell Type: During the non-training phase, based on the learned cell embedding representation, the type prediction result for each cell is determined by calculating its similarity to the prototype of each cell type.
[0096] Step S10, End of Process: Output cell type annotation results and their spatial distribution information, and the process ends.
[0097] The embodiments of the present invention can fully utilize spatial structure information and gene expression characteristics to achieve highly robust and accurate cell type annotation with very few labeled samples. Compared with traditional methods that rely on a large amount of labeled data or end-to-end training, the embodiments of the present invention have the advantages of small parameter update, strong generalization ability, and high ability to identify rare cell types. They are applicable to data generated by various spatial transcriptome technology platforms and have good versatility and engineering application value.
[0098] Example 8: Three representative large-scale spatial transcriptome datasets, covering different species, tissue types, and sequencing platforms, were selected to verify the effectiveness of the embodiments of the present invention:
[0099] 1. Dataset:
[0100] 1.1 Mouse hypothalamus dataset (MERFISH platform):
[0101] Preparation technique: This dataset was prepared using multi-scale error robust fluorescence in situ hybridization (MERFISH) technology;
[0102] Data scale: Includes approximately 1 million cell samples collected from the preoptic area of the mouse hypothalamus;
[0103] Data organization: The data is organized using 36 animal IDs, with each ID corresponding to a separate tissue slice;
[0104] Metadata composition: Each cell unit is associated with a unique cell ID, the animal to which it belongs, sex, behavioral status, and anatomical location indicated by Bregma coordinates;
[0105] Spatial information characteristics: Spatial coordinates are in micrometers and are recorded as the x and y coordinates of the cell centroid;
[0106] 1.2 Colorectal adenocarcinoma dataset (COAD, Stereo-seq platform):
[0107] Preparation technique: This dataset was prepared using the spatiotemporal omics (Stereo-seq v1.3) platform and contains colorectal adenocarcinoma (COAD) data from untreated tumor tissues;
[0108] Data scale and precision: The transcriptome profile covers 5,001 to 18,085 genes with subcellular resolution (2 μm).
[0109] Data organization: The data captures the complete architecture of COAD tissue, including multiple cell populations such as epithelial, immune, and stromal cells;
[0110] Metadata composition: By integrating with single-cell RNA sequencing (scRNA-seq) and 16-color protein analysis (CODEX) data, precise cell type annotations, including CD4+T, CD8+T, B cells, and macrophages, were obtained;
[0111] Spatial information characteristics: It has subcellular spatial coordinate information, which fully captures the organizational structure and cellular heterogeneity;
[0112] 1.3 Breast Cancer Dataset (Xenium Platform):
[0113] Preparation technique: This dataset was prepared using the Xenium platform and consists of multimodal data of formalin-fixed paraffin-embedded (FFPE) human breast cancer tissue.
[0114] Data scale and precision: Includes two independent samples with different receptor states (ER+ / HER2+ / PR and ER / HER2+ / PR), with subcellular spatial gene expression characteristics;
[0115] Data organization: Covering ductal carcinoma in situ (DCIS) and invasive ductal carcinoma regions, primarily using Xenium in situ data from Sample 1;
[0116] Metadata composition: The data is linked to whole transcriptome single-cell sequencing (scFFPE-seq) and Visium spatial transcriptome data as references to ensure the accuracy of cell type labeling;
[0117] Spatial information features: Provides subcellular resolution spatial expression coordinates based on targeted gene panels.
[0118] 2. Experimental Results:
[0119] Under different levels of supervision (5-shot, 10-shot, and 20-shot), the method proposed in this invention was systematically compared and evaluated with four mainstream benchmark methods (SpatialID, DSCT, scmap, and scPoli) on three spatial transcriptome datasets. The results are shown in Table 1.
[0120] Table 1 Experimental Results and Comparison Results
[0121] Note: — indicates that the method cannot be trained normally or fails to produce effective results under the corresponding few-shot settings (scPoli fails in the 5-shot case of COAD).
[0122] Table 1 summarizes the quantitative experimental results of each method under three datasets and different few-sample settings. It can be seen that under all datasets and all supervision levels, the embodiments of the present invention have achieved the best or near-best results in terms of overall prediction performance indicators, showing stable and consistent performance advantages.
[0123] To further and more intuitively analyze the predictive performance of different methods, Figure 9 , Figure 10 and Figure 11 The distribution of ground truth cell type annotations and prediction results of each method in the three datasets is shown. The prediction results of all methods are visualized in the same spatial coordinate system. Different colors represent different cell types, and cells that cannot be reliably predicted are marked as unassigned.
[0124] by Figure 9 For example, in real-world annotations, each cell type exhibits a clear regional structure in space. Some benchmark methods show significant class confusion in tissue boundary regions and areas with strong spatial heterogeneity, resulting in fragmented regions or insufficient spatial continuity in the prediction results. In contrast, the prediction results of the embodiments of the present invention are highly consistent with the ground truth in terms of overall spatial structure, can more accurately restore the spatial boundaries of the main cell types, and significantly reduce local misjudgment phenomena.
[0125] Similar results also Figure 10 and Figure 11 The corresponding dataset shows that, combined with the quantitative results in Table 1, the performance of each method improves with the increase of the number of supervised samples. However, the embodiments of the present invention maintain a leading advantage under different levels of supervision, and can still achieve stable and reliable prediction results, especially under conditions with very few samples such as 5-shot.
[0126] In summary, the quantitative comparison results in Table 1 are consistent with... Figure 9 , Figure 10 , Figure 11 The spatial visualization results corroborate each other, indicating that the embodiments of the present invention can make full use of spatial structure and contextual information under limited annotation conditions, and are superior to existing methods in terms of prediction accuracy, spatial consistency and model robustness.
[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A few-shot spatial transcriptome cell annotation system based on graph cue learning, characterized in that, include: The preprocessing module is used for quality control and feature planning of raw spatial transcriptome data; The graph construction module is used to construct spatial adjacency relationships based on cell spatial coordinates and to constrain or weight graph connectivity relationships by combining the similarity of transcriptome expression between cells. The graph representation learning module is used to learn discriminative cell embedding representations from a pre-constructed cell graph structure under unsupervised or weakly supervised conditions. The prompt fine-tuning module is used to efficiently inject the category information contained in a small number of labeled samples into the pre-trained graph representation model in the downstream cell type annotation task, so as to achieve efficient few-sample learning of parameters. The cell type prediction module is used to complete cell type annotation based on a small number of labeled samples.
2. The few-shot spatial transcriptome cell annotation system based on graph cue learning according to claim 1, characterized in that, The graph construction module includes: The spatial information subgraph construction unit is used to determine the spatial adjacency relationship between cells based on the two-dimensional or three-dimensional spatial coordinates of the cells using a nearest neighbor search strategy, and to construct a spatial information subgraph. The expression information subgraph construction unit is used to calculate the transcriptomic similarity between cells based on the gene expression characteristics of cells, and to construct an expression information subgraph that reflects the similarity of cell transcriptional states. The graph fusion unit is used to model spatial information subgraphs and representational information subgraphs in a unified manner.
3. The few-shot spatial transcriptome cell annotation system based on graph cue learning according to claim 1, characterized in that, The graph representation learning module includes a self-supervised representation learning unit, which is used to learn the general feature representation of cells with a small number of annotations by using the depth graph information maximization technique.
4. The few-shot spatial transcriptome cell annotation system based on graph cue learning according to claim 1, characterized in that, The prompting fine-tuning module includes a Prompt injection unit, which enables the pre-trained model to quickly adapt to the noise and sparsity characteristics of a specific dataset by introducing learnable prompt vectors.
5. The few-shot spatial transcriptome cell annotation system based on graph cue learning according to claim 1, characterized in that, The cell type prediction module includes: Prototype building units are used to construct representative feature prototypes of various cells using a small number of known labels; The similarity calculation unit is used to achieve accurate type assignment based on the similarity between the cell to be labeled and the prototype.
6. A few-shot spatial transcriptome cell annotation method based on graph cue learning, applied to the system as described in any one of claims 1-5, characterized in that, Includes the following steps: S1. Obtain raw spatial transcriptome data, which includes at least gene expression information for each cell and its corresponding spatial location information; S2. Data Preprocessing and Normalization: Preprocessing operations are performed on the raw spatial transcriptome data, including filtering low-quality cells and genes, and performing normalization, logarithmic transformation and feature standardization on gene expression data. S3. Constructing a spatial graph structure: Based on the preprocessed spatial coordinate information and gene expression characteristics, each cell is regarded as a node, and a cell graph structure is constructed to characterize the spatial proximity and expression similarity relationships between cells. S4. Initialize cue vectors: Initialize learnable cue vectors for downstream task adaptation, which are used to inject global or category-related information into the graph encoding process; S5. Graph Coding and Cue Injection: Graph coding is performed based on the constructed cell graph structure, and cue vectors are injected into cell node features through a soft attention mechanism to generate a cell embedding representation that integrates spatial information, expression features and cue information. S6. Determine if the training phase is in progress: The system determines whether the current running state is in the training phase. If it is in the training phase, it executes S7; otherwise, it directly executes S9. S7. Calculate the training loss: Calculate the training loss based on the embedding representation of a small number of labeled cells. The training loss includes a loss function used to constrain the clustering of cells of the same type and the separation of different categories. S8. Update model parameters: Update the learnable parameters based on the calculated training loss. The learnable parameters include at least the cue vector-related parameters to complete the training and optimization of the model. S9. Predicting Cell Type: During the non-training phase, based on the learned cell embedding representation, the type prediction result for each cell is determined by calculating its similarity to the prototype of each cell type. S10: Output cell type annotation results and their spatial distribution information.