A spatial transcriptome imputation method based on tensor chain decomposition
By using tensor chain decomposition and protein-protein interaction network to generate Cartesian product graphs, the problem of difficulty in determining rank and parameter explosion in existing technologies is solved. This method enables efficient and accurate spatial transcriptome gene expression matrix interpolation, improving the reliability of gene analysis and data support for disease mechanism research.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-16
Smart Images

Figure CN122224286A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of bioinformatics, specifically a spatial transcriptome interpolation method based on tensor chain decomposition. Background Technology
[0002] Genes are functional segments of deoxyribonucleic acid (DNA) molecules that carry genetic information and are the basic units of heredity controlling biological traits. Genes follow the central dogma of genetics when transmitting genetic information: DNA transmits genetic information to itself for self-replication, or DNA transcribes genetic information into messenger RNA (messenger RNA), which then translates the information into polypeptides. The process of DNA transcribing genetic information into messenger RNA and translating it into polypeptides is called gene expression. Gene expression data contains genetic information, representing the abundance of messenger RNA, the product of indirect or direct transcription, and reflecting the physiological state of cells. Analyzing gene expression data helps to understand the corresponding gene expression regulation information and gene-related functional information, thereby revealing the mechanisms of disease development. This data can be organized into a gene expression matrix with spatial coordinates. Rows represent spatial sites / cells (a spatial site is a small region that may contain one or more cells), the first two columns of each row represent the x, y coordinates of the spatial site / cell, and the subsequent columns represent genes. Matrix elements represent gene expression values.
[0003] Gene expression data can be obtained through transcriptome sequencing technology. Transcriptome sequencing, using high-throughput sequencing, analyzes the expression levels of messenger RNA, providing technical support for further investigation of differential gene expression in different cell types. Despite continuous technological advancements, gene expression matrices still contain a large number of zero values. This stems primarily from two aspects: firstly, the technology itself can only cover a portion of genes; secondly, even within the detection range, significant signal loss occurs due to issues such as molecular capture efficiency. These zero values can be categorized into two types: biological zeros and non-biological zeros. Biological zeros, also known as "true zeros," refer to cells lacking the corresponding gene transcriptome or messenger RNA, indicating the absence of gene expression in a specific cell type. Biological zeros represent cells with specific expression in a real cell type; the presence of biological zeros contributes to cell type diversity because different cell types exhibit different gene expressions. Non-biological zeros, also known as pseudo-zeros, arise from technological limitations that prevent the measurement of true gene expression levels. Non-biological zeros may mask underlying biological relationships in gene expression, thereby disrupting potential biological signals and reducing the reliability of downstream analyses such as gene enrichment analysis, differential gene expression, and trajectory inference. Therefore, accurate imputation of gene expression matrices to restore complete and reliable data is crucial for in-depth exploration of gene function, interaction networks, and their mechanisms of action under specific physiological and pathological conditions.
[0004] Research on imputation of spatial transcriptome gene expression matrices is constantly evolving, from initially focusing solely on sparse gene expression matrices, to attempts to integrate single-cell data for enhancement, and more recently, strategies incorporating protein-protein interaction networks, significantly improving model imputation performance. However, existing models still have inherent limitations in tensor decomposition strategies, hindering further performance improvements. The first method to introduce protein-protein interaction networks into the imputation task employed a graph regularized tensor completion framework, fitting gene expression tensors through canonical tensor decomposition. However, the optimal rank of canonical tensor decomposition is difficult to determine, leading to uncertainty in capturing the intrinsic structure of the data and affecting the robustness of imputation. Subsequent improved methods introduced neural networks to fit factor matrices, attempting to reveal the complex nonlinear interactions within the tensor, but their essence remains limited by the canonical correlation decomposition framework, failing to fundamentally solve the problem of rank selection difficulty. Building on this, some studies have replaced typical tensor decomposition with the more flexible Tucker decomposition, where each factor matrix can have a different rank, thus improving flexibility. However, the number of parameters in Tucker decomposition increases exponentially with the tensor dimension, which can easily lead to the curse of dimensionality and poses a serious computational and storage bottleneck when processing high-dimensional transcriptome data.
[0005] In summary, existing methods for integrating protein-protein interaction networks suffer from problems such as difficulty in determining the rank or parameter explosion in the selection of decomposition models, making it difficult to achieve accurate imputation while ensuring expressive power and computational efficiency. Summary of the Invention
[0006] This invention provides a spatial transcriptome imputation method based on tensor chain decomposition, which solves the problems of difficulty in determining the rank or parameter explosion in the selection of decomposition models in existing methods of fusion protein-protein interaction networks, making it difficult to achieve accurate imputation while ensuring expression capacity and computational efficiency.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A spatial transcriptome imputation method based on tensor chain decomposition includes: Obtain the gene expression matrix and perform preprocessing; The preprocessed gene expression matrix is input into the trained tensor chain decomposition spatial transcriptome imputation model, and the imputation results are output. The training method for the spatial transcriptome interpolation model of tensor chain decomposition is as follows: The gene expression matrix is obtained and preprocessed to transform it into a three-dimensional tensor, wherein the gene expression matrix contains integer position coordinates. The three-dimensional tensor was reconstructed using tensor chain decomposition to obtain the reconstructed gene expression tensor; A Cartesian product graph is constructed by generating a spatial graph based on a gene expression matrix with integer position coordinates and combining it with a gene graph generated by a protein-protein interaction network. Construct a total loss function that includes reconstruction loss and graph regularization term loss, and iteratively update the model parameters through an adaptive moment estimator until convergence.
[0008] Preferably, the three-dimensional tensor has three-dimensional indices corresponding to the x-coordinate and y-coordinate of the gene and the spatial site / cell, respectively. The three-dimensional tensor is composed of several gene slices stacked together, and each gene slice contains several spatial sites / cells.
[0009] Preferably, the step of reconstructing the three-dimensional tensor using tensor chain decomposition to obtain the reconstructed gene expression tensor specifically includes: Tensor chain decomposition is used to reconstruct the three-dimensional tensor to obtain the reconstructed gene expression tensor. Specifically, this includes: inputting the index position coordinates of each dimension of the three-dimensional tensor; performing nonlinear mapping on the individual index position coordinates of each dimension using a multilayer perceptron to generate column vectors for the corresponding dimensions; concatenating the generated column vectors column by column to form an index matrix; reshaping the shape of the index matrix to obtain three kernel tensors; extracting the corresponding slice matrices from the kernel tensors and performing matrix multiplication; and combining the results with a linear rectified function to obtain the reconstructed gene expression tensor. The multilayer perceptron adopts a 4-layer network structure. The first 3 layers all include linear mapping transformation and nonlinear transformation of activation function, while the last layer only contains linear mapping transformation. The activation function is a sine function.
[0010] Preferably, the steps of generating a spatial graph based on a gene expression matrix with integer position coordinates and constructing a Cartesian product graph by combining it with a gene graph generated from a protein-protein interaction network are as follows: A Cartesian product graph is constructed by integrating biological prior information from the gene expression matrix. This prior information includes spatial location / cell position information, pattern information, and gene function information. Specifically, this includes: generating a spatial location map and a gene pattern map based on the position and pattern information; integrating the spatial location map and gene pattern map to obtain a spatial map; generating a gene map based on gene function information in the protein-protein interaction network; and performing a Cartesian product operation on the spatial map and the gene map to obtain the Cartesian product graph, where each node of the Cartesian product graph corresponds one-to-one with an element in the reconstructed gene expression tensor.
[0011] Preferably, the reconstruction loss introduces a masking mechanism, focusing only on the observed elements in the tensor, and calculating the mean square error between the observed gene expression values at these positions and the predicted tensor element values. When the observed gene expression value is not 0, the masked tensor element is set to 1; otherwise, it is set to 0.
[0012] Preferably, the graph regularization loss is used to make the expression values of adjacent nodes similar, thereby enhancing the biological rationality of the model, where the adjacent nodes are biological prior neighbors.
[0013] Compared with existing technologies, the present invention has the following advantages: The present invention provides a spatial transcriptome imputation method based on tensor chain decomposition. It uses tensor chain decomposition to reconstruct gene expression tensors, avoiding the rank uncertainty of typical tensor decomposition and the curse of dimensionality of Tucker decomposition. It generates a spatial graph based on gene expression matrices with integer position coordinates and constructs a Cartesian product graph by combining gene graphs generated by protein-protein interaction networks. It trains the total loss function of reconstruction loss and graph regularization loss, improves imputation reliability, effectively restores the true gene expression levels corresponding to non-biological zeros, reduces signal loss caused by technical limitations, ensures the credibility of downstream gene analysis, and provides reliable data support for exploring gene function and revealing disease mechanisms.
[0014] Furthermore, introducing tensor chain decomposition to replace the traditional tensor decomposition structure can effectively overcome the bottlenecks of existing methods in terms of parameter size and rank selection. While typical tensor decompositions have fewer parameters, selecting the optimal rank is extremely difficult; Tucker decomposition, although allowing different ranks for each dimension and offering high flexibility, suffers from an exponential increase in the number of parameters with the tensor dimension, easily leading to the curse of dimensionality. NTTD-BPI uses tensor chain decomposition to decompose high-dimensional tensors into a series of low-rank three-dimensional kernel tensors, effectively avoiding the curse of dimensionality. Simultaneously, the optimal rank can be selected based on the rank of the expansion matrix, making it easier to find the optimal rank compared to CP decomposition.
[0015] Furthermore, by incorporating nonlinear mappings from neural networks, the limitations of linear tensor decomposition are overcome. Traditional tensor chain decomposition models assume a multilinear relationship between tensor element values and their corresponding slice matrices. However, tensors in the real world often exhibit more complex interactions than multilinear relationships. Therefore, a multilayer perceptron is introduced to fit the slice matrices, revealing the complex interactions within the tensors.
[0016] Furthermore, a multilayer perceptron-based index mapping mechanism is employed for local feature modeling to accurately capture local specific features. Unlike global modeling methods that process the entire dimensional index at once, each dimension's individual index is mapped independently, directly generating the corresponding local slice matrix. This generation method enables the model to flexibly learn specific expression patterns of different spatial locations or genes. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a spatial transcriptome interpolation method based on tensor chain decomposition according to an embodiment of the present invention; Figure 2 This is a training framework diagram of the spatial transcriptome imputation model of tensor chain decomposition according to an embodiment of the present invention; Detailed Implementation To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0019] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0020] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0021] In this invention, there are some concepts that require additional explanation, as follows.
[0022] Concept Explanation: Cartesian product graphs are an important form of product graph in graph theory, where two graphs are combined to form a new graph. For graphs... ,in For a set of nodes, Let edge set be the adjacency matrix. When nodes are adjacent, Cumulative plot node set For two connection graphs and The Cartesian product of a set of nodes, i.e. The edges are determined based on adjacent nodes. Two nodes and The rule for adjacent is: when and or and Then the node and Adjacent. Their adjacency matrix can be represented by the Kronecker sum as: ,in For Kronecker product, It is an identity matrix.
[0023] Tensor chain decomposition is a novel decomposition method for high-dimensional tensors. Traditional methods such as Tucker decomposition suffer from the curse of dimensionality when dealing with high-dimensional tensors, where the number of parameters increases exponentially with the tensor's dimension. This method decomposes high-dimensional tensors into a series of low-rank three-dimensional kernel tensors, effectively avoiding the curse of dimensionality.
[0024] Multi-Layer Perceptron (MLP) is a basic feedforward neural network structure and belongs to the category of supervised learning models. It consists of an input layer, several hidden layers, and an output layer. The layers are connected in a fully connected manner (i.e., each neuron in one layer is connected to all neurons in the next layer), enabling it to learn the non-linear mapping relationship between input and output.
[0025] Protein-Protein Interaction Network (PPI network): Each node typically represents a protein functional unit corresponding to a gene, and the edges represent direct interactions between proteins. It systematically describes their roles in life processes such as signal transduction, gene regulation, metabolism, and cell cycle.
[0026] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0027] like Figure 1 As shown, this invention provides a spatial transcriptome interpolation method based on tensor chain decomposition, comprising: S1: Obtain the gene expression matrix and perform preprocessing; S2: Input the preprocessed gene expression matrix into the trained tensor chain decomposition spatial transcriptome imputation model and output the imputation results; The training method for the spatial transcriptome interpolation model of tensor chain decomposition is as follows: The gene expression matrix is obtained and preprocessed to transform it into a three-dimensional tensor, wherein the gene expression matrix contains integer position coordinates. The three-dimensional tensor was reconstructed using tensor chain decomposition to obtain the reconstructed gene expression tensor; A Cartesian product graph is constructed by generating a spatial graph based on a gene expression matrix with integer position coordinates and combining it with a gene graph generated by a protein-protein interaction network. Construct a total loss function that includes reconstruction loss and graph regularization term loss, and iteratively update the model parameters through an adaptive moment estimator until convergence.
[0028] Tensor chain decomposition is used to reconstruct gene expression tensors, eliminating the need for complex rank determination and avoiding the rank uncertainty of typical tensor decomposition and the curse of dimensionality of Tucker decomposition. A spatial graph is generated based on the gene expression matrix with integer position coordinates, and a Cartesian product graph is constructed by combining it with the gene graph generated by the protein-protein interaction network. The total loss function of reconstruction loss and graph regularization loss is trained to improve the reliability of imputation, effectively recover the true gene expression levels corresponding to non-biological zeros, reduce signal loss caused by technical limitations, ensure the credibility of downstream analysis, and provide reliable data support for exploring gene function and revealing the mechanism of disease.
[0029] Detailed training process as follows Figure 2 As shown, specifically: (1) Gene expression tensor reconstruction At high spatial resolutions, especially when dealing with millions of spatial sites, computing or storing a dense tensor is computationally expensive and often impractical. Therefore, the goal of this application is to extract data from sparse gene expression tensors. Learning a complete tensor We use a more flexible tensor chain decomposition to reconstruct tensors.
[0030] However, the tensor chain decomposition model assumes a multilinear relationship between tensor elements and their corresponding slice matrices. In the real world, tensors often have more complex interactions than multilinear relationships. Therefore, a multilayer perceptron (MLP) is further introduced to fit the slice matrices and reveal the complex interactions within the tensors.
[0031] First, the gene expression matrix containing integer position coordinates is... Transform into a three-dimensional tensor , Each tensor element in the matrix corresponds to a gene expression matrix. Each value corresponds to an index in its three dimensions, which in turn correspond to the x-coordinate and y-coordinate of the gene, spatial location / cell, respectively. This can be... See as It is composed of stacked gene slices, each gene slice containing Each spatial site / cell is identified. The indices of each dimension of the tensor are then obtained, and an index matrix is generated using an MLP. The shape of the index matrix is reshaped to obtain three kernel tensors. Finally, specific slice matrices are extracted and multiplied to predict target tensor elements. To ensure the reconstructed expression values are biologically meaningful (non-negative), a linear rectified function is applied after the tensor chain decomposition output.
[0032] Specifically, the input tensor has three index coordinates in three dimensions. , , , Then input the coordinates into the MLP respectively. This will result in a column vector of the corresponding dimensions. Specifically, the index... , , Input them into the corresponding MLPs to obtain column vectors of the corresponding dimensions: Input get ;enter ,get ;enter ,get As shown in the formula below:
[0033]
[0034]
[0035] In the formula, the dimensions of each weight matrix are defined as follows: , , , , , , , , , , , . These are the hyperparameters corresponding to the TT decomposition. In the experiment, . For the activation function, this application selects the sine function. A four-layer neural network is set up. The first three layers are transformed by a linear mapping and then transformed by an activation function to introduce nonlinear characteristics and enhance the expressive power of the model. The last layer only has a linear transformation.
[0036] Total indivual coordinate, indivual coordinate, indivual Coordinates, traverse all possible indices, concatenate the resulting vectors column-wise to form three index matrices. , , By reshaping the shape of these matrices, the three kernel tensors required for tensor chain decomposition can be obtained: , , For a given index position coordinate The corresponding slice matrix is extracted from the kernel tensor. The slice matrix is essentially constructed from the column vectors mentioned earlier. As ,Bundle After changing the shape, it is regarded as ,Bundle As The predicted element can be obtained by multiplying the three slice matrices together. ( ) ,in This indicates reshaping the shape row by row. To ensure that the reconstructed gene expression values are biologically meaningful (non-negative), a linear rectified function is applied after the tensor chain decomposition predictions. The tensor chain decomposition formula is as follows:
[0037] in, Represents the kernel tensor The d-th slice matrix, , , , , For tensor The number of element values.
[0038] The model learns by minimizing the mean squared error between the observed and predicted values. The reconstruction loss is defined as:
[0039] in This represents the masking tensor element, indicating when the observed gene expression value is not 0. Otherwise, it is 0.
[0040] (2) Construction of Cartesian product graph To fully utilize the biological prior information (including three types of information: spatial site / cell location information, pattern information, and gene function information) contained in spatial transcriptomics data, spatial location maps and gene pattern maps are first generated based on gene expression matrices with spatial location coordinates using spatial site / cell location information and pattern information. Then, the information from the spatial location maps and gene pattern maps is fused to form a spatial map. Then, using the Cartesian product, we can apply it to the spatial graph. and gene map (Gene function information) Constructing a Cartesian product diagram At this point, the nodes in the Cartesian product graph are related to the gene expression matrix. The values in the table correspond one-to-one, and adjacent nodes reflect the complex connections between spatial sites / cells and genes.
[0041] 1) Spatial maps and gene maps Based on integer position coordinates ( Gene expression matrix Generate spatial map . It consists of two parts: the spatial location coordinate matrix P and the gene expression matrix. .in , indicating that there is Linear spatial sites / cells, Column position coordinates, , indicating that there is Linear spatial sites / cells, Genes listed. Gene expression matrix. Each row of spatial site / cell vectors in the data can be represented as: , Each column of gene vectors can be represented as: , Spatial location maps and gene pattern maps are generated using location and pattern information. Location information refers to the similarity in expression between a spatial site / cell and its nearest surrounding spatial sites / cells (represented by spatial site / cell vectors). and (The Pearson correlation coefficient is very high), which can determine the corresponding location neighbors based on location information. For example... Figure 1 The data presented is from Visium. A spatial locus has six nearest spatial loci; these six are its location neighbors. Pattern information refers to the fact that a spatial locus / cell, besides sharing similarities in expression with its nearest surrounding spatial loci / cells, may also share similarities with spatially more distant spatial loci / cells. Pattern information can be used to determine the corresponding pattern neighbors. This application calculates the spatial locus / cell vectors. The Euclidean distance between them is selected, and the one with the smallest Euclidean distance is chosen. Each spatial site / cell serves as a pattern neighbor. These are hyperparameters. The nodes in the spatial location map and gene pattern map are gene expression matrices. In the spatial location / cell graph, the edges are determined based on location neighbors and pattern neighbors, respectively. The spatial location graph and the spatial neighborhood and pattern neighbors from the gene pattern graph are integrated, and their union is taken to form a new spatial graph. At this point, the spatial coordinates of the site / cell are ( ), (For Visium data, the nodes are staggered. To facilitate code execution, the spatial sites / cells in odd or even rows are arranged in a staggered manner.) (Move 1 unit in the direction to align the nodes neatly). The size of the spatial graph is... It is also the number of spatial sites / cells. express Spatial location / cell number in coordinate direction: 78 express Spatial location / cell number in coordinate direction: 64. Let the spatial diagram be... Each node Represents a spatial location / cell. ; Each edge This indicates that the spatial sites / cells are adjacent and have similar expression. If there is an edge between two spatial sites / cells, then define... Otherwise, it is 0. for The adjacency matrix, For degree matrix, .
[0042] Gene map generation based on PPI network This involves generating a gene map using gene function information from a PPI network. Gene function information means that if proteins interact, their corresponding genes should have similar functions and similar expression. The corresponding gene neighbors can be determined based on this gene function information; that is, if proteins are neighbors in the PPI network, their corresponding genes are also neighbors. Let the gene map be... Each node Represents a gene, ; Each edge This indicates that the genes are adjacent and have similar expression. If there is an edge between two genes, define... Otherwise, it is 0. for The adjacency matrix, It is a degree matrix.
[0043] 2) Cartesian product diagram Spatial diagram and gene map Construct Cartesian product graph , for and The Cartesian product of nodes, i.e., the set of Cartesian product nodes, has a total of 1 node The Cartesian product node contains both spatial location / cell and gene nodes. At this point, the node and... The gene expression values in the data correspond one-to-one with the coordinates of the tensor index positions. One-to-one correspondence, , According to respectively , and Generate starting from 0, for example . Let be the edges of the Cartesian product graph. If and only if and ,or and At that time, node and exist In this context, nodes are adjacent, allowing us to construct edges using adjacency relationships. If there is an edge between two nodes, then... Otherwise, it is 0. for The adjacency matrix, , This is the degree matrix. To explain the neighbor relationships between nodes more simply: among all nodes corresponding to a given spatial location / cell, if genes are adjacent, then the nodes are considered adjacent; similarly, among all nodes corresponding to a given gene, if spatial locations / cells are adjacent, then the nodes are considered adjacent. This edge configuration considers not only different spatial location / cell vectors... Neighbor relationships and different gene vectors The neighbor relationships between them can be further considered in terms of individual spatial sites / cell vectors. In the text, the neighbor relationships between different genes and the vectors of each gene are... In this model, the neighbor relationships between different spatial sites / cells can be deeply integrated to understand the complex connections between spatial sites / cells and genes. The core advantage of this approach is that it not only considers the independent relationships between different spatial sites / cells and different genes, but more importantly, it models the interaction between the dimensions of "spatial sites / cells" and "genes": the expression of the same gene should tend to be smooth across different similar spatial sites / cells; within the same spatial site / cell, functionally related genes may also exhibit correlations in their expression. This provides a comprehensive and accurate topological foundation for subsequently introducing graph regularization constraints, thereby improving interpolation accuracy.
[0044] (3) Graph regularization term loss Besides and The mean squared error is used as the reconstruction loss to numerically guarantee the accuracy of interpolation. This application also constructs a graph regularization loss based on biological prior neighbor information to ensure that the values of adjacent nodes are similar, thus achieving... The values of the related elements are similar, thus preserving important biological prior information and making the model easier to imput effectively. This can be achieved by minimizing (4).
[0045]
[0046] in, Represents the Cartesian product diagram adjacency matrix elements, For Kronecker and... And the above equation can also be:
[0047]
[0048]
[0049]
[0050] Therefore, the general graph regularization loss is given as: .in, Cartesian product diagram The graph Laplace matrix, , , If we take Written In this form, then according to Kronecker and the definition, we can further... Expand as ,in and It is the identity matrix. It can be further written as ,in , for The subvectors. When implementing this in code, using a for loop to calculate the graph regularization term consumes too much memory; this application addresses this issue. Rewrite in matrix form ,in Indicates to indivual Row vectors are concatenated row by row to form a matrix.
[0051] Regularization terms of the graph Rewritten in element form, the graph regularization loss is:
[0052] In summary, the total loss of NTTD-BPI can be defined as:
[0053] in, These are hyperparameters used to adjust the effect of prior information on the reconstructed gene expression tensor. The impact; Indicates the occlusion of an element, when When it is not 0, It is 1 if it is true, otherwise it is 0.
[0054] This application uses an adaptive moment estimation optimizer in PyTorch 1.10.2 (PyTorch 1.10.2 is a specific version of the PyTorch deep learning framework) to update all learnable parameters. The initial learning rate is 0.0005. The optimization process automatically calculates the gradient of the loss function with respect to all parameters through the standard backpropagation algorithm and iteratively updates the parameters until convergence.
[0055] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or basic characteristics. Therefore, the embodiments should be considered exemplary and non-limiting in all respects.
[0056] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art. The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.
Claims
1. A spatial transcriptome interpolation method based on tensor chain decomposition, characterized in that, include: Obtain the gene expression matrix and perform preprocessing; The preprocessed gene expression matrix is input into the trained tensor chain decomposition spatial transcriptome imputation model, and the imputation results are output. The training method for the spatial transcriptome interpolation model of tensor chain decomposition is as follows: The gene expression matrix is obtained and preprocessed to transform it into a three-dimensional tensor, wherein the gene expression matrix contains integer position coordinates. The three-dimensional tensor was reconstructed using tensor chain decomposition to obtain the reconstructed gene expression tensor; A Cartesian product graph is constructed by generating a spatial graph based on a gene expression matrix with integer position coordinates and combining it with a gene graph generated by a protein-protein interaction network. Construct a total loss function that includes reconstruction loss and graph regularization term loss, and iteratively update the model parameters through an adaptive moment estimator until convergence.
2. The spatial transcriptome interpolation method based on tensor chain decomposition according to claim 1, characterized in that, The three-dimensional tensor has three dimensional indices corresponding to the x-coordinate and y-coordinate of the gene and the spatial site / cell, respectively. The three-dimensional tensor is composed of several gene slices stacked together, and each gene slice contains several spatial sites / cells.
3. The spatial transcriptome interpolation method based on tensor chain decomposition according to claim 1, characterized in that, The specific steps for reconstructing the three-dimensional tensor using tensor chain decomposition to obtain the reconstructed gene expression tensor are as follows: Tensor chain decomposition is used to reconstruct the three-dimensional tensor to obtain the reconstructed gene expression tensor. Specifically, this includes: inputting the index position coordinates of each dimension of the three-dimensional tensor; performing nonlinear mapping on the individual index position coordinates of each dimension using a multilayer perceptron to generate column vectors for the corresponding dimensions; concatenating the generated column vectors column by column to form an index matrix; reshaping the shape of the index matrix to obtain three kernel tensors; extracting the corresponding slice matrices from the kernel tensors and performing matrix multiplication; and combining the results with a linear rectified function to obtain the reconstructed gene expression tensor. The multilayer perceptron adopts a 4-layer network structure. The first 3 layers all include linear mapping transformation and nonlinear transformation of activation function, while the last layer only contains linear mapping transformation. The activation function is a sine function.
4. The spatial transcriptome interpolation method based on tensor chain decomposition according to claim 1, characterized in that, The specific steps for generating a spatial graph based on a gene expression matrix with integer position coordinates and constructing a Cartesian product graph by combining it with a gene graph generated from a protein-protein interaction network are as follows: Integrate biological prior information from the gene expression matrix to construct a Cartesian product graph. The biological prior information includes spatial site / cell location information, pattern information, and gene function information. Specifically, this includes: generating a spatial location map and a gene pattern map based on the location information and pattern information; integrating the spatial location map and the gene pattern map to obtain a spatial map; generating a gene map based on gene function information in the protein-protein interaction network; and performing a Cartesian product operation on the spatial map and the gene map to obtain a Cartesian product map, wherein the nodes of the Cartesian product map correspond one-to-one with the elements in the reconstructed gene expression tensor.
5. The spatial transcriptome interpolation method based on tensor chain decomposition according to claim 1, characterized in that, The reconstruction loss introduces a masking mechanism, focusing only on the observed elements in the tensor and calculating the mean square error between the observed gene expression values at these positions and the predicted tensor element values. When the observed gene expression value is not 0, the masked tensor element is set to 1; otherwise, it is set to 0.
6. The spatial transcriptome interpolation method based on tensor chain decomposition according to claim 1, characterized in that, The graph regularization loss is used to make the expression values of adjacent nodes similar, thereby enhancing the biological rationality of the model. The adjacent nodes are biological prior neighbors.