Gene regulatory network inference method, system and device based on edge-level contrastive learning
By optimizing the gene regulation network model using the side-level contrastive learning method and multi-head graph attention network, the problems of low efficiency and insufficient accuracy of deep learning methods in single-cell RNA sequencing data reconstruction were solved, achieving efficient and accurate gene regulation network inference and promoting the development of plant breeding research.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI UNIV
- Filing Date
- 2026-06-02
- Publication Date
- 2026-07-03
Smart Images

Figure CN122334510A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gene pair regulatory relationship inference technology, and more specifically to a gene regulatory network inference method, system and device based on edge-level contrastive learning. Background Technology
[0002] Gene regulatory networks (GRNs) are complex, directed networks composed of transcription factors, target genes, and their regulatory relationships. These networks control important biological processes such as cell differentiation, apoptosis, and organism development. Reconstructing GRNs from gene expression profiles provides crucial insights into normal and pathological changes during tissue or organism development, laying the foundation for advancing plant breeding and biotechnology applications. Therefore, the precise and efficient construction of gene regulatory networks has significant application value.
[0003] To achieve these goals, numerous computational methods (such as differential equations and Boolean networks for mechanistic modeling of gene regulatory networks) have been developed to infer GRNs from bulk RNA sequencing data. Bulk RNA-seq generates average transcriptomic profiles from mixed RNA samples, which masks the cellular heterogeneity present in complex biological systems. While bulk RNA-seq allows for the reconstruction of global GRNs in diseased organs, it lacks the resolution to distinguish different cell types. With the rapid development of single-cell RNA sequencing, researchers have obtained an explosive increase in the amount of gene expression profiling data at the cellular level, allowing for the reconstruction of cell-type-specific GRNs with higher accuracy. However, the aforementioned methods for mechanistic modeling of gene regulatory networks using differential equations and Boolean networks suffer from low computational efficiency and insufficient accuracy with large amounts of single-cell RNA.
[0004] Deep learning has demonstrated outstanding performance when dealing with large volumes of single-cell RNA transcription data. In recent years, many deep learning-based methods have been developed for inferring gene regulatory networks. For example, CNNNC converts scRNA-seq data of TF target gene pairs into histograms and then inputs them into a convolutional neural network for feature extraction; GENELink introduces GAT (Graph Attention Network) to extract network node features; STGRNS borrows the Transformer concept, using genes as tokens and employing self-attention to learn long-range dependencies and global regulatory patterns between genes. It encodes expression features into embeddings and uses a graph Transformer to predict edge existence. These deep learning methods primarily focus on the interactions between gene pairs during feature extraction. However, due to the extremely limited availability of labeled data for training, their predictive performance is often poor. Summary of the Invention
[0005] The present invention provides a more efficient, accurate and easy-to-use gene regulatory network inference method, system and device based on edge-level contrastive learning, which can at least solve one of the above-mentioned technical problems.
[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A gene regulatory network inference method based on edge-level contrastive learning includes the following steps: S1. Obtain single-cell RNA sequencing data from the database and preprocess it to obtain a transcriptome dataset. Then, obtain the prior regulatory edges from the database, use known interacting gene pairs as positive samples, and unknown interacting gene pairs as negative samples, and randomly divide them into training set, validation set and test set in a ratio of 3:1:1. S2. Input the processed transcriptome dataset and training set into the pre-constructed gene regulation network inference model for iterative training. S3. We use the weighted joint optimization of the edge-level contrast loss and the supervised binary cross-entropy loss, and use the loss between the predicted and actual values of gene pairs to update the parameter weights. Finally, we obtain the trained gene regulation network inference model. S4: Establish a user interface where users input their prepared transcriptome data into the trained gene regulation network inference model, and the model returns the inferred gene regulation network to the user.
[0007] Furthermore, the database selected in S1 is an open-source database, including at least the Gene Expression Database GEO and the Plant Regulatory Omics Database CHIP-HUB. The prior regulatory relationships between single-cell omics features can be represented in the form of a graph-coupled guide graph, where nodes are transcriptomics features and edges are the prior regulatory relationships between omics features.
[0008] Furthermore, in step S1, the preprocessing operation includes: S1.1 Input the single-cell RNA sequencing data scRNA_seq into the counting matrix. The rows in the counting matrix represent genes and the columns represent cells. S1.2, Let the original counting matrix be... Where C represents the number of cells and G represents the number of genes. Let L represent the set of natural numbers, and the library size of the m-th cell be L. m for:
[0009] Where n represents the gene index and m represents the cell index. This represents the original count value of the m-th cell on the n-th gene; S1.3, Given a target total quantity s = 10000, for Normalization process yields :
[0010] in, This represents a pre-defined target total, used to uniformly scale the total count of each cell to the same sequencing depth. S1.4 After normalization, the total count of each cell is scaled to the pre-set target total s, and then the expression value is standardized. At the same time, gene filtering is performed to reduce noise.
[0011] Furthermore, the specific process of training iteration in S2 includes: S2.1. Input gene expression data and regulatory relationship matrix to construct an undirected regulatory network graph. Nodes in the undirected regulatory network graph represent genes. Transcription factors are only a subset of the gene set. The edges in the undirected regulatory network graph come from the labels in the training set. When label=1, an edge is built between the transcription factor TF and the target gene Target. Each row in the training set is [tf_idx, target_idx, label], where tf_idx represents the index of the transcription factor and target_idx represents the index of the target gene. Specifically, it is initialized using a sparse DOK matrix. Edges are built only when the positive sample edge label=1, and negative samples are not included in the graph. The graph is constructed based on this rule. S2.2 Graph augmentation is performed by retaining the original graph and randomly deleting edges. Specifically, retaining the original graph can make the most of the known information, while randomly deleting edges can force the model to adapt to the extremely sparse scene. The augmented graph is denoted as View1 and the original graph is denoted as View2. S2.3 In the gene regulation network inference model based on edge-level contrastive learning, the multi-head image attention network (GAT) is used as the encoder for all benchmark datasets. Each head image attention network is treated as a single-layer feedforward neural network. In the individual image attention network, nodes and Margin coefficients between Represented as:
[0012] Among them, LeakyReLU ( ) represents a non-linear activation function. Indicates the first Learnable weight vectors for the head image attention network This indicates that the features applied to each input node are used to learn the first embedding. The individual image attention network can learn the weight matrix. Indicates the feature dimension of the input node. The || represents the feature dimension of each attention head output, and || denotes the concatenation operation. Represents the target node Input feature vector, Represents the target node Input feature vector, Represents a node The corresponding target node, Represents a node The corresponding target node, Indicates the target node When iterating through the neighbors to reach the summation point 1 node This indicates the first iteration reached during summation. Nodes The input feature vector, Represents the target node The set of neighboring nodes, Represents the union; Edge coefficient The GAT encoder uses a linear combination of features from neighboring nodes to learn the embedding for each node. The GAT encoder uses the non-linear activation function ELU as the final embedding, expressed as:
[0013] in, Represents a node In the Embedding in the header image attention network; Each node in the header image attention network The embedded connections are expressed as follows:
[0014] in, Represents a node Embedded, This indicates the total number of attention networks in the header image; S2.4 To compare edges and reduce computational complexity, node representations are used to generate the edge embedding representation, expressed as:
[0015] in, This represents the embedding vector of edge (i,j). Represents the target node and The edges formed This represents the embedding of the finally learned edge. It is a GNN encoder. This represents the edge embedding mapping function, used to embed the target node. Embedded vector and target node Embedded vector Combine and map the edges into embedding vectors for edge (i,j). Represents a node Embedding; S2.5 After obtaining the edge embeddings, define positive and negative samples in the edge-edge contrastive learning, and let... and These represent the values learned by the GNN encoder. and Embedding, select As an anchor point, and anchor point Related edge contrast loss Formulated as:
[0016] in, It is a cosine similarity measure. The temperature parameter is given, and set Q is the set of edges with a label of 0 in the training set. It is the edge embedding in View1. It is an edge embedding in View2; The above edge-level contrast loss formula is equivalent to maximizing the consistency between positive pairs and minimizing the consistency between negative pairs; Finally, the edge-level contrast loss is defined as:
[0017] in, The edge-level contrastive learning loss is equal to the one-sided loss of each edge in the constructed undirected network control graph. Take the average, where N represents the number of nodes and M represents the number of edges participating in training. Indicates the first Edge embedding corresponding to the edge, Indicates the index of the edge participating in the training; Finally, we obtain the node embeddings and edge embeddings after edge comparison learning optimization.
[0018] Furthermore, in step S3, the obtained nodes are embedded. The data are fed into two multilayer perceptrons (MLPs) to obtain the decoded embeddings of transcription factor TF and target gene Target, with the following expressions:
[0019]
[0020] in, Indicates the embedding of transcription factors, Indicates the embedding of the target gene. MLP decoder representing transcription factor branches, MLP decoder representing target gene branches; Given the indices of the training pair (t, g), from and Extracting a subvector from the given vector and decoding it for scoring, the expression is:
[0021] in, This represents the predicted score for the transcription factor and target gene pair. and These represent the weight coefficients for dot product decoding and MLP decoding, respectively. This represents the decoding function for a multilayer perceptron.
[0022] Furthermore, in S3, the prediction scores between the predicted gene pairs are used. The calculation of cross-entropy loss includes the following steps: The loss per sample of binary cross-entropy (BCE) The calculation expression is:
[0023] in, For real labels, indicating the first The true value of each gene pair This represents the predicted value output by the gene regulatory network inference model; The average of gene pairs in a batch is expressed as:
[0024] in, This represents the BCE loss for a batch of gene pairs. Indicates unilateral loss. This represents the number of samples in the training batch. This represents the gene pair index in the training batch. Represents a logarithmic function; The final total loss function is expressed as follows:
[0025] in, This represents the total loss function value. This represents the binary cross-entropy loss term. This represents the edge-level contrastive learning loss term. and All are weighted coefficients.
[0026] Furthermore, in step S3, a gene regulatory network inference model is trained using the preprocessed gene dataset. During the training process, a preset loss function is optimized. To improve the predictive performance of the gene regulation network inference model, a learning rate adjustment strategy is adopted to prevent the model from overfitting, and finally the best-trained gene regulation network inference model is obtained.
[0027] A gene regulatory network inference system based on edge-level contrastive learning, applicable to the gene regulatory network inference method based on edge-level contrastive learning, comprising: The preprocessing unit is used to acquire gene expression data of several known gene regulatory networks and form a gene dataset. In the gene regulatory network dataset, gene pairs with known interactions are regarded as positive samples, gene pairs with unknown interactions are regarded as negative samples, and positive samples and negative samples are randomly divided into training set, validation set and test set in a ratio of 3:1:1. The model building unit, which is connected to the preprocessing unit, is used to input the prior gene regulation network and gene expression profile generated from positive samples in the training set into the pre-constructed gene regulation network inference model for iterative training, and finally obtain the trained gene regulation network inference model. A human-computer interaction unit, connected to the model building unit, is used to establish a user interface. The user inputs the prepared transcriptome data into the trained gene regulation network inference model, and the gene regulation network inference model returns the inferred gene regulation network to the user.
[0028] A computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the gene regulatory network inference method based on edge-level contrastive learning described above.
[0029] The beneficial effects of this invention are reflected in: 1. Improve research efficiency: The automated processing method significantly improves the efficiency of gene regulatory network inference. Users can complete data import, model selection and parameter setting in a short time and obtain accurate inference results, thereby effectively saving time and costs in the research process.
[0030] 2. Improve research quality: Based on the edge-level contrastive learning method, the toolkit can output more accurate and reliable gene regulatory networks, thereby supporting researchers to deeply analyze regulatory mechanisms and providing important support for plant breeding. Attached Figure Description
[0031] The accompanying drawings, which are provided to further illustrate this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application.
[0032] Figure 1 This is a schematic diagram of the overall process of the gene regulatory network inference method based on edge-level contrastive learning in an embodiment of the present invention.
[0033] Figure 2 This is a schematic diagram illustrating the construction of a gene regulatory network dataset and the partitioning of the sample set according to an embodiment of the present invention.
[0034] Figure 3 This is a schematic diagram of the construction of an undirected control network graph according to an embodiment of the present invention.
[0035] Figure 4 This is a schematic diagram of the node embedding stage of the GAT (Graph Attention Network) extraction method in an embodiment of the present invention.
[0036] Figure 5 This is a schematic diagram illustrating the principle of edge-level contrastive learning in an embodiment of the present invention.
[0037] Figure 6 This is a schematic diagram of the overall architecture of the gene regulatory network inference system based on edge-level contrastive learning according to an embodiment of the present invention.
[0038] Figure 7 This is a schematic diagram of the main interface design of the gene regulatory network inference system based on edge-level contrastive learning according to an embodiment of the present invention.
[0039] Figure 8 This is a schematic diagram of the design of the model parameter customization interface according to an embodiment of the present invention.
[0040] Figure 9 This is a structural block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0041] 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 a part of the embodiments of the present invention, and not all of them. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] It should be noted that the meaning of "and / or" throughout the text includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or a solution that simultaneously satisfies A and B. Furthermore, "multiple" refers to two or more. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0043] See Figure 1 This invention provides a gene regulatory network inference method based on edge-level contrastive learning, comprising the following steps: S1. Obtain single-cell RNA sequencing data from the database and preprocess it to obtain the transcriptome dataset. Then, obtain the prior regulatory edges from the database, use gene pairs with known interactions as positive samples, and gene pairs with unknown interactions as negative samples, and randomly divide them into training set, validation set and test set in a ratio of 3:1:1.
[0044] In S1, the selected databases are recognized, professional and open source databases, including at least the Gene Expression Database GEO and the Plant Regulatory Omics Database CHIP-HUB. The prior regulatory relationships between single-cell omics features can be represented in the form of a graph-coupled guide graph, where nodes are transcriptomics features and edges are the prior regulatory relationships between omics features.
[0045] In S1, the preprocessing operation includes: S1.1 Input the single-cell RNA sequencing data scRNA_seq into the counting matrix. The rows in the counting matrix represent genes and the columns represent cells. If the counting matrix is in UMI format, then CP10k is needed for cell column normalization. S1.2, Let the original counting matrix be... Where C represents the number of cells and G represents the number of genes. Let L represent the set of natural numbers, and the library size of the m-th cell be L. m for:
[0046] Where n represents the gene index and m represents the cell index. This represents the original count value of the m-th cell on the n-th gene; S1.3. Due to the different sequencing depths of different cells, if not... Direct comparisons after normalization can misinterpret a large total cell count as high gene expression levels. Therefore, given a target total count of s=10000, it's equivalent to converting each cell to a total count of 10000 at the same sequencing depth before comparison. Normalization process yields :
[0047] in, This represents a pre-defined target total, used to uniformly scale the total count of each cell to the same sequencing depth. S1.4 After normalization, the total count of each cell is scaled to the pre-set target total s, and then the expression value is standardized. At the same time, gene filtering is also required to reduce noise.
[0048] Specifically, the minimum expression percentage is defined as p=0.1. If a gene is expressed in less than 10% of cells, then that gene will be filtered out, resulting in the final gene expression data. For example... Figure 2 As shown, the gene regulation network corresponding to the final gene expression data is converted into an adjacency matrix. In this adjacency matrix, the known gene regulation relationship is labeled "1", and the unknown gene regulation relationship is labeled "0". The known gene regulation relationships come from the databases GEO and CHIP-HUB mentioned above, and the unknown gene regulation relationships are obtained by random sampling from the gene expression data. The gene datasets used in this embodiment include Arabidopsis thaliana_root and Arabidopsis thaliana_leaf, etc. The gene expression data samples are shown in Table 1 below.
[0049] Table 1. Sample Gene Expression Data
[0050] S2. Input the processed transcriptome dataset and training set into the pre-constructed gene regulatory network inference model for iterative training.
[0051] In S2, the specific training iteration process includes: S2.1, such as Figure 3As shown, an undirected regulatory network graph is constructed by inputting gene expression data and a regulatory relationship matrix. Nodes in the undirected regulatory network graph represent genes, where transcription factors are only a subset of the gene set. The edges in the undirected regulatory network graph come from the labels in the training set. When label=1, an edge is built between the transcription factor TF and the target gene Target. Each row in the training set is [tf_idx, target_idx, label], where tf_idx represents the index of the transcription factor and target_idx represents the index of the target gene. Specifically, a sparse DOK matrix is used for initialization, and edges are built only when the positive sample edge label=1. Negative samples are not included in the graph. The graph is constructed based on this rule. S2.2 Since comparative learning is required, the graph is augmented by retaining the original graph and randomly deleting edges. Specifically, retaining the original graph can make the most of the known information, while randomly deleting edges can force the model to adapt to the extremely sparse scene. The augmented graph is denoted as View1 and the original graph is denoted as View2. S2.3, such as Figure 4 As shown, in the gene regulation network inference model based on edge-level contrastive learning, the multi-head image attention network GAT is used as the encoder for all benchmark datasets. Each head image attention network is treated as a single-layer feedforward neural network. In the individual image attention network, nodes and Margin coefficients between Represented as:
[0052] Among them, LeakyReLU ( ) represents a non-linear activation function. Indicates the first Learnable weight vectors for the head image attention network This indicates that the features applied to each input node are used to learn the first embedding. The individual image attention network can learn the weight matrix. Indicates the feature dimension of the input node. The || represents the feature dimension of each attention head output, and || denotes the concatenation operation. Represents the target node Input feature vector, Represents the target node Input feature vector, Represents a node The corresponding target node, Represents a node The corresponding target node, Indicates the target node When iterating through the neighbors to reach the summation point 1 node This indicates the first iteration reached during summation. Nodes The input feature vector, Represents the target node The set of neighboring nodes, Represents the union; Edge coefficient The GAT encoder uses a linear combination of features from neighboring nodes to learn the embedding for each node. The GAT encoder uses the non-linear activation function ELU as the final embedding, expressed as:
[0053] in, Represents a node In the Embedding in the header image attention network; Each node in the header image attention network The embedded connections are expressed as follows:
[0054] in, Represents a node Embedded, This indicates the total number of attention networks in the header image; S2.4 To compare edges and reduce computational complexity, node representations are used to generate the edge embedding representation, expressed as:
[0055] in, This represents the embedding vector of edge (i,j). Represents the target node and The edges formed This represents the embedding of the finally learned edge. It is a GNN encoder. This represents the edge embedding mapping function, used to embed the target node. Embedded vector and target node Embedded vector Combine and map the edges into embedding vectors for edge (i,j). Represents a node Embedding; S2.5, such as Figure 5 As shown, after obtaining the edge embeddings, positive and negative samples are defined in the edge-edge contrastive learning, allowing... and These represent the values learned by the GNN encoder. and Embedding, select As an anchor point, in the gene regulatory network inference model proposed in this invention, the positive samples for contrastive learning originate from the same edge in different views. In this case, the anchor point... The number of relevant positive pairs should be 1, meaning the same edge in another view. Negative samples come from a defined set Q, which is derived from the set of edges with a label of 0 in the training set, not from all edges except the same edge in another view being negative samples. Therefore, with anchor points... Related edge contrast loss Formulated as:
[0056] in, It is a cosine similarity measure. The temperature parameter is given, and set Q is the set of edges with a label of 0 in the training set. It is the edge embedding in View1. It is an edge embedding in View2; The above edge-level contrastive loss formula is equivalent to maximizing the consistency between positive pairs and minimizing the consistency between negative pairs. That is, the embedding of each edge is driven to be consistent with the embedding of itself in another view, while the embedding of each edge will be inconsistent with the embeddings of edges in set Q. Therefore, the gene regulatory network inference model proposed in this invention differs from existing multi-view graph contrastive learning models. In this model, positive samples include the anchor itself to prevent the learned representation from deviating from the target. Furthermore, this model does not treat all edges except itself as negative samples, but rather selectively selects negative samples.
[0057] Finally, the edge-level contrast loss is defined as:
[0058] in, The edge-level contrastive learning loss is equal to the one-sided loss of each edge in the constructed undirected network control graph. Take the average, where N represents the number of nodes and M represents the number of edges participating in training. Indicates the first Edge embedding corresponding to the edge, Indicates the index of the edge participating in the training; Regarding M, it's important to note that for small graphs, all edges in the graph can be used directly for training, in which case M represents the total number of edges in the graph. For large graphs, the edges will be calculated based on probability first. Sampling Then determine M, where, This represents the sampled adjacency matrix. Represents the original adjacency matrix. Represents a random sampling mask matrix. This refers to Hadamard products. Indicates the edge sampling probability; Finally, we obtain the node embeddings and edge embeddings after edge comparison learning optimization.
[0059] S3. The model is jointly optimized by weighted edge-level contrast loss and supervised binary cross-entropy loss. The parameter weights are updated by using the loss between the predicted and actual values of gene pairs. Finally, the trained gene regulation network inference model is obtained.
[0060] In step S3, the obtained nodes are embedded. The data are fed into two multilayer perceptrons (MLPs) to obtain the decoded embeddings of transcription factor TF and target gene Target, with the following expressions:
[0061]
[0062] in, Indicates the embedding of transcription factors, Indicates the embedding of the target gene. MLP decoder representing transcription factor branches, MLP decoder representing target gene branches; Given the indices of the training pair (t, g), from and Extracting a subvector from the given vector and decoding it for scoring, the expression is:
[0063] in, This represents the predicted score for the transcription factor and target gene pair. and These represent the weight coefficients for dot product decoding and MLP decoding, respectively. This represents the decoding function for a multilayer perceptron.
[0064] In S3, the prediction scores between the predicted gene pairs are used. The calculation of cross-entropy loss includes the following steps: The loss per sample of binary cross-entropy (BCE) The calculation expression is:
[0065] in, For real labels, indicating the first The true value of each gene pair This represents the predicted value output by the gene regulatory network inference model; The average of gene pairs in a batch is expressed as:
[0066] in, This represents the BCE loss for a batch of gene pairs. Indicates unilateral loss. This represents the number of samples in the training batch. This represents the gene pair index in the training batch. Represents a logarithmic function.
[0067] The final total loss function is expressed as follows:
[0068] in, This represents the total loss function value. This represents the binary cross-entropy loss term. This represents the edge-level contrastive learning loss term. and All are weighted coefficients.
[0069] In step S3, a gene regulatory network inference model is trained using the preprocessed gene dataset. During the training process, a preset loss function is optimized. To improve the predictive performance of the gene regulation network inference model, a learning rate adjustment strategy is adopted to prevent the model from overfitting, and finally the best-trained gene regulation network inference model is obtained.
[0070] S4: Establish a user interface where users input their prepared transcriptome data into the trained gene regulation network inference model, and the model returns the inferred gene regulation network to the user.
[0071] As shown above, in each training epoch, the gene regulation network inference model first performs graph augmentation, then obtains node embeddings through the GNN encoder. If it is a large graph, edge sampling is required, and if it is a small graph, no processing is required. Then, edge embeddings are generated by splicing and projecting the node embeddings. Finally, the parameter weights are updated by minimizing the total loss function.
[0072] To further verify the feasibility and superiority of the gene regulatory network inference method based on edge-level contrastive learning proposed in this invention, the model of this invention was compared and evaluated with existing models such as scMGATGRN, GRANet, GCLink, and GENELINK_PLUS on different datasets and gold standard network frameworks of different sizes, including Leaf, Root, Bulk and Maize Bulk of Arabidopsis thaliana. The evaluation metrics selected were AUROC and AUPRC (AUPRC is more sensitive to the prediction of regulatory edges with extremely imbalanced positive and negative samples).
[0073] As shown in Table 2, the model of this invention achieves optimal results in both AUROC and AUPRC on all four datasets. Specifically, on the Arabianopsis thaliana_leaf dataset, the AUROC reaches 0.733, a 1.1% improvement over the second-best method, GRANet (0.722); on the Arabianopsis thaliana_root dataset, the AUPRC reaches 0.897, a 2.3% improvement over the second-best method, GENELINK_PLUS (0.874); and on the Maize Bulk dataset, the AUROC reaches 0.792, a 2.3% improvement over the second-best method, GCLink (0.769). Overall, across the four datasets, ECLGRN's average AUROC is 0.827 and its average AUPRC is 0.831, representing improvements of approximately 1.3% and 1.7% respectively compared to the average performance of the second-best methods on each dataset. The above results demonstrate that by introducing edge-level contrastive learning, this invention can more fully mine graph structure and representational feature information in scenarios where supervised labels are scarce and sample distribution is unbalanced, thereby improving the ability to identify real control edges and the generalization stability across datasets.
[0074] Table 2. Distribution of AUROC and AUPRC indices for the gene regulatory network inference model (referred to as the "ECLGRN model") on different datasets under different gold standard network frameworks of different sizes.
[0075] This invention also provides a gene regulatory network inference system based on edge-level contrastive learning, applicable to the gene regulatory network inference method based on edge-level contrastive learning, comprising: The preprocessing unit is used to acquire gene expression data of several known gene regulatory networks and form a gene dataset. In the gene regulatory network dataset, gene pairs with known interactions are regarded as positive samples, gene pairs with unknown interactions are regarded as negative samples, and positive samples and negative samples are randomly divided into training set, validation set and test set in a ratio of 3:1:1. The model building unit, connected to the preprocessing unit, is used to input the prior gene regulation network and gene expression profile generated from positive samples in the training set into the pre-built gene regulation network inference model for iterative training, and finally obtain the trained gene regulation network inference model. The model uses a symmetric edge-level InfoNCE loss: the similarity between positive and negative pairs is calculated and the mean is calculated using the enhanced image View1 and the original image View2 as anchor points respectively. The edge-level contrast loss and the supervised binary cross-entropy loss are weighted and jointly optimized, which can improve the prediction accuracy and stability. The human-computer interaction unit is connected to the model building unit and is used to establish a user interface. The user inputs the prepared transcriptome data into the trained gene regulation network inference model, and the gene regulation network inference model returns the inferred gene regulation network to the user, which simplifies the complex data processing and model training process and makes it convenient for users to use.
[0076] Similarly, to verify the feasibility and superiority of the gene regulatory network inference system proposed in this invention, this invention also provides a gene regulatory network inference system developed using Python and Java languages, see [link to documentation]. Figure 6 As shown, the system includes a user graphical interface and core algorithm components. In its implementation, a graphical user interface (GUI) design is adopted, including a login interface, a system introduction interface, a data import module, a parameter setting module, and a results display module. Users can import data, select models, set parameters, and view inference results through simple click and drag-and-drop operations.
[0077] The use of this system interface includes the following aspects: (1) Data preparation and import into the system: First, users need to organize the gene expression data and import it into the system. This process ensures that the quality and format of the data meet the standards for subsequent analysis.
[0078] The example dataset used in this embodiment comes from the GEO public dataset. The gene expression data is provided in .csv format, and the gene regulatory network data used is also in .csv format. On the login interface, users can choose to log in as a "computer researcher" or a "biological researcher".
[0079] (2) System mode selection and parameter setting: such as Figure 7 As shown, users can select functions on the main interface and choose appropriate inference modes and related parameter settings through the graphical user interface. This process allows users to customize the inference process according to specific research needs. Users first need to prepare gene expression data and training data, and then input them into the model themselves, such as... Figure 8As shown, users can customize relevant parameters and fine-tune the model themselves. Clicking [generate & train] will start evaluating the model's performance, and the results display module will show the model's score on the dataset.
[0080] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the gene regulatory network inference method based on edge-level contrastive learning described above.
[0081] See Figure 9 The present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the gene regulatory network inference method based on edge-level contrastive learning as described above.
[0082] This invention also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps of the gene regulatory network inference method based on edge-level contrastive learning described above.
[0083] It is understood that the systems, devices, and storage media provided in the embodiments of the present invention correspond to the methods provided in the embodiments of the present invention, and the explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding parts of the above-described gene regulatory network inference method based on edge-level contrastive learning.
[0084] It should be noted that those skilled in the art will understand that all or part of the steps implemented in the embodiments of the present invention can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. When implemented in hardware, it can be implemented entirely or partially by purchasing standard parts or modifications. When implemented in software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state disks (SSDs)).
[0085] In summary, to address the issue of poor performance of existing deep learning methods in gene regulatory network inference, this invention proposes a gene regulatory network inference method and system based on edge-level contrastive learning, which significantly improves the accuracy of inference. Furthermore, an intuitive graphical user interface is designed to make gene regulatory network inference more efficient, accurate, and easy to use. Users can easily import data, select models, set parameters, and view inference results through simple clicks and drag-and-drop operations, greatly simplifying the operation process and effectively promoting the development of gene regulatory network research and its application in fields such as plant GRN construction.
[0086] It should be understood that the examples and embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Those skilled in the art can make various modifications or changes based on them. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A gene regulatory network inference method based on edge-level contrastive learning, characterized in that, Includes the following steps: S1. Obtain single-cell RNA sequencing data from the database and preprocess it to obtain a transcriptome dataset. Then, obtain the prior regulatory edges from the database, use known interacting gene pairs as positive samples, and unknown interacting gene pairs as negative samples, and randomly divide them into training set, validation set and test set in a ratio of 3:1:
1. S2. Input the processed transcriptome dataset and training set into the pre-constructed gene regulation network inference model for iterative training. S3. We use the weighted joint optimization of the edge-level contrast loss and the supervised binary cross-entropy loss, and use the loss between the predicted and actual values of gene pairs to update the parameter weights. Finally, we obtain the trained gene regulation network inference model. S4: Establish a user interface where users input their prepared transcriptome data into the trained gene regulation network inference model, and the model returns the inferred gene regulation network to the user.
2. The gene regulatory network inference method based on edge-level contrastive learning as described in claim 1, characterized in that, The databases selected in S1 are open-source databases, including at least the Gene Expression Database GEO and the Plant Regulatory Omics Database CHIP-HUB. The prior regulatory relationships between single-cell omics features can be represented in the form of a graph-coupled guide graph, where nodes are transcriptomics features and edges are the prior regulatory relationships between omics features.
3. The gene regulatory network inference method based on edge-level contrastive learning as described in claim 1, characterized in that, In step S1, the preprocessing operation includes: S1.1 Input the single-cell RNA sequencing data scRNA_seq into the counting matrix. The rows in the counting matrix represent genes and the columns represent cells. S1.2, Let the original counting matrix be... Where C represents the number of cells and G represents the number of genes. Let L represent the set of natural numbers, and the library size of the m-th cell be L. m for: Where n represents the gene index and m represents the cell index. This represents the original count value of the m-th cell on the n-th gene; S1.3, Given a target total quantity s = 10000, for Normalization process yields : in, This represents a pre-defined target total, used to uniformly scale the total count of each cell to the same sequencing depth. S1.4 After normalization, the total count of each cell is scaled to the preset target total s, and then the expression value is standardized. At the same time, gene filtering is performed to reduce noise.
4. The gene regulatory network inference method based on edge-level contrastive learning as described in claim 1, characterized in that, The specific training iteration process in S2 includes: S2.
1. Input gene expression data and regulatory relationship matrix to construct an undirected regulatory network graph. Nodes in the undirected regulatory network graph represent genes. Transcription factors are only a subset of the gene set. The edges in the undirected regulatory network graph come from the labels in the training set. When label=1, an edge is built between the transcription factor TF and the target gene Target. Each row in the training set is [tf_idx, target_idx, label], where tf_idx represents the index of the transcription factor and target_idx represents the index of the target gene. Specifically, it is initialized using a sparse DOK matrix. Edges are built only when the positive sample edge label=1, and negative samples are not included in the graph. The graph is constructed based on this rule. S2.2 Graph augmentation is performed by retaining the original graph and randomly deleting edges. Specifically, retaining the original graph can make the most of the known information, while randomly deleting edges can force the model to adapt to the extremely sparse scene. The augmented graph is denoted as View1 and the original graph is denoted as View2. S2.3 In the gene regulation network inference model based on edge-level contrastive learning, the multi-head image attention network (GAT) is used as the encoder for all benchmark datasets. Each head image attention network is treated as a single-layer feedforward neural network. In the individual image attention network, nodes and Margin coefficients between Represented as: Among them, LeakyReLU ( ) represents a non-linear activation function. Indicates the first Learnable weight vectors for the head image attention network This indicates that the features applied to each input node are used to learn the first embedding. The individual image attention network can learn the weight matrix. Indicates the feature dimension of the input node. The || represents the feature dimension of each attention head output, and || denotes the concatenation operation. Represents the target node Input feature vector, Represents the target node Input feature vector, Represents a node The corresponding target node, Represents a node The corresponding target node, Indicates the target node When iterating through the neighbors to reach the summation point 1 node This indicates the first iteration reached during summation. Nodes The input feature vector, Represents the target node The set of neighboring nodes, Represents the union; Edge coefficient The GAT encoder uses a linear combination of features from neighboring nodes to learn the embedding for each node. The GAT encoder uses the non-linear activation function ELU as the final embedding, expressed as: in, Represents a node In the Embedding in the header image attention network; Each node in the header image attention network The embedded connections are expressed as follows: in, Represents a node Embedded, This indicates the total number of attention networks in the header image; S2.4 To compare edges and reduce computational complexity, node representations are used to generate the edge embedding representation, expressed as: in, This represents the embedding vector of edge (i,j). Represents the target node and The edges formed This represents the embedding of the finally learned edge. It is a GNN encoder. This represents the edge embedding mapping function, used to embed the target node. Embedded vector and target node Embedded vector Combine and map the edges into embedding vectors for edge (i,j). Represents a node Embedding; S2.5 After obtaining the edge embeddings, define positive and negative samples in the edge-edge contrastive learning, and let... and These represent the values learned by the GNN encoder. and Embedding, select As an anchor point, and anchor point Related edge contrast loss Formulated as: in, It is a cosine similarity measure. The temperature parameter is given, and set Q is the set of edges with a label of 0 in the training set. It is the edge embedding in View1. It is an edge embedding in View2; The above edge-level contrast loss formula is equivalent to maximizing the consistency between positive pairs and minimizing the consistency between negative pairs; Finally, the edge-level contrast loss is defined as: in, The edge-level contrastive learning loss is equal to the one-sided loss of each edge in the constructed undirected network control graph. Take the average, where N represents the number of nodes and M represents the number of edges participating in training. Indicates the first Edge embedding corresponding to the edge, Indicates the index of the edge participating in the training; Finally, we obtain the node embeddings and edge embeddings after edge comparison learning optimization.
5. The gene regulatory network inference method based on edge-level contrastive learning as described in claim 1, characterized in that, In step S3, the obtained nodes are embedded The data are fed into two multilayer perceptrons (MLPs) to obtain the decoded embeddings of transcription factor TF and target gene Target, with the following expressions: in, Indicates the embedding of transcription factors, Indicates the embedding of the target gene. MLP decoder representing transcription factor branches, MLP decoder representing target gene branches; Given the indices of the training pair (t, g), from and Extracting a subvector and decoding it for scoring, the expression is: in, This represents the predicted score for the transcription factor and target gene pair. and These represent the weight coefficients for dot product decoding and MLP decoding, respectively. This represents the decoding function for a multilayer perceptron.
6. The gene regulatory network inference method based on edge-level contrastive learning as described in claim 1, characterized in that, In S3, the prediction scores between the predicted gene pairs are used. The calculation of cross-entropy loss includes the following steps: The loss per sample of binary cross-entropy (BCE) The calculation expression is: in, For real labels, indicating the first The true value of each gene pair This represents the predicted value output by the gene regulatory network inference model; The average of gene pairs in a batch is expressed as: in, This represents the BCE loss for a batch of gene pairs. Indicates unilateral loss. This represents the number of samples in the training batch. This represents the gene pair index in the training batch. Represents a logarithmic function; The final total loss function is expressed as follows: in, This represents the total loss function value. This represents the binary cross-entropy loss term. This represents the edge-level contrastive learning loss term. and All are weighted coefficients.
7. The gene regulatory network inference method based on edge-level contrastive learning as described in claim 1, characterized in that, In step S3, a gene regulation network inference model is trained using the preprocessed gene dataset. During the training process, a preset loss function is optimized. To improve the predictive performance of the gene regulation network inference model, a learning rate adjustment strategy is adopted to prevent the model from overfitting, and finally the best-trained gene regulation network inference model is obtained.
8. A gene regulatory network inference system based on edge-level contrastive learning, applicable to the gene regulatory network inference method based on edge-level contrastive learning as described in any one of claims 1-7, characterized in that, include: The preprocessing unit is used to acquire gene expression data of several known gene regulatory networks and form a gene dataset. In the gene regulatory network dataset, gene pairs with known interactions are regarded as positive samples, gene pairs with unknown interactions are regarded as negative samples, and positive samples and negative samples are randomly divided into training set, validation set and test set in a ratio of 3:1:
1. The model building unit, which is connected to the preprocessing unit, is used to input the prior gene regulation network and gene expression profile generated from positive samples in the training set into the pre-constructed gene regulation network inference model for iterative training, and finally obtain the trained gene regulation network inference model. A human-computer interaction unit, connected to the model building unit, is used to establish a user interface. The user inputs the prepared transcriptome data into the trained gene regulation network inference model, and the gene regulation network inference model returns the inferred gene regulation network to the user.
9. A computer device, characterized in that, The device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the gene regulatory network inference method based on edge-level contrastive learning as described in any one of claims 1-7.