Spatial transcriptomics cell type deconvolution method based on generative adversarial network and comparative learning framework

By integrating histological images and spatial location information based on the method of generating adversarial networks and contrast learning frameworks, reconstructing the spatial gene expression matrix and learning the mapping matrix, the problem of difficult to analyze the complex spatial heterogeneity and microenvironment characteristics of cells in the prior art is solved, and the accurate analysis of cell type gene expression characteristics and spatial distribution is achieved and the effect of integrating histological images and spatial transcriptome data is achieved.

CN119724362APending Publication Date: 2025-03-28QUFU NORMAL UNIV
View PDF 0 Cites 9 Cited by

Patent Information

Application Number
CN202411840249.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art is difficult to comprehensively analyze the complex spatial heterogeneity and microenvironment characteristics of cells in multicellular organisms, and it is impossible to effectively integrate histological images and spatial transcriptome data, resulting in one-sided analysis of the intrinsic relationship between gene expression and tissue structure.

Method used

Using a method based on a generative adversarial network and a contrast learning framework, the scRNA-seq and ST data are preprocessed, histological images and spatial position information are integrated, spatial gene expression matrix is ​​reconstructed, and mapping matrix is ​​learned to achieve cell type deconvolution.

Benefits of technology

Accurate analysis of cell type gene expression characteristics and spatial distribution are realized, precise analysis of spatial heterogeneity and microenvironment characteristics is enhanced, and histological images and spatial transcriptome data are effectively integrated, revealing the intrinsic relationship between gene expression and tissue structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119724362A_ABST
    Figure CN119724362A_ABST
Patent Text Reader

Abstract

The invention discloses a space transcriptomics cell type deconvolution method based on a generative adversarial network and a comparative learning framework. The method comprises the following steps: firstly, enhancing a gene expression matrix by using a histological image and spatial position information; then, in combination with GraphSAGE and self-supervised comparative learning, optimizing feature representation of space transcriptomics data, and reconstructing high-quality space gene expression data; single-cell RNA sequencing data gene expression features are extracted by using a variational automatic encoder, and meanwhile, the quality of a generated sample is optimized by using a discriminator, so that efficient feature extraction and accurate gene expression reconstruction are realized; and finally, mapping single-cell RNA sequencing data into spatial points through comparative learning and mapping matrix learning based on low-rank representation, thereby predicting the cell type of each point. According to the model, multi-modal information in single-cell RNA sequencing and space transcriptomics data is comprehensively considered, and a mapping matrix is constructed and optimized, so that the cell type of each space point is predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention designs a spatial transcriptomics cell type deconvolution method based on a generative adversarial network and a contrastive learning framework, and relates to the field of bioinformatics spatial transcriptomics. Background Art

[0002] In multicellular organisms, tissues are complex systems composed of diverse cell types, which are orderly combined according to specific spatial arrangements and structures to form units that perform specialized physiological functions. Each cell type not only has unique morphological and molecular characteristics, but also occupies a precise position in the tissue. This position is not random, but the result of long-term evolutionary optimization to ensure that they can effectively cooperate with other cells to maintain the normal operation of the tissue. Therefore, in multicellular organisms, the function and structure of a tissue are closely related, relying on the precise spatial layout of different cell types and their highly coordinated cooperation. This complex organizational architecture enables organisms to cope with various internal and external environmental changes and achieve efficient life activities.

[0003] Traditional gene expression analysis methods, such as bulk RNA sequencing (bulk RNA-seq) and single-cell RNA sequencing (scRNA-seq), have played an indispensable role in analyzing gene expression patterns. However, each method has its inherent limitations, which restrict their comprehensive understanding of the complex spatial heterogeneity of cells within tissues. Bulk RNA-seq is a transcriptome sequencing method that extracts mixed RNA from tissues, organs or a group of cells for sequencing. The average data of the transcriptome of a group of cells is obtained, which can only provide the average expression level of the cell group, masking the subtle differences between individual cells and failing to capture the differences between single cells. In contrast, scRNA-seq significantly improves the depth of understanding of cell individuality and diversity. By dissociating tissues into single-cell suspensions and sequencing them separately, the gene expression profile of single cells can be revealed, but this high resolution comes at the expense of spatial information. In the process of dissociating tissues into single-cell suspensions, the spatial position of the original cells and their relationship with neighboring cells are destroyed, resulting in the loss of crucial contextual information. Therefore, none of these methods can fully reflect the complex spatial heterogeneity of cells within tissues.

[0004] In order to overcome the limitations of the above methods, the emerging spatial transcriptomics (ST) technology has emerged in recent years. Spatial transcriptomics can not only capture the gene expression of cells in tissues, but also retain spatial location information, thus providing a powerful tool for analyzing the relationship between cell types and tissue functions. However, although spatial transcriptomics has brought unprecedented insights, it also faces a series of challenges. ST data usually contain mixed expression signals of multiple cell types, which makes it still a major challenge for current research to accurately analyze the gene expression characteristics of each cell type and reveal its spatial distribution.

[0005] There are three main computational models currently used for spatial transcriptomics cell type deconvolution: probability modeling-based methods, regression-based methods, and deep learning methods. Although existing methods have achieved excellent prediction performance, they still have the following defects:

[0006] (1) The spatial resolution of many current spatial transcriptomics technologies is low, and one spatial point usually contains multiple cell types, resulting in signal confounding. The current spatial transcriptomics cell-level deconvolution methods for single-cell resolution are still insufficient, which restricts the precise analysis of spatial heterogeneity and microenvironmental characteristics.

[0007] (2) Although gene expression data plays an important role in cell type identification, many existing methods rely mainly on gene expression data and fail to fully integrate spatial location information. Spatial location information is crucial for revealing cell-cell interactions, tissue structure, and microenvironmental characteristics. Ignoring this dimension may lead to a one-sided interpretation of spatial transcriptomics data and make it difficult to capture complex spatial organizational patterns.

[0008] (3) Histological images provide important information about tissue structure, cell morphology, and spatial distribution. However, there are currently few methods that can effectively integrate histological images with spatial transcriptome data, thus failing to fully reveal the intrinsic relationship between gene expression and tissue structure. Summary of the invention

[0009] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides a spatial transcriptomics cell type deconvolution method based on a generative adversarial network and a contrastive learning framework.

[0010] In order to achieve the above objectives, the present invention mainly includes four modules, namely, scRNA-seq data and ST data preprocessing module, spatial gene expression matrix reconstruction module, single cell gene expression matrix reconstruction module, and mapping matrix learning and deconvolution module. It mainly includes the following steps:

[0011] (1) In the data preprocessing stage, a series of steps were implemented on the scRNA-seq gene expression data and ST gene expression data, including gene filtering, normalization, logarithmic transformation, high variable gene screening, and data scaling.

[0012] (2) For ST gene expression data, the gene expression matrix is ​​enhanced by integrating histological images and spatial location information to obtain an enhanced gene expression matrix. GraphSAGE extracts features from the original gene expression matrix and the enhanced gene expression matrix, while the self-supervised contrastive learning mechanism captures the local spatial context to obtain a high-quality reconstructed spatial gene expression matrix.

[0013] (3) Based on scRNA-seq data, a generative adversarial network based on a variational autoencoder is used to capture the potential structure and heterogeneity of single-cell data, learn the latent representation of gene expression and reconstruct the cellular gene expression matrix;

[0014] (4) By learning two low-rank matrices, using regularization constraints to maintain the low-rank structure, constructing a mapping matrix, and using contrastive learning to align the predicted and reconstructed spatial gene expressions;

[0015] (5) Based on the mapping matrix and the cell type matrix in the scRNA-seq data, the probability distribution of different cell types in each spatial point is calculated. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is the overall flow chart of the present invention;

[0017] Figure 2 The spatial gene expression matrix reconstruction flow chart of the present invention;

[0018] Figure 3 The single cell gene expression matrix reconstruction flow chart of the present invention;

[0019] Figure 4 This is a flowchart of mapping matrix learning of the present invention. DETAILED DESCRIPTION

[0020] The present invention is a spatial transcriptomics cell type deconvolution method based on a generative adversarial network and a contrastive learning framework. The specific implementation process of the present invention will be described in detail below in conjunction with the accompanying drawings.

[0021] like Figure 1As shown, the present invention provides a spatial transcriptomics cell type deconvolution method based on a generative adversarial network and a contrastive learning framework, which mainly includes four modules, namely, a scRNA-seq data and ST data preprocessing module, a spatial gene expression matrix reconstruction module, a single cell gene expression matrix reconstruction module, and a mapping matrix learning and deconvolution module. Each link is described in detail below.

[0022] 1. Preprocessing of scRNA-seq data and ST data:

[0023] 1.1: This paper uses two datasets: human lymph node and human dorsolateral prefrontal lobe. The spatial transcriptomics data of human lymph node data contains 4035 spatial points and 36588 genes, and the corresponding scRNA-seq data contains 73260 cells and 10237 genes, and 34 cell types are annotated; 151673 slices were selected for human dorsolateral prefrontal lobe data, and its spatial transcriptomics data contains 3639 spatial points and 33538 genes, and the corresponding scRNA-seq data contains 78886 cells and 30062 genes, and 33 cell types are annotated.

[0024] 1.2: There is a lot of technical and biological noise in scRNA-seq data and ST data. To reduce noise interference, we first filtered out genes expressed in less than 10% of cells; then logarithmically transformed the raw gene expression data using the SCANPY package and normalized according to the library size; then screened highly variable genes and extracted biologically meaningful features; finally, the data was scaled with zero mean and unit variance.

[0025] 1.3: To ensure the consistency and reliability of feature information in scRNA-seq and ST data, overlapping genes in the two datasets were selected.

[0026] 2. Spatial gene expression matrix reconstruction Figure 2 As shown:

[0027] 2.1: Using the spatial location information embedded in the ST data, construct an undirected neighbor graph ,in represents a set of spatial points, Represents the spatial adjacency relationship between nodes.

[0028] 2.2: Calculate the Euclidean distance between all points. For each point , sorted its distances to all other points, and selected the three closest points As its neighbor.

[0029] If the point Yes The neighbors of The corresponding edges in are set to 1, otherwise they are 0; the adjacency matrix is ​​symmetric, that is, .

[0030] 2.3: According to the coordinates of each point, the histological image in the ST data is segmented and the corresponding local area image is extracted. Then, the pre-trained deep neural network model ResNet50 is used to extract features from the hematoxylin-eosin stained image. Finally, the cosine distance is used to calculate the point Its adjacent points Histological similarity weight :

[0031]

[0032] in and Indicate point and Point histological characteristics.

[0033] 2.4: Considering that spatially adjacent cells or regions usually show similar gene expression patterns, the gene expression similarity between each point is further calculated:

[0034]

[0035] in and Indicate point and Point Gene expression vectors, and Represents the average gene expression value of the corresponding point.

[0036] 2.5: Enhance the gene expression profile of each spatial point by integrating histological images and spatial location information:

[0037]

[0038] 2.6: The GraphSAGE-based encoder aims to learn node representations from the original gene expression matrix and the enhanced gene expression matrix.

[0039] The encoder normalizes the gene expression matrix and its neighbor graph As input, features are extracted through two layers of GraphSAGE, where the first layer aggregates node features from the neighborhood graph and the second layer captures high-order relational information, finally generating an embedded representation:

[0040]

[0041] in Indicates Layer Node Embedded, Representation Node The adjacent nodes of is a learnable weight matrix, is the aggregation function for the features of a node and its neighbors. The encoder supports multiple aggregation methods:

[0042] (1) Average aggregation:

[0043] (2) Maximum aggregation:

[0044] (3) Attention mechanism aggregation:

[0045]

[0046] 2.7: The task of the decoder is to generate the embedding representation from the encoder To reconstruct the original gene expression matrix :

[0047]

[0048] in, represents the reconstructed gene expression matrix, is the mapping function of the decoder. In addition, the mean square error loss is used to constrain the reconstruction of the input features, further ensuring the ability to preserve the original data features:

[0049]

[0050] in and They are points of original gene expression and reconstructed gene expression.

[0051] 2.8: Self-supervised contrastive learning is introduced to construct positive and negative sample pairs, where the positive sample pairs are composed of the feature representation of spatially neighboring points and their local neighborhood context representation, capturing the inherent spatial consistency; the negative samples are constructed by enhancing the feature representation of points in the graph with the same local neighborhood context representation, highlighting the difference with the real spatial background.

[0052] The goal of self-supervised contrastive learning is to ensure that positive pairs exhibit maximum similarity, while negative pairs maintain minimum similarity, thereby encouraging spatially adjacent nodes to exhibit similar representations and non-adjacent nodes to have different representations:

[0053]

[0054]

[0055]

[0056] in Is a discriminator module used to distinguish positive sample pairs from negative sample pairs. Calculate the enhanced image contrast loss:

[0057]

[0058]

[0059]

[0060] 2.9: Training ST data requires minimizing reconstruction error and contrast loss:

[0061]

[0062] 3. Single-cell gene expression matrix reconstruction Figure 3 As shown:

[0063] 3.1: Encoder of Variational Autoencoder The preprocessed single-cell gene expression matrix Parameters mapped to Gaussian distribution , and use the reparameterization technique to obtain the latent variables :

[0064]

[0065] in and denote the mean and standard deviation of the underlying distribution, respectively.

[0066] 3.2: Decoder of Variational Autoencoder According to the latent variable Generate reconstruction samples :

[0067]

[0068] The training loss of a variational autoencoder consists of the reconstruction loss and the Kullback-Leibler (KL) divergence between the learned distribution and the prior distribution:

[0069]

[0070]

[0071]

[0072] 3.3: Apply the discriminator to distinguish real data and the reconstructed data generated by the variational autoencoder , the discriminator output and The discriminator distinguishes between real data and generated data through binary cross entropy loss:

[0073]

[0074] 3.4: The discriminator is trained by optimizing its own loss function, while the variational autoencoder incorporates the discriminator’s feedback in the process of optimizing its objective, thereby improving the quality of generated samples:

[0075]

[0076] 4. Mapping matrix learning and deconvolution Figure 4 As shown:

[0077] 4.1: Learning two low-rank matrices and , through matrix multiplication Constructing the mapping matrix .

[0078] 4.2: In order to prevent overfitting and improve generalization ability, regularization constraints are introduced on the low-rank matrix:

[0079]

[0080] 4.3: Mapping Matrix For projecting single cell embeddings , generating spatial embeddings :

[0081]

[0082] 4.4: Mean squared error loss is used to minimize the reconstructed gene expression data and the predicted gene expression data:

[0083]

[0084] 4.5: Introducing contrastive learning mechanism to better capture and distinguish different spatial gene expression patterns:

[0085]

[0086] in Indicate point Predicted gene expression vector, Indicate point Reconstructed gene expression vector, is the temperature parameter.

[0087] 4.6: Combining reconstruction loss and contrast loss to maintain data structure while emphasizing spatial neighborhood relationships, thereby enhancing the ability to capture the mapping between cells and spatial points:

[0088]

[0089] 4.7: Construct a one-hot encoded cell type matrix based on the cell type labels in the scRNA-seq data .

[0090] 4.8: Using the Mapping Matrix Cell type matrix with one-hot encoding , the probability distribution of different cell types at each spatial point through matrix multiplication : .

[0091] To avoid the influence of low-scoring spatial points, we empirically retained the top 15% of cell scores in each spatial point and set the rest of the scores to 0.

Claims

1. The present invention discloses a spatial transcriptomics cell type deconvolution method based on a generative adversarial network and a contrastive learning framework, characterized in that the following step: Step 1: Preprocess the single-cell RNA sequencing data and spatial transcriptomics data, construct a spatial neighbor graph of the spatial transcriptomics data, enhance the spatial transcriptomics gene expression matrix by combining histological images and spatial location information, and obtain the enhanced spatial gene expression matrix; Step 2: Based on the spatial transcriptomics data, GraphSAGE extracts features from the original gene expression matrix and the enhanced gene expression matrix, while the self-supervised contrastive learning mechanism captures the local spatial context to obtain a high-quality reconstructed spatial gene expression matrix; Step 3: Based on the single-cell RNA sequencing data, a generative adversarial network based on a variational autoencoder is used to capture the potential structure and heterogeneity of single-cell data, learn the potential representation of gene expression and reconstruct the cell gene expression matrix; Step 4: By learning two low-rank matrices, using regularization constraints to maintain the low-rank structure, constructing a mapping matrix, and using contrastive learning to align the predicted and reconstructed spatial gene expressions; Step 5: Based on the mapping matrix and the cell type matrix in the single-cell RNA sequencing data, the probability distribution of different cell types in each spatial point is calculated.

2. The spatial transcriptomics cell type deconvolution method based on generative adversarial network and contrastive learning framework according to claim 1, characterized in that: In step 1: Step 1.1: Construct the graph structure of spatial transcriptomics data, convert the spatial location information into an undirected neighbor graph, and determine the spatial proximity; Step 1.2: The pre-trained deep neural network ResNet50 was used to extract histological image features, and the original gene expression of each point was enhanced by combining gene expression similarity, histological similarity and spatial proximity to obtain the enhanced spatial gene expression matrix.

3. The spatial transcriptomics cell type deconvolution method based on generative adversarial network and contrastive learning framework according to claim 1, characterized in that: In step 2: Step 2.1: Based on the preprocessed spatial transcriptomics gene expression data and the enhanced spatial transcriptomics gene expression data, the input data is processed through the first GraphSAGE layer, the neighbor information is aggregated, and the preliminary node embedding representation is output; Step 2.2: Pass each preliminary node embedding representation to the second GraphSAGE layer to further refine the features and generate the final node embedding representation; Step 2.3: Calculate the scores of positive sample pairs and negative sample pairs through the discriminator, use the contrast loss function to measure the accuracy of the discriminator's prediction, and provide a supervision signal for the model; Step 2.4: The final node embedding representation is mapped back to the original spatial gene expression matrix through the decoder, thereby reconstructing high-quality spatial gene expression data.

4. The spatial transcriptomics cell type deconvolution method based on generative adversarial network and contrastive learning framework according to claim 1, characterized in that: In step 3: Step 3.1: Based on the preprocessed single-cell gene expression data, the encoder in the variational autoencoder is used to map the input data to the mean and variance in the latent space, and the latent variables are generated by sampling from the latent distribution through the reparameterization technique; Step 3.2: Input the latent variables into the decoder of the variational autoencoder to generate reconstructed single-cell gene expression data; Step 3.3: Train the discriminator in the generative adversarial network to distinguish between real and reconstructed single-cell data.

5. The spatial transcriptomics cell type deconvolution method based on generative adversarial network and contrastive learning framework according to claim 1, characterized in that: In step 4: Step 4.1: Initialize two low-rank matrices and use the L2 regularization term of the Frobenius norm to prevent overfitting; Step 4.2: The mapping matrix is ​​obtained by multiplying two low-rank matrices, and the single-cell RNA data is projected into space using the mapping matrix to generate predicted spatial gene expression; Step 4.3: Use contrastive learning method to align the predicted spatial gene expression with the reconstructed spatial gene expression, and optimize the mapping matrix by minimizing the difference between the predicted spatial gene expression and the reconstructed spatial gene expression.

6. The spatial transcriptomics cell type deconvolution method based on generative adversarial network and contrastive learning framework according to claim 1, characterized in that: In step 5: Step 5.1: Construct a one-hot encoded cell type matrix based on the cell type labels in the single-cell RNA data; Step 5.2: Using the mapping matrix and the one-hot encoded cell type matrix, calculate the cell type composition of each spatial point by matrix multiplication, and normalize the result so that the sum of the cell type probability distribution at each spatial point is 1.

Citation Information

Cited By

  • Spatial transcriptome data clustering method based on progressive learning and multi-modal fusion

    CN120256988A

  • Function unit prediction model construction method, prediction method, device and electronic equipment

    CN120431990A

  • Spatial domain identification method based on data interpolation and cell type deconvolution

    CN120748500A

  • Empty transgene expression filling method based on conditional variation auto-encoder

    CN120913643A

  • Cell type annotation method and annotation system

    CN120932748A