Prediction model training method and program product based on transfer learning
Through the prediction model training method based on transfer learning, deep features in the gene expression matrix are extracted and migrated to the semantic embedding space, solving the problem of low accuracy in the existing technology in the annotated data and cross-domain data classification, and achieving accurate classification of gene classes in the lack of annotated data.
Patent Information
- Application Number
- CN202411515084.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-10-29
Smart Images

Figure CN119026646B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a prediction model training method and program product based on transfer learning. Background Art
[0002] In the study of high-throughput sequencing technology, obtaining large-scale gene expression data provides valuable theoretical guidance for gene regulation research. Gene regulatory networks describe the regulatory relationships between genes to guide the understanding of the role of genes in cell and tissue functions. By predicting gene regulatory networks, it is possible to infer which genes have important effects on the expression of other genes and identify key regulatory factors and regulatory pathways. This prediction can reveal the topological structure of gene regulatory networks and provide important clues to the complexity of biological systems and the mechanisms of biological processes.
[0003] In some related technologies, correlation analysis, linear models, cluster analysis, factor analysis and Bayesian networks are usually used to analyze gene expression networks. However, the above-mentioned analysis methods often rely on a large amount of labeled data, and in practical applications, it is often difficult to obtain labeled data, which not only consumes a lot of manpower and time, but also has the problem of data scarcity. At the same time, the distribution of gene expression data in different biological processes or experimental conditions may vary greatly, which further leads to poor performance of traditional methods when processing cross-domain data and low classification accuracy. Summary of the invention
[0004] In order to solve at least one of the problems mentioned in the above background technology, the present application provides a prediction model training method and program product based on transfer learning, which regards background noise as an independent category and combines it with the transfer learning method, so that the prediction model can accurately classify new biological processes in the absence of labeled data.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] In a first aspect, a prediction model training method based on transfer learning is provided, the method comprising:
[0007] Constructing an initial prediction model, and pre-training the initial prediction model based on a convolutional neural network to obtain a pre-trained model;
[0008] Obtaining a gene expression matrix of a known category, and using the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category;
[0009] Migrating the deep features of the preset gene to the semantic embedding space to obtain a representation vector of the deep feature in the semantic embedding space, and analyzing the similarity between the representation vector of the deep feature in the semantic embedding space and the real gene category associated with the preset gene and the similarity of other categories;
[0010] When the difference between the similarity of the real gene category and the similarity of other categories meets the preset interval, the training of the initial prediction model is completed.
[0011] In a specific embodiment, the construction of the initial prediction model specifically includes: obtaining the feature representation of the preset gene, respectively calculating the similarity between the feature representation of the preset gene and all known category attributes to obtain a similarity queue; and selecting the known category attribute with the highest similarity in the similarity queue as the predicted gene category associated with the preset gene.
[0012] In a specific embodiment, the initial prediction model is pre-trained based on a convolutional neural network to obtain a pre-trained model, specifically comprising: using a convolutional layer in the convolutional neural network to extract local features in the gene expression matrix of the known category; setting a fully connected layer in the convolutional neural network to map the local features to a preset low-dimensional feature space to obtain the pre-trained model.
[0013] In a specific embodiment, the gene expression matrix of the known category is standardized, and the pre-trained model is used to extract the deep features associated with the preset genes in the gene expression matrix of the known category after the standardized processing.
[0014] In a specific embodiment, the pre-trained model is used to extract deep features of preset genes in the gene expression matrix of the known category, specifically including: using the pre-trained model to extract the gene feature matrix in the gene expression matrix of the known category after standardization; setting the high-dimensional features in the gene feature matrix to be mapped to a low-dimensional space to obtain normal gene features; obtaining labeled data in the gene expression matrix of the known category, and adjusting the normal gene features in combination with the labeled data and a preset loss function to obtain deep features.
[0015] In a specific embodiment, obtaining the real gene category associated with the preset gene in the gene expression matrix of the known category specifically includes: obtaining functional description information of the known category of the preset gene, and preprocessing the functional description information; using a preset word vector model to map the preprocessed functional description information to a word vector space to form at least one word vector representation corresponding to the phrase information in the functional description information; and combining all the word vector representations to form the real gene category associated with the preset gene.
[0016] In a specific embodiment, the deep features of the preset genes are migrated to the semantic embedding space, specifically including: marking the background noise area in the gene expression matrix of the known category; configuring the semantic embedding space with a preset fixed vector, and the preset fixed vector is used for the static representation of the background noise area; obtaining a preset projection matrix, and using the preset projection matrix to map the deep features to the semantic embedding space.
[0017] In a specific embodiment, the preset fixed vector is set as a high-dimensional vector, and the preset fixed vector is set to have a preset distance from other functional module vectors in the semantic embedding space.
[0018] In a specific embodiment, the preset projection matrix is used to project the features in each bounding box into the semantic embedding space to obtain a vectorized representation of the deep features in the gene expression matrix of the known category in the semantic embedding space.
[0019] In a specific embodiment, the calculation formula (1) for projecting the features in each bounding box into the semantic embedding space using the preset projection matrix is as follows:
[0020] (1)
[0021] in, The representation vector representing the deep feature in the semantic embedding space; Represents the preset projection matrix; Deep features in gene expression matrices representing known classes; Represents the gene expression matrix Gene expression samples.
[0022] In a specific embodiment, the gene expression matrix includes a plurality of gene expression samples, and each of the gene expression samples corresponds one-to-one to its associated deep features.
[0023] In a specific embodiment, the gene expression samples in the gene expression matrix of the known category are obtained, and the deep features of the gene expression samples are extracted; and the similarity between the representation vector of the deep features of the gene expression samples in the semantic embedding space and each real gene category is calculated.
[0024] In a specific embodiment, the calculation formula (2) for the similarity between the representation vector of the deep features of the gene expression sample in the semantic embedding space and each real gene category is as follows:
[0025] (2)
[0026] in, Represents the similarity value; The representation vector of the deep features of gene expression samples in the semantic embedding space; Represents the gene expression matrix gene expression samples; Represents the first of all true gene categories true gene categories; Indicates The semantic embedding vectors of the true gene categories.
[0027] In a specific embodiment, a similarity comparison is set between a representation vector of the deep feature of the gene expression sample in a semantic embedding space and a preset fixed vector in the semantic embedding space; if the similarity between the representation vector of the deep feature in the semantic embedding space and the preset fixed vector is greater than or equal to a preset threshold, the gene expression sample is marked as background noise.
[0028] In a specific embodiment, a first similarity between the deep features of the gene expression sample and the semantic embedding vector of the real gene category, and a second similarity between the deep features of the gene expression sample and the semantic embedding vectors of other gene categories are calculated by a maximum margin loss function;
[0029] Calculating a difference between the first similarity and the second similarity;
[0030] And minimize the maximum interval loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval.
[0031] In a specific embodiment, the calculation formula (3) for minimizing the maximum interval loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval is as follows:
[0032] (3)
[0033] in, represents the maximum margin loss function; Indicates Deep features of gene expression samples; Indicates The true gene category of each gene expression sample; represents the trainable parameters in the initial prediction model; Indicates a preset interval; Indicates the The first similarity between the deep features of the gene expression samples and the semantic embedding vectors of the true gene categories; Indicates The second similarity between the deep features of the gene expression samples and the semantic embedding vectors of other gene categories.
[0034] In a specific embodiment, gene sample data to be classified is obtained, and the gene sample data to be classified is input into a trained initial prediction model to output a gene category prediction result.
[0035] In a second aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0036] Step A: constructing an initial prediction model, and pre-training the initial prediction model based on a convolutional neural network to obtain a pre-trained model;
[0037] Step B: obtaining a gene expression matrix of a known category, and using the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category;
[0038] Step C: Migrating the deep features of the preset gene to the semantic embedding space to obtain a representation vector of the deep feature in the semantic embedding space, and analyzing the similarity between the representation vector of the deep feature in the semantic embedding space and the real gene category associated with the preset gene and the similarity of other categories;
[0039] Step D: When the difference between the similarity of the real gene category and the similarity of other categories meets the preset interval, the training of the initial prediction model is completed.
[0040] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0041] Step A: constructing an initial prediction model, and pre-training the initial prediction model based on a convolutional neural network to obtain a pre-trained model;
[0042] Step B: obtaining a gene expression matrix of a known category, and using the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category;
[0043] Step C: Migrating to the semantic embedding space to obtain a representation vector of the deep feature in the semantic embedding space, and analyzing the similarity between the representation vector of the deep feature in the semantic embedding space and the real gene category associated with the preset gene and the similarity of other categories;
[0044] Step D: When the difference between the similarity of the real gene category and the similarity of other categories meets the preset interval, the training of the initial prediction model is completed.
[0045] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0046] Step A: constructing an initial prediction model, and pre-training the initial prediction model based on a convolutional neural network to obtain a pre-trained model;
[0047] Step B: obtaining a gene expression matrix of a known category, and using the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category;
[0048] Step C: Migrating to the semantic embedding space to obtain a representation vector of the deep feature in the semantic embedding space, and analyzing the similarity between the representation vector of the deep feature in the semantic embedding space and the real gene category associated with the preset gene and the similarity of other categories;
[0049] Step D: When the difference between the similarity of the real gene category and the similarity of other categories meets the preset interval, the training of the initial prediction model is completed.
[0050] The embodiments of the present application have the following beneficial effects:
[0051] 1. The solution provided in the embodiment of the present application obtains a gene expression matrix of known categories by data annotation of the gene expression matrix, constructs an initial prediction model, and pre-trains the initial prediction model based on a convolutional neural network. The pre-trained model can quickly extract deep features of gene expression, reduce subsequent training processes, and learn common features in the pre-training stage so that the model can be smoothly migrated to new tasks or data sets during the prediction process to achieve accurate classification of gene categories. In addition, by pre-training the model, it can be classified using semantic features captured by the pre-trained network without a large amount of labeled data, so as to reduce the dependence of the prediction model on labeled data.
[0052] 2. In this scheme, a background noise area is introduced into the training of the prediction model, and the background noise is regarded as an independent category, and represented in the semantic space through a specific fixed vector. When the model predicts and classifies gene categories, it can effectively distinguish between functional modules and background noise in gene expression data, thereby effectively reducing the interference of background noise on model recognition and improving the accuracy of the prediction model for predicting the category of unknown gene data. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 A schematic diagram of an application environment according to the present application is shown;
[0055] Figure 2 A schematic diagram of a prediction model training method based on transfer learning in the present application is shown;
[0056] Figure 3 A schematic diagram showing a computer device according to the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0058] The prediction model training method based on transfer learning provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. A prediction model is configured in the terminal 102 to obtain a gene expression matrix of a known category; construct an initial prediction model, and pre-train the initial prediction model based on a convolutional neural network to obtain a pre-trained model; use the pre-trained model to extract the deep features of the preset genes in the gene expression matrix of the known category; migrate the deep features of the preset genes to the semantic embedding space to obtain the representation vector of the deep features in the semantic embedding space, analyze the similarity of the representation vector of the deep features in the semantic embedding space with the real gene category associated with the preset gene and the similarity of other categories; when the difference between the similarity of the real gene category and the similarity of other categories meets the preset interval, the training of the initial prediction model is completed.
[0059] The terminal 102 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0060] In one embodiment, Figure 2 As shown in the figure, a prediction model training method based on transfer learning is provided. Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0061] Step 101: construct an initial prediction model, and pre-train the initial prediction model based on a convolutional neural network to obtain a pre-trained model.
[0062] Furthermore, the construction of the initial prediction model specifically includes: obtaining the feature representation of the preset gene, respectively calculating the similarity between the feature representation of the preset gene and all category attribute signatures to obtain a similarity queue; and selecting the attribute signature with the highest similarity in the similarity queue as the preset category attribute associated with the preset gene.
[0063] It can be understood that the initial prediction model constructed is expressed in formula (1) as follows:
[0064] (1)
[0065] in, Represents a preset category attribute, Represents the similarity value; Represents the first of all category attribute signatures true gene categories; Represents a collection of unknown categories.
[0066] In this embodiment, the initial prediction model is pre-trained based on a convolutional neural network to obtain a pre-trained model, specifically including: standardizing the gene expression matrix of the known category, using the convolutional layer in the convolutional neural network to extract local features in the standardized gene expression matrix; setting the fully connected layer in the convolutional neural network to map the local features to a preset low-dimensional feature space to obtain the pre-trained model.
[0067] First, obtain a general neural network or other models trained by a public gene data set, and directly load these models as common models into the task of building an initial model, thereby reducing the process of training from scratch. The gene expression matrix of known categories in this embodiment is composed of gene expression levels of different samples.
[0068] Exemplary, gene expression matrix , where n represents the number of genes, m represents the number of samples, and each element in the matrix It is The gene in The data can be downloaded from a public database, such as GEO or TCGA, to form a breast cancer gene expression dataset, which includes 500 samples and 1000 genes corresponding to breast cancer patients.
[0069] The above gene expression matrix is standardized. Since the gene expression levels of different samples may vary greatly, the data usually needs to be standardized. The commonly used standardization methods are Z-score standardization method or log2 transformation method. For example, for each gene i, the standardized expression value can be expressed as formula (2):
[0070] (2)
[0071] in, represents the standardized value; Represents the gene expression matrix The gene in The expression level in each sample; Indicates gene The mean of It's genetic Standard deviation of expression values.
[0072] Furthermore, the local features in the gene expression matrix are extracted by designing the structure of a convolutional neural network. Specifically, the convolutional neural network in this embodiment includes a convolutional layer, a pooling layer, and a fully connected layer. The local features are extracted by the convolutional layer, and the convolution kernel slides along the gene or sample direction to capture the local relationship between genes; the vector is reduced in dimension by the pooling layer to reduce the number of features and retain important information; the convolutional features are mapped to a low-dimensional feature space by the fully connected layer for final classification or feature representation.
[0073] It should be noted that the loss function is used to further pre-train the model so that the model can learn the general feature representation of gene expression data, wherein the pre-trained loss function includes but is not limited to the mean square error function or the cross entropy function, and the specific choice of the loss function type can be selected according to the task objective.
[0074] Exemplarily, in this embodiment, supervised pre-training is used to complete the above process to obtain pre-training. The model selects the reconstruction loss function for training, where the calculation formula (3) of the loss function is:
[0075] (3)
[0076] in, represents the loss function; represents the input of the prediction model; Represents the output of the prediction model.
[0077] Step 102: Obtain a gene expression matrix of a known category, and use the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category.
[0078] After obtaining the pre-trained model, the pre-trained model is used to extract the deep features associated with the preset genes in the gene expression matrix of the known category after standardization, specifically including: using the pre-trained model to extract the gene feature matrix in the gene expression matrix of the known category after standardization; setting the high-dimensional features in the gene feature matrix to be mapped to a low-dimensional space to obtain normal gene features; obtaining the labeled data in the gene expression matrix of the known category, and adjusting the normal gene features in combination with the labeled data and a preset loss function to obtain deep features.
[0079] In this embodiment, when a gene-related data set is obtained, the data set is first annotated to distinguish and annotate the gene function modules in the data set, so as to obtain a gene expression matrix of known categories, wherein the gene expression matrix includes known category modules and background noise modules, and the known gene function modules are annotated in the known category module data, and these modules are the main features used in model training; the background noise area in the gene expression matrix is defined and annotated in the background noise module, which usually includes gene expression features that are not related to the known gene function modules.
[0080] The gene expression matrix of the above-mentioned labeled known categories is input into the model to extract deep features. Specifically, feature extraction is performed using formula (4):
[0081] (4)
[0082] in, represents the gene feature matrix; Represents a pre-trained model based on convolutional neural network training; represents the normalized gene expression matrix;
[0083] Furthermore, in order to make the extracted features easier to visualize or use for downstream analysis, the high-dimensional features in the gene feature matrix are mapped to a low-dimensional space. The dimensionality reduction method used includes but is not limited to PCA or t-SNE. Specifically, the dimensionality reduction process is performed through formula (5):
[0084] (5)
[0085] in, represents the normal gene features after dimensionality reduction; Represents high-dimensional features in the gene feature matrix.
[0086] It should be noted that in order to further improve the prediction accuracy of the pre-trained model in an environment with a small amount of labeled data, the cross entropy function is used as the loss function in this embodiment to further adjust the extracted features, wherein the calculation formula (6) of the cross entropy loss function is as follows:
[0087] (6)
[0088] in, represents the loss function; represents the actual gene category of the preset gene; Represents the gene category label in pre-training.
[0089] Step 103: migrate the deep features of the preset gene to the semantic embedding space to obtain a representation vector of the deep feature in the semantic embedding space, and analyze the similarity between the representation vector of the deep feature in the semantic embedding space and the real gene category associated with the preset gene and other categories.
[0090] Step 104: When the difference between the similarity of the real gene category and the similarity of other categories meets a preset interval, the training of the initial prediction model is completed.
[0091] In a specific embodiment, in order to further train the model, the deep features are mapped to the semantic embedding space, specifically including: marking the background noise area in the gene expression matrix of the known category; configuring the semantic embedding space with a preset fixed vector, and the preset fixed vector is used for the static representation of the background noise area; obtaining a preset projection matrix, and using the preset projection matrix to map the deep features to the semantic embedding space.
[0092] A trainable projection matrix is used to map deep features into the semantic embedding space, wherein the projection matrix is used to convert the high-dimensional gene expression feature space into a semantic embedding space, so that the expression features of different genes can be aligned with the semantic descriptions of predefined biological processes or functional modules.
[0093] In this embodiment, the calculation formula (7) of projecting the features in each bounding box into the semantic embedding space using the preset projection matrix is as follows:
[0094] (7)
[0095] in, The representation vector representing the deep feature in the semantic embedding space; Represents the preset projection matrix; Deep features in gene expression matrices representing known classes; Represents the gene expression matrix Gene expression samples.
[0096] Among them, the preset fixed vector is set to a high-dimensional vector, and the preset fixed vector is set to have a preset distance from other functional module vectors in the semantic embedding space; by setting the preset fixed vector to a static, high-dimensional vector, a certain distance is maintained from the functional module vector to ensure that the preset fixed vector will not be similar to the vectors of other functional modules in the semantic space, thereby reducing the influence of its noise data on the accuracy of the model prediction results.
[0097] Exemplarily, the gene expression matrix includes APP and SNCA gene modules for brain diseases, STAT3 gene module for skin diseases and background noise module. The APP gene related to Alzheimer's disease, the SNCA gene related to Parkinson's disease, and the STAT3 gene related to psoriasis are mapped into the semantic space through the word vector model; and a fixed vector is assigned to represent the background noise, wherein the fixed vector is generated randomly.
[0098] In a specific embodiment, it also includes setting a similarity comparison between the representation vector of the deep feature of the gene expression sample in the semantic embedding space and the preset fixed vector in the semantic embedding space; if the similarity between the representation vector of the deep feature in the semantic embedding space and the preset fixed vector is greater than or equal to a preset threshold, the gene expression sample belongs to background noise.
[0099] Exemplarily, the model first extracts the features of the sample and calculates its similarity with APP, SNCA, STAT3 and background noise vectors. If the sample has the highest similarity with the background noise vector, the model will mark it as noise.
[0100] Furthermore, the preset projection matrix is used to project the features in each bounding box into the semantic embedding space to obtain a vectorized representation of the deep features in the gene expression matrix of the known category in the semantic embedding space.
[0101] Among them, obtaining the real gene category associated with the preset gene in the gene expression matrix of the known category specifically includes: obtaining the functional description information of the known category of the preset gene, and preprocessing the functional description information; using a preset word vector model to map the preprocessed functional description information to the word vector space to form at least one word vector representation corresponding to the phrase information in the functional description information; combining all the word vector representations to form the real gene category associated with the preset gene.
[0102] For example, first select a word vector model, and the exemplary word vector model is GloVe, Word2 Vec or fast Text; the word vector model learns to map words to a high-dimensional vector space, thereby capturing the semantic similarity between words. Further, obtain the functional description information corresponding to each gene, and its functional description information can be derived from a public gene database, such as Gene Ontology (GO) and KEGG; for example, query the APP gene from the database, and the functional description information of the APP gene is "involved in the metabolism of amyloid precursor protein and related to Alzheimer's disease."
[0103] Furthermore, in order to reduce the impact of redundant information in the function description information on the input data, the function description information is preprocessed, specifically including removing irrelevant characters, stop words and punctuation marks, to ensure that the function description information text only includes core content related to the gene category. The preprocessed text is segmented into phrases; then the phrases are mapped to the word vector space using a pre-trained word vector model, so that each phrase or word will have a corresponding vector representation, and the real gene category associated with the preset gene is formed by combining all the word vector representations.
[0104] It should be noted that when combining word vectors, each word vector can be combined into a semantic embedding vector representing the gene category, and the word vectors can be merged by weighted average or average.
[0105] The gene expression matrix includes a number of gene expression samples, each of which corresponds to its associated deep features. During the training process, the gene data in each gene expression sample needs to be trained.
[0106] Specifically, it includes obtaining the gene expression samples in the gene expression matrix of the known category and extracting the deep features of the gene expression samples; calculating the similarity between the representation vector of the deep features of the gene expression samples in the semantic embedding space and each real gene category.
[0107] In a specific embodiment, the similarity calculation formula (8) between the representation vector of the deep feature of the gene expression sample in the semantic embedding space and each real gene category is as follows:
[0108] (8)
[0109] in, Represents the similarity value; The representation vector of the deep features of gene expression samples in the semantic embedding space; Represents the gene expression matrix gene expression samples; Represents the first of all true gene categories true gene categories; Indicates The semantic embedding vectors of the true gene categories.
[0110] Furthermore, by using the loss function to adjust the parameters between the projection matrix and the deep neural network, the similarity between the representation vector and the semantic embedding vector of its true category is the highest, while the similarity with other categories is the lowest. Through the optimization process of the loss function, the model can learn to accurately distinguish different gene expression patterns in the semantic space, further improving the accuracy of the prediction.
[0111] In this embodiment, a first similarity between the deep features of the gene expression sample and the semantic embedding vector of the real gene category, and a second similarity between the deep features of the gene expression sample and the semantic embedding vector of other gene categories are calculated through a maximum margin loss function; the difference between the first similarity and the second similarity is calculated; and the maximum margin loss function is minimized so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval.
[0112] The calculation formula (9) for minimizing the maximum interval loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval is as follows:
[0113] (9)
[0114] in, represents the maximum margin loss function; Indicates Deep features of gene expression samples; Indicates The true gene category of each gene expression sample; represents the trainable parameters in the initial prediction model; Indicates a preset interval; Indicates the The first similarity between the deep features of the gene expression samples and the semantic embedding vectors of the true gene categories; Indicates The second similarity between the deep features of the gene expression samples and the semantic embedding vectors of other gene categories.
[0115] It should be noted that background noise is also included in the above loss function to ensure that the model can effectively distinguish between gene category objects and background noise modules through the training process.
[0116] Furthermore, after the model training is completed, the model is verified by using the recall rate to obtain the model's predicted category results, and whether the correct target category is included in the top k most similar gene categories predicted. Specifically, for each gene expression instance, the model will output the top k most similar gene categories, and if the correct category is included in the top k most similar gene categories, it is considered that the instance has been correctly identified, that is, the model's prediction is accurate.
[0117] Through the above training process, the trained initial prediction model is obtained, the gene sample data to be classified is obtained, and the gene sample data to be classified is input into the trained initial prediction model to output the gene category prediction result; wherein, the calculation formula (10) of the trained initial prediction model is as follows:
[0118] (10)
[0119] in, Indicates the gene category prediction result; Represents the similarity value, specifically refers to The second similarity between the deep features of the gene sample data to be classified and the semantic embedding vectors of other gene categories; Represents the first of all category attribute signatures true gene categories; Represents a collection of unknown categories.
[0120] Through the scheme in this embodiment, the model can be smoothly migrated to new tasks or data sets during the prediction process to achieve accurate classification of gene categories. By pre-training the model, it can be classified using the semantic features captured by the pre-trained network in the absence of a large amount of labeled data, thereby reducing the prediction model's dependence on labeled data.
[0121] Embodiment 2
[0122] Corresponding to the above embodiment, the present application provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the steps of implementing the above-mentioned prediction model training method based on transfer learning include the following steps:
[0123] Step 201: construct an initial prediction model, and pre-train the initial prediction model based on a convolutional neural network to obtain a pre-trained model;
[0124] Step 202: obtaining a gene expression matrix of a known category, and using the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category;
[0125] Step 203: Migrate the deep features of the preset gene to the semantic embedding space to obtain a representation vector of the deep feature in the semantic embedding space, and analyze the similarity between the representation vector of the deep feature in the semantic embedding space and the real gene category associated with the preset gene and the similarity of other categories;
[0126] Step 204: When the difference between the similarity of the real gene category and the similarity of other categories meets a preset interval, the training of the initial prediction model is completed.
[0127] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0128] Acquire the feature representation of the preset gene, and respectively calculate the similarity between the feature representation of the preset gene and all known category attributes to obtain a similarity queue; select the known category attribute with the highest similarity in the similarity queue as the predicted gene category associated with the preset gene.
[0129] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0130] The convolutional layer in the convolutional neural network is used to extract local features in the gene expression matrix of the known category; and the fully connected layer in the convolutional neural network is set to map the local features to a preset low-dimensional feature space to obtain the pre-trained model.
[0131] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0132] The gene expression matrix of the known category is standardized, and the pre-trained model is used to extract the deep features associated with the preset genes in the gene expression matrix of the known category after the standardized processing.
[0133] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0134] The pre-trained model is used to extract a gene feature matrix from a gene expression matrix of a known category after standardization; a high-dimensional feature map in the gene feature matrix is set to a low-dimensional space to obtain normal gene features; annotated data in the gene expression matrix of the known category is obtained, and the normal gene features are adjusted in combination with the annotated data and a preset loss function to obtain deep features.
[0135] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0136] Acquire functional description information of known categories of the preset gene and preprocess the functional description information; use a preset word vector model to map the preprocessed functional description information to a word vector space to form at least one word vector representation corresponding to the phrase information in the functional description information; combine all the word vector representations to form a real gene category associated with the preset gene.
[0137] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0138] Marking the background noise area in the gene expression matrix of the known category; configuring a semantic embedding space with a preset fixed vector, wherein the preset fixed vector is used for static representation of the background noise area; obtaining a preset projection matrix, and using the preset projection matrix to map the deep features to the semantic embedding space.
[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0140] The preset fixed vector is set as a high-dimensional vector, and a preset distance is set between the preset fixed vector and other functional module vectors in the semantic embedding space.
[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0142] The preset projection matrix is used to project the features in each bounding box into the semantic embedding space to obtain a vectorized representation of the deep features in the gene expression matrix of the known category in the semantic embedding space.
[0143] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0144] The calculation formula (1) for projecting the features in each bounding box into the semantic embedding space using the preset projection matrix is as follows:
[0145] (1)
[0146] in, The representation vector representing the deep feature in the semantic embedding space; Represents the preset projection matrix; Deep features in gene expression matrices representing known classes; Represents the gene expression matrix Gene expression samples.
[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0148] The gene expression matrix includes a plurality of gene expression samples, and each of the gene expression samples corresponds one-to-one to its associated deep features.
[0149] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0150] The gene expression samples in the gene expression matrix of the known category are obtained, and the deep features of the gene expression samples are extracted; and the similarity between the representation vector of the deep features of the gene expression samples in the semantic embedding space and each real gene category is calculated.
[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0152] The calculation formula (2) for the similarity between the representation vector of the deep features of the gene expression sample in the semantic embedding space and each real gene category is as follows:
[0153] (2)
[0154] in, Represents the similarity value; The representation vector of the deep features of gene expression samples in the semantic embedding space; Represents the gene expression matrix gene expression samples; Represents the first of all true gene categories true gene categories; Indicates The semantic embedding vectors of the true gene categories.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0156] Set a similarity comparison between the representation vector of the deep feature of the gene expression sample in the semantic embedding space and the preset fixed vector in the semantic embedding space; if the similarity between the representation vector of the deep feature in the semantic embedding space and the preset fixed vector is greater than or equal to a preset threshold, mark the gene expression sample as background noise.
[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0158] The method comprises the following steps: calculating a first similarity between the deep features of the gene expression sample and the semantic embedding vector of the real gene category, and a second similarity between the deep features of the gene expression sample and the semantic embedding vector of other gene categories through a maximum margin loss function; calculating a difference between the first similarity and the second similarity; and minimizing the maximum margin loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0160] The calculation formula (3) for minimizing the maximum interval loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval is as follows:
[0161] (3)
[0162] in, represents the maximum margin loss function; Indicates Deep features of gene expression samples; Indicates The true gene category of each gene expression sample; represents the trainable parameters in the initial prediction model; Indicates a preset interval; Indicates the The first similarity between the deep features of the gene expression samples and the semantic embedding vectors of the true gene categories; Indicates The second similarity between the deep features of the gene expression samples and the semantic embedding vectors of other gene categories.
[0163] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0164] Obtain gene sample data to be classified, and input the gene sample data to be classified into the trained initial prediction model to output a gene category prediction result.
[0165] Embodiment 3
[0166] A computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0167] Step 301: construct an initial prediction model, and pre-train the initial prediction model based on a convolutional neural network to obtain a pre-trained model;
[0168] Step 302: obtaining a gene expression matrix of a known category, and using the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category;
[0169] Step 303: Migrate the deep features of the preset gene to the semantic embedding space to obtain a representation vector of the deep feature in the semantic embedding space, and analyze the similarity between the representation vector of the deep feature in the semantic embedding space and the real gene category associated with the preset gene and the similarity of other categories;
[0170] Step 304: When the difference between the similarity of the real gene category and the similarity of other categories meets a preset interval, the training of the initial prediction model is completed.
[0171] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0172] Acquire the feature representation of the preset gene, and respectively calculate the similarity between the feature representation of the preset gene and all known category attributes to obtain a similarity queue; select the known category attribute with the highest similarity in the similarity queue as the predicted gene category associated with the preset gene.
[0173] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0174] The convolutional layer in the convolutional neural network is used to extract local features in the gene expression matrix of the known category; and the fully connected layer in the convolutional neural network is set to map the local features to a preset low-dimensional feature space to obtain the pre-trained model.
[0175] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0176] The gene expression matrix of the known category is standardized, and the pre-trained model is used to extract the deep features associated with the preset genes in the gene expression matrix of the known category after the standardized processing.
[0177] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0178] The pre-trained model is used to extract a gene feature matrix from a gene expression matrix of a known category after standardization; a high-dimensional feature map in the gene feature matrix is set to a low-dimensional space to obtain normal gene features; annotated data in the gene expression matrix of the known category is obtained, and the normal gene features are adjusted in combination with the annotated data and a preset loss function to obtain deep features.
[0179] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0180] Acquire functional description information of known categories of the preset gene and preprocess the functional description information; use a preset word vector model to map the preprocessed functional description information to a word vector space to form at least one word vector representation corresponding to the phrase information in the functional description information; combine all the word vector representations to form a real gene category associated with the preset gene.
[0181] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0182] Marking the background noise area in the gene expression matrix of the known category; configuring a semantic embedding space with a preset fixed vector, wherein the preset fixed vector is used for static representation of the background noise area; obtaining a preset projection matrix, and using the preset projection matrix to map the deep features to the semantic embedding space.
[0183] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0184] The preset fixed vector is set as a high-dimensional vector, and a preset distance is set between the preset fixed vector and other functional module vectors in the semantic embedding space.
[0185] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0186] The preset projection matrix is used to project the features in each bounding box into the semantic embedding space to obtain a vectorized representation of the deep features in the gene expression matrix of the known category in the semantic embedding space.
[0187] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0188] The calculation formula (1) for projecting the features in each bounding box into the semantic embedding space using the preset projection matrix is as follows:
[0189] (1)
[0190] in, The representation vector representing the deep feature in the semantic embedding space; Represents the preset projection matrix; Deep features in gene expression matrices representing known classes; Represents the gene expression matrix Gene expression samples.
[0191] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0192] The gene expression matrix includes a plurality of gene expression samples, and each of the gene expression samples corresponds one-to-one to its associated deep features.
[0193] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0194] The gene expression samples in the gene expression matrix of the known category are obtained, and the deep features of the gene expression samples are extracted; and the similarity between the representation vector of the deep features of the gene expression samples in the semantic embedding space and each real gene category is calculated.
[0195] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0196] The calculation formula (2) for the similarity between the representation vector of the deep features of the gene expression sample in the semantic embedding space and each real gene category is as follows:
[0197] (2)
[0198] in, Represents the similarity value; The representation vector of the deep features of gene expression samples in the semantic embedding space; Represents the gene expression matrix gene expression samples; Represents the first of all true gene categories true gene categories; Indicates The semantic embedding vectors of the true gene categories.
[0199] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0200] Set a similarity comparison between the representation vector of the deep feature of the gene expression sample in the semantic embedding space and the preset fixed vector in the semantic embedding space; if the similarity between the representation vector of the deep feature in the semantic embedding space and the preset fixed vector is greater than or equal to a preset threshold, mark the gene expression sample as background noise.
[0201] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0202] The method comprises the following steps: calculating a first similarity between the deep features of the gene expression sample and the semantic embedding vector of the real gene category, and a second similarity between the deep features of the gene expression sample and the semantic embedding vector of other gene categories through a maximum margin loss function; calculating a difference between the first similarity and the second similarity; and minimizing the maximum margin loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval.
[0203] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0204] The calculation formula (3) for minimizing the maximum interval loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval is as follows:
[0205] (3)
[0206] in, represents the maximum margin loss function; Indicates Deep features of gene expression samples; Indicates The true gene category of each gene expression sample; represents the trainable parameters in the initial prediction model; Indicates a preset interval; Indicates the The first similarity between the deep features of the gene expression samples and the semantic embedding vectors of the true gene categories; Indicates The second similarity between the deep features of the gene expression samples and the semantic embedding vectors of other gene categories.
[0207] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0208] Obtain gene sample data to be classified, and input the gene sample data to be classified into the trained initial prediction model to output a gene category prediction result.
[0209] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store gene expression matrix data of known categories. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a prediction model training method based on transfer learning is implemented.
[0210] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. The specific computer device may include Figure 3 More or fewer components may be shown, or certain components may be combined, or may have a different arrangement of components.
[0211] Embodiment 4
[0212] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0213] Step 401: construct an initial prediction model, and pre-train the initial prediction model based on a convolutional neural network to obtain a pre-trained model;
[0214] Step 402: obtaining a gene expression matrix of a known category, and using the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category;
[0215] Step 403: Migrate the deep features of the preset gene to the semantic embedding space to obtain a representation vector of the deep features in the semantic embedding space, and analyze the similarity between the representation vector of the deep features in the semantic embedding space and the real gene category associated with the preset gene and the similarity of other categories;
[0216] Step 404: When the difference between the similarity of the real gene category and the similarity of other categories meets a preset interval, the training of the initial prediction model is completed.
[0217] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0218] Acquire the feature representation of the preset gene, and respectively calculate the similarity between the feature representation of the preset gene and all known category attributes to obtain a similarity queue; select the known category attribute with the highest similarity in the similarity queue as the predicted gene category associated with the preset gene.
[0219] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0220] The convolutional layer in the convolutional neural network is used to extract local features in the gene expression matrix of the known category; and the fully connected layer in the convolutional neural network is set to map the local features to a preset low-dimensional feature space to obtain the pre-trained model.
[0221] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0222] The gene expression matrix of the known category is standardized, and the pre-trained model is used to extract the deep features associated with the preset genes in the gene expression matrix of the known category after the standardized processing.
[0223] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0224] The pre-trained model is used to extract a gene feature matrix from a gene expression matrix of a known category after standardization; a high-dimensional feature map in the gene feature matrix is set to a low-dimensional space to obtain normal gene features; annotated data in the gene expression matrix of the known category is obtained, and the normal gene features are adjusted in combination with the annotated data and a preset loss function to obtain deep features.
[0225] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0226] Acquire functional description information of known categories of the preset gene and preprocess the functional description information; use a preset word vector model to map the preprocessed functional description information to a word vector space to form at least one word vector representation corresponding to the phrase information in the functional description information; combine all the word vector representations to form a real gene category associated with the preset gene.
[0227] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0228] Marking the background noise area in the gene expression matrix of the known category; configuring a semantic embedding space with a preset fixed vector, wherein the preset fixed vector is used for static representation of the background noise area; obtaining a preset projection matrix, and using the preset projection matrix to map the deep features to the semantic embedding space.
[0229] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0230] The preset fixed vector is set as a high-dimensional vector, and a preset distance is set between the preset fixed vector and other functional module vectors in the semantic embedding space.
[0231] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0232] The preset projection matrix is used to project the features in each bounding box into the semantic embedding space to obtain a vectorized representation of the deep features in the gene expression matrix of the known category in the semantic embedding space.
[0233] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0234] The calculation formula (1) for projecting the features in each bounding box into the semantic embedding space using the preset projection matrix is as follows:
[0235] (1)
[0236] in, The representation vector representing the deep feature in the semantic embedding space; Represents the preset projection matrix; Deep features in gene expression matrices representing known classes; Represents the gene expression matrix Gene expression samples.
[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0238] The gene expression matrix includes a plurality of gene expression samples, and each of the gene expression samples corresponds one-to-one to its associated deep features.
[0239] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0240] The gene expression samples in the gene expression matrix of the known category are obtained, and the deep features of the gene expression samples are extracted; and the similarity between the representation vector of the deep features of the gene expression samples in the semantic embedding space and each real gene category is calculated.
[0241] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0242] The calculation formula (2) for the similarity between the representation vector of the deep features of the gene expression sample in the semantic embedding space and each real gene category is as follows:
[0243] (2)
[0244] in, Represents the similarity value; The representation vector of the deep features of gene expression samples in the semantic embedding space; Represents the gene expression matrix gene expression samples; Represents the first of all true gene categories true gene categories; Indicates The semantic embedding vectors of the true gene categories.
[0245] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0246] Set a similarity comparison between the representation vector of the deep feature of the gene expression sample in the semantic embedding space and the preset fixed vector in the semantic embedding space; if the similarity between the representation vector of the deep feature in the semantic embedding space and the preset fixed vector is greater than or equal to a preset threshold, mark the gene expression sample as background noise.
[0247] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0248] The method comprises the following steps: calculating a first similarity between the deep features of the gene expression sample and the semantic embedding vector of the real gene category, and a second similarity between the deep features of the gene expression sample and the semantic embedding vector of other gene categories through a maximum margin loss function; calculating a difference between the first similarity and the second similarity; and minimizing the maximum margin loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval.
[0249] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0250] The calculation formula (3) for minimizing the maximum interval loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval is as follows:
[0251] (3)
[0252] in, represents the maximum margin loss function; Indicates Deep features of gene expression samples; Indicates The true gene category of each gene expression sample; represents the trainable parameters in the initial prediction model; Indicates a preset interval; Indicates the The first similarity between the deep features of the gene expression samples and the semantic embedding vectors of the true gene categories; Indicates The second similarity between the deep features of the gene expression samples and the semantic embedding vectors of other gene categories.
[0253] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0254] Obtain gene sample data to be classified, and input the gene sample data to be classified into the trained initial prediction model to output a gene category prediction result.
[0255] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0256] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0257] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A prediction model training method based on transfer learning, characterized in that: The method comprises: Constructing an initial prediction model, and pre-training the initial prediction model based on a convolutional neural network to obtain a pre-trained model; Obtaining a gene expression matrix of a known category, and using the pre-trained model to extract deep features of preset genes in the gene expression matrix of the known category; Migrating the deep features of the preset gene to the semantic embedding space to obtain a representation vector of the deep feature in the semantic embedding space, and analyzing the similarity between the representation vector of the deep feature in the semantic embedding space and the real gene category associated with the preset gene and the similarity of other categories; The method of migrating the deep features of the preset genes into the semantic embedding space specifically includes: marking the background noise region in the gene expression matrix of the known category; configuring the semantic embedding space with a preset fixed vector, the preset fixed vector being used for the static representation of the background noise region; obtaining a preset projection matrix, and using the preset projection matrix to map the deep features into the semantic embedding space; Wherein, obtaining the real gene category associated with the preset gene in the gene expression matrix of the known category specifically includes: obtaining the functional description information of the known category of the preset gene, and preprocessing the functional description information; using a preset word vector model to map the preprocessed functional description information to a word vector space to form at least one word vector representation corresponding to the phrase information in the functional description information; combining all the word vector representations to form the real gene category associated with the preset gene; Furthermore, the gene expression matrix of known categories includes a known category module and a background noise module, the known gene function modules are annotated in the known category module data, and the background noise module defines and annotates the background noise region in the gene expression matrix; When the difference between the similarity of the real gene category and the similarity of other categories meets the preset interval, the training of the initial prediction model is completed.
2. The prediction model training method based on transfer learning according to claim 1, characterized in that: The constructing of the initial prediction model specifically includes: Acquire the feature representation of the preset gene, and respectively calculate the similarity between the feature representation of the preset gene and all known category attributes to obtain a similarity queue; The known category attribute with the highest similarity in the similarity queue is selected as the predicted gene category associated with the preset gene.
3. The prediction model training method based on transfer learning according to claim 2, characterized in that: The pre-training of the initial prediction model based on a convolutional neural network to obtain a pre-trained model specifically includes: Using the convolutional layer in the convolutional neural network to extract local features in the gene expression matrix of the known category; The fully connected layer in the convolutional neural network is set to map the local features to a preset low-dimensional feature space to obtain the pre-trained model.
4. The prediction model training method based on transfer learning according to claim 3, characterized in that: The method further comprises: The gene expression matrix of the known category is standardized, and the pre-trained model is used to extract the deep features associated with the preset genes in the gene expression matrix of the known category after the standardized processing.
5. The prediction model training method based on transfer learning according to claim 4, characterized in that: The pre-trained model is used to extract the deep features of the preset genes in the gene expression matrix of the known category, specifically including: The pre-trained model is used to extract a gene feature matrix from a gene expression matrix of known categories after standardization; Mapping high-dimensional features in the gene feature matrix to a low-dimensional space to obtain normal gene features; The labeled data in the gene expression matrix of the known category is obtained, and the normal gene features are adjusted in combination with the labeled data and a preset loss function to obtain deep features.
6. The prediction model training method based on transfer learning according to claim 1, characterized in that: The method further comprises: The preset fixed vector is set as a high-dimensional vector, and a preset distance is set between the preset fixed vector and other functional module vectors in the semantic embedding space.
7. The prediction model training method based on transfer learning according to claim 6, characterized in that: The method further comprises: The preset projection matrix is used to project the features in each bounding box into the semantic embedding space to obtain a vectorized representation of the deep features in the gene expression matrix of the known category in the semantic embedding space.
8. The prediction model training method based on transfer learning according to claim 7, characterized in that: The calculation formula (1) for projecting the features in each bounding box into the semantic embedding space using the preset projection matrix is as follows: ; in, The representation vector representing the deep feature in the semantic embedding space; Represents the preset projection matrix; Deep features in gene expression matrices representing known classes; represents the gene expression sample in the gene expression matrix.
9. The prediction model training method based on transfer learning according to claim 1, characterized in that: The gene expression matrix includes a plurality of gene expression samples, and each of the gene expression samples corresponds one-to-one to its associated deep features.
10. The prediction model training method based on transfer learning according to claim 9, characterized in that: The method further comprises: Acquire the gene expression samples in the gene expression matrix of the known category, and extract deep features of the gene expression samples; The similarity between the representation vector of the deep feature of the gene expression sample in the semantic embedding space and each true gene category is calculated.
11. The prediction model training method based on transfer learning according to claim 10, characterized in that: The calculation formula (2) for the similarity between the representation vector of the deep features of the gene expression sample in the semantic embedding space and each real gene category is as follows: ; in, Represents the similarity value; The representation vector of the deep features of gene expression samples in the semantic embedding space; represents the gene expression sample in the gene expression matrix; Represents the first of all true gene categories true gene categories; Indicates The semantic embedding vectors of the true gene categories.
12. The prediction model training method based on transfer learning according to claim 10, characterized in that: The method further comprises: Setting a similarity comparison between a representation vector of the deep feature of the gene expression sample in a semantic embedding space and the preset fixed vector in the semantic embedding space; If the similarity between the representation vector of the deep feature in the semantic embedding space and the preset fixed vector is greater than or equal to a preset threshold, the gene expression sample is marked as background noise.
13. The prediction model training method based on transfer learning according to claim 10, characterized in that: The method further comprises: Calculating, by means of a maximum margin loss function, a first similarity between the deep features of the gene expression sample and a semantic embedding vector of a real gene category, and a second similarity between the deep features of the gene expression sample and the semantic embedding vectors of other gene categories; Calculating a difference between the first similarity and the second similarity; And minimize the maximum interval loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval.
14. The prediction model training method based on transfer learning according to claim 13, characterized in that: The calculation formula (3) for minimizing the maximum interval loss function so that the difference between the first similarity and the second similarity is greater than or equal to the preset interval is as follows: ; in, represents the maximum margin loss function; Indicates Deep features of gene expression samples; Indicates The true gene category of each gene expression sample; represents the trainable parameters in the initial prediction model; Indicates a preset interval; Indicates the The first similarity between the deep features of the gene expression samples and the semantic embedding vectors of the true gene categories; Indicates The second similarity between the deep features of the gene expression samples and the semantic embedding vectors of other gene categories.
15. The prediction model training method based on transfer learning according to claim 1 or 2, characterized in that: The method further comprises: Obtain gene sample data to be classified, and input the gene sample data to be classified into the trained initial prediction model to output a gene category prediction result.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 15 are implemented.
17. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 15 are implemented.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.
Citation Information
Patent Citations
Model training method and device for image classification and storage medium
CN114170475A
Crop phenotype correlation regulation and control network optimization method and system
CN118609667A