A genome prediction method, system and device
By constructing a dynamic weight proportional allocation mechanism and a TRM-CNN prediction model combining Transformer and CNN architecture, the shortcomings of existing genomic prediction methods in balancing local and global sample information characteristics are solved, and the accuracy and generalization ability of genomic prediction are significantly improved.
Patent Information
- Application Number
- CN202510202420.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-02-24
AI Technical Summary
The existing genomic prediction methods fail to effectively balance local and global sample information characteristics, resulting in a decrease in the generalization ability of the prediction model and still have room for improvement in the accuracy of phenotype prediction.
By constructing a dynamic weight ratio allocation mechanism, genome weight ratio is obtained, and TRM-CNN prediction model is constructed in combination with two neural network architectures, Transformer and CNN, to deeply explore the deep relationship between genotype and phenotype.
It significantly improves the accuracy and generalization ability of genomic prediction, can more effectively balance local and global sample information characteristics, expands the scope of application, and improves the training and optimization efficiency of prediction models.
Smart Images

Figure CN119673287B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a genome prediction method, system and device. Background Art
[0002] Genomic selection technology uses molecular markers across the entire genome, such as single nucleotide polymorphisms, to accurately predict individual phenotypic traits. This method can quickly assess the breeding value of each individual, thereby achieving more accurate selection and greatly improving the efficiency of breeding work.
[0003] The mainstream methods of genomic selection are mainly divided into three categories: BLUP method, Bayesian method and machine learning method. For the existing machine learning-based genomic selection methods, most of them select a single type of neural network module, such as the Chinese invention patent "High-efficiency multi-environment whole genome prediction method and system based on deep learning" with application number CN202410239836.0, the Chinese invention patent "Transformer-based genomic prediction method" with application number CN202410666750.6, and the Chinese invention patent "An interpretable genomic selection method and system based on deep learning and heterogeneous networks" with application number CN202410267334.9. They can all be used to achieve prediction from genes to phenotypes. However, the above three methods do not balance the local and global sample information characteristics, reduce the generalization ability of the prediction model, and the accuracy of their phenotypic predictions still has room for further improvement. Summary of the invention
[0004] Based on this, in order to solve the problem that the existing genome prediction method does not balance the local and global sample information characteristics, reduces the generalization ability of the prediction model, and the accuracy of phenotype prediction still has room for further improvement, the present invention provides a genome prediction method, system and device, which constructs a dynamic weight ratio allocation mechanism, obtains the genome weight ratio according to the dynamic weight ratio allocation mechanism, constructs a TRM-CNN prediction model, obtains the target genome fusion feature vector, passes the target genome fusion feature vector to the regression layer, and obtains the prediction result of the phenotype corresponding to the genome. It combines the two neural network architectures of Transformer and CNN, can balance the local and global sample information characteristics, deeply explore the deep relationship between genotype and phenotype, and significantly improves the accuracy of genome prediction. The specific technical scheme is as follows:
[0005] A genome prediction method comprises the following steps:
[0006] Collecting genomic data samples and phenotypic data samples, and using the collected genomic data samples and the collected phenotypic data samples as training sample sets;
[0007] Constructing a dynamic weight ratio allocation mechanism, and obtaining the genome weight ratio according to the dynamic weight ratio allocation mechanism;
[0008] Constructing a TRM-CNN prediction model and training the TRM-CNN prediction model to obtain the trained TRM-CNN prediction model;
[0009] Obtaining target genome data, and after preprocessing the target genome data, obtaining a target genome encoding vector of the preprocessed target genome data through a coding layer;
[0010] Extracting features of the target genome encoding vector using a TRM neural network module and a CNN neural network module respectively to obtain a first target genome feature and a second target genome feature;
[0011] According to the genome weight ratio, the first target genome feature and the second target genome feature are merged to obtain a target genome fusion feature vector;
[0012] The target genome fusion feature vector is passed to the regression layer to obtain the prediction result of the phenotype corresponding to the genome.
[0013] The genome prediction method constructs a TRM-CNN prediction model, combining the two neural network architectures of Transformer and CNN. It can balance local and global sample information characteristics, deeply explore the deep relationship between genotype and phenotype, and significantly improve the accuracy and generalization ability of genome prediction.
[0014] In addition, the collected genomic data samples and the phenotypic data samples are used as training sample sets, and a dynamic weight ratio allocation mechanism is constructed. The genomic weight ratio is obtained according to the dynamic weight ratio allocation mechanism, and the first target genomic feature and the second target genomic feature are fused based on the genomic weight ratio. The diversity of sample data is also taken into consideration, and the weight ratio is dynamically allocated, which further improves the generalization ability, expands the scope of application, and can improve the efficiency of prediction model training and optimization.
[0015] Preferably, the specific method for obtaining the genome weight ratio according to the dynamic weight ratio allocation mechanism comprises the following steps:
[0016] Get the genome weight base ratio ;
[0017] Obtaining the first complexity of the genome data sample and the concentration of the phenotypic data samples ;
[0018] The genome weight ratio is obtained according to the first complexity, the concentration and the genome weight basic ratio .
[0019] Preferably, the specific method for training the TRM-CNN prediction model comprises the following steps:
[0020] Processing the genome data sample through the encoding layer to obtain a genome sample encoding vector;
[0021] Extracting features of the genome sample encoding vector using a TRM neural network module and a CNN neural network module respectively to obtain a first genome sample feature and a second genome sample feature;
[0022] According to the genome weight ratio, the first genome sample feature and the second genome sample feature are merged to obtain a genome sample fusion feature vector;
[0023] The TRM-CNN prediction model is trained according to the phenotype sample feature vector of the phenotype data sample and the genomic sample fusion feature vector.
[0024] Preferably, the specific method for training the TRM-CNN prediction model also includes the following steps:
[0025] Obtain the characteristic values of LOSS objective factors of multiple models;
[0026] Obtaining a feature alignment loss value between the TRM neural network module and the CNN neural network module;
[0027] A TRM-CNN prediction model network loss function is constructed according to the phenotype sample feature vector, the first complexity, the concentration, the feature alignment loss value, and multiple model LOSS objective factor feature values.
[0028] Preferably, the network loss function ;
[0029] in, represents the mean square error between the true value and the predicted value of the phenotype sample feature vector, , represents the feature alignment loss value, , represents the number of phenotypic samples, Indicates The true value of the phenotypic sample feature vector, Indicates The predicted value of the phenotypic sample feature vector, , Indicates the first preset parameter and the second preset parameter and both are set by the technician. Respectively represent the KL divergence value and the cosine similarity value, , , represent the first complexity and the concentration respectively, represents the number of eigenvalues of the objective factor LOSS of the model, Indicates The objective factor characteristic value of LOSS in each model, Indicates The standard value of the objective factor characteristic of the model LOSS, They respectively represent the first preset coefficient, the second preset coefficient and the third preset coefficient and are all set by technical personnel.
[0030] The present invention also provides a genome prediction system for implementing the genome prediction method, which comprises:
[0031] A sample collection module, used to collect genome data samples and phenotype data samples, and use the collected genome data samples and phenotype data samples as training sample sets;
[0032] A weight ratio construction module, used to construct a dynamic weight ratio allocation mechanism, and obtain the genome weight ratio according to the dynamic weight ratio allocation mechanism;
[0033] A prediction model building module, used to build a TRM-CNN prediction model and train the TRM-CNN prediction model to obtain the trained TRM-CNN prediction model;
[0034] The coding layer is used to obtain the target genome data. After preprocessing the target genome data, the target genome coding vector of the preprocessed target genome data is obtained through the coding layer.
[0035] A TRM-CNN module layer is used to extract features of the target genome encoding vector through a TRM neural network module and a CNN neural network module respectively, to obtain a first target genome feature and a second target genome feature;
[0036] A feature fusion layer, used to fuse the first target genome feature and the second target genome feature according to the genome weight ratio, obtain a target genome fusion feature vector, and pass the target genome fusion feature vector to the regression layer;
[0037] A regression layer, used to obtain a prediction result of a phenotype corresponding to the target genome based on the fusion feature vector of the target genome;
[0038] Among them, the TRM-CNN prediction model includes a coding layer, a TRM-CNN module layer, a feature fusion layer and a regression layer, and the TRM-CNN module layer includes a TRM neural network module and a CNN neural network module.
[0039] Preferably, the weight ratio building module includes:
[0040] Weight parameter acquisition unit, used to obtain the basic proportion of genome weight , the first complexity of the genome data sample and the concentration of the phenotypic data samples ;
[0041] A weight ratio acquisition unit, configured to acquire the genome weight ratio according to the first complexity, the concentration and the genome weight base ratio. .
[0042] Preferably, the encoding layer is further used to process the genome data sample through the encoding layer to obtain a genome sample encoding vector;
[0043] The TRM-CNN module layer is also used to extract features from the genome sample encoding vector through the TRM neural network module and the CNN neural network module respectively, to obtain the first genome sample feature and the second genome sample feature;
[0044] The feature fusion layer is also used to fuse the first genome sample feature and the second genome sample feature according to the genome weight ratio to obtain a genome sample fusion feature vector;
[0045] The weight ratio construction module includes a training module, and the training module is used to train the TRM-CNN prediction model according to the phenotype sample feature vector of the phenotype data sample and the genome sample fusion feature vector.
[0046] Preferably, the training module includes:
[0047] An objective factor characteristic value acquisition unit, used to acquire characteristic values of objective factors of LOSS of multiple models;
[0048] A feature alignment loss value acquisition unit, used to acquire a feature alignment loss value between the TRM neural network module and the CNN neural network module;
[0049] A network loss function construction unit, used to construct a TRM-CNN prediction model network loss function according to the phenotype sample feature vector, the first complexity, the concentration, the feature alignment loss value, and a plurality of the model LOSS objective factor feature values;
[0050] in, represents the mean square error between the true value and the predicted value of the phenotype sample feature vector, , represents the feature alignment loss value, , represents the number of phenotypic samples, Indicates The true value of the phenotypic sample feature vector, Indicates The predicted value of the phenotypic sample feature vector, , Indicates the first preset parameter and the second preset parameter and both are set by the technician. Respectively represent the KL divergence value and the cosine similarity value, , , represent the first complexity and the concentration respectively, represents the number of eigenvalues of the objective factor LOSS of the model, Indicates The objective factor characteristic value of LOSS in each model, Indicates The standard value of the objective factor characteristic of the model LOSS, They respectively represent the first preset coefficient, the second preset coefficient and the third preset coefficient and are all set by technical personnel.
[0051] The present invention also provides a genome prediction device, comprising:
[0052] Controller;
[0053] A memory storing executable instructions;
[0054] The executable instructions can be run on the controller and implement the genome prediction method. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The present invention can be further understood from the following description in conjunction with the accompanying drawings. The components in the figures are not necessarily drawn to scale, but the emphasis is placed on illustrating the principles of the embodiments. In different views, the same reference numerals designate corresponding parts.
[0056] Figure 1 It is a schematic diagram of the overall process of a genome prediction method in one embodiment of the present invention;
[0057] Figure 2 is a flowchart of a specific method for obtaining a genome weight ratio in one embodiment of the present invention;
[0058] Figure 3 It is a flowchart of a specific method for training a TRM-CNN prediction model in one embodiment of the present invention;
[0059] Figure 4 is a flowchart of a specific method for training a TRM-CNN prediction model in another embodiment of the present invention;
[0060] Figure 5 is a schematic diagram of the overall structure of a genome prediction system in one embodiment of the present invention;
[0061] Figure 6 is a schematic diagram of the structure of a CNN neural network module in one embodiment of the present invention;
[0062] Figure 7 It is a schematic diagram of the structure of the TRM neural network module in one embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with its embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the protection scope of the present invention.
[0064] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only and do not represent the only implementation method.
[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0066] The “first” and “second” mentioned in the present invention do not represent specific quantities and orders, but are merely used to distinguish names.
[0067] like Figure 1As shown, the present invention provides a genome prediction method, comprising the following steps:
[0068] S1, collecting genome data samples and phenotype data samples, and using the collected genome data samples and the collected phenotype data samples as training sample sets.
[0069] Here, the genomic data sample can be understood as the entire genetic information of the genome composed of the genes of the target analysis object whose phenotype needs to be predicted, that is, the genotype sample. The phenotypic data sample is the morphological characteristics and physiological and behavioral characteristics actually exhibited by the target analysis object, including but not limited to body length, height, chest circumference, etc., which is the result of the combined effect of genotype and environment.
[0070] S2, constructing a dynamic weight ratio allocation mechanism, and obtaining the genome weight ratio according to the dynamic weight ratio allocation mechanism.
[0071] The dynamic weight ratio allocation mechanism can be understood as dynamically allocating genome weight ratios for different types of individuals according to changes in individual identity characteristics, or re-updating genome weight ratios at a preset frequency.
[0072] The purpose of constructing a dynamic weight ratio allocation mechanism is to be able to reallocate the genome weight ratio according to changes in actual conditions and changes in the identity characteristics of different types of individuals to adapt to changes in individual identity, so that the system can adjust the weight of each part according to the diversity of samples, thereby improving its flexibility and scope of applicability.
[0073] As a preferred technical solution, Figure 2 As shown, in step S2, the specific method for obtaining the genome weight ratio according to the dynamic weight ratio allocation mechanism includes the following steps:
[0074] S21, obtain the basic proportion of genome weight ;
[0075] S22, obtaining the first complexity of the genome data sample and the concentration of the phenotypic data samples ;
[0076] S23, obtaining the genome weight ratio according to the first complexity, the concentration and the genome weight base ratio .
[0077] Genomic weight base ratio The first complexity of the genome data sample can be set by a technician based on experience. It can be obtained by calculating the ratio between the standard deviation and the mean of the genomic data sample, that is, ;in, represents the number of genomic data samples, Indicates Genomic data sample value, Represents the average value of the genomic data samples.
[0078] The concentration of the phenotypic data samples ;in, represents the number of phenotypic data samples, Indicates Phenotypic data sample values, Indicates The average value of the phenotypic data samples.
[0079] By genome weight ratio formula , which can be based on the first complexity of the genome data sample and the concentration of the phenotypic data samples , dynamically obtain the genome weight ratio, so as to adapt to the changes in individual identity, improve flexibility and scope of application.
[0080] S3, constructing a TRM-CNN prediction model and training the TRM-CNN prediction model to obtain the trained TRM-CNN prediction model.
[0081] Specifically, the TRM-CNN prediction model includes a TRM neural network module and a CNN neural network module. The core of the TRM neural network module, that is, the Transformer neural network architecture, lies in the self-attention mechanism. The self-attention mechanism gives the Transformer a powerful ability to perform well in processing sequence data and is good at capturing long-distance dependencies and global information. The CNN neural network module, that is, the convolutional neural network module extracts local features by sliding the convolution kernel on the data.
[0082] The TRM-CNN prediction model includes a TRM neural network module and a CNN neural network module, which combines the local characteristics of CNN and the global attention of Transformer, can balance local and global sample information characteristics, and deeply explore the deep relationship between genotype and phenotype.
[0083] As a preferred technical solution, Figure 3 As shown, in step S3, the specific method for training the TRM-CNN prediction model includes the following steps:
[0084] S31, processing the genome data sample through the encoding layer to obtain a genome sample encoding vector;
[0085] S32, respectively extracting features from the genome sample encoding vector through a TRM neural network module and a CNN neural network module to obtain a first genome sample feature and a second genome sample feature;
[0086] S33, fusing the first genome sample feature and the second genome sample feature according to the genome weight ratio to obtain a genome sample fusion feature vector;
[0087] S34, training the TRM-CNN prediction model according to the phenotype sample feature vector of the phenotype data sample and the genomic sample fusion feature vector.
[0088] The genome sample encoding vector obtained through the encoding layer is fed into the TRM neural network module and the CNN neural network module for in-depth feature extraction.
[0089] S4, obtaining target genome data, and after preprocessing the target genome data, obtaining a target genome encoding vector of the preprocessed target genome data through a coding layer.
[0090] The preprocessing includes but is not limited to data cleaning, integration and conversion.
[0091] Data cleaning mainly involves cleaning the collected data, removing noise and outliers, and processing missing values and duplicate values to ensure data quality and consistency. Data integration mainly involves integrating data from different data sources to eliminate redundancy and contradictions between data. Specifically, data conversion technology can be used to convert data into a unified format and structure.
[0092] Data conversion mainly involves necessary conversion of data based on the needs of data fusion, such as format conversion, unit unification, dimensionless processing, etc.
[0093] S5, respectively extracting features of the target genome encoding vector through a TRM neural network module and a CNN neural network module to obtain a first target genome feature and a second target genome feature.
[0094] S6, fusing the first target genome feature and the second target genome feature according to the genome weight ratio to obtain a target genome fusion feature vector.
[0095] S7, passing the target genome fusion feature vector to the regression layer to obtain the prediction result of the phenotype corresponding to the genome.
[0096] Specifically, the TRM-CNN prediction model is trained to adjust the parameters of the TRM-CNN prediction model, such as the regression layer, especially the weight values corresponding to the neuron connections, to minimize the loss function and optimize the output of the regression layer.
[0097] The genome prediction method constructs a TRM-CNN prediction model, combining the two neural network architectures of Transformer and CNN. It can balance local and global sample information characteristics, deeply explore the deep relationship between genotype and phenotype, and significantly improve the accuracy and generalization ability of genome prediction.
[0098] In addition, the collected genomic data samples and the phenotypic data samples are used as training sample sets, and a dynamic weight ratio allocation mechanism is constructed. The genomic weight ratio is obtained according to the dynamic weight ratio allocation mechanism, and the first target genomic feature and the second target genomic feature are fused based on the genomic weight ratio. The diversity of sample data is also taken into consideration, and the weight ratio is dynamically allocated, which further improves the generalization ability, expands the scope of application, and can improve the efficiency of prediction model training and optimization.
[0099] As a preferred embodiment, Figure 4 As shown, the specific method for training the TRM-CNN prediction model also includes the following steps:
[0100] S8, obtaining characteristic values of multiple model LOSS objective factors. The multiple model LOSS objective factors include but are not limited to the accuracy of the instrumentation used to collect the genomic data samples and phenotypic data samples in step S1, the operating temperature of the system hardware during training, data noise values and abnormal values, and data reading error probability.
[0101] When training a neural network, objective factors such as the accuracy of instrumentation, the operating temperature of the system hardware during training, data noise values and outliers, and the probability of data reading errors will affect the accuracy and convergence speed of the neural network model training. By obtaining the characteristic values of multiple model LOSS objective factors, the factor values that affect the accuracy and efficiency of model training can be taken into account, thereby improving the accuracy and efficiency of model training.
[0102] S9, obtaining the feature alignment loss value between the TRM neural network module and the CNN neural network module.
[0103] The feature alignment loss value includes a KL divergence value and a cosine similarity value.
[0104] KL divergence, also known as relative entropy, is used in information theory to measure the difference between two probability distributions. In the loss function of this application, it is used to constrain the distribution consistency of CNN shallow features and Transformer encoding output. In principle, when CNN and Transformer process the same data, the features they obtain should ideally have similar probability distributions. For example, when processing image data, if CNN and Transformer can both accurately identify objects in the image, the features they generate should be similar in probability distribution. The smaller the value of KL divergence, the more similar the two distributions are. In actual calculations, it is obtained by summing the logarithmic differences of the two probability distributions. In order to make this constraint play a proper role in the loss function, we introduced the parameter To adjust its weight. Parameters The choice of needs to be adjusted according to the specific data set and task, and an appropriate value should be determined through experiments so that the KL divergence term in the loss function can effectively constrain the consistency of the feature distribution without overly dominating the entire loss function.
[0105] Cosine similarity is a measure of the similarity between two vectors. In the loss function of this application, it is used to align the CNN channel attention and the Transformer self-attention matrix. In neural networks, the attention mechanism is an important feature selection and weighting method. Both the CNN's channel attention and the Transformer's self-attention matrix reflect the model's attention to different features. By calculating the cosine similarity between them, the two can be made consistent in feature attention. For example, when processing text data, if a word is considered important in both the CNN's channel attention and the Transformer's self-attention matrix, their cosine similarity will be higher. In order to make the cosine similarity play an appropriate role in the loss function, we introduced the parameter To adjust its weight. Parameters The choice of needs to be adjusted according to the specific data set and task, and a suitable value can be determined through experiments. It is also used to adjust the weight of the cosine similarity term in the loss function, and its value also needs to be optimized based on experiments to achieve the best feature alignment effect.
[0106] S10, constructing a TRM-CNN prediction model network loss function according to the phenotype sample feature vector, the first complexity, the concentration, the feature alignment loss value, and multiple model LOSS objective factor feature values.
[0107] Preferably, the network loss function .
[0108] in, represents the mean square error between the true value and the predicted value of the phenotype sample feature vector, , represents the feature alignment loss value, , represents the number of phenotypic samples, Indicates The true value of the phenotypic sample feature vector, Indicates The predicted value of the phenotypic sample feature vector, , Indicates the first preset parameter and the second preset parameter and both are set by the technician. Respectively represent the KL divergence value and the cosine similarity value, represents the mean square error weight, ranging from 0.725 to 0.91, represents the feature alignment loss value weight, represent the first complexity and the concentration respectively, represents the number of eigenvalues of the objective factor LOSS of the model, Indicates The objective factor characteristic value of LOSS in each model, Indicates The standard value of the objective factor characteristic of the model LOSS, They respectively represent the first preset coefficient, the second preset coefficient and the third preset coefficient and are all set by technical personnel.
[0109] By setting the network loss function, the phenotypic sample feature vector, the first complexity, the concentration, the feature alignment loss value and multiple feature values of the model LOSS objective factors are taken into account, and multiple factors that may affect the model training fitting efficiency and prediction accuracy are integrated, so that the TRM neural network module and the CNN neural network module can work better together, and adaptively optimize the weight distribution according to the different feature vectors of the training sample set, thereby optimizing the generalization ability of the system and the accuracy of the prediction results.
[0110] The present invention also provides a genome prediction system for implementing the genome prediction method, such as Figure 5 As shown, it includes a sample collection module, a weight ratio construction module, a prediction model construction module, a coding layer, a TRM-CNN module layer, a feature fusion layer and a regression layer.
[0111] The sample collection module is used to collect genome data samples and phenotypic data samples, and use the collected genome data samples and the collected phenotypic data samples as training sample sets; the weight ratio construction module is used to construct a dynamic weight ratio allocation mechanism, and obtain the genome weight ratio according to the dynamic weight ratio allocation mechanism.
[0112] The prediction model construction module is used to construct a TRM-CNN prediction model and train the TRM-CNN prediction model to obtain the trained TRM-CNN prediction model; the encoding layer is used to obtain target genome data, and after preprocessing the target genome data, the target genome encoding vector of the preprocessed target genome data is obtained through the encoding layer.
[0113] Preferably, the encoding layer consists of a normalization layer and a linear layer in sequence, followed by a ReLU activation function and a Dropout regularization step. This structure cleverly converts the input two-dimensional genomic data into a richer three-dimensional tensor, laying the foundation for subsequent feature extraction.
[0114] The TRM-CNN module layer is used to extract features of the target genome encoding vector through the TRM neural network module and the CNN neural network module respectively, to obtain the first target genome feature and the second target genome feature; the feature fusion layer is used to fuse the first target genome feature and the second target genome feature according to the genome weight ratio, to obtain a target genome fusion feature vector, and pass the target genome fusion feature vector to the regression layer; the regression layer is used to obtain the prediction result of the phenotype corresponding to the genome based on the target genome fusion feature vector.
[0115] Wherein, the TRM-CNN prediction model includes a coding layer, a TRM-CNN module layer, a feature fusion layer and a regression layer, and the TRM-CNN module layer includes a TRM neural network module and a CNN neural network module. Preferably, the genome weight ratio is 0.5:0.5, that is, the feature fusion layer fuses the first target genome feature and the second target genome feature at a ratio of 0.5:0.5.
[0116] like Figure 6 As shown in the figure, the CNN neural network module includes convolutional layers, ReLU activation functions, and Dropout. The tensor output by the encoding layer is first processed by a 1×1 convolution kernel, then passed to a 3×3 convolution kernel for deeper feature extraction, and finally passed through another 1×1 convolution kernel. The ReLU activation function is then applied to increase the nonlinearity of the features. After completing this series of convolution and activation steps, the feature tensor will undergo Dropout regularization in order to effectively improve the model's performance in feature expression and generalization capabilities.
[0117] like Figure 7 As shown in the figure, the TRM neural network module includes layer normalization, multi-head self-attention, residual connection, layer normalization, feedforward neural network and residual connection units in sequence. After the tensor output by the encoding layer is integrated into the position code, it goes through layer normalization, multi-head self-attention, residual connection, layer normalization, and multiple iterations of feedforward neural network and residual connection in sequence to achieve deep feature extraction and effective encoding of information.
[0118] The system uses the hierarchical architecture of CNN to efficiently extract local features in the sequence and integrates it with the attention mechanism of Transformer to achieve deep interaction and integration of features, thereby capturing more comprehensive and rich information. Its multi-threaded feature fusion strategy can more effectively enhance the representation ability of the model, thereby improving the accuracy of genome prediction.
[0119] The target genome fusion feature vectors extracted by the TRM neural network module and the CNN neural network module are fused according to the weight ratio, and the merged features are then sent to the regression layer. In the regression layer, the three-dimensional tensor is first converted to one dimension, followed by layer normalization. After that, the features pass through a linear layer, and then go through the ReLU activation function and Dropout regularization steps, and finally pass through another linear layer to output the final prediction results.
[0120] The weight ratio construction module includes a weight parameter acquisition unit and a weight ratio acquisition unit. The weight parameter acquisition unit is used to acquire the basic weight ratio of the genome. , the first complexity of the genome data sample and the concentration of the phenotypic data samples A weight ratio acquisition unit, used to acquire the genome weight ratio according to the first complexity, the concentration and the genome weight base ratio .
[0121] Genomic weight base ratio The first complexity of the genome data sample can be set by a technician based on experience. It can be obtained by calculating the ratio between the standard deviation and the mean of the genomic data sample, that is, ;in, represents the number of genomic data samples, Indicates Genomic data sample value, Represents the average value of the genomic data samples.
[0122] The concentration of the phenotypic data samples ;in, represents the number of phenotypic data samples, Indicates Phenotypic data sample values, Indicates The average value of the phenotypic data samples.
[0123] By genome weight ratio formula , which can be based on the first complexity of the genome data sample and the concentration of the phenotypic data samples , dynamically obtain the genome weight ratio, so as to adapt to the changes in individual identity, improve flexibility and scope of application.
[0124] The encoding layer is also used to process the genome data sample through the encoding layer to obtain a genome sample encoding vector; the TRM-CNN module layer is also used to extract features of the genome sample encoding vector through the TRM neural network module and the CNN neural network module respectively to obtain a first genome sample feature and a second genome sample feature.
[0125] Specifically, the TRM-CNN prediction model includes a TRM neural network module and a CNN neural network module. The core of the TRM neural network module, that is, the Transformer neural network architecture, lies in the self-attention mechanism. The self-attention mechanism gives the Transformer a powerful ability to perform well in processing sequence data and is good at capturing long-distance dependencies and global information. The CNN neural network module, that is, the convolutional neural network module extracts local features by sliding the convolution kernel on the data.
[0126] The TRM-CNN prediction model includes a TRM neural network module and a CNN neural network module, which combines the local characteristics of CNN and the global attention of Transformer, can balance local and global sample information characteristics, and deeply explore the deep relationship between genotype and phenotype.
[0127] The feature fusion layer is also used to fuse the first genome sample feature and the second genome sample feature according to the genome weight ratio to obtain a genome sample fusion feature vector; the weight ratio construction module includes a training module, and the training module is used to train the TRM-CNN prediction model according to the phenotype sample feature vector of the phenotype data sample and the genome sample fusion feature vector.
[0128] In summary, the genome prediction method combines the two neural network architectures of Transformer and CNN by constructing the TRM-CNN prediction model, which can balance the local and global sample information characteristics, deeply explore the deep relationship between genotype and phenotype, and significantly improve the accuracy and generalization ability of genome prediction.
[0129] In addition, the collected genomic data samples and the phenotypic data samples are used as training sample sets, and a dynamic weight ratio allocation mechanism is constructed. The genomic weight ratio is obtained according to the dynamic weight ratio allocation mechanism, and the first target genomic feature and the second target genomic feature are fused based on the genomic weight ratio. The diversity of sample data is also taken into consideration, and the weight ratio is dynamically allocated, which further improves the generalization ability, expands the scope of application, and can improve the efficiency of prediction model training and optimization.
[0130] As a preferred technical solution, the training module includes an objective factor feature value acquisition unit, a feature alignment loss value acquisition unit and a network loss function construction unit.
[0131] The objective factor feature value acquisition unit is used to obtain multiple model LOSS objective factor feature values; the feature alignment loss value acquisition unit is used to obtain the feature alignment loss value between the TRM neural network module and the CNN neural network module.
[0132] The network loss function construction unit is used to construct a TRM-CNN prediction model network loss function according to the phenotype sample feature vector, the first complexity, the concentration, the feature alignment loss value and multiple model LOSS objective factor feature values.
[0133] in, represents the mean square error between the true value and the predicted value of the phenotype sample feature vector, , represents the feature alignment loss value, , represents the number of phenotypic samples, Indicates The true value of the phenotypic sample feature vector, Indicates The predicted value of the phenotypic sample feature vector, , Indicates the first preset parameter and the second preset parameter and both are set by the technician. Respectively represent the KL divergence value and the cosine similarity value, , , represent the first complexity and the concentration respectively, represents the number of eigenvalues of the objective factor LOSS of the model, Indicates The objective factor characteristic value of LOSS in each model, Indicates The standard value of the objective factor characteristic of the model LOSS, They respectively represent the first preset coefficient, the second preset coefficient and the third preset coefficient and are all set by technical personnel.
[0134] By setting the network loss function, the phenotypic sample feature vector, the first complexity, the concentration, the feature alignment loss value and multiple feature values of the model LOSS objective factors are taken into account, and multiple factors that may affect the model training fitting efficiency and prediction accuracy are integrated, so that the TRM neural network module and the CNN neural network module can work better together, and adaptively optimize the weight distribution according to the different feature vectors of the training sample set, thereby optimizing the generalization ability of the system and the accuracy of the prediction results.
[0135] The present invention also provides a genome prediction device, which includes: a controller; a memory storing executable instructions; wherein the executable instructions can be run on the controller and implement the genome prediction method.
[0136] The genome prediction method, system and device were used to perform genome prediction on Yorkshire pigs and outbred mice, respectively. As shown in Tables 1 and 2, they can obtain relatively different prediction effects compared with other existing prediction models.
[0137] Table 1 Prediction accuracy of different prediction models for Yorkshire pig genome selection
[0138]
[0139] Table 2 Prediction accuracy of different prediction models for genomic selection of outbred mice
[0140]
[0141] In Tables 1 and 2, GBLUP (Genomic Best Linear Unbiased Prediction) is the best linear unbiased prediction model for genome, TRM (Transformer) is a model based on the self-attention mechanism, CNN is a convolutional neural network model, MLP (Multi-Layer Perceptron) is a multi-layer perceptron model, LightGBM (Light GradientBoosting Machine) is a lightweight gradient boosting machine model, PCA_DNNGP (Principle Component Analysis_Deep Neural Network for Genomic Prediction) is a deep learning network for gene prediction based on component analysis, and DNNGP (Deep Neural Network for Genomic Prediction) is a deep learning network for gene prediction.
[0142] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A genome prediction method, characterized in that: The genome prediction method comprises the following steps: Collecting genomic data samples and phenotypic data samples, and using the collected genomic data samples and the collected phenotypic data samples as training sample sets; Constructing a dynamic weight ratio allocation mechanism, and obtaining the genome weight ratio according to the dynamic weight ratio allocation mechanism; Constructing a TRM-CNN prediction model and training the TRM-CNN prediction model to obtain the trained TRM-CNN prediction model; Obtaining target genome data, and after preprocessing the target genome data, obtaining a target genome encoding vector of the preprocessed target genome data through a coding layer; Extracting features of the target genome encoding vector using a TRM neural network module and a CNN neural network module respectively to obtain a first target genome feature and a second target genome feature; According to the genome weight ratio, the first target genome feature and the second target genome feature are merged to obtain a target genome fusion feature vector; Passing the target genome fusion feature vector to the regression layer to obtain the prediction result of the phenotype corresponding to the genome; The specific method for obtaining the genome weight ratio according to the dynamic weight ratio allocation mechanism includes the following steps: Get the basic proportion of genome weight ; Obtaining the first complexity of the genome data sample and the concentration of the phenotypic data samples ; The genome weight ratio is obtained according to the first complexity, the concentration and the genome weight basic ratio ; The specific method for training the TRM-CNN prediction model also includes the following steps: Obtain the characteristic values of LOSS objective factors of multiple models; Obtaining a feature alignment loss value between the TRM neural network module and the CNN neural network module; Constructing a TRM-CNN prediction model network loss function according to the phenotype sample feature vector of the phenotype data sample, the first complexity, the concentration, the feature alignment loss value, and a plurality of the model LOSS objective factor feature values; The network loss function ; in, represents the mean square error between the true value and the predicted value of the phenotype sample feature vector, , represents the feature alignment loss value, , represents the number of phenotypic samples, Indicates The true value of the phenotypic sample feature vector, Indicates The predicted value of the phenotypic sample feature vector, , Indicates the first preset parameter and the second preset parameter and both are set by the technician. Respectively represent the KL divergence value and the cosine similarity value, , , represent the first complexity and the concentration respectively, represents the number of eigenvalues of the objective factor LOSS of the model, Indicates The objective factor characteristic value of LOSS in each model, Indicates The standard value of the objective factor characteristic of the model LOSS, They respectively represent the first preset coefficient, the second preset coefficient and the third preset coefficient and are all set by technical personnel.
2. A genome prediction method as claimed in claim 1, characterized in that: The specific method for training the TRM-CNN prediction model includes the following steps: Processing the genome data sample through the encoding layer to obtain a genome sample encoding vector; Extracting features of the genome sample encoding vector using a TRM neural network module and a CNN neural network module respectively to obtain a first genome sample feature and a second genome sample feature; According to the genome weight ratio, the first genome sample feature and the second genome sample feature are merged to obtain a genome sample fusion feature vector; The TRM-CNN prediction model is trained according to the phenotype sample feature vector of the phenotype data sample and the genomic sample fusion feature vector.
3. A genome prediction system, used to implement the genome prediction method according to any one of claims 1-2, characterized in that: The genome prediction system comprises: A sample collection module, used to collect genome data samples and phenotype data samples, and use the collected genome data samples and phenotype data samples as training sample sets; A weight ratio construction module, used to construct a dynamic weight ratio allocation mechanism, and obtain the genome weight ratio according to the dynamic weight ratio allocation mechanism; A prediction model building module, used to build a TRM-CNN prediction model and train the TRM-CNN prediction model to obtain the trained TRM-CNN prediction model; The coding layer is used to obtain the target genome data. After preprocessing the target genome data, the target genome coding vector of the preprocessed target genome data is obtained through the coding layer. A TRM-CNN module layer is used to extract features of the target genome encoding vector through a TRM neural network module and a CNN neural network module respectively, to obtain a first target genome feature and a second target genome feature; A feature fusion layer, used to fuse the first target genome feature and the second target genome feature according to the genome weight ratio, obtain a target genome fusion feature vector, and pass the target genome fusion feature vector to the regression layer; A regression layer, used to obtain a prediction result of a phenotype corresponding to the target genome based on the fusion feature vector of the target genome; The TRM-CNN prediction model includes a coding layer, a TRM-CNN module layer, a feature fusion layer and a regression layer, and the TRM-CNN module layer includes a TRM neural network module and a CNN neural network module; The weight ratio building module includes: Weight parameter acquisition unit, used to obtain the basic proportion of genome weight , the first complexity of the genome data sample and the concentration of the phenotypic data samples ; A weight ratio acquisition unit, configured to acquire the genome weight ratio according to the first complexity, the concentration and the genome weight base ratio. ; The weight ratio building module also includes a training module, and the training module includes: An objective factor characteristic value acquisition unit, used to acquire characteristic values of objective factors of multiple model LOSS; A feature alignment loss value acquisition unit, used to acquire a feature alignment loss value between the TRM neural network module and the CNN neural network module; A network loss function construction unit, used to construct a TRM-CNN prediction model network loss function according to the phenotype sample feature vector, the first complexity, the concentration, the feature alignment loss value, and a plurality of the model LOSS objective factor feature values; in, represents the mean square error between the true value and the predicted value of the phenotype sample feature vector, , represents the feature alignment loss value, , represents the number of phenotypic samples, Indicates The true value of the phenotypic sample feature vector, Indicates The predicted value of the phenotypic sample feature vector, , Indicates the first preset parameter and the second preset parameter and both are set by the technician. Respectively represent the KL divergence value and the cosine similarity value, , , represent the first complexity and the concentration respectively, represents the number of eigenvalues of the objective factor LOSS of the model, Indicates The objective factor characteristic value of LOSS in each model, Indicates The standard value of the objective factor characteristic of the model LOSS, They respectively represent the first preset coefficient, the second preset coefficient and the third preset coefficient and are all set by technical personnel.
4. A genome prediction system as claimed in claim 3, characterized in that: The encoding layer is also used to process the genome data sample through the encoding layer to obtain a genome sample encoding vector; The TRM-CNN module layer is also used to extract features from the genome sample encoding vector through the TRM neural network module and the CNN neural network module respectively, to obtain the first genome sample feature and the second genome sample feature; The feature fusion layer is also used to fuse the first genome sample feature and the second genome sample feature according to the genome weight ratio to obtain a genome sample fusion feature vector; The training module is used to train the TRM-CNN prediction model according to the phenotype sample feature vector of the phenotype data sample and the genomic sample fusion feature vector.
5. A genome prediction device, characterized in that: The genome prediction device comprises: Controller; A memory storing executable instructions; The executable instructions can be run on the controller and implement the genome prediction method as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Deplatable genome selection method and system based on deep learning and heterogeneous network
CN117995268A
High-efficiency multi-environment whole genome prediction method and system based on deep learning
CN118098344A
Transform-based genome prediction method
CN118629494A
Method for estimating aquatic animal genome breeding value based on MCP sparse deep neural network model
CN114639446A
Machine learning driven gene discovery and gene editing in plants
US20220301658A1