Multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning

By using a hierarchical graph contrastive learning method, a spatial adjacency graph is constructed and modality-specific feature encoding is performed, which solves the problem of cross-integration and mosaic integration that cannot be handled in existing technologies, and improves the integration capability and fusion accuracy of multi-omics data.

CN122157791APending Publication Date: 2026-06-05NORTHWESTERN POLYTECHNICAL UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHWESTERN POLYTECHNICAL UNIV
Filing Date
2026-02-10
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing spatial omics data analysis methods cannot effectively handle cross-integration and mosaic integration problems, and are difficult to adapt to unified modeling of multi-omics data, resulting in poor performance in downstream tasks.

Method used

A hierarchical graph contrastive learning approach is adopted. By constructing a spatial adjacency graph, modality-specific feature encoding is performed using a graph attention autoencoder, and the features are integrated through hierarchical graph contrastive learning, including cross-omics graph contrastive learning, cross-slice graph contrastive learning, and spatial ecological location graph contrastive learning. Finally, features are decoded and reconstructed through a neural network.

Benefits of technology

It improves the integration capability and fusion accuracy of multi-omics data, can adapt to various integration scenarios, and realizes the alignment and fusion of multi-omics data and the enhancement of spatial context information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157791A_ABST
    Figure CN122157791A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence and bioinformatics, in particular to a multi-source spatial multi-omics data integration method based on hierarchical graph contrast learning, which comprises the following steps: preprocessing acquired multi-source spatial multi-omics data, and constructing a spatial adjacency graph based on spatial distance; using a graph attention autoencoder to encode modality-specific features of the preprocessed multi-omics data based on the spatial adjacency graph, so as to obtain latent feature representation and negative representation of each spatial node; integrating the encoded latent feature representation and negative representation through hierarchical graph contrast learning; decoding and reconstructing the integrated features based on a neural network, and outputting reconstructed features for downstream tasks to minimize reconstruction error. The method can improve the full-scene data integration capability and improve the multi-omics data fusion precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this application relate to the fields of artificial intelligence and bioinformatics, and in particular to a method for integrating multi-source spatial multi-omics data based on hierarchical graph contrastive learning. Background Technology

[0002] The life activities of multicellular organisms are highly dependent on their sophisticated spatiotemporal organization. The normal function, development, and pathological processes of tissues are determined not only by the molecular characteristics of the cells themselves but also profoundly influenced by their spatial microenvironment. The rise of spatial omics technology is leading life science research into a completely new dimension. This type of technology can perform whole-genome and even multi-omics molecular measurements on tissue slices while preserving the spatial location information of the tissue. Compared to single-cell sequencing technology, which only provides a "list of cell types," spatial omics data provides expression profiles of sequencing spatial sites in biological tissues, allowing us to map the distribution of molecules in tissues and visually reveal spatial patterns of gene expression, chromatin openness, or protein abundance in complex tissues. For example, in tumor research, spatial omics technology has been successfully applied to depict the fine structure of the tumor immune microenvironment, identifying the spatial co-location or repulsion relationships between cancer cells and specific immune cells, providing crucial insights for understanding immune escape mechanisms and developing novel immunotherapies.

[0003] With the rapid development of spatial omics technology, researchers are now able to acquire multimodal information such as transcriptomics and proteomics from the same slide, or to construct three-dimensional spatial expression maps by performing sequential slicing of the same tissue. Spatial omics data integration aims to unify and jointly analyze spatial omics data from different experimental batches, different technology platforms, or different molecular modalities. Horizontal integration (single-omics multi-slice integration) reconstructs the three-dimensional molecular expression profile and three-dimensional structure of tissues by unifying the modeling of multiple slides; vertical integration (single-slice multi-omics integration) more comprehensively reveals cellular characteristics and tissue microenvironment by integrating multiple modalities of information from each sequencing point; and cross integration (omics-consistent multi-omics multi-slice integration) and mosaic integration (omics-incompletely consistent multi-omics multi-slice integration) combine the advantages of both. In summary, data integration has become a crucial support for achieving a systematic understanding of biological processes from a three-dimensional structural and multi-molecular level.

[0004] Researchers have developed numerous spatial omics data analysis methods, but these methods are limited to horizontal or vertical integration problems, failing to handle cross-integration and mosaic integration issues, and are ill-suited to the requirements of all four integration scenarios mentioned above. For horizontal integration of spatial omics data, researchers have developed many deep learning solutions, but these methods are mostly limited to the transcriptome, making it difficult to extend to other omics, and even more incapable of handling multi-omics data. With the rise of multi-omics sequencing, researchers have developed several vertical integration methods for spatial omics data, but these methods suffer from incompatibility with specific omics or handling cross-modal data heterogeneity, resulting in poor performance in downstream tasks. Furthermore, they cannot handle unified modeling of multi-omics data across batches. Summary of the Invention

[0005] In view of this, embodiments of this application propose a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning, which can improve the data integration capability across all scenarios and enhance the accuracy of multi-omics data fusion.

[0006] To achieve the above objectives, embodiments of this application propose a method for integrating multi-source spatial multi-omics data based on hierarchical graph contrastive learning, the method comprising: The acquired multi-source spatial multi-omics data are preprocessed, and a spatial adjacency graph is constructed based on spatial distance; the spatial adjacency graph is used to represent spatial nodes and all their neighboring nodes. Using a graph attention autoencoder, based on a spatial adjacency graph, modality-specific feature encoding is performed on the preprocessed multi-omics data to obtain the latent feature representation and negative representation of each spatial node; Hierarchical graph contrastive learning integrates the encoded latent feature representation and negative representation. The hierarchical graph contrastive learning includes a first-layer contrastive learning and a second-layer contrastive learning. The first-layer contrastive learning performs cross-omics graph contrastive learning and cross-slice graph contrastive learning to achieve the fusion alignment of multi-omics data and cross-slice batch correction, respectively. The second-layer contrastive learning performs spatial ecological bitmap contrastive learning to achieve spatial regularization. Based on neural network decoding, the integrated features are decoded and reconstructed, and the reconstructed features are output for downstream tasks to minimize reconstruction error.

[0007] To achieve the above objectives, embodiments of this application also propose a multi-source spatial multi-omics data integration device based on hierarchical graph contrastive learning, the device comprising: The preprocessing and adjacency graph construction module is used to preprocess the acquired multi-source spatial multi-omics data and construct a spatial adjacency graph based on spatial distance; wherein, the spatial adjacency graph is used to represent a spatial node and all its neighboring nodes. The modality-specific feature encoding module is used to perform modality-specific feature encoding on preprocessed multi-omics data based on the spatial adjacency graph using a graph attention autoencoder to obtain the latent feature representation and negative representation of each spatial node. The hierarchical graph contrastive learning module is used to integrate the encoded latent feature representation and negative representation through hierarchical graph contrastive learning. The hierarchical graph contrastive learning includes a first-layer contrastive learning and a second-layer contrastive learning. The first-layer contrastive learning performs cross-omics graph contrastive learning and cross-slice graph contrastive learning to achieve the fusion alignment of multi-omics data and cross-slice batch correction, respectively. The second-layer contrastive learning performs spatial ecological bitmap contrastive learning to achieve spatial regularization. The decoding and reconstruction module is used to decode and reconstruct the integrated features based on neural network decoding, and output the reconstructed features for downstream tasks to minimize reconstruction error.

[0008] To achieve the above objectives, embodiments of this application also propose an electronic device, including a processor and a memory, wherein the memory stores instructions executable by the processor, and the processor is configured to execute the instructions such that the electronic device can implement the multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning as described above.

[0009] To achieve the above objectives, embodiments of this application also propose a computer-readable storage medium storing a computer program that, when executed by a processor, enables a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning as described above.

[0010] This application proposes a method for integrating multi-source spatial multi-omics data based on hierarchical graph contrastive learning. First, the acquired multi-source spatial multi-omics data is preprocessed, and a spatial adjacency graph is constructed based on spatial distance. Then, using a graph attention autoencoder, modality-specific feature encoding is performed on the preprocessed multi-omics data based on the spatial adjacency graph to obtain the latent feature representation and negative representation of each spatial node. Next, the encoded latent feature representation and negative representation are integrated through hierarchical graph contrastive learning. Finally, based on neural network decoding, the integrated features are decoded and reconstructed, outputting reconstructed features for downstream tasks to minimize reconstruction errors. Since hierarchical graph contrastive learning includes a first layer of contrastive learning and a second layer of contrastive learning; the first layer of contrastive learning simultaneously performs cross-omics graph contrastive learning and cross-slice graph contrastive learning to achieve multi-omics data fusion alignment and cross-slice batch correction, respectively; the second layer of contrastive learning performs spatial ecological location graph contrastive learning to achieve spatial regularization. This enables multi-omics data alignment and fusion, multi-source data batch correction, and spatial context information enhancement. Therefore, this scheme can improve the full-scene data integration capability and enhance the accuracy of multi-omics data fusion.

[0011] Optionally, different omics data correspond to different preprocessing methods; the preprocessing of the acquired multi-source spatial multi-omics data includes: detecting the data type of each omics data; for transcriptome data, acquiring highly variable genes and performing normalization and logarithmic transformation on them; for proteome data, normalizing the counting matrix of the proteome data based on the change in the central logarithmic ratio; for ATAC or histone modification data, reducing the dimensionality of the data based on the latent semantic indexing algorithm; The construction of a spatial adjacency graph based on spatial distance includes: For any spatial node Select radius All spatial nodes within the range are taken as neighboring nodes to obtain a spatial adjacency graph; where the radius... Set to allow each spatial node to have 5 neighboring nodes, .

[0012] Optionally, the graph attention layer aggregates the features of neighboring nodes based on the attention mechanism, and the fully connected layer is used for dimensionality reduction to obtain a potential representation with uniform dimension. The graph attention autoencoder, based on a spatial adjacency graph, performs modality-specific feature encoding on preprocessed multi-omics data to obtain the latent feature representation and negative representation of each spatial node, including: Using a graph attention layer, the attention scores of the neighboring nodes of each spatial node are calculated. At the same time, the attention scores are normalized to obtain attention coefficients, and the neighbor representations are obtained by aggregation based on the attention coefficients. By using a fully connected layer, the dimensionality of the aggregated neighbor representation is reduced to extract the latent feature representation of each spatial node; For each spatial node, multiple non-neighboring nodes are randomly selected as negative samples and input into a shared encoder to obtain the negative representation of that spatial node; the negative representation is used to enhance the contrastive learning effect.

[0013] Optionally, the attention score of each neighboring node. The calculation formula is as follows: ; in, and Representing spatial nodes respectively and spatial nodes The initial feature representation; and Represents the trainable parameters. This represents the trainable parameter matrix for feature extraction in the attention layer; This represents the sigmoid activation function; The formula for calculating the attention coefficient from the normalized attention score is as follows: ; in, Represents spatial node pairs Attention coefficient Representing spatial nodes The set of neighbors; Neighbor aggregation based on attention coefficient The calculation formula is as follows: ; in, Represents spatial nodes obtained from the GAT layer. The first layer of representation, Represents the activation function of the exponential linear unit; The process of reducing the dimensionality of the aggregated neighbor representation through a fully connected layer to extract a modality-specific latent representation includes: Dimensionality reduction is achieved by using a fully connected network to reduce the aggregated neighbor representation of the graph attention layer output, resulting in spatial nodes obtained from the fully connected layer. Potential representation The calculation formula is as follows: ; in, This represents the trainable weight parameter matrix. The output dimension of the fully connected layer is set to 30 by default.

[0014] Optionally, the same spatial node Two modes , Feature representation , Forming cross-omics pairs, and connecting the same spatial nodes The same mode Positive and negative representation , Forming corresponding negative pairs; Cross-omics graph contrastive learning achieves alignment of multi-omics data sources through the graph contrastive learning loss function. The formula for the graph contrastive learning loss function is as follows: Multi-omics data alignment is achieved by reducing the Euclidean distance between cross-omics pairs and increasing the distance between corresponding negative pairs; among them, for modality... The formula for the graph contrast learning loss function is as follows: ; in, Representing modes Cross-omics integration loss; Indicates the number of spatial nodes; It is the contrastive learning loss, which is specifically represented as follows: ; in, and The composition diagram contrasts with the learning of the opposite side. and Negative pairs in graph contrast learning Indicates the minimum distance that must be fixed; Indicates Euclidean distance; For modal The formula for the graph contrast learning loss function is as follows: ; The cross-modal contrastive learning objective is formed by summing the loss functions of the two graphs. The formula for the cross-modal contrastive learning objective is as follows: ; Normalized attention scores are calculated using an attention mechanism, and the final multimodal fusion representation is obtained by weighted summation of these attention scores. Among them, multimodal fusion representation Used for various downstream analyses; multimodal fusion characterization The formula is expressed as follows: ; Among them, the normalized attention score The calculation formula is as follows: ; ; in, Representing spatial nodes modality Attention score; The query vector representing the attention mechanism; Represents the key vector used to construct a fully connected network; This represents the arctangent activation function; Representing spatial nodes modality Normalized attention score; and These are trainable parameters.

[0015] Optionally, specific implementations of cross-slice contrastive learning include: Calculate the Euclidean distance between all spatial nodes in different slices, and take the two closest spatial nodes as cross-slice pairs; For each spatial node, randomly select spatial nodes on this slice to form a random sampling pair; For modal Cross-slice plot comparison learning loss function between two slices The formula is as follows: ; Among them, spatial nodes and Form a cross-slice pair, spatial nodes and Form a random sampling pair; This represents the total number of slice pairs between two slices; When the total number of cross-slice pairs is greater than 2, the cross-slice integration objective is formed by cross-slice integration groups; wherein, the graph contrastive learning loss function of the integration group is... The formula is as follows: ; in, Indicates the total number of cross-slice integration groups; Represents an integration group; This represents the cross-slice contrastive learning loss for the integration group; For cross-slice integration of multi-omics data, each modality's data is integrated separately, and the total loss function for cross-slice plot contrastive learning is used. As shown in the following formula: ; in, and These represent the cross-slice plot comparison learning loss functions for the two types of omics data.

[0016] Optionally, spatial niche map contrastive learning obtains niche representations by aggregating neighbor node representations, specifically including: For each spatial node, the aggregate representation of its neighboring nodes is determined by an aggregation function, as shown in the following formula: ; in, Representing spatial nodes Spatial niche representation; Representing spatial nodes The set of neighbors; Representing neighboring nodes modality Feature representation; The triplet loss function brings spatial niche pairs closer together while distancing their corresponding negative pairs; spatial niche pairs are spatial nodes. Feature representation Its ecological niche representation The distance; the corresponding negative pair is a spatial node. Feature representation With negative representation The distance; the loss function is expressed by the following formula: ; Ultimately, the spatial regularization loss for multimodal data is the sum of the losses of each modality, expressed by the following formula: ; in, and These represent the spatial regularization losses for two different modes.

[0017] Optionally, based on neural network decoding, the integrated features are decoded and reconstructed to output reconstructed features for downstream tasks, in order to minimize reconstruction error, including: Two neural networks are used to decode the features of two omics data respectively, and the difference between the features and the original features is reconstructed with the goal of minimizing the loss of mean squared error; Each neural network consists of two fully connected layers, which are specifically represented as follows: In the first layer of the fully connected network, features will be fused. Mapping to intermediate latent features Intermediate latent features The formula is expressed as follows: ; in, These are trainable weights; These are trainable bias parameters; Represents the activation function of the exponential linear unit; In the second layer of the fully connected network, intermediate latent features are... Further mapping to modality Reconstruction features Reconstructing features The formula is expressed as follows: ; in, These are trainable weights; These are trainable bias parameters.

[0018] Optionally, the method provided in the embodiments of this application further includes: constructing modalities. The reconstruction loss function is used to quantify the reconstructed features. Compared with the original input features The differences between them; among which, for modes The reconstruction loss function is expressed by the following formula: ; in, Indicates the total number of nodes in the space; Representing modes The original input features; Total reconstruction loss function for multimodal data The formula is as follows: ; in, Representing modes The reconstruction loss function; Representing modes The reconstruction loss function. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies of this application will be briefly introduced below. Obviously, the following drawings are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The drawings described herein are only used to explain this application and are not intended to limit this application.

[0020] Figure 1 This is a flowchart of a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning provided in one embodiment of this application; Figure 2 This is a schematic diagram of a layered graph comparison learning modular decomposition provided in one embodiment of this application; Figure 3 This is a framework diagram of a data integration model provided in one embodiment of this application; Figure 4 This is a schematic diagram of a missing omics inference process provided in one embodiment of this application; Figure 5 This is a schematic diagram of the structure of a multi-source spatial multi-omics data integration device based on hierarchical graph contrastive learning, provided in another embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. Those skilled in the art will understand that many technical details have been presented in the embodiments of this application to facilitate better understanding. However, the technical solutions claimed in this application can be implemented even without these technical details and various variations and modifications based on the following embodiments. The division of the following embodiments is for ease of description and should not constitute any limitation on the specific implementation of this application. The following embodiments can be combined with and referenced by each other without contradiction.

[0022] The life activities of multicellular organisms are highly dependent on their sophisticated spatiotemporal organization. The normal function, development, and pathological processes of tissues are determined not only by the molecular characteristics of the cells themselves but also profoundly influenced by their spatial microenvironment. The rise of spatial omics technology is leading life science research into a completely new dimension. This type of technology can perform whole-genome and even multi-omics molecular measurements on tissue slices while preserving the spatial location information of the tissue. Compared to single-cell sequencing technology, which only provides a "list of cell types," spatial omics data provides expression profiles of sequencing spatial sites in biological tissues, allowing us to map the distribution of molecules in tissues and visually reveal spatial patterns of gene expression, chromatin openness, or protein abundance in complex tissues. For example, in tumor research, spatial omics technology has been successfully applied to depict the fine structure of the tumor immune microenvironment, identifying the spatial co-location or repulsion relationships between cancer cells and specific immune cells, providing crucial insights for understanding immune escape mechanisms and developing novel immunotherapies.

[0023] With the rapid development of spatial omics technology, researchers are now able to acquire multimodal information such as transcriptomics and proteomics from the same slide, or to construct three-dimensional spatial expression maps by performing sequential slicing of the same tissue. Spatial omics data integration aims to unify and jointly analyze spatial omics data from different experimental batches, different technology platforms, or different molecular modalities. Horizontal integration (single-omics multi-slice integration) reconstructs the three-dimensional molecular expression profile and three-dimensional structure of tissues by unifying the modeling of multiple slides; vertical integration (single-slice multi-omics integration) more comprehensively reveals cellular characteristics and tissue microenvironment by integrating multiple modalities of information from each sequencing point; and cross integration (omics-consistent multi-omics multi-slice integration) and mosaic integration (omics-incompletely consistent multi-omics multi-slice integration) combine the advantages of both. In summary, data integration has become a crucial support for achieving a systematic understanding of biological processes from a three-dimensional structural and multi-molecular level.

[0024] Researchers have developed numerous spatial omics data analysis methods, but these methods are limited to horizontal or vertical integration problems, failing to handle cross-integration and mosaic integration issues, and are ill-suited to the requirements of all four integration scenarios mentioned above. For horizontal integration of spatial omics data, researchers have developed many deep learning solutions, but these methods are mostly limited to the transcriptome, making it difficult to extend to other omics, and even more incapable of handling multi-omics data. With the rise of multi-omics sequencing, researchers have developed several vertical integration methods for spatial omics data, but these methods suffer from incompatibility with specific omics or handling cross-modal data heterogeneity, resulting in poor performance in downstream tasks. Furthermore, they cannot handle unified modeling of multi-omics data across batches.

[0025] In view of this, embodiments of this application propose a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning, which can improve the data integration capability across all scenarios and enhance the accuracy of multi-omics data fusion.

[0026] One embodiment of this application proposes a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning, applied to an electronic device, wherein the electronic device can be a terminal or a server. This embodiment and the following embodiments will use a server as an example for description. The implementation details of the multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning proposed in this embodiment will be described in detail below. The following content is only for the convenience of understanding the implementation details and is not necessary for implementing this solution.

[0027] For example, in order to fill the technical gap in the integration of spatial omics data across all scenarios, the embodiments of this application provide a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning, which specifically includes the following four aspects: data preprocessing and spatial adjacency graph construction, modality-specific feature encoding based on graph attention autoencoder, hierarchical graph contrastive learning, and representation decoding and reconstruction.

[0028] The specific process of the multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning proposed in this embodiment can be described as follows: Figure 1 As shown, it includes: Step 101: Preprocess the acquired multi-source spatial multi-omics data and construct a spatial adjacency graph based on spatial distance.

[0029] The spatial adjacency graph is used to represent a spatial node and all its neighboring nodes.

[0030] For example, spatial multi-omics data can be used to provide expression profiles of sequencing spatial sites in biological tissues, which is a type of biomedical data. Specifically, spatial multi-omics data can combine spatial location information, multiple molecular modalities, and multiple data sources to reflect the molecular characteristics and microenvironment interactions of biological tissues at the spatial scale.

[0031] It is understandable that by preprocessing multi-source spatial multi-omics data, the original spatial omics data can be normalized, and then a spatial adjacency graph can be constructed to capture spatial contextual relationships.

[0032] For example, spatial adjacency graphs can be used to capture geographic relationships and microenvironment structures in spatial omics data. Nodes can represent spatial nodes and be associated with molecular expression data of those nodes (e.g., sequencing points, protein abundance, etc. in tissue slices).

[0033] In one possible embodiment of this application, different omics data correspond to different preprocessing methods; the preprocessing of the acquired multi-source spatial multi-omics data includes: detecting the data type of each omics data; for transcriptome data, acquiring highly variable genes and performing normalization and logarithmic transformation on them; for proteome data, normalizing the counting matrix of the proteome data based on the change in the central logarithmic ratio; and for ATAC or histone modification data, reducing the dimensionality of the data based on the latent semantic indexing algorithm.

[0034] For example, specific preprocessing strategies can be used for different omics data types, such as: 1. For transcriptome data (e.g., RNA sequencing data), select A highly variable gene (e.g., Then, it is normalized and logarithmically transformed to eliminate technical bias.

[0035] 2. For proteomics data, use central log ratio transformation to normalize the technology matrix to ensure consistent data distribution.

[0036] 3. For peaks matrix data such as ATAC-seq and / or histone modifications, a latent semantic indexing algorithm can be used for preliminary dimensionality reduction to reduce noise and retain key features.

[0037] In addition, when processing multi-slice data, multi-slice data of the same omics are also concatenated together as model input to support cross-slice integration.

[0038] In one possible embodiment of this application, constructing a spatial adjacency graph based on spatial distance includes: for any spatial node Select radius All spatial nodes within the graph are treated as neighboring nodes to obtain a spatial adjacency graph.

[0039] Where, radius Set to allow each spatial node to have 5 neighboring nodes, .

[0040] For example, based on spatial coordinate information, a spatial adjacency graph can be constructed for each spatial node. Specifically, for any spatial node... , with radius (Typically, each node is chosen to have an average of 5-15 neighboring nodes.) Its spatial neighbors are searched to form an undirected graph structure. The spatial adjacency graph is used for subsequent feature aggregation in the graph neural network, ensuring that spatial proximity is effectively modeled.

[0041] Step 102: Using a graph attention autoencoder, based on the spatial adjacency graph, modality-specific feature encoding is performed on the preprocessed multi-omics data to obtain the latent feature representation and negative representation of each spatial node.

[0042] Understandably, graph attention autoencoders are used to encode each type of omics data independently to preserve modal heterogeneity and generate latent and negative representations for contrastive learning.

[0043] For example, modality-specific feature encoding can be used for feature extraction using a shared architecture graph attention autoencoder for each omics (e.g., transcriptomics, proteomics). The graph attention autoencoder takes as input a preprocessed molecular expression matrix (i.e., preprocessed multi-omics data) and a spatial adjacency graph, and outputs a low-dimensional latent representation.

[0044] For example, the graph attention layer aggregates the features of neighboring nodes based on the attention mechanism, and the fully connected layer is used for dimensionality reduction to obtain a potential representation with a unified dimension.

[0045] In one possible embodiment of this application, step 102 includes: Using a graph attention layer, the attention scores of the neighboring nodes of each spatial node are calculated. At the same time, the attention scores are normalized to obtain attention coefficients, and the neighbor representations are obtained by aggregation based on the attention coefficients.

[0046] Understandably, the graph attention layer, based on the attention mechanism, adaptively assigns weights to the neighboring nodes of spatial nodes, enhancing feature aggregation by emphasizing the contributions of similar neighbors and reducing the contributions of dissimilar neighbors. The calculation of attention weights is performed in two steps: first, the attention score of the neighbor node pair is calculated.

[0047] For example, the attention scores of each neighboring node. The calculation formula is as follows: ; in, and Representing spatial nodes respectively and spatial nodes The initial feature representation; and Represents the trainable parameters. This represents the trainable parameter matrix for feature extraction in the attention layer; This represents the sigmoid activation function; The formula for calculating the attention coefficient from the normalized attention score is as follows: ; in, Represents spatial node pairs Attention coefficient Representing spatial nodes The set of neighbors; Neighbor representation obtained based on attention coefficient aggregation The calculation formula is as follows: ; in, Spatial nodes obtained from the GAT layer The first layer of representation, This represents the activation function of the Exponential Linear Unit (ELU).

[0048] It is understandable that, in order to further extract the potential representation of gene expression features of each node, the method provided in the embodiments of this application uses a fully connected network (i.e., a fully connected layer) to reduce the dimensionality of the output of the graph attention layer, as specifically described in the following embodiments: By using a fully connected layer, the dimensionality of the aggregated neighbor representation is reduced to extract the latent feature representation of each spatial node.

[0049] For example, a fully connected network is used to reduce the dimensionality of the aggregated neighbor representation of the graph attention layer's output, and the spatial nodes obtained from the fully connected layer are... Potential representation The calculation formula is as follows: ; in, This represents the trainable weight parameter matrix. The output dimension of the fully connected layer is set to 30 by default to ensure that the dimension of the multi-omics representation is consistent.

[0050] For each spatial node, multiple non-neighboring nodes are randomly selected as negative samples and input into a shared encoder to obtain the negative representation of that spatial node; the negative representation is used to enhance the contrastive learning effect.

[0051] For example, for each spatial node Random selection Non-neighboring nodes (e.g., The same encoder generates negative representations, which are used to construct negative samples in contrastive learning. Negative representations can be used to model spatial heterogeneity and reduce computational complexity.

[0052] It is understandable that the above can be used as an example of spatial transcriptome data; in spatial transcriptome data, there is a significant gap between the total number of nodes and the number of their neighbors, and these nodes are usually not spatial nodes. It is not a neighbor, but located far from the spatial node. The location of the nodes is determined by the random selection of nodes. Therefore, randomly selected nodes can minimize computation while maintaining basic heterogeneity with the central node. Inputting this random graph and node features into a graph autoencoder shared by the above process yields a negative representation for each omics at each spatial point.

[0053] For other omics data, the encoding process can also refer to the encoding method in the above embodiments; due to the difference in the dimension of the input data, the output dimension setting of the attention layer can be slightly different. In order to facilitate subsequent hierarchical graph comparison and learning, the output dimension of the fully connected layer is uniform and can be set to 30 by default.

[0054] Step 103: Integrate the encoded latent feature representation and negative representation through hierarchical graph contrast learning.

[0055] The hierarchical graph contrastive learning includes a first-layer contrastive learning and a second-layer contrastive learning. The first-layer contrastive learning performs cross-omics graph contrastive learning and cross-slice graph contrastive learning simultaneously to achieve the fusion and alignment of multi-omics data and cross-slice batch correction, respectively. The second-layer contrastive learning performs spatial ecological bitmap contrastive learning to achieve spatial regularization.

[0056] It is understood that the core technology of the multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning provided in the embodiments of this application is the hierarchical graph contrastive learning in step 103 of this application. Figure 2 As shown, Figure 2This illustration provides a modular decomposition of hierarchical graph contrastive learning as an embodiment of this application: hierarchical graph contrastive learning can be divided into three parts: cross-omics graph contrastive learning, cross-slice graph contrastive learning, and spatial ecological map contrastive learning. These three parts respectively achieve multi-omics data alignment and fusion, multi-source data batch correction, and spatial context information enhancement. The first two are executed simultaneously, constituting the first layer of contrastive learning, while spatial ecological map contrastive learning functions as a separate second layer, acting after the first two. In particular, the flexible framework of hierarchical graph contrastive learning allows for vertical integration, horizontal integration, cross-integration, and mosaic integration through modular decomposition, thus comprehensively adapting to various integration scenarios.

[0057] To effectively align data from different omics and adaptively balance their contributions, the method provided in the embodiments of this application offers a cross-omics graph contrastive learning strategy that additionally fuses multi-omics features using an attention mechanism in contrastive learning.

[0058] Cross-omics graph contrastive learning achieves alignment of multi-omics data sources through the graph contrastive learning loss function. The formula for the graph contrastive learning loss function is as follows: To construct cross-omics graph contrastive learning, nodes in the same spatial region can be... Two modes , Feature representation , Forming cross-omics pairs, and connecting the same spatial nodes The same mode Positive and negative representation , Forming corresponding negative pairs; Multi-omics data alignment is achieved by narrowing (i.e., reducing) the Euclidean distance between cross-omics pairs and widening (i.e., increasing) the distance between corresponding negative pairs; among which, for modality... The formula for the graph contrast learning loss function is as follows: ; in, Representing modes Cross-omics integration loss; Indicates the number of spatial nodes; It is the contrastive learning loss, which is specifically represented as follows: ; in, and The composition diagram contrasts with the learning of the opposite side. and Negative pairs in graph contrast learning Indicates the minimum distance that must be fixed; Indicates Euclidean distance; For modal The formula for the graph contrast learning loss function is as follows: ; The cross-modal contrastive learning objective is formed by summing the loss functions of the two graphs. The formula for the cross-modal contrastive learning objective is as follows: ; To facilitate downstream analysis and obtain a unique representation, the representations of the two modalities need to be fused. Considering that each modality may contain consistent or complementary information, a normalized attention score is calculated using an attention mechanism, and the final multimodal fused representation is obtained by weighted summation of these attention scores. Among them, multimodal fusion representation It can be used for a variety of downstream analyses (e.g., spatial domain identification, cross-omics inference, etc.).

[0059] Multimodal fusion characterization The formula is expressed as follows: ; Among them, the normalized attention score The calculation formula is as follows: ; ; in, Representing spatial nodes modality Attention score; The query vector representing the attention mechanism; Represents the key vector used to construct a fully connected network; This represents the arctangent activation function; Representing spatial nodes modality Normalized attention score; and These are trainable parameters.

[0060] Understandably, since spatial omics data are significantly affected by batch effects, batch correction between different slices is a necessary step in cross-slice analysis. By introducing cross-slice plot contrastive learning, the batch effect of omics data on different slices can be eliminated.

[0061] To integrate two slices, the data from all slices first need to be pre-trained using a shared encoder to obtain initial representations. Based on these initial representations, the Euclidean distances between all spatial points in different slices are calculated. Then, the closest pairs of spatial points are selected and defined as cross-slice pairs. Furthermore, for each spatial point, random spatial points within the same slice can be selected to form random sampling pairs. To integrate homologous omics data from different slices, the screenshots are used to bring cross-slice pairs closer together and widen the distance between random sampling pairs. See the following implementation example for details.

[0062] In one possible embodiment of this application, the specific implementation of cross-slice graph contrastive learning includes: calculating the Euclidean distance between all spatial nodes in different slices, and taking the two closest spatial nodes as cross-slice pairs; for each spatial node, randomly selecting spatial nodes on the current slice to form random sampling pairs; For modal Cross-slice plot comparison learning loss function between two slices The formula is as follows: ; Among them, spatial nodes and Form a cross-slice pair, spatial nodes and Form a random sampling pair; This represents the total number of slice pairs between two slices; When the total number of cross-slice pairs is greater than 2, the cross-slice integration objective is formed by cross-slice integration groups; wherein, the graph contrastive learning loss function of the integration group is... The formula is as follows: ; in, Indicates the total number of cross-slice integration groups; Represents an integration group; This represents the cross-slice contrastive learning loss for the integration group; For cross-slice integration of multi-omics data, each modality's data is integrated separately, and the total loss function for cross-slice plot contrastive learning is used. As shown in the following formula: ; in, and These represent the cross-slice plot comparison learning loss functions for the two types of omics data.

[0063] To ensure the continuity of spatial domains and the heterogeneity of different spatial domains, embodiments of this application propose spatial niche map contrastive learning. This strategy aims at spatial regularization by defining spatial niche pairs and constructing contrastive learning triples by combining corresponding negative pairs, as detailed in the following embodiments.

[0064] In one possible embodiment of this application, spatial niche map contrastive learning obtains a niche representation by aggregating neighbor node representations, specifically including: For each spatial node, the aggregate representation of its neighboring nodes is determined by an aggregation function, as shown in the following formula: ; in, Representing spatial nodes Spatial niche representation; Representing spatial nodes The set of neighbors; Representing neighboring nodes modality Feature representation; The triplet loss function brings spatial niche pairs closer together while distancing their corresponding negative pairs; spatial niche pairs are spatial nodes. Feature representation Its ecological niche representation The distance; the corresponding negative pair is a spatial node. Feature representation With negative representation The distance; the loss function is expressed by the following formula: ; Ultimately, the spatial regularization loss for multimodal data is the sum of the losses of each modality, expressed by the following formula: ; in, and These represent the spatial regularization losses for two different modes.

[0065] Step 104: Based on neural network decoding, decode and reconstruct the integrated features, and output the reconstructed features for downstream tasks to minimize reconstruction error.

[0066] In one possible embodiment of this application, step 104 includes: decoding two omics data features using two neural networks respectively, and reconstructing the difference between the features and the original features with the goal of minimizing the loss of mean squared error; Each neural network consists of two fully connected layers, which are specifically represented as follows: In the first layer of the fully connected network, features will be fused. Mapping to intermediate latent features Intermediate latent features The formula is expressed as follows: ; in, These are trainable weights; These are trainable bias parameters; Represents the activation function of the exponential linear unit; In the second layer of the fully connected network, intermediate latent features are... Further mapping to modality Reconstruction features Reconstructing features The formula is expressed as follows: ; in, These are trainable weights; These are trainable bias parameters.

[0067] In one possible embodiment of this application, the method provided by the embodiments of this application further includes: constructing modes The reconstruction loss function is used to quantify the reconstructed features. Compared with the original input features The differences between them; among which, for modes The reconstruction loss function is expressed by the following formula: ; in, Indicates the total number of nodes in the space; Representing modes The original input features; Total reconstruction loss function for multimodal data The formula is as follows: ; in, Representing modes The reconstruction loss function; Representing modes The reconstruction loss function.

[0068] The following six examples illustrate in detail a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning provided in this application.

[0069] The following examples illustrate the application of the methods provided by the embodiments of this application in different spatial omics data integration scenarios, including general integration process, spatial omics data cross integration, spatial omics data mosaic integration, spatial omics data vertical integration, spatial omics data horizontal integration, and spatial omics data cross-omics inference.

[0070] Example 1: General integration process.

[0071] like Figure 3 As shown, Figure 3 This document presents a framework diagram of a data integration model provided for embodiments of this application. This framework is applicable to various spatial omics data integration scenarios. Its core is to achieve data integration through hierarchical graph contrastive learning, specifically including the following steps: Step 1: Obtain data.

[0072] For example, spatial omics datasets can be downloaded from public databases.

[0073] Step 2: Data preprocessing and constructing an adjacency graph of spatial points.

[0074] For example, specific processing is applied to different omics data for data preprocessing. For adjacency graph construction, an undirected adjacency graph is constructed based on spatial coordinates, defining a radius for each spatial node (average number of neighbors 5-15). This graph captures the spatial microenvironment for subsequent graph neural networks.

[0075] Step 3: Input the spatial adjacency graph and the molecular expression profiles of multiple modalities of all slices into the model.

[0076] For example, the input includes a preprocessed molecular expression matrix and an adjacency graph. The molecular expression profile input model is encoded based on a graph attention autoencoder to generate a latent feature representation and a negative representation for each spatial node.

[0077] Step 4: Model training.

[0078] For example, training can be divided into two phases, taking 1000 epochs as an example: Pre-training phase (epoch < 500): The loss function is: ; in, Indicates the losses incurred during reconstruction. This represents the space regularization loss. This indicates the loss in cross-omics comparisons. , , This is a hyperparameter and can be adjusted based on the data.

[0079] Integration phase (500≤epoch<1000): Add cross-slice contrast loss, the overall loss is: ; in, The hyperparameter represents the cross-slice integration loss. Cross-slice pairs are recalculated every 100 rounds to reduce noise.

[0080] Step 5: Clustering to achieve organizational structure division (i.e., downstream analysis).

[0081] For example, the integrated representations can be used for clustering (such as K-means or Leiden clustering) to delineate spatial domains (e.g., immune regions within the tumor microenvironment). The clustering results can be used for visualization or biological analysis to validate the integration effect.

[0082] Example 2: Cross-integration of spatial omics data This example focuses on cross-integration (i.e., omics-consistent multi-omics multi-slice integration), and its main difference from Example 1 lies in steps one and four, which are designed to handle the consistency alignment of multi-slice multi-omics data.

[0083] Step 1: Data Acquisition Multi-omics data of mouse brain P21 and P22 RNA and ATAC can be downloaded from UCSC. These data come from the same biological sample but at different time points, ensuring consistency of omics modalities (all containing RNA and ATAC), but batch effects exist.

[0084] Step 4 (1): Foundation Stage The model is pre-trained on all slices of data. During this stage, the overall loss is as follows: ; Step 4 (2): Cross-slice integration stage Based on pre-trained representations, this method computes cross-slice pairs and performs cross-slice integration. The overall loss for this stage is shown below: ; In this phase, cross-slice pairs are recalculated every 100 epochs to reduce the impact of noisy pairs in contrastive learning. In summary, the overall training process is as follows: .

[0085] Example 2 addresses the consistency issue of multi-slice, multi-omics data by eliminating technical variations through cross-integration and highlighting biological signals.

[0086] Example 3: Spatial omics data mosaicking and integration This implementation method is for mosaic integration (i.e., integration of multiple omics slices with incomplete omics consistency). The main difference between this implementation method and the second implementation method is in step one and step four (2), which are used to handle the flexible fusion of heterogeneous omics data.

[0087] Step 1: Data Acquisition UCSC downloaded multi-omics data on RNA and histone modifications (H3K27ac) in mouse brain P22, as well as multi-omics data on RNA and H3K4me3. These omics modalities are not completely consistent (e.g., H3K27ac and H3K4me3 cannot be directly aligned), but they share RNA modalities, forming a mosaic scene.

[0088] Step 4 (2): Cross-slice integration adjustment during model training Since cross-slice pairs cannot be constructed normally between H3K27ac and H3K4me3 omics, this implementation uses cross-slice pairs of RNA omics as a proxy for integration, while other parts remain unchanged.

[0089] Specifically: In cross-slice map contrastive learning, cross-slice pairs (i.e., the closest point pairs) are calculated based solely on RNA modalities, and this alignment is extended to other omics.

[0090] The overall loss function remains unchanged, but Consistent fusion of heterogeneous data is ensured by computing only across slice pairs of RNA modalities.

[0091] Other parts (such as pre-training) are the same as in Example 2.

[0092] Example 3 addresses the integration challenge of incomplete omics matching through a modal proxy strategy, demonstrating the flexibility of the approach.

[0093] Example 4: Vertical integration of spatial omics data This example focuses on vertical integration (i.e., single-slice multi-omics integration), and the main difference from Example 1 is in steps one and four, which are used for aligning multi-omics data within the same slice.

[0094] Step 1: Data Acquisition Download the dataset with accession number GSE213264 from the Gene Expression Omnibus (GEO) database. This dataset contains molecular expression matrices and spatial coordinates for a single slice (similar to RNA and proteomic data from human tumor slices). The data involves only one slice but includes multiple omics modalities.

[0095] Step 4: Model Training For vertical integration of spatial omics data, the model training process involves only one step, and the overall loss is shown below: ; In particular, when the number of omics is expanded to three or more, similar to the cross-slice integration strategy, we use a defined cross-omics integration set to construct the overall cross-omics loss, as shown in the following formula: ; in, It is the number of integration groups. It is modal and The cross-omics integration loss.

[0096] Example 4 highlights the efficiency of integrating multiple omics in a single slice by simplifying the process and reducing computational complexity.

[0097] Example 5: Horizontal integration of space omics data This example focuses on horizontal integration scenarios, specifically integrating multi-slice data from a single omics dataset. The main differences compared to Example 1 lie in the specific processes of steps one and four. The core objective of horizontal integration is to eliminate batch effects between multiple slices and integrate them into a unified feature space, thereby supporting downstream analyses such as 3D structural reconstruction.

[0098] Step 1: Data Acquisition Download the mouse multi-stage embryo dataset with accession number GSE214991 from the GEO database.

[0099] Step 4 (1): Foundation Stage The overall loss in the first stage of the model training process is shown below: ; in, and These are the reconstruction loss and spatial regularization loss of single-omics, respectively.

[0100] Step 4 (2): The overall loss is shown below: ; in, It is a single-omics cross-slice loss. In summary, the overall training process is as follows: .

[0101] Example 5, through a simplified two-stage training process, specifically optimizes the integration of single-omics multi-slice data, effectively solving the batch effect problem in spatial transcriptome data and laying the foundation for constructing a consistent three-dimensional expression map.

[0102] Example 6: Cross-omics inference from spatial omics data The core of Example Six is ​​to perform a novel downstream task: cross-omics inference, which involves predicting missing omics data at the same spatial location based on measured omics data. The main difference from Example One lies in the specific process of step five (clustering for organizational structure partitioning). The method provided in this example leverages representational similarities learned by the ensemble model to establish mapping relationships between different slices or modalities, thereby achieving accurate projection of omics information.

[0103] Step 5: Cross-omics inference process This step replaces the standard cluster analysis and consists of two sub-steps: Step 5 (1): First, train the model using a shared transcriptome and perform clustering (optional process). First, an integrated model is trained using shared omics data (typically readily available or broadly covered transcriptome data). After training, the integrated representations can optionally be clustered to identify spatial domains with similar biological states (e.g., tumor regions, immune regions). The aim is to utilize the boundary information of these spatial domains to confine the inference process to areas of similar biological significance, thereby improving prediction accuracy. If clustering is not performed, mapping points are searched globally.

[0104] Step 5 (2): Construct the mapping relationship and perform inference like Figure 4 As shown, Figure 4 This is a schematic diagram illustrating a missing omics inference process provided for an embodiment of this application. Two slices ( and For example, let's assume... There is RNA and ATAC data, and With RNA and another histone modification (such as H3K4me3) data, the goal is to predict slides. The H3K4me3 data for each spatial node.

[0105] First, we need to find the mapping point: for slices A target space point In slices Searching for spatial points The closest Euclidean distance in shared omics (RNA) characterization A spatial node (e.g., ).this A point is called a point. The mapping points. These mapping points must be associated with the point. They belong to the same spatial domain or are most similar globally.

[0106] Then, perform aggregated prediction: combine this A mapping point in the slice The average value of the previously measured target omics (H3K4me3) data is taken, and this average value is used as the target space node. The predicted values ​​of the target omics data.

[0107] After the above process is performed in parallel at all spatial points of the two slices, a complete set of multi-omics data, i.e., the original slices, can be obtained. It was given the H3K4me3 omics information that it originally lacked.

[0108] Example 6 demonstrates how representation learning can be used to transfer knowledge and effectively fill in missing values ​​in multi-omics data, which is of great value for costly or technically challenging omics measurements.

[0109] This application proposes a method for integrating multi-source spatial multi-omics data based on hierarchical graph contrastive learning. First, the acquired multi-source spatial multi-omics data is preprocessed, and a spatial adjacency graph is constructed based on spatial distance. Then, using a graph attention autoencoder, modality-specific feature encoding is performed on the preprocessed multi-omics data based on the spatial adjacency graph to obtain the latent feature representation and negative representation of each spatial node. Next, the encoded latent feature representation and negative representation are integrated through hierarchical graph contrastive learning. Finally, based on neural network decoding, the integrated features are decoded and reconstructed, outputting reconstructed features for downstream tasks to minimize reconstruction errors. Since hierarchical graph contrastive learning includes a first layer of contrastive learning and a second layer of contrastive learning; the first layer of contrastive learning simultaneously performs cross-omics graph contrastive learning and cross-slice graph contrastive learning to achieve multi-omics data fusion alignment and cross-slice batch correction, respectively; the second layer of contrastive learning performs spatial ecological location graph contrastive learning to achieve spatial regularization. This enables multi-omics data alignment and fusion, multi-source data batch correction, and spatial context information enhancement. Therefore, this scheme can improve the full-scene data integration capability and enhance the accuracy of multi-omics data fusion.

[0110] The steps described above are for clarity only. In implementation, they can be combined into one step, or some steps can be broken down into multiple steps, as long as they involve the same logical relationship, they are all within the scope of protection of this application. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, without changing the core design of the algorithm and process, are also within the scope of protection of this application.

[0111] Another embodiment of this application proposes a multi-source spatial multi-omics data integration device based on hierarchical graph contrastive learning. The details of this embodiment's multi-source spatial multi-omics data integration device are described below. The following implementation details are provided for ease of understanding and are not essential for implementing this example. Figure 5 This is a schematic diagram of the structure of a multi-source spatial multi-omics data integration device based on hierarchical graph contrastive learning proposed in this embodiment, including: The preprocessing and adjacency graph construction module 210 is used to preprocess the acquired multi-source spatial multi-omics data and construct a spatial adjacency graph based on spatial distance; wherein, the spatial adjacency graph is used to represent a spatial node and all its neighboring nodes. The modality-specific feature encoding module 220 is used to perform modality-specific feature encoding on the preprocessed multi-omics data based on the spatial adjacency graph using a graph attention autoencoder to obtain the latent feature representation and negative representation of each spatial node. The hierarchical graph contrastive learning module 230 is used to integrate the encoded latent feature representation and negative representation through hierarchical graph contrastive learning. The hierarchical graph contrastive learning includes a first-layer contrastive learning and a second-layer contrastive learning. The first-layer contrastive learning performs cross-omics graph contrastive learning and cross-slice graph contrastive learning to achieve the fusion alignment of multi-omics data and cross-slice batch correction, respectively. The second-layer contrastive learning performs spatial ecological bitmap contrastive learning to achieve spatial regularization. The decoding and reconstruction module 240 is used to decode and reconstruct the integrated features based on neural network decoding, and output the reconstructed features for downstream tasks to minimize the reconstruction error.

[0112] It is not difficult to see that this embodiment is a system embodiment corresponding to the above method embodiments, and this embodiment can be implemented in conjunction with the above method embodiments. The relevant technical details and technical effects mentioned in the above method embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above method embodiments.

[0113] It is worth mentioning that all modules and units involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units do not exist in this embodiment.

[0114] Another embodiment of this application provides an electronic device, such as Figure 6 As shown, it includes a processor 31 and a memory 32. The memory 32 stores instructions that the processor 31 can execute. When the processor 31 is configured to execute the instructions, the electronic device can realize a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning as described in the above method embodiment.

[0115] The memory and processor are connected via a bus, which includes any number of interconnecting buses and bridges, connecting various circuits of one or more processors and the memory. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.

[0116] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.

[0117] Another embodiment of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, can implement a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning as described in the above method embodiments.

[0118] That is, those skilled in the art will understand that all or part of the steps in the above method embodiments can be implemented by a program instructing related hardware. The program is stored in a storage medium and includes several instructions to cause a device (such as a microcontroller, chip, etc.) or processor to execute all or part of the steps of the method described in the method embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0119] Those skilled in the art will understand that the above embodiments are specific implementations of this application, and in practical applications, various changes can be made in form and detail without departing from the spirit and scope of this application. For those skilled in the art, several improvements and modifications can be made without departing from the principles of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.

Claims

1. A method for integrating multi-source spatial multi-omics data based on hierarchical graph contrastive learning, characterized in that, The method includes: The acquired multi-source spatial multi-omics data are preprocessed, and a spatial adjacency graph is constructed based on spatial distance; the spatial adjacency graph is used to represent spatial nodes and all their neighboring nodes. Using a graph attention autoencoder, based on a spatial adjacency graph, modality-specific feature encoding is performed on the preprocessed multi-omics data to obtain the latent feature representation and negative representation of each spatial node; Hierarchical graph contrastive learning integrates the encoded latent feature representation and negative representation. The hierarchical graph contrastive learning includes a first-layer contrastive learning and a second-layer contrastive learning. The first-layer contrastive learning performs cross-omics graph contrastive learning and cross-slice graph contrastive learning to achieve the fusion alignment of multi-omics data and cross-slice batch correction, respectively. The second-layer contrastive learning performs spatial ecological bitmap contrastive learning to achieve spatial regularization. Based on neural network decoding, the integrated features are decoded and reconstructed, and the reconstructed features are output for downstream tasks to minimize reconstruction error.

2. The method according to claim 1, characterized in that, Different omics data require different preprocessing methods; the preprocessing of the acquired multi-source spatial multi-omics data includes: Detect the data types of each omics dataset; For transcriptome data, highly variable genes were identified and normalized and log-transformed. For proteomic data, the counting matrix was normalized based on the change in the central log ratio; For ATAC and / or histone modification data, dimensionality reduction is performed based on a latent semantic indexing algorithm. The construction of a spatial adjacency graph based on spatial distance includes: For any spatial node Select radius All spatial nodes within the range are taken as neighboring nodes to obtain a spatial adjacency graph; where the radius... Set to allow each spatial node to have 5 neighboring nodes, .

3. The method according to claim 2, characterized in that, The graph attention layer aggregates features of neighboring nodes based on the attention mechanism, while the fully connected layer is used for dimensionality reduction to obtain a unified dimensional latent representation. The graph attention autoencoder, based on a spatial adjacency graph, performs modality-specific feature encoding on preprocessed multi-omics data to obtain the latent feature representation and negative representation of each spatial node, including: Using a graph attention layer, the attention scores of the neighboring nodes of each spatial node are calculated. At the same time, the attention scores are normalized to obtain attention coefficients, and the neighbor representations are obtained by aggregation based on the attention coefficients. By using a fully connected layer, the dimensionality of the aggregated neighbor representation is reduced to extract the latent feature representation of each spatial node; For each spatial node, multiple non-neighboring nodes are randomly selected as negative samples and input into a shared encoder to obtain the negative representation of that spatial node; the negative representation is used to enhance the contrastive learning effect.

4. The method according to claim 3, characterized in that, Attention score of each neighboring node The calculation formula is as follows: ; in, and Representing spatial nodes respectively and spatial nodes The initial feature representation; and Represents the trainable parameters. This represents the trainable parameter matrix for feature extraction in the attention layer; This represents the sigmoid activation function; The formula for calculating the attention coefficient from the normalized attention score is as follows: ; in, Represents spatial node pairs Attention coefficient Representing spatial nodes The set of neighbors; Neighbor representation obtained based on attention coefficient aggregation The calculation formula is as follows: ; in, Spatial nodes obtained from the GAT layer The first layer of representation, Represents the activation function of the exponential linear unit; The process of reducing the dimensionality of the aggregated neighbor representation through a fully connected layer to extract a modality-specific latent representation includes: Dimensionality reduction is achieved by using a fully connected network to reduce the aggregated neighbor representation of the graph attention layer output, resulting in spatial nodes obtained from the fully connected layer. Potential representation The calculation formula is as follows: ; in, This represents the trainable weight parameter matrix. The output dimension of the fully connected layer is set to 30 by default.

5. The method according to claim 4, characterized in that, Same spatial node Two modes , Feature representation , Forming cross-omics pairs, and connecting the same spatial nodes The same mode Positive and negative representation , Forming corresponding negative pairs; Cross-omics graph contrastive learning achieves alignment of multi-omics data sources through the graph contrastive learning loss function. The formula for the graph contrastive learning loss function is as follows: Multi-omics data alignment is achieved by reducing the Euclidean distance between cross-omics pairs and increasing the distance between corresponding negative pairs; among them, for modality... The formula for the graph contrast learning loss function is as follows: ; in, Representing modes Cross-omics integration loss; Indicates the number of spatial nodes; It is the contrastive learning loss, which is specifically represented as follows: ; in, and The composition diagram contrasts with the learning of the opposite side. and Negative pairs in graph contrast learning Indicates the minimum distance that must be fixed; Indicates Euclidean distance; For modal The formula for the graph contrast learning loss function is as follows: ; The cross-modal contrastive learning objective is formed by summing the loss functions of the two graphs. The formula for the cross-modal contrastive learning objective is as follows: ; Normalized attention scores are calculated using an attention mechanism, and the final multimodal fusion representation is obtained by weighted summation of these attention scores. Among them, multimodal fusion representation Used for various downstream analyses; multimodal fusion characterization The formula is expressed as follows: ; Among them, the normalized attention score The calculation formula is as follows: ; ; in, Representing spatial nodes modality Attention score; The query vector representing the attention mechanism; Represents the key vector used to construct a fully connected network; This represents the arctangent activation function; Representing spatial nodes modality Normalized attention score; and These are trainable parameters.

6. The method according to claim 5, characterized in that, The specific implementation of cross-slice image contrastive learning includes: Calculate the Euclidean distance between all spatial nodes in different slices, and take the two closest spatial nodes as cross-slice pairs; For each spatial node, randomly select spatial nodes on this slice to form a random sampling pair; For modal Cross-slice plot comparison learning loss function between two slices The formula is as follows: ; Among them, spatial nodes and Form a cross-slice pair, spatial nodes and Form a random sampling pair; This represents the total number of slice pairs between two slices; When the total number of cross-slice pairs is greater than 2, the cross-slice integration objective is formed by cross-slice integration groups; wherein, the graph contrastive learning loss function of the integration group is... The formula is as follows: ; in, Indicates the total number of cross-slice integration groups; Represents an integration group; This represents the cross-slice contrastive learning loss for the integration group; For cross-slice integration of multi-omics data, each modality's data is integrated separately, and the total loss function for cross-slice plot contrastive learning is used. As shown in the following formula: ; in, and These represent the cross-slice plot comparison learning loss functions for the two types of omics data.

7. The method according to claim 6, characterized in that, Spatial niche map contrastive learning obtains niche representations by aggregating neighbor node representations. Specific implementations include: For each spatial node, the aggregate representation of its neighboring nodes is determined by an aggregation function, as shown in the following formula: ; in, Representing spatial nodes Spatial niche representation; Representing spatial nodes The set of neighbors; Representing neighboring nodes modality Feature representation; The triplet loss function brings spatial niche pairs closer together while distancing their corresponding negative pairs; spatial niche pairs are spatial nodes. Feature representation Its ecological niche representation The distance; the corresponding negative pair is a spatial node. Feature representation With negative representation The distance; the loss function is expressed by the following formula: ; Ultimately, the spatial regularization loss for multimodal data is the sum of the losses of each modality, expressed by the following formula: ; in, and These represent the spatial regularization losses for two different modes.

8. The method according to claim 7, characterized in that, The neural network-based decoding process involves decoding and reconstructing the integrated features to output reconstructed features for downstream tasks, aiming to minimize reconstruction errors. This includes: Two neural networks are used to decode the features of two omics data respectively, and the difference between the features and the original features is reconstructed with the goal of minimizing the loss of mean squared error; Each neural network consists of two fully connected layers, which are specifically represented as follows: In the first layer of the fully connected network, features will be fused. Mapping to intermediate latent features Intermediate latent features The formula is expressed as follows: ; in, These are trainable weights; These are trainable bias parameters; Represents the activation function of the exponential linear unit; In the second layer of the fully connected network, intermediate latent features are... Further mapping to modality Reconstruction features Reconstructing features The formula is expressed as follows: ; in, These are trainable weights; These are trainable bias parameters.

9. The method according to claim 8, characterized in that, The method further includes: constructing modes The reconstruction loss function is used to quantify the reconstructed features. Compared with the original input features The differences between them; among which, for modes The reconstruction loss function is expressed by the following formula: ; in, Represents the total number of nodes in the space; Representing modes The original input features; Total reconstruction loss function for multimodal data The formula is as follows: ; in, Representing modes The reconstruction loss function; Representing modes The reconstruction loss function.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it can implement a multi-source spatial multi-omics data integration method based on hierarchical graph contrastive learning as described in any one of claims 1 to 9.