A method for analyzing ex vivo tissue spatial transcriptome data based on a graph neural network

CN121838890BActive Publication Date: 2026-08-21GUANGZHOU UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202512045723.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-08-21
Estimated Expiration
2045-12-31

AI Technical Summary

Technical Problem

实际应用中,不同实验批次与制备流程的切片存在显著差异,使模型性能剧烈波动;高质量切片的稀缺性也限制了跨器官、跨物种的泛化能力

Benefits of technology

[0030]本发明基于“基因-空间双图交替传播”与“注意力引导的自适应图裁剪”的核心技术手段,通过Moran's I与图傅里叶低频能量比双重评分筛选空间变异基因构建共表达关系图,利用互编码器在基因图与点位空间图间实现双向上下文信息流动,采用标准化Sigmoid注意力机制动态识别并剔除伪边以锐化组织微结构边界,结合表达重建、基因相关一致性、空间平滑、对比对齐及深度聚类对齐的复合损失进行联合约束,在无需依赖H&E图像配准的前提下,显著提升了空间域识别精度与离散功能结构的边界分割准确性,实现了跨切片数据的稳定整合与批次效应自动校正,同时保持了潜空间表示的功能可解释性,从而系统性地解决了现有技术因静态图构建偏差、错误平滑及图像依赖导致的泛化能力差、层次比例失真与跨样本整合稳健性不足的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121838890B_ABST
    Figure CN121838890B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on graph neural network's in vitro tissue spatial transcriptome data analysis method, comprising: obtaining the data including spatial position information and gene expression information from biological tissue sample, gene screening pre-processing is carried out, and spatial variation gene set is obtained;Gene co-expression graph is constructed, and point space graph is simultaneously constructed;Based on encoder, alternating graph message propagation is carried out on gene co-expression graph and point space graph, and the latent representation of point and gene is obtained;According to the attention weight after standardization, adaptive edge pruning is executed, and the adjacent edge connectivity of each node is maintained;Expression is reconstructed from point latent representation using decoder, and combined optimization is carried out through composite loss;The optimized point latent representation is clustered, and the spatial domain recognition result of biological tissue is obtained.The application significantly improves the spatial domain recognition precision and the boundary segmentation accuracy of discrete functional structure, realizes the stable integration of cross-slice data and batch effect automatic correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of bioinformatics and artificial intelligence, and in particular relates to a method for analyzing spatial transcriptome data of ex vivo tissues based on graph neural networks. Background Technology

[0002] Spatial transcriptomics technology captures the physical coordinates and whole-genome expression information of various measurement points on isolated tissue sections, providing a foundation for analyzing tissue structure, the tumor microenvironment (TME), and cell interactions. In biomedical research, accurately identifying the spatial boundaries of tissue functional regions is crucial for assessing tumor invasion extent, delineating immune cell aggregation substructures, and analyzing drug action sites. However, the insufficient precision of current methods has become a bottleneck restricting their industrial application.

[0003] Existing technologies fall into two categories: one is non-spatial clustering methods (such as K-means and Seurat), which completely ignore the physical proximity between measurement points and only use the expression matrix, easily leading to fragmented organizational layers and blurred boundaries. The other category is spatial graph models (such as STAGATE and GraphST), which, while introducing spatial adjacency, rely on manually set fixed K values ​​or distance thresholds during graph construction. This static strategy forces neighboring measurement points across cortical layers to be associated when analyzing brain tissue, causing erroneous smoothing of transcriptional features across different neuronal layers. More seriously, most models cannot prune these false edges during training, leading to the continuous accumulation of erroneous signals, resulting in distorted layer proportions and overly smoothed boundaries. Some contrastive learning frameworks use global random shuffling to generate negative samples, which often misclassifies measurement points with similar biological functions as negative samples when processing cross-batch sample data, significantly reducing clustering recall.

[0004] Many existing methods still heavily rely on the RGB features of H&E staining images. In practical applications, significant differences exist between slides from different experimental batches and preparation processes, causing drastic fluctuations in model performance; the scarcity of high-quality slides also limits the generalization ability across organs and species. When integrating multi-slide data, these methods still require manual registration using external tools such as PASTE, which is cumbersome and difficult to scale.

[0005] In summary, the current state of insufficient precision, weak generalization ability, and difficulty in cross-sample integration means that although spatial transcriptomics technology can generate massive amounts of data, it cannot provide reliable analytical results for tissue microenvironment research or new drug target screening. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention proposes a method for analyzing in vitro tissue spatial transcriptome data based on graph neural networks. This method utilizes two relationships simultaneously: gene co-expression and spatial adjacency. It also adaptively prunes pseudo-edges during training and employs a novel graph attention autoencoder framework that combines expression reconstruction and function preservation constraints to improve spatial domain recognition accuracy and cross-slice integration stability, thereby resolving the problems existing in the prior art.

[0007] To achieve the above objectives, this invention provides a method for analyzing in vitro tissue spatial transcriptome data based on graph neural networks, comprising the following steps:

[0008] Data including spatial location information and gene expression information are obtained from biological tissue samples using spatial transcriptome sequencing methods. Gene screening preprocessing is then performed to obtain a set of spatially variable genes.

[0009] A gene co-expression map is constructed based on the spatially variable gene set, and a point spatial map is constructed based on spatial location k-nearest neighbor information and expression similarity.

[0010] Based on the encoder performing alternating graph message propagation on the gene co-expression map and the site space map, the latent representation of sites and genes is obtained;

[0011] During the encoding process, adaptive edge pruning is performed based on the standardized attention weights, while maintaining the connectivity of adjacent edges for each node;

[0012] The representation is reconstructed from the latent representation of the point using a decoder, and joint optimization is performed using a composite loss.

[0013] Clustering is performed on the optimized point latent representations to obtain spatial domain identification results for biological tissues.

[0014] Optionally, the process of obtaining data including spatial location information and gene expression information from biological tissue samples through spatial transcriptome sequencing, performing gene screening preprocessing, and obtaining a set of spatially variable genes includes:

[0015] Library size normalization and logarithmic transformation were performed on the obtained original expression matrix; Moran index and graph Fourier low-frequency energy ratio were calculated on the spatial nearest neighbor graph; the two scores were integrated and sorted using the Borda rank aggregation method, and the top-ranked genes were selected as the set of spatially variable genes.

[0016] Optionally, the process of constructing a gene co-expression map based on the spatially varied gene set and simultaneously constructing a point spatial map based on the spatial location information includes:

[0017] In the spatially variable gene set, the Pearson correlation coefficient between genes is calculated as the edge weight to construct a gene co-expression map; a point spatial map is constructed based on spatial location k-nearest neighbor information and expression similarity.

[0018] Optionally, the process of alternating graph message propagation on the gene co-expression map and the site spatial map to obtain the latent representations of sites and genes includes:

[0019] A mutual encoder is used to alternately stack graph convolutional layers between the gene co-expression map and the site spatial map, enabling bidirectional flow of contextual information between genes and sites. A dimension encoder performs attention encoding from graph attention network to Transformer convolution, and the attention encoding is embedded and spliced ​​with the pre-embedded obtained from a pre-defined multilayer perceptron to form the final site latent representation.

[0020] Optionally, during the encoding process, the process of performing adaptive edge pruning based on the standardized attention weights and maintaining the connectivity of neighboring edges for each node includes:

[0021] The attention weights of each edge in the point graph are collected, and after standardization by mean and standard deviation, they are activated by the Sigmoid function to obtain sparse and stable attention weights. After each training cycle or a preset number of cycles, low-weight edges are pruned according to the global percentile threshold, and the top preset number of neighboring edges of each node are retained to maintain graph connectivity. The updated edge set is used for the next round of message propagation.

[0022] Optionally, the process of reconstructing the representation from the latent representation of the point using a decoder and jointly optimizing it using a composite loss includes:

[0023] A multilayer perceptron is used as a decoder to reconstruct gene expression from latent vectors at locations; the composite loss consists of expression mean square error loss, inter-gene correlation consistency logic loss, spatial smoothing Laplacian regularization term, contrast alignment loss based on cosine similarity, and deep clustering alignment loss using studentized distribution and KL divergence; end-to-end joint optimization training is performed using the composite loss.

[0024] Optionally, the process of clustering the optimized point latent representations to obtain the spatial domain identification results of biological tissues includes:

[0025] After training is completed, the latent representations of the points are extracted and clustered in the latent space using the Leiden algorithm or deep embedding cluster centers to obtain the spatial domain partitioning results; for multi-slice data, batch effect correction and joint partitioning are directly completed in a unified latent space.

[0026] The present invention also proposes a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.

[0027] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method.

[0028] The present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the steps of the method.

[0029] Compared with the prior art, the present invention has the following advantages and technical effects:

[0030] This invention is based on the core technologies of "alternating propagation of gene-spatial dual graphs" and "attention-guided adaptive graph pruning". It uses Moran's I and graph Fourier low-frequency energy ratio dual scoring to screen spatially variable genes and construct co-expression relationship graphs. It uses a mutual encoder to realize bidirectional contextual information flow between gene graphs and spatial graphs. It adopts a standardized Sigmoid attention mechanism to dynamically identify and remove false edges to sharpen tissue microstructure boundaries. It combines expression reconstruction, gene correlation consistency, spatial smoothing, contrast alignment and deep clustering alignment composite losses for joint constraints. Without relying on H&E image registration, it significantly improves the accuracy of spatial domain recognition and the accuracy of boundary segmentation of discrete functional structures. It achieves stable integration of cross-slice data and automatic batch effect correction, while maintaining the functional interpretability of latent space representation. Thus, it systematically solves the technical problems of poor generalization ability, hierarchical ratio distortion and insufficient robustness of cross-sample integration caused by static graph construction bias, error smoothing and image dependence in existing technologies. Attached Figure Description

[0031] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0032] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention. Detailed Implementation

[0033] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0034] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0035] Example 1

[0036] like Figure 1 As shown, this embodiment provides a method for analyzing in vitro tissue spatial transcriptome data based on graph neural networks, including the following steps:

[0037] Data including spatial location information and gene expression information are obtained from biological tissue samples using spatial transcriptome sequencing methods. Gene screening preprocessing is then performed to obtain a set of spatially variable genes.

[0038] A gene co-expression map is constructed based on the spatially varied gene set, and a point spatial map is constructed based on the spatial location information.

[0039] Based on the encoder performing alternating graph message propagation on the gene co-expression map and the site space map, the latent representation of sites and genes is obtained;

[0040] During the encoding process, adaptive edge pruning is performed based on the standardized attention weights, while maintaining the connectivity of adjacent edges for each node;

[0041] The representation is reconstructed from the latent representation of the point using a decoder, and joint optimization is performed using a composite loss.

[0042] Clustering is performed on the optimized point latent representations to obtain spatial domain identification results for biological tissues.

[0043] As a specific implementation method, this embodiment provides a specific implementation of the Graph Attention Autoencoder (STCOGAT) framework for collaborative co-expression perception. The process includes data preprocessing, dual graph construction, alternating propagation, attention encoding, adaptive pruning, decoding reconstruction, and joint optimization.

[0044] Specifically, the following steps are included:

[0045] S1: Data preprocessing and spatial variation gene selection:

[0046] The feasible process of obtaining spatially variable gene sets from biological tissue samples using spatial transcriptome sequencing, including data on spatial location and gene expression, followed by gene screening preprocessing, includes:

[0047] Library size normalization and logarithmic transformation were performed on the obtained original expression matrix; Moran index and graph Fourier low-frequency energy ratio were calculated on the spatial nearest neighbor graph; the two scores were integrated and sorted using the Borda rank aggregation method, and the top-ranked genes were selected as the set of spatially variable genes.

[0048] Use the Scanpy toolkit to perform the following operations on the original expression matrix:

[0049] Remove genes detected at fewer than 3 measurement points;

[0050] Perform library size normalization;

[0051] Implement log1p transformation.

[0052] Based on the transformed data, a spatial K-nearest neighbor graph (mutual nearest neighbors, default k=6) is constructed, and two spatial variability scores are calculated on this graph: Moran's I and Graph Fourier Low Frequency Energy Ratio (GFT-LFER).

[0053] The Borda rank aggregation method was used to integrate the above scores, and the top 3000 genes were selected as spatial variant genes (SVG).

[0054] Enable graph low-pass enhancement: Low-pass filtering is performed in the graph Laplacian feature subspace to truncate high-frequency noise, and the output is the expression matrix used for modeling.

[0055] S2: Dual-graph construction:

[0056] The feasible process of constructing a gene co-expression map based on the spatially varied gene set, and simultaneously constructing a spatial map based on spatial k-nearest neighbor information and expression similarity, includes:

[0057] In the spatially variable gene set, the Pearson correlation coefficient between genes is calculated as the edge weight to construct a gene co-expression map; a point spatial map is constructed based on the mutual nearest neighbor relationship of spatial coordinates.

[0058] Specifically, gene co-expression map: In the selected SVG set, calculate the Pearson correlation coefficient between genes and retain undirected edges according to preset thresholds or quantiles.

[0059] Point spatial graph: A nearest neighbor KNN graph (default k=6, supports hot kernel weights) is constructed based on the spatial coordinates of the measurement points for spatial message propagation, smoothing, and dynamic pruning. Optionally, a fusion graph of representation-KNN and spatial-KNN (linear fusion weights) can be constructed. The main experiment uses spatial KNN and attention-refined graphs for propagation.

[0060] S3: Encoder Construction:

[0061] The feasible process of obtaining the latent representations of sites and genes by performing alternating graph message propagation on the gene co-expression map and the site spatial map includes:

[0062] A mutual encoder is used to alternately stack graph convolutional layers between the gene co-expression map and the site spatial map, enabling bidirectional flow of contextual information between genes and sites. A dimension encoder performs attention encoding from graph attention network to Transformer convolution, and the attention encoding is embedded and spliced ​​with the pre-embedded obtained from a pre-defined multilayer perceptron to form the final site latent representation.

[0063] Specifically, the encoder consists of two parts: MutualEncoder and DimEncoder.

[0064] MutualEncoder performs alternating propagation: SAGEConv graph convolutional layers are stacked alternately on the geolocation graph and the gene co-expression graph to achieve bidirectional flow of gene-geolocation context, and LeakyReLU activation function and dropout regularization are used between layers.

[0065] DimEncoder performs attention encoding: intermediate representations are obtained sequentially through GATConv, followed by a TransformerConv variant to output the final embedding; two-stage residual projection and batch normalization are used for stable training. Attention computation employs a "normalized sigmoid" strategy: the original attention scores are normalized by mean / standard deviation, then activated by the sigmoid function to obtain sparse and stable edge weights to support subsequent pruning. The final latent representation of a point is concatenated from the attention-encoded embedding and a lightweight MLP pre-embedding.

[0066] S4: Attention-guided image cropping:

[0067] A feasible process during encoding, which involves performing adaptive edge pruning based on standardized attention weights while maintaining the connectivity of neighboring edges for each node, includes:

[0068] The attention weights of each edge in the point graph are collected, and after standardization by mean and standard deviation, they are activated by the Sigmoid function to obtain sparse and stable attention weights. After each training cycle or a preset number of cycles, low-weight edges are pruned according to the global percentile threshold, and the top preset number of neighboring edges of each node are retained to maintain graph connectivity. The updated edge set is used for the next round of message propagation.

[0069] Specifically, during the training phase, the TransformerConv attention weights of each edge in the point space graph are collected; after each or several training epochs, low-weight edges are pruned according to the global 10th percentile threshold, and at least the top 6 neighboring edges with the highest weights are retained for each node to maintain connectivity; the updated edge set is used for the next round of message propagation.

[0070] S5: Decoder Reconstruction and Joint Optimization

[0071] The feasible process of reconstructing the representation from the latent representation of a point using a decoder and jointly optimizing it using a composite loss includes:

[0072] A multilayer perceptron is used as a decoder to reconstruct gene expression from latent vectors at locations; the composite loss consists of expression mean square error loss, inter-gene correlation consistency logic loss, spatial smoothing Laplacian regularization term, contrast alignment loss based on cosine similarity, and deep clustering alignment loss using studentized distribution and KL divergence; end-to-end joint optimization training is performed using the composite loss.

[0073] Specifically, the decoder uses a three-layer MLP structure (ELU activation function, dropout) to reconstruct gene expression from locus latent vectors (input data is pre-normalized by z-score column).

[0074] The total loss function is the sum of the following terms:

[0075] The mean squared error loss (MSE) is expressed and calculated based on the SVG set;

[0076] Gene-gene correlation consistency loss: Calculate the gene correlation matrix from latent space features and apply logistic loss to positive / negative correlation edges;

[0077] Gene link reconstruction loss: If the gene encoder is enabled, the gene map is decoded using inner product decoding plus logical loss;

[0078] Spatial smoothing regularization term: Apply Laplacian smoothing to spatial edges with Gaussian weights;

[0079] Contrast alignment loss: Temperature scaling comparison is performed on the point map based on cosine similarity (positive sample pairs are determined by spatial adjacency / co-domain relationship), and negative sample sampling avoids false negatives;

[0080] Deep Cluster Alignment Loss (DEC): Uses studentized distribution and KL divergence to align the soft cluster distribution with the target distribution.

[0081] S6: Reasoning and Spatial Domain Partitioning:

[0082] The feasible process of clustering the optimized point latent representations to obtain the spatial domain identification results of biological tissues includes:

[0083] After training is completed, the latent representations of the points are extracted and clustered in the latent space using the Leiden algorithm or deep embedding cluster centers to obtain the spatial domain partitioning results; for multi-slice data, batch effect correction and joint partitioning are directly completed in a unified latent space.

[0084] Specifically, after completing end-to-end training, the latent representations of the points are extracted and clustered in the latent space (using the Leiden algorithm or DEC centers) to obtain a spatial domain partition map. For multi-slice data, batch effect correction and joint clustering are performed directly in a unified latent space without the need for geometric registration.

[0085] Preferred parameter configuration:

[0086] Graph construction: The hot kernel parameter of spatial KNN is the median of non-zero neighbor distances; gene graph edge selection uses correlation coefficient thresholds or Top-P quantiles.

[0087] Encoder depth: MutualEncoder uses SAGEConv stacking; point DimEncoder adopts GAT→TransformerConv structure;

[0088] Pruning strategy: Use the global 10th percentile threshold to retain the top-6 neighboring edges for each node;

[0089] Training configuration: Adam optimizer (normal learning rate and weight decay), default 500 epochs, fixed random seed 42 and set CuDNN determinism;

[0090] The optimal number of SVGs is 3000, and preprocessing includes low-pass enhancement of the map.

[0091] The message passing unit can replace SAGEConv with GCNConv, GraphConv, or GATConv;

[0092] The contrastive learning module can use InfoNCE / Barlow Twins; negative sampling can introduce hard negative sample mining but needs to be combined with domain priors to reduce the risk of false negatives;

[0093] The smoothing regularization term can be replaced with Total Variation or Anisotropic Diffusion;

[0094] Cross-slice integration can incorporate domain-invariant adversarial terms or maximum mean difference (MMD) in the latent space to improve batch alignment robustness.

[0095] All of the above alternative solutions can achieve the technical effects of alternating propagation of dual images, attention-guided pruning, and joint constraints on reconstruction / function.

[0096] This embodiment does not rely on image pre-registration or additional staining information, and can directly complete domain segmentation and batch correction on transcriptome data; it has universal value for tumor pathology, immune microenvironment assessment, drug action zone localization, tissue development research and spatial multi-omics fusion, and is easy to embed into hospital / pharmaceutical companies' data analysis pipelines.

[0097] Example 2

[0098] Spatial domain recognition in the dorsolateral prefrontal cortex (DLPFC) of the human brain:

[0099] Twelve publicly available slices of the dorsolateral prefrontal cortex of the human brain were used as test data, each slice containing ground truth annotations of layered structure markers. The model configuration employed the aforementioned optimized parameters: a spatial KNN graph was constructed using k=6; the gene co-expression map was constructed based on the Pearson correlation coefficients of 3000 spatially variable genes (SVGs); and the attention pruning threshold was set to the 10th percentile globally, retaining the top-6 neighboring edges of each node. The Adam optimizer was used during training, with conventional learning rates and weight decay, a fixed random seed of 42, and a CuDNN deterministic mode, for a total of 500 epochs. Quantitative evaluation results showed that the median adjusted Rand index (ARI) of the 12 slices reached 0.66, and the median normalized mutual information (NMI) was 0.72, significantly outperforming existing baseline methods. Qualitative analysis showed that the spatial domain partitioning map output by the model clearly restored the layered structure boundaries of the L1-L6 cortex, the transition regions between adjacent layers were sharp, and there was no layer mixing phenomenon caused by excessive smoothing. The boundary signals of layer-specific marker genes (such as the limited expression of Pcp4 in the L6 layer) were completely preserved.

[0100] Example 3

[0101] STARmap mouse visual cortex (VISp) high-resolution validation:

[0102] The model was validated using a mouse primary visual cortex (VISp) dataset generated using STARmap technology, which features single-cell-level spatial resolution and dense layered structural markers. The model was trained for 500 epochs using the same configuration parameters as in Example 1, and then clustered the entire slice spatial domain. Quantitative results showed that this example achieved performance metrics of ARI=0.701 and NMI=0.760, effectively separating the layered structural clusters of the neocortex. Technical performance validation demonstrated that the model successfully distinguished key neuronal layers such as L2 / 3, L4, L5, and L6. Transcriptional features within each layer cluster were highly uniform, interlayer boundaries were clearly discernible, and the expression boundaries of layer-specific marker genes were precisely aligned with the spatial domain segmentation results, without any cross-layer misclassification due to false edge interference.

[0103] Example 4

[0104] Identification of human lymph node germinal centers (GC) and their micro-domain structures:

[0105] A human lymph node tissue slice dataset was used, containing pathologically annotated germinal center (GC) regions and various immune cell subset markers, to validate the model's ability to finely resolve discrete functional substructures. The model configuration employed the aforementioned optimized parameters: a spatial KNN graph was constructed with k=6; the gene co-expression map was constructed based on the Pearson correlation coefficients of 3000 spatially variable genes (SVGs); and the attention pruning threshold was set to the 10th percentile globally, retaining the top-6 neighboring edges of each node. After 500 epochs of training, spatial domain clustering and functional annotation were performed on the entire slice.

[0106] Quantitative evaluation of segmentation performance for the germinal center region showed a Jaccard index of 0.76, an F1 score of 0.86, precision of 0.83, and recall of 0.90, significantly outperforming existing baseline methods. Technical validation demonstrated that the model not only accurately identified the core germinal center region but also successfully isolated a micro-domain structure located at the outer edge of the GC—Cluster 6. This cluster exhibits high IFN-γ expression and T cell dominance, closely matching the immune activation microenvironment surrounding the GC, demonstrating the model's advantages in capturing fine spatial microstructures and the heterogeneity of the immune microenvironment.

[0107] Example 5

[0108] This embodiment also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in Embodiment 1.

[0109] Example 6

[0110] This embodiment also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0111] Example 7

[0112] This embodiment also discloses a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0113] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for analyzing spatial transcriptome data of ex vivo tissues based on graph neural networks, characterized in that, Includes the following steps: Data including spatial location information and gene expression information were obtained from ex vivo biological tissue samples using spatial transcriptome sequencing methods. Gene screening preprocessing was then performed to obtain a set of spatially variant genes. A gene co-expression map is constructed based on the spatially variable gene set, and a point spatial map is constructed based on spatial location k-nearest neighbor information and expression similarity. Based on the encoder performing alternating graph message propagation on the gene co-expression map and the site space map, the latent representation of sites and genes is obtained; During the encoding process, adaptive edge pruning is performed based on the standardized attention weights, while maintaining the connectivity of adjacent edges for each node; The representation is reconstructed from the latent representation of the point using a decoder, and joint optimization is performed using a composite loss. Clustering is performed on the optimized latent representation of points to obtain spatial domain identification results of biological tissues; The process of constructing a gene co-expression map based on the spatially varied gene set, and simultaneously constructing a point spatial map based on the spatial location information, includes: In the spatially variable gene set, the Pearson correlation coefficient between genes is calculated as the edge weight to construct a gene co-expression map; a point spatial map is constructed based on spatial location k-nearest neighbor information and expression similarity. The process of obtaining the latent representations of sites and genes by performing alternating graph message propagation on the gene co-expression map and the site spatial map includes: A cross-encoder is used to alternately stack graph convolutional layers between the gene co-expression map and the point spatial map, enabling bidirectional flow of contextual information between genes and points. A dimension encoder is used to perform attention encoding from the graph attention network to the Transformer convolution, and the attention encoding is embedded and spliced ​​with the pre-embedded obtained from the pre-defined multilayer perceptron to form the final point latent representation. The process of reconstructing the representation from the latent representation of the point using a decoder and performing joint optimization through a composite loss includes: A multilayer perceptron is used as a decoder to reconstruct gene expression from latent vectors at locations; the composite loss consists of expression mean square error loss, inter-gene correlation consistency logic loss, spatial smoothing Laplacian regularization term, contrast alignment loss based on cosine similarity, and deep clustering alignment loss using studentized distribution and KL divergence; end-to-end joint optimization training is performed using the composite loss.

2. The method according to claim 1, characterized in that, The process of obtaining spatially variable gene sets by acquiring data including spatial location and gene expression information from biological tissue samples using spatial transcriptome sequencing, followed by gene screening preprocessing, includes: Library size normalization and logarithmic transformation were performed on the obtained original expression matrix; Moran index and graph Fourier low-frequency energy ratio were calculated on the spatial nearest neighbor graph; the two scores were integrated and sorted using the Borda rank aggregation method, and the top-ranked genes were selected as the set of spatially variable genes.

3. The method according to claim 1, characterized in that, During the encoding process, the process of performing adaptive edge pruning based on the standardized attention weights and maintaining the connectivity of neighboring edges for each node includes: The attention weights of each edge in the point graph are collected, and after standardization by mean and standard deviation, they are activated by the Sigmoid function to obtain sparse and stable attention weights. After each training cycle or a preset number of cycles, low-weight edges are pruned according to the global percentile threshold, and the top preset number of neighboring edges of each node are retained to maintain graph connectivity. The updated edge set is used for the next round of message propagation.

4. The method according to claim 1, characterized in that, The process of clustering the optimized site latent representations to obtain the spatial domain identification results of biological tissues includes: After training is completed, the latent representations of the points are extracted and clustered in the latent space using the Leiden algorithm or deep embedding cluster centers to obtain the spatial domain partitioning results; for multi-slice data, batch effect correction and joint partitioning are directly completed in a unified latent space.

5. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-4.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-4.

7. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Spatial transcriptome spatial domain identification method and system based on neighbor contrast learning

    CN117976057A

  • Graph convolution spatial domain identification method of fusion gene interaction network and medium

    CN119170111A