A genome prediction method that integrates gating and linear attention mechanisms (G×E interaction)
By integrating gating and linear attention mechanisms into the GEFormer model, the problem of capturing the interaction between genotype and environmental factors in multi-environment experiments was solved, thereby improving the accuracy of genome prediction, especially in untested environments and cross-population prediction.
Patent Information
- Application Number
- CN202410899678.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-07-05
AI Technical Summary
In multi-environment experiments, existing genome prediction methods cannot accurately capture the higher-order interactions and dynamic environmental characteristics between genotypes and environmental factors, resulting in inaccurate phenotypic predictions.
The GEFormer model, which integrates gating and linear attention mechanisms, extracts genotype data features from local and global perspectives through gMLP, TimeFeatureBlock, and CrossGatedMLP layers, respectively. It captures long-distance dependencies between SNP sites and temporal features of environmental factors, and integrates genotype and environmental features to capture complex nonlinear relationships. Finally, it predicts phenotypic values through linear regression.
It improves the accuracy of phenotypic prediction for complex traits, is applicable to phenotypic prediction in untested environments, significantly improves the accuracy of phenotypic prediction for hybrids and cross-populations, and is applicable to phenotypic prediction for untested genotypes and environments.
Smart Images

Figure CN118866092B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of genome prediction technology, specifically involving a genome prediction method that integrates gating and linear attention mechanisms (G×E interaction). Background Technology
[0002] Global climate change has brought enormous challenges to global food security and sustainable agricultural development. Developing new crop varieties adapted to different environments is beneficial for further alleviating food shortages caused by biotic and abiotic stresses resulting from climate change. Genome prediction (GP) uses genotype data to predict crop field phenotypes. In plant and animal breeding research, GP has been used to shorten breeding cycles and improve field resource utilization efficiency; however, in multi-environment experiments (MET), the predictive effectiveness of GP needs further improvement. Therefore, it is necessary to consider genotype-environment interaction (GEI) in genome prediction, constructing a genotype-environment-phenotype GP model (G×E) to improve the accuracy of phenotype prediction.
[0003] Constructing a G×E model is crucial for capturing the complex nonlinear relationships between genotype and environmental traits. In quantitative genetics, some researchers capture the interactions between genotype and environment by constructing genotype-environment covariance. Therefore, without adding new environmental information to the model, it is impossible to capture new genotype-environment covariances. In classic machine learning, XGBoost mines potential genotype-environment interaction features using a tree structure. When the dimensionality is too high, additional feature extraction engineering is required. Deep learning methods can flexibly handle features of different dimensions, do not require prior assumptions about the distribution of data, and can automatically capture complex nonlinear interactions.
[0004] However, the above-mentioned technologies have technical problems such as insufficient accuracy in prediction in multi-environment experiments, inability to capture higher-order interactions between environmental factors and between environmental factors and genotypes, and dynamic environmental characteristics throughout the entire reproductive period. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide a genome prediction method that integrates gating and linear attention mechanisms (G×E) for predicting phenotypic values of complex traits.
[0006] The technical solution adopted by this invention to solve the above-mentioned technical problems is: a genome prediction method that integrates gating and linear attention mechanisms (G×E interaction), comprising the following steps:
[0007] S0: Build the GEFormer model, including the gMLP layer, TimeFeatureBlock layer and CrossGatedMLP layer;
[0008] The gMLP layer is used to extract genotype data features from both local and global perspectives, thereby capturing long-distance dependencies between SNP sites.
[0009] The TimeFeatureBlock layer is used to fuse features of different environmental factors within a day through fully dynamic convolution, and to extract the temporal features of environmental factors between days during the crop growth period using a linear attention mechanism. The TimeFeatureBlock layer includes an embedding layer, a dynamic convolution layer, and a linear attention layer. The embedding layer includes a value embedding module, a position embedding module, and a time embedding module, which are used to fuse the embedding information of time series and environmental factors.
[0010] The CrossGatedMLP layer is used to fuse extracted genotype features and environmental features, thereby capturing the complex nonlinear relationships hidden between different omics data. The CrossGatedMLP layer includes Hidden MLP and Gate MLP. Hidden MLP includes the GELU activation function, which is used to compute the hidden representation of the input. Gate MLP includes the Sigmoid activation function, which is used to compute the gate weights.
[0011] S1: Obtain whole genome data, environmental data, and phenotypic data of breeding materials and perform preprocessing;
[0012] S2: Input whole genome data into the GEFormer model, extract genotype data features from both local and global perspectives through the gMLP layer, and capture the genotype features G* of long-distance dependence between SNP sites;
[0013] S3: Input environmental data for the entire reproductive period into the GEFormer model, extract environmental features through the TimeFeatureBlock layer, and capture environmental features E*.
[0014] S4: By fusing genotype features G* and environmental features E* through a CrossGatedMLP layer, the complex nonlinear relationships hidden between different omics data are captured, resulting in the fused feature C. (6) ;
[0015] S5: Utilizing a fully connected neural network to process the fused features C (6) Linear regression was performed to predict the phenotypic values of the breeding material.
[0016] According to the above scheme, the specific steps in step S1 are as follows:
[0017] S11: Obtain whole genome data of breeding materials and breeding chip data of corresponding species through sequencing;
[0018] High-quality variant site data were obtained by comparing whole-genome data with breeding microarray data;
[0019] The alignment method includes taking the intersection, and the resulting genotype data is SNP locus sequence data of length l, G = {g1, g2, ... g}. l}, g i ∈{0,1,2};
[0020] S12: For environmental data, collect environmental factor data related to light, temperature, water, air and soil factors from planting time to harvest time at crop planting sites;
[0021] S13: Collect agronomic traits, including plant height, flowering period, and yield, of the phenotypic data corresponding to each breeding material in the planting environment.
[0022] Furthermore, in step S2, the specific steps are as follows:
[0023] S21: Input the SNP site sequence G into the gMLP layer and map it to a higher-dimensional space through a linear transformation to obtain GMLP. (1) ;
[0024] S22: G (1) Input the GELU activation function and obtain the output G. (2) :
[0025]
[0026] Where g∈G (1) μ is the mean of the normal distribution, and σ is the standard deviation of the normal distribution;
[0027] S23: The output G of the activation function (2) Input spatial gating unit (SGU) to obtain output G (3) ;
[0028] S24: Output G of the Space Gating Unit (SGU) (3) Layer normalization, global average pooling, and linear transformation are performed to extract global information from the feature map and map it to a specified dimension to obtain the genotype feature G*.
[0029] Furthermore, in step S23, the specific steps are as follows:
[0030] S231: G (2) It is divided into parts of the same shape, including res and gate; res is used to transmit raw information, and gate is used for gating mechanisms to control the flow of information;
[0031] S232: Let b represent the batch size, h represent the number of heads, d represent the feature dimension, m represent the output feature dimension, N represent the sequence length, and n represent the sample sequence length. The projection weights W and bias are derived from the model parameters. The feature dimension of the gate is divided into multiple heads to obtain the gate. (1) Then for the gate (1) Spatial projection yields the gate (2) :
[0032]
[0033] gate (2) ∈R b×h×m×d gate (1) ∈R b×h×n×d , W∈R h×m×n bias∈R 1×h×n×1 ;
[0034] S233: Gate for outputting spatial projection (2) Multiplying the output of the corresponding linear transformation yields G. (3) :
[0035] G (3) =res⊙gate (2) .
[0036] Furthermore, in step S3,
[0037] S31: Input the date vector D into the embedding layer of the TimeFeatureBlock layer. (1) and environmental factor vector E (1) D (1) ∈R d×3 E is an encoded d-day date vector. (1) ∈R d×e The standardized environmental factor vector consists of e environmental factors per day; the embedding layer outputs E. (4) ;
[0038] S32: E (4) The input is a dynamic convolutional layer, which captures the combined effects of various environmental factors each day, and outputs E. (7) ;
[0039] S33: E (7) Input a linear attention layer, which captures the dependencies of environmental factors over time to obtain environmental features E*.
[0040] Furthermore, in step S31, the specific steps are as follows:
[0041] S311: E is embedded via the value embedding module(1) The values in the matrix are converted into a low-dimensional representation E. (2) :
[0042]
[0043] Where, E∈R n E (1) ∈R c’ n represents the index of the input channel, c represents the number of input channels, and c' represents the number of output channels;
[0044] S312: E (1) The input position embedding module encodes the position information of the input sequence into a vector form using sine and cosine functions, resulting in a vector E containing the internal positional relationships of the sequence. (3) The weight calculation process for position embedding is as follows:
[0045]
[0046] Where pos represents the position in the input sequence, i represents the dimension index, d represents the embedding dimension, and Pos_Embedding(pos, 2i) and Pos_Embedding(pos, 2i+1) represent the even-numbered and odd-numbered dimensions of position pos in the position embedding matrix, respectively.
[0047] S313: D (1) Input time embedding module to obtain D (2) The specific calculation process for temporal embedding is as follows:
[0048]
[0049] Where i represents the time dimension, Embedding i This represents the embedding function for the i-th time dimension;
[0050] S314: Embed the value into the module's output E (2) The output E of the position embedding module (3) and the output D of the time embedding module (2) Adding them together gives E (4) .
[0051] Furthermore, in step S32, the specific steps are as follows:
[0052] S321: Input-based E (4) Different kernel attention mechanisms are obtained through multi-dimensional attention mechanisms, including channel attention A. channel Spatial attention A spatial Convolutional kernel attention A kernel and filter attention Afilter :
[0053] A channel =σ(Conv1d channel (E (4) )),
[0054] A spatial =σ(Conv1d spatial (E (4) )),
[0055] A kernel =softmax(Conv1d kernel (E (4) )),
[0056] A filter =σ(Conv1d filter (E (4) )),
[0057] Where σ is the Sigmoid activation function, A channel ∈R b×c×1 A spatial ∈R b×1×1×1×k A kernel ∈R b ×n×1×1×1 A filter ∈R b×c’×1 E (4) ∈R b×c×1 b is the batch size, c is the number of input channels, c' is the number of output channels, k is the kernel size, and n is the number of kernels.
[0058] S322: Place A channel Applied to E (4) Each channel receives E (5) , for E (5) Perform convolution operation; simultaneously convert A spatial 、A kernel The weights of the convolution are obtained by multiplying the initial weights by the product of the product and the product weights, and the output E is obtained. (6) ;
[0059] S323: A filter The feature vector E applied to the output of the convolution (6) Get E (7) .
[0060] Furthermore, in step S33, the specific steps are as follows:
[0061] S331: For E (7) A linear mapping is performed to obtain the query vector Q, the key vector K, and the value vector V;
[0062] S332: Based on the total number of keys L used respectively K Total number of queries L Q Calculate the number of random samples U_part for the keys and the number of samples u for the query; randomly sample U_part keys to obtain K_sample; calculate the sparsity measure M based on the attention score between the query Q and the sampled keys K_sample.
[0063]
[0064] Where the constant c represents the scaling factor, L K L represents the length of the key sequence. Q Indicates the length of the query sequence; q m ∈Q, q m It is the m-th query vector; k n ∈K_sample,k n It is the nth key vector; d is the dimension of the query vector and the key vector, L K It is the length of the key sequence;
[0065] S333: Based on the sparsity measurement value M, take the query vector Q corresponding to the first u queries. reduce Calculate K and Q reduce The attention score represents the degree of correlation between each time step and other time steps; applying the attention score to the value vector yields representative sequence features E. (8) :
[0066]
[0067] Among them, Q reduce The first u queries are selected based on the sparsity measurement value M;
[0068] S334: For E (8) Perform a linear transformation and integrate the comprehensive information from multiple sources to obtain E. (9) E is processed through convolution and max pooling. (9) Feature extraction is performed to obtain environmental features E*.
[0069] Furthermore, in step S4, the specific steps are as follows:
[0070] S41: Input genotype feature G* and environmental feature E* into a CrossGated MLP layer; compute the hidden representation G* of G* and E* using Hidden MLP. (4) and E (10) The gate weights G* and E* are calculated using Gate MLP. (5) and E (11) ;
[0071] S42: Gating weight G(5) and E (11) Applied to the hidden representation G (4) and E (10) , to obtain C (1) and C (2) splicing C (1) and C (2) Obtain fusion feature C (3) :
[0072]
[0073] S43: Multiply G* and E* to obtain G*×E*; perform feature fusion on G* and G*×E* and E* and G*×E* respectively through the CrossGatedMLP layer to obtain the fused feature C. (4) and C (5) splicing C (3) C (4) and C (5) Obtain the interaction characteristics between genotype and environment C (6) .
[0074] Furthermore, in step S5, the specific steps are as follows:
[0075] S51: Combining genotype with environment interaction characteristics C (6) Input a linear layer, and obtain C through linear mapping. (7) ;
[0076] S52: C (7) Input the LeakyReLU activation function and output C. (8) The input features were fitted non-linearly; let c∈C (7) The calculation process of the LeakyReLU activation function is as follows:
[0077] LeakyReLU(c) = max(αc,c),
[0078] C (8) By randomly setting the output of some neurons to 0 using Dropout, we obtain C. (9) ;
[0079] S53: Transform C using a linear transformation (9) This is mapped to a single value, which is the predicted phenotypic value C output by the model. (10) .
[0080] The beneficial effects of this invention are as follows:
[0081] 1. The genome prediction method of the present invention, which integrates gating and linear attention mechanisms (G×E interaction), constructs a GEFormer model, including a gMLP layer, a TimeFeatureBlock layer, and a CrossGatedMLP layer. By extracting features, fusing features, and capturing relationships, it achieves the function of accurately predicting phenotypic values of complex traits based on genomic and environmental data, thereby accelerating intelligent crop design breeding and showing great application potential in real crop breeding.
[0082] 2. This invention is applicable to accurately predicting the phenotypic values of untested genotypes in untested environment modes.
[0083] 3. This invention can simultaneously use paternal and maternal inbred line data to predict the phenotype of hybrids, significantly improving the accuracy of hybrid phenotype prediction, and is particularly effective in predicting phenotypic values of untested genotypes under untested environmental conditions.
[0084] 4. This invention is applicable to cross-population phenotype prediction. GEFormer significantly improves the accuracy of phenotype prediction between populations with different genetic backgrounds, and is particularly effective in predicting phenotypic values of test genotypes in untested environments and in predicting phenotypic values of untested genotypes in untested environments. Attached Figure Description
[0085] Figure 1 This is a flowchart of an embodiment of the present invention.
[0086] Figure 2 These are diagrams illustrating three experimental setup schemes according to embodiments of the present invention.
[0087] Figure 3 This is a performance evaluation graph of different methods in three populations for untested genotypes in a test environment, according to an embodiment of the present invention.
[0088] Figure 4 This is a performance evaluation graph of different methods on three populations in an untested environment for the test genotypes of this invention.
[0089] Figure 5 This is a performance evaluation graph of different methods for three populations in an untested environment for untested genotypes according to embodiments of the present invention.
[0090] Figure 6 This is a performance evaluation graph of the GEFormer method in this invention for predicting the PH phenotype of the CUBIC1404 inbred line in an unknown environment.
[0091] Figure 7 This is a graph showing the results of the GEFormer method in this invention predicting the EW phenotype of the CUBIC1404 inbred line in an unknown environment.
[0092] Figure 8 This is a performance analysis diagram of the GEFormer method in this invention, which uses different inbred lines to predict the phenotype of hybrids.
[0093] Figure 9 This is a visualization of the feature extraction results of the GEFormer method of this invention, trained only with maternal data, in predicting the EW trait extraction of the 6210 population in the LN region.
[0094] Figure 10 This is a visualization of the feature extraction results of the GEFormer method of this invention, which uses a model trained by fusing maternal and paternal data to predict the EW trait extraction of the 6210 population in the LN region.
[0095] Figure 11 This is a performance evaluation graph of the GEFormer method in this invention for predicting the DTA and EW phenotypes of the CUBIC1404 inbred line in an unknown environment. Detailed Implementation
[0096] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0097] Example 1
[0098] This invention proposes a genome prediction model for maize genotype-environment interactions based on a fusion gating mechanism (MLP) and a linear attention mechanism, named GEFormer. It comprises a gMLP layer, a TimeFeatureBlock layer, and a CrossGatedMLP layer. First, the gMLP layer extracts genotype data features from both local and global perspectives, thereby capturing long-range dependencies between SNP loci. Based on the actual crop growth environment, the TimeFeatureBlock layer utilizes fully dynamic convolution (ODconv) to fuse features between different environmental factors within a single day, and employs a linear attention mechanism to extract the temporal features of environmental factors across days during the crop's growth period. Finally, based on the idea of fusing cross-modal features, the CrossGatedMLP layer fuses the extracted genotype and environmental features, thereby capturing the complex nonlinear relationships hidden between different omics data. The technical solution provided by this invention is as follows: Figure 1 As shown.
[0099] See Figure 1 The embodiments of the present invention include the following steps:
[0100] S1. Obtain whole-genome data from sequencing, environmental data throughout the maize growth cycle, and phenotypic data from the field. Perform data preprocessing on the acquired whole-genome, environmental, and phenotypic data. Specific steps are as follows:
[0101] Whole-genome data of breeding materials were obtained through sequencing, and breeding microarray data of the corresponding species were also obtained. High-quality variant site data were obtained by comparing the whole-genome data with the breeding microarray data. The comparison method included intersection analysis. The resulting genotype data consisted of L-length SNP sequence data G = {g1, g2…g…}. l}, g i ∈{0,1,2};
[0102] For environmental data, collect data on light, temperature, moisture, air, and soil-related environmental factors from planting time to harvest time at the crop planting site;
[0103] For each breeding material, collect agronomic traits such as plant height, flowering period, and yield for each planting environment;
[0104] S2, in the GEFormer model, the gMLP module extracts genotype data features from both local and global perspectives from the input whole genome data, thereby capturing the long-distance dependency features G* between SNP sites; the specific steps are as follows:
[0105] S201, the SNP site sequence G is input into the gMLP layer and mapped to a higher-dimensional space through a linear transformation to enhance the feature representation capability of the model, resulting in G. (1) .
[0106] S202, G (1) Input the GELU activation function and obtain the output G. (2) The GELU activation function is a smooth, non-linear function that approximates a linear transformation when the input value is small. It saturates when the input value is large, which helps the model propagate gradients quickly, prevents overfitting, and makes the model more stable during gradient calculation and backpropagation.
[0107] The implementation of the GELU activation function is shown below:
[0108]
[0109] Where g∈G (1) μ is the mean of the normal distribution, and σ is the standard deviation of the normal distribution.
[0110] S203, the output G of the activation function (2) Input the spatial gating unit (SGU); the specific steps are as follows:
[0111] First, G (2) It is divided into two parts of the same shape: res and gate; res is used to transmit raw information, and gate is used for gating mechanism to control the flow of information.
[0112] Secondly, the feature dimensions of the gate are divided into multiple heads to obtain the gate. (1) Then for the gate (1) Perform spatial projection to obtain the gate. (2) This operation allows the model to capture input data features from different perspectives. Simultaneously, by weighting the gating tensor of each head with different weights, the model can learn features more flexibly. The specific implementation is as follows:
[0113]
[0114] Among them, gate (2) ∈R b×h×m×d gate (1) ∈R b×h×n×d , W∈R h×m×n bias∈R 1×h×n×1 Where b represents the batch size, h represents the number of heads, d represents the feature dimension, m represents the output feature dimension, N represents the sequence length, n represents the sample sequence length, and the projection weights W and biases are derived from the model parameters.
[0115] Finally, the gate output by spatial projection (2) Multiplying the output of the corresponding linear transformation yields G. (3) G (3) It preserves long-range dependencies while retaining important features and reducing the influence of unimportant features. The specific calculation process is as follows:
[0116] G (3) =res⊙gate (2) ;
[0117] S204, output G of SGU (3) By performing layer normalization, global average pooling, and linear transformation, the global information of the feature map is extracted and mapped to a specified dimension to obtain the genotype feature G*.
[0118] S3, for the input environmental data throughout the entire growth period, drawing on the model of the actual crop growth environment, the temporal characteristics E* of environmental factors are captured through the TimeFeatureBlock module; the specific steps are as follows:
[0119] Environmental features are extracted from the input environmental data spanning the entire reproductive period. The input to TimeFeatureBlock is a date vector D. (1) and environmental factor vector E (1) Among them, D (1) ∈R d×3 E is an encoded d-day date vector. (1) ∈R d×eThis is a tensor standardized for e environmental factors each day. The TimeFeatureBlock layer contains an embedding layer, a dynamic convolutional layer, and a linear attention layer. Specifically:
[0120] S301, the embedding layer consists of three parts: value embedding, position embedding, and temporal embedding. It is used to fuse the embedding information of time series data and environmental factors, resulting in a richer semantic representation. The specific steps are as follows:
[0121] First, use value embedding to embed E (1) The values in the matrix are converted into a low-dimensional representation E. (2) This is beneficial for the model to learn the relationships between values in the input tensor. The specific calculation process of value embedding is as follows:
[0122]
[0123] Where, E∈R n E (1) ∈R c’ , where n represents the index of the input channel, c represents the number of input channels, and c' represents the number of output channels.
[0124] Secondly, E (1) The input position embedding module encodes the positional information of the input sequence into a vector form using sine and cosine functions. This operation allows the model to better learn the relative positional relationships between elements in the sequence, resulting in a vector E that contains the internal positional relationships of the sequence. (3) The weight calculation process for position embedding is as follows:
[0125]
[0126] Where pos represents the position in the input sequence, i represents the dimension index, d represents the embedding dimension, and Pos_Embedding(pos, 2i) and Pos_Embedding(pos, 2i+1) represent the even-numbered dimension and odd-numbered dimension of position pos in the position embedding matrix, respectively.
[0127] Then, D (1) Input time embedding module to obtain D (2) This module maps temporal features to a higher dimension, helping the model better understand temporal information. The specific calculation process of temporal embedding is as follows:
[0128]
[0129] Where i represents the time dimension, Embedding iThis represents the embedding function for the i-th time dimension.
[0130] Finally, the value is embedded in the output E. (2) The output E of position embedding (3) and the output D of time embedding (2) Adding them together gives E (4) .
[0131] S302, the output E of the embedding layer (4) Input a dynamic convolutional layer to capture the combined effects of various environmental factors each day; the specific steps are as follows:
[0132] First, based on the input E (4) Different kernel attention mechanisms are obtained through multi-dimensional attention mechanisms, namely channel attention A. channel Spatial attention A spatial Convolution kernel attention A kernel and filter attention A filter The specific implementation process is as follows:
[0133] A channel =σ(Conv1d channel (E (4) ))
[0134] A spatial =σ(Conv1d spatial (E (4) ))
[0135] A kernel =softmax(Conv1d kernel (E (4) ))
[0136] A filter =σ(Conv1d filter (E (4) ))
[0137] Where σ is the Sigmoid activation function, A channel ∈R b×c×1 A spatial ∈R b×1×1×1×k A kernel ∈R b ×n×1×1×1 A filter ∈R b×c’×1 E (4) ∈R b×c×1 Where b is the batch size, c is the number of input channels, c' is the number of output channels, k is the kernel size, and n is the number of kernels.
[0138] Then, A channel Applied to E(4) Each channel receives E (5) , for E (5) Perform a convolution operation. Simultaneously, A... spatial A kernel The weights of the convolution are obtained by multiplying the initial weights by the product of the product and ... (6) E (4) Each channel corresponds to a different environmental factor (such as temperature, water, etc.) and time feature. Channel attention assigns different weights to these channels, making the model pay more attention to the environmental factors with greater influence.
[0139] Finally, A filter The feature vector E applied to the output of the convolution (6) E (7) By adjusting the weights of each filter, more critical environmental features can be extracted when outputting features, further improving the model's feature representation capabilities.
[0140] S303 will output E of the dynamic convolutional layer (7) Input is processed through a linear attention layer to capture the dependencies between environmental factors each day; the specific steps are as follows:
[0141] First, regarding E (7) A linear mapping is performed to obtain the query vector Q, the key vector K, and the value vector V.
[0142] Secondly, using the total number of queries L Q Total number of keys L K Calculate the number of random samples U_part for each key, the number of sample keys u for each query, and randomly sample U_part keys to obtain K_sample. Then, based on the attention score between the query Q and the sampled keys K_sample, calculate the sparsity measure M. This value measures the difference between the weight distribution of each query and a uniform distribution; a larger value indicates a sparser attention weight distribution. The specific implementation is as follows:
[0143]
[0144] Where the constant c represents the scaling factor, L K L represents the length of the key sequence. Q Indicates the length of the query sequence. q m ∈Q, q m It is the m-th query vector. n ∈K_sample,k n It is the nth key vector. d is the dimension of the query vector and the key vector, L K It is the length of the key sequence.
[0145] Then, based on the sparsity measurement value M, the query vector Q corresponding to the first u queries is taken.reduce Calculate K and Q reduce The attention score represents the degree of correlation between each time step and other time steps. Finally, the attention score is applied to the value vector to obtain representative sequence features E. (8) The specific implementation is as follows:
[0146]
[0147] Among them, Q reduce The first u queries are selected based on the sparsity measure M.
[0148] Finally, regarding E (8) Perform a linear transformation and integrate the comprehensive information from multiple sources to obtain E. (9) By using convolution and max pooling to apply E (9) Feature extraction is performed to obtain environmental features E*.
[0149] S4, based on the idea of fusing cross-modal features, utilizes the genotype feature G* and environmental feature E* extracted by CrossGatedMLP to capture the complex nonlinear relationships hidden between different omics data, thereby obtaining the fused feature C. (6) The specific steps are as follows:
[0150] The CrossGatedMLP module integrates information from two features, thereby fusing genotype feature G* and environmental feature E*. This layer consists of two MLPs. One is a Hidden MLP containing the GELU activation function, used to compute the hidden representation of the input. The other two are Gate MLPs containing the Sigmoid activation function, used to compute the gating weights. Details are as follows:
[0151] First, the output G* of the gMLP layer and the output E* of the TimeFeatureBlock layer are input into the CrossGatedMLP layer. The hidden representation G* of G* and E* is then computed using Hidden MLP. (4) and E (10) Simultaneously, the gating weights G* and E* are calculated using Gate MLP. (5) and E (11) .
[0152] Secondly, the gating weight G (5) and E (11) Applied to the hidden representation G (4) and E (10) , to obtain C (1) and C (2) Then concatenate C. (1) and C (2) Obtain fusion feature C (3)The cross-gating mechanism controls the interaction of input features by adjusting the gating weights. The specific implementation is as follows:
[0153] C (1) =(1-G (5) )×G (4) +E (11) ×E (10)
[0154] C (2) = (1-E (11) )×E (10) +G (5) ×G (4)
[0155] Finally, G* and E* are multiplied to obtain G*×E*. CrossGatedMLP is then used to fuse the features of G* and G*×E*, and E* and G*×E* respectively, to obtain the fused feature C. (4) and C (5) splicing C (3) C (4) and C (5) Obtain the interaction characteristics between genotype and environment C (6) .
[0156] S5, using a fully connected neural network to process the fused features C (6) Linear regression was performed to predict the phenotypic values of the material; the specific steps were as follows:
[0157] First, the interaction characteristics between genotype and environment (C) are considered. (6) Input a linear layer, and obtain C through linear mapping. (7) This operation extracts key features while reducing the dimensionality of the feature vector.
[0158] Then, C (7) Input the LeakyReLU activation function. LeakyReLU introduces a non-zero slope, solving the problem that the ReLU activation function's gradient is 0 in the negative region, causing neurons to fail to update. The output C of the activation function. (8) It non-linearly fits the input features, resulting in stronger feature representation capabilities. The calculation process of the LeakyReLU activation function is shown below (where c∈C). (7) ):
[0159] LeakyReLU(c) = max(αc,c)
[0160] The output C of the activation function (8) By randomly setting the output of some neurons to 0 using Dropout, we obtain C. (9) This operation reduces the dependencies between neurons in the network, prevents overfitting, and improves the model's generalization ability.
[0161] Finally, C is transformed using a linear transformation. (9) This is mapped to a single value, which is the predicted phenotypic value C output by the model. (10) .
[0162] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0163] Example 2
[0164] The GEFormer method of this invention demonstrates strong robustness in different experimental settings. Based on four maize datasets, three types of experiments (untested genotypes in untested environments, tested genotypes in untested environments, and untested genotypes in untested environments) were used to verify the accuracy of GEFormer in predicting three important agronomic traits (plant height, flowering time, and yield). The results of these three types of experiments show that GEFormer's prediction accuracy outperforms six state-of-the-art statistical learning methods and four machine learning methods. The experimental setup technology provided by this invention is as follows: Figure 2 As shown.
[0165] An experiment was conducted using maize data (CUBIC1404 inbred line, CUBIC1404*JING724 hybrid, CUBIC1404*ZHENG58 hybrid, CUBIC6210 hybrid, Maize976 hybrid) to perform genome prediction experiments. The results of these experiments will illustrate the superiority of the method of this invention in genotype-environment interaction.
[0166] This invention evaluates the predictive performance of untested genotypes in a test environment. The phenotypic prediction accuracy of GEFormer was compared with that of four machine learning methods (Random Forest (RF), Gradient Boosting Decision Tree (XGBoost), Stacking, and Multilayer Perceptron (DL)) and six statistical learning methods (main-effect EAD+GE bias model based on best linear unbiased genomic prediction (EAD+GE(GB)), main-effect EAW+GE response canonical model based on best linear unbiased genomic prediction (EADW+GW(GB)), main-effect EAD+GE bias model based on Gaussian kernel (EAD+GE(GK)), main-effect EAW+GE response canonical model based on Gaussian kernel (EADW+GW(GK), main-effect EAD+GE bias model based on deep kernel (EAD+GE(DK)) and main-effect EAW+GE response canonical model based on deep kernel (EADW+GW(DK))) in three populations (CUBIC1404 inbred line, CUBIC1404*JING724 hybrid, and CUBIC1404*ZHE NG58 hybrid). Figure 3 As shown). Figure 3 As shown in (A, B, C), GEFormer outperforms four machine learning methods and six statistical learning methods in pH prediction accuracy across most environments. Furthermore, GEFormer achieves the highest average prediction accuracy in both the CUBIC1404 inbred line and the CUBIC1404*JING724 hybrid population, at 58.93% and 46.83% respectively, exceeding the comparison methods by at least 2.20% and 2.87%. In the CUBIC1404*ZHENG58 population, GEFormer's average prediction accuracy is 53.92%, slightly lower than the best method (EAD+GE(GK)) by 0.12%. Figure 3 As shown in (D, E, F), GEFormer achieved higher EW prediction accuracy than the comparative method in all environments across different populations, with average prediction accuracy of 40.13%, 31.85%, and 41.61%, respectively, representing improvements of at least 3.57%, 3.99%, and 2.56% over the comparative method.
[0167] This invention evaluates the predictive performance of test genotypes in untested environments. Using data from three populations, the phenotypic prediction accuracy of GEFormer was compared with that of four machine learning methods and six statistical learning methods in untested environments. In PH and EW predictions for each population, the average prediction accuracy of DL, EADW+GW(GB), and EADW+GW(DK) methods was lower than that of other methods (e.g., ...) in different environments. Figure 4(As shown). Meanwhile, GEFormer demonstrated relatively stable prediction accuracy across different environments compared to eight other methods (RF, XGBoost, Stacking, EAD+GE(GB), EAD+GE(GK), EADW+GW(GK), and EAD+GE(DK)). For EW, GEFormer exhibited the highest average prediction accuracy across all three populations, exceeding the comparison methods by at least 0.46%, 2.47%, and 0.24%, respectively. This indicates that GEFormer achieved high average prediction accuracy in phenotypic prediction of genotypes in untested environments across the three populations, and its prediction performance remained relatively stable across different environments.
[0168] This invention evaluated the predictive performance of untested genotypes in untested environments. In phenotypic prediction for three populations, GEFormer achieved the highest PH prediction accuracy across all environments, with average accuracies of 58.87%, 48.12%, and 55.16%, respectively, exceeding the comparative methods by at least 1.57%, 2.57%, and 2.14%. Simultaneously, GEFormer demonstrated the highest EW prediction accuracy across all environments, with average prediction accuracies of 36.27%, 26.52%, and 36.68% for the three populations, representing improvements of 2.57% (EAD+GE(GK)), 5.70% (EADW+GW(GK)), and 1.96% (EAD+GE(GK)) compared to the optimal comparative methods.
[0169] This invention designs a strategy to find the relatively optimal training set environment for predicting phenotypes in unknown environments with fewer experimental combinations, without exhausting all combinations of known environments. Taking the phenotype prediction of the JL (Jilin) environment in the CUBIC1404 population when the environment is unknown as an example, one environment is allocated from four known environments (LN, BJ, HB, and HN) for model validation, and the remaining three environments are used for model training. Then, the four trained models are used to independently predict the phenotype in the JL environment. The three training set environments corresponding to the optimal accuracy are selected for further analysis. One environment is selected from the three for model validation, and the remaining two are used for model training. Similarly, the model with the highest prediction accuracy is selected and compared with the optimal accuracy obtained in the previous step. If the optimal accuracy of the two environment training sets is lower than the optimal accuracy of the three training set environments, it indicates that the phenotypic prediction of this environment requires three training set environments, that is, the optimal training set environment for predicting the JL environment phenotype has been found. Otherwise, the training set environment corresponding to the optimal accuracy is further analyzed. One of the two environments is used for model validation, and the other environment is used for model training. By evaluating the prediction accuracy of the two models and comparing it with the best accuracy obtained in the previous step until the highest prediction accuracy is obtained, the best training set environment for predicting the JL environment phenotype is found.
[0170] For the CUBIC1404 inbred line population, independent prediction accuracies were obtained using models trained with different training set environments (e.g., Figure 6 and Figure 11 (As shown). When the environments JL, LN, BJ, HB, and HN are unknown, models trained using three environments generally outperform those trained using two environments in predicting the PH and EW phenotypes, with average optimal prediction accuracies of 77.21% and 52.19%, respectively. When the environments LN and BJ are unknown, models trained using three environments achieve the highest accuracy in predicting the DTA phenotype. When the environments JL, HB, and HN are unknown, the prediction accuracies of models trained using two environments are 2.73%, 1.33%, and 1.75% higher than those trained using three environments, respectively, with negligible differences. Therefore, models trained with more environmental data can predict phenotypes in unknown environments better in most cases.
[0171] This invention utilizes the method to evaluate the optimal prediction model for stable, high-yielding varieties in unknown environments. The overlap between the top 5% of varieties predicted by GEFormer and the top 5% of varieties with actual high yields was calculated as an indicator for recommending stable, high-yielding varieties. First, the overlap between 5% of the CUBIC inbred line population and the top 5% of the actual high-yielding lines was randomly selected and repeated 100 times. The average value was compared with the accuracy of GEFormer's recommendations, as shown in Fig. 7(AE). When BJ was considered an unknown environment, GEFormer recommended 27 varieties for high yields when planted in BJ, with a recommendation accuracy of 38.57%, significantly higher than the 4.87% of the random recommendation results. When HB was considered an unknown environment, GEFormer recommended 22 varieties for high yields when planted in HB, with a recommendation accuracy of 31.43%, significantly higher than the 5.51% of the random recommendation results. When HN was considered an unknown environment, GEFormer recommended 28 varieties for high yields when planted in HN, with a recommendation accuracy of 38.57%, significantly higher than the 5.06% of randomized recommendations. When JL was considered an unknown environment, GEFormer recommended 16 varieties for high yields when planted in JL, with a recommendation accuracy of 22.86%, significantly higher than the 5.40% of randomized recommendations. When LN was considered an unknown environment, GEFormer recommended 22 varieties for high yields when planted in HB, with a recommendation accuracy of 31.43%, significantly higher than the 5.51% of randomized recommendations. Among these, three varieties (MG_739, MG_1000, and MG_1232) consistently achieved high yields in all five regions (e.g., ...). Figure 7 (as shown in (F)).
[0172] The predictive ability of inbred lines for hybrids was evaluated using the method of this invention. The 6210 hybrid population was obtained by hybridizing 207 materials and 30 test species materials from the CUBIC1404 inbred line population. Using 207 maternal materials and maternal and paternal materials (207+30) as training populations, a predictive model GEFormer_M3 was trained under untested genotypes in untested environments. This model was then used to predict three phenotypes (PH, EW, and DTA) in the 6210 hybrid population, and the results are as follows. Figure 8 As shown, the average accuracies of PH, EW, and DTA were 46.44%, 24.30%, and 57.71%, respectively, which were 31.25%, 16.99%, and 51.62% higher than those of models trained using only maternal parent materials. This demonstrates that integrating inbred line data from both maternal and paternal parents can effectively improve the accuracy of hybrid phenotypic prediction.
[0173] Furthermore, the high-dimensional features extracted by each module in the GEFormer model were reduced to 2D planar features using the feature visualization technique t-SNE. By comparing the differences in the correlation between the features captured by the same module after dimensionality reduction and the phenotypes, the reasons for the high prediction accuracy of the GEFormer model trained using both maternal and paternal data were analyzed. Taking the prediction results of the EW trait of the 6210 population in the LN region as an example, the feature visualization results extracted by the GEFormer_M3 model trained using only maternal data are shown below. Figure 9 As shown, the feature visualization results extracted by the GEFormer_M3 model trained from both parent and parent data are as follows. Figure 10 As shown in the figure. The colors in the figure represent the correlation between the captured features and the phenotypic values. Through... Figure 9 (A) and Figure 10 (A) It can be seen that the original SNP data has complex nonlinear characteristics and also exhibits some clustering phenomena. Through... Figure 9 (B) and Figure 10 (B) It can be seen that the characteristics of environmental factors are relatively discrete, and there are few characteristics related to the phenotype. Figure 9 (C) and Figure 10 (C) indicates the correlation between genotype features and phenotypes extracted by gMLP. GEFormer_M3_M (a model trained based on maternal data) captures more features similar to the original SNP data. GEFormer_M3_P (a model trained by fusing maternal and paternal data) can capture more complex nonlinear features related to dominant effects or epistatic relationships. Figure 9 (D) and Figure 10(D) indicates the correlation between environmental factor features extracted by TimeFeatureBlock and phenotype. It is evident that GEFormer_M3 captures more correlations between environmental factors and temporal features, and learns more phenotype-related features. GEFormer_M3_P captures a denser set of environmental factor features than GEFormer_M3_M. Figure 9 (E) and Figure 10 (E) indicates the correlation between the genotype and environmental features extracted by CrossGatedMLP and the resulting phenotype. Compared to the genotype and environmental features before fusion, the fusion manipulation yields richer features. This suggests that GEFormer can learn complex nonlinear fusion features. GEFormer_M3_P can capture more complex variation features than GEFormer_M3_M. Figure 9 (F) and Figure 10 (F) indicates that the MLP is further utilized to enhance the correlation between the fused features and the phenotype. It can be seen that GEFormer_M3_P captures more complex nonlinear relationships and richer variation features than GEFormer_M3_P. Therefore, the GEFormer model trained based on maternal and paternal data can capture more complex nonlinear features of genotype, environmental factors, and genotype-environment interactions, and its prediction accuracy is higher than that of the model trained using only maternal data.
[0174] The method of this invention is applied to predict the phenotypic characteristics of hybrids across populations. One hundred materials were randomly selected from the Maize976 hybrid population as a test set, and the population remaining after removing the 100 test materials from the Maize976 population was designated as the Maize976* population. The GEFormer_M2 and GEFormer_M3 models were constructed using the CBUIC1404 inbred line population, the Maize976* population, and the CBUIC1404+Maize976* population under experimental schemes M1 and M2, respectively. The predictions of PH and EW for the 100 materials in Maize976 by these models are shown in Table 1.
[0175] Table 1. Experimental results of cross-population prediction of PH and EW
[0176]
[0177]
[0178] Wherein, 976* represents the population after removing 100 test materials from the Maize976 population.
[0179] Compared to the CUBIC1404 population, the GEFormer_M2 and GEFormer_M3 models trained using the 976* population showed an average improvement of 28.0% and 45.62% in predicting the PH phenotype, respectively, and an average improvement of 52.11% and 26.21% in predicting EW. Furthermore, the two models trained using CUBIC1404+Maize976* showed the highest accuracy in predicting most phenotypes. This indicates that adding some hybrid materials to the training set of the inbred line population can significantly improve the accuracy of predicting hybrid population phenotypes. Meanwhile, the GEFormer_M2 model trained using CUBIC1404+Maize976* outperformed GEFormer_M3 in prediction performance. The former's average accuracy in predicting PH and EW was 2.04% and 16.72% higher than the latter, respectively. This demonstrates that using data from all materials in the population under different environments can also improve the accuracy of hybrid population phenotype prediction.
[0180] The above embodiments are only used to illustrate the design concept and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made based on the principles and design ideas disclosed in the present invention are within the protection scope of the present invention.
Claims
1. A genome prediction method integrating gating and linear attention mechanisms (G×E interaction), characterized by: Includes the following steps: S0: Build the GEFormer model, including the gMLP layer, TimeFeatureBlock layer and CrossGatedMLP layer; The gMLP layer is used to extract genotype data features from both local and global perspectives, thereby capturing long-distance dependencies between SNP sites. The TimeFeatureBlock layer is used to fuse features of different environmental factors within a day through fully dynamic convolution, and to extract the temporal features of environmental factors between days during the crop growth period using a linear attention mechanism. The TimeFeatureBlock layer includes an embedding layer, a dynamic convolution layer, and a linear attention layer. The embedding layer includes a value embedding module, a position embedding module, and a time embedding module, which are used to fuse the embedding information of time series and environmental factors. The CrossGatedMLP layer is used to fuse extracted genotype features and environmental features, thereby capturing the complex nonlinear relationships hidden between different omics data; the CrossGatedMLP layer includes Hidden MLP and Gate MLP; the Hidden MLP includes the GELU activation function, which is used to compute the hidden representation of the input; Gate MLP includes a sigmoid activation function used to compute the gate weights; S1: Obtain whole genome data, environmental data, and phenotypic data of breeding materials and perform preprocessing; S2: Input whole genome data into the GEFormer model, extract genotype data features from both local and global perspectives through the gMLP layer, and capture genotype features of long-distance dependencies between SNP sites; S3: Input environmental data for the entire reproductive period into the GEFormer model, extract environmental features through the TimeFeatureBlock layer, and capture environmental features; S4: By fusing genotype features and environmental features through the CrossGatedMLP layer, the complex nonlinear relationships hidden between different omics data are captured, and the fused features are obtained. S5: Use a fully connected neural network to perform linear regression on the fused features to predict the phenotypic value of the breeding material.
2. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 1, characterized in that: The specific steps in step S1 are as follows: S11: Obtain whole genome data of breeding materials and breeding chip data of corresponding species through sequencing; High-quality variant site data were obtained by comparing whole-genome data with breeding microarray data; The comparison methods include taking the intersection, and the resulting genotype data is of length [length missing]. l SNP site sequence data G ={ g 1, g 2… g l }, g i ∈{0,1,2}; S12: For environmental data, collect environmental factor data related to light, temperature, water, air and soil factors from planting time to harvest time at crop planting sites; S13: Collect agronomic traits, including plant height, flowering period, and yield, of the phenotypic data corresponding to each breeding material in the planting environment.
3. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 2, characterized in that: The specific steps in step S2 are as follows: S21: Sequence of SNP sites G Input the gMLP layer and map it to a higher-dimensional space through a linear transformation to obtain G (1) ; S22: Will G (1) Input the GELU activation function and get the output. G (2) : , in, g ∈ G (1) , μ The mean of a normal distribution is . The standard deviation of the normal distribution; S23: Output the activation function G (2) Input spatial gating unit (SGU) to obtain output G (3) ; S24: Output of the Space Gating Unit (SGU) G (3) Layer normalization, global average pooling, and linear transformation are performed to extract global information from the feature maps and map it to a specified dimension to obtain genotype features. G * 4. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 3, characterized in that: The specific steps in step S23 are as follows: S231: Will G (2) Divided into parts of the same shape, including res and gate ; res Used to transmit raw information. gate Used in gating mechanisms to control the flow of information; S232: Let b Indicates batch size. h Indicates the number of heads. d Indicates the input feature dimension. m Indicates the output feature dimension. n The weight parameters representing the sample sequence length and the projection are... W and bias bias From model parameters; gate The feature dimensions are divided into multiple heads to obtain gate (1) Then on gate (1) Spatial projection is obtained gate (2) : , in gate (2) ∈ R b×h×m×d , gate (1) ∈ R b×h×n×d , W ∈ R h×m×n , bias ∈ R 1×h×n×1 ; S233: Output spatial projection gate (2) Multiply by the corresponding linear transformation output to obtain G (3) : 。 5. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 4, characterized in that: In step S3, S31: Input the date vector into the embedding layer of the TimeFeatureBlock layer. D (1) and environmental factor vector E (1) , D (1) ∈ R d×3 For encoded d Day-date vector E (1) ∈ R d×e Within each day e Standardized environmental factor vectors; embedding layer output E (4) ; S32: Will E (4) Input to a dynamic convolutional layer, which captures the combined effects of various environmental factors each day, and output... E (7) ; S33: Will E (7) The input is a linear attention layer, which captures the dependencies of environmental factors from each day to obtain environmental features. E * 6. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 5, characterized in that: The specific steps in step S31 are as follows: S311: Through the value embedding module E (1) The values in the data are converted into a low-dimensional representation. E (2) : in, E ∈ R n , E (1) ∈ R c’ , n Indicates the index of the input channel. c Indicates the number of input channels. c 'Indicates the number of output channels; S312: Will E (1) The input position embedding module uses sine and cosine functions to encode the position information of the input sequence into a vector form, resulting in a vector containing the internal positional relationships of the sequence. E (3) The weight calculation process for position embedding is as follows: , in, pos Indicates the position in the input sequence. i Indicates a dimension index. d Pos_Embedding represents the embedding dimension. pos , 2 i ) and Pos_Embedding( pos , 2 i +1) represent the positions in the position embedding matrix. pos Even-numbered and odd-numbered dimensions; S313: Will D (1) Input time embedding module obtains D (2) The specific calculation process for temporal embedding is as follows: , in, i Representing the time dimension, Embedding i Indicates the first i Embedded functions in a time dimension; S314: Embedding values into the module's output E (2) Output of the position embedding module E (3) and the output of the time embedding module D (2) Adding them together gives E (4) .
7. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 5, characterized in that: The specific steps in step S32 are as follows: S321: Input-based E (4) Different kernel attention mechanisms are obtained through multi-dimensional attention mechanisms, including channel attention. A channel Spatial attention A spatial Convolutional kernel attention A kernel and filter attention A filter : , , , , in, It is the Sigmoid activation function. A channel ∈ R b×c×1 , A spatial ∈ R b×1×1×1×k , A kernel ∈ R b×n×1×1×1 , A filter ∈ R b×c’×1 , E (4) ∈ R b×c×1 ; b For batch size, c Input the number of channels. c’ Number of output channels k The kernel size is [size]. n The number of convolution kernels; S322: Will A channel Applied to E (4) Each channel gets E (5) ,right E (5) Perform convolution operations; at the same time A spatial , A kernel With initial weights weight The multiplication is used as the weights of the convolution, and the output is... E (6) ; S323: Will A filter Feature vectors applied to the output of convolution E (6) get E (7) .
8. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 5, characterized in that: The specific steps in step S33 are as follows: S331: Yes E (7) Perform a linear mapping to obtain the query vector Q Key vector K Sum value vector V ; S332: Based on the total number of keys used respectively L K Total number of queries L Q Calculate the number of random samples for the key. U_part and the number of samples for the query u Random sampling U_part Each key is obtained K_sample One sampling key; Based on query vector Q and K_sample The attention score for each sampling key is used to calculate a sparsity measure. M : , , , Where, constant c Indicates the scaling factor. L K Indicates the length of the key sequence. L Q Indicates the length of the query sequence; q m ∈ Q , q m It is the first m One query vector; k n ∈ K_sample , k n It is the first n One key vector; d It refers to the dimensions of the query vector and the key vector. L K It is the length of the key sequence; S333: Based on sparsity measurement values M Take the front u The query vector corresponding to each query Q reduce ,calculate K and Q reduce The attention score represents the degree of correlation between each time step and other time steps; applying the attention score to the value vector yields representative sequence features. E (8) : in, Q reduce Based on sparsity measurements M Selected u One query; S334: Yes E (8) Perform a linear transformation to integrate the comprehensive information from multiple sources to obtain... E (9) ; through convolution and max pooling E (9) Feature extraction is performed to obtain environmental features. E * 9. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 8, characterized in that: The specific steps in step S4 are as follows: S41: Input genotype feature G* and environmental feature E* into the CrossGatedMLP layer; calculate using Hidden MLP. G *and E * indicates hidden meaning G (4) and E (10) ; Calculated via Gate MLP G *and E *Gating weights G (5) and E (11) ; S42: Gating weights G (5) and E (11) Applied to hidden representation G (4) and E (10) ,get C (1) and C (2) ; splicing C (1) and C (2) Obtain fusion features C (3) : , S43: Will G *and E Multiplying yields... G *× E *; Through the CrossGatedMLP layer, respectively G *and G *× E *、 E *and G *× E Perform feature fusion to obtain fused features. C (4) and C (5) ; splicing C (3) , C (4) and C (5) To obtain the interaction characteristics between genotype and environment C (6) .
10. The genome prediction method based on the fusion of gating and linear attention mechanisms (G×E interaction) as described in claim 9, characterized in that: The specific steps in step S5 are as follows: S51: Genotype-environment interaction characteristics C (6) Input a linear layer, and obtain through linear mapping C (7) ; S52: Will C (7) Input the LeakyReLU activation function, output C (8) It non-linearly fits the input features; set up c ∈ C (7) The calculation process of the LeakyReLU activation function is as follows: , C (8) By randomly setting the output of some neurons to 0 using Dropout, we obtain... C (9) ; S53: Transform by linear transformation C (9) This is mapped to a single value, which is the predicted phenotypic value output by the model. C (10) .