Genotype-environment interaction prediction method based on multi-modal attention and mixed experts and application thereof

By combining a hierarchical deep learning architecture with a hybrid expert layer, genotype and environmental features are explicitly separated and fused, achieving fine-grained interaction between genotype and environment. This solves the problems of low prediction accuracy and weak generalization ability in existing technologies, and improves the prediction effect of complex traits.

CN121601042BActive Publication Date: 2026-08-04ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2025-12-02
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing technologies for predicting genotype-environment interactions in multiple environments suffer from problems such as coarse feature extraction mechanisms, insufficient granularity of interaction modeling, and a single prediction mode, resulting in low prediction accuracy and weak generalization ability.

Method used

Employing a hierarchical deep learning architecture, this approach explicitly separates and merges the independent and synergistic effects of features through dual-path attention modules. Combined with a tokenized bidirectional cross-modal attention mechanism and a hybrid expert layer, it achieves fine-grained gene-environment interaction and adaptive processing of heterogeneous interaction modes.

Benefits of technology

It significantly improves the accuracy and generalization ability of complex trait prediction. The R2 of corn grain moisture prediction reaches 0.809, which is about 58% higher than the existing methods. The R2 of yield prediction reaches 0.528, which solves the prediction failure problem of traditional models in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121601042B_ABST
    Figure CN121601042B_ABST
Patent Text Reader

Abstract

The application provides a genotype-environment interaction prediction method based on multi-modal attention and mixed experts and application thereof, and belongs to the technical field of genomic selection. In view of the problems of low precision and weak generalization ability caused by coarse feature extraction and single interaction modeling in the prior art in multi-environment prediction, a multi-modal deep learning model is constructed. The method explicitly separates and dynamically fuses the independent effects and synergistic effects of the genotype and environment characteristics through a double-path attention module; fine-grained interaction between genes and environment semantic units is realized by using a Tokenized bidirectional cross-modal attention mechanism; and a mixed expert layer is introduced to adaptively process heterogeneous interaction modes through a gating network and output prediction values. The application significantly improves the prediction accuracy and stability of complex traits of crops in multiple environments, and effectively solves the technical problem that the genotype-environment interaction effect is difficult to accurately model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of bioinformatics and artificial intelligence, specifically relating to a genomic selection (GS) technology. More specifically, this invention relates to a genotype-environment interaction prediction method based on multimodal attention and hybrid experts, and its application, utilizing a multimodal deep learning architecture for genotype-environment interaction (G×E) effect modeling and complex trait prediction. Background Technology

[0002] Genome prediction (GP) aims to predict complex traits in plants and animals using genome-wide genetic markers (such as SNPs) and has become a key technology for shortening breeding cycles. However, crop phenotypes are the product of complex interactions (G×E) between genotype and environmental factors. While traditional methods perform reasonably well in single-environment trials, their predictive accuracy and generalization ability are severely limited in multi-environment trials (METs) because they neglect the changes in SNP effects caused by environmental variability.

[0003] To address this issue, existing technologies mainly fall into two categories: one is statistical and traditional machine learning methods. For example, environmental covariates (ECs) are introduced to construct an environmental kernel, or models such as random forest (RF) and XGBoost are used. These methods often rely on principal component analysis (PCA) to reduce the dimensionality of genotypes, resulting in the loss of nonlinear features such as dominance and epistasis, and making it difficult to capture the dynamic changes of environmental factors throughout the entire reproductive period.

[0004] Second, there are multimodal methods based on deep learning. In recent years, models such as GEFormer have attempted to integrate genotype and environmental data through deep neural networks. However, these existing technologies still face significant technical bottlenecks: 1. Crude feature extraction mechanism: It fails to effectively distinguish between the "independent effect" of gene loci or environmental factors and the "synergistic effect" within them, resulting in fuzzy feature representation.

[0005] 2. Insufficient granularity of interactive modeling: Existing cross-modal fusion methods mostly use simple global gating or splicing, which cannot capture the fine-grained dynamic correlation between specific SNP locus groups and specific environmental factor groups.

[0006] 3. Limited prediction model: Regression prediction is usually performed using a single fully connected network, which makes it difficult to fit the various heterogeneous models that exist in the G×E interaction. This results in limited accuracy improvement in practical applications (such as yield and moisture prediction), and may even be worse than traditional methods.

[0007] Therefore, there is an urgent need for a new predictive framework that can accurately model the complex interaction mechanisms between genotype and environment in order to solve the problems existing in the current technology. Summary of the Invention

[0008] This invention provides a genotype-environment interaction prediction method based on multimodal attention and hybrid experts, and its application. Existing technologies (such as GEFormer) suffer from low accuracy in multi-environment prediction due to their inability to explicitly separate independent and synergistic effects of features, coarse granularity of cross-modal interactions, and single prediction network, resulting in an inability to accurately fit complex heterogeneous genotype-environment interaction patterns (e.g., low accuracy in cereal moisture R). 2 It has the problem of being only 0.5115 and having weak generalization ability.

[0009] The core technology of this invention is to propose a hierarchical deep learning architecture. By explicitly separating and fusing the independent and synergistic effects of features through a dual-path attention module, it utilizes a tokenized bidirectional cross-modal attention mechanism to achieve fine-grained gene-environment interaction, and combines a hybrid expert (MoE) layer to adaptively process heterogeneous interaction modes, thereby achieving high-precision phenotypic prediction.

[0010] In a first aspect, the present invention provides a genotype-environment interaction prediction method based on multimodal attention and hybrid experts, the method comprising the following steps: Obtain genotype and environmental data for the target species; A multimodal feature extraction network is used to encode features from genotype data and environment data respectively, resulting in genotype feature vectors and environment feature vectors. The processing of each modality by the multimodal feature extraction network includes: Independent effect features and synergistic effect features within the features are extracted in parallel, and the independent effect features and synergistic effect features are adaptively fused through a gating mechanism; The cross-modal interaction module is used to fuse genotype feature vectors and environmental feature vectors to obtain a fused feature vector; the cross-modal interaction module is configured as follows: The input feature vector is mapped to a sequence containing multiple semantic units. The bidirectional cross-attention between the genotype semantic unit sequence and the environment semantic unit sequence is calculated, and the result of the bidirectional interaction is aggregated into a fused feature vector. The hybrid expert module is used to perform regression prediction on the fused feature vector and output the phenotypic prediction value. The hybrid expert module includes a gating unit and multiple expert networks. The gating unit dynamically selects some expert networks to participate in the calculation based on the fused feature vector and then weights and combines the outputs of the selected expert networks to obtain the prediction result.

[0011] Furthermore, the multimodal feature extraction network includes an SNP attention module and an environmental attention module with identical structures, which are used to process genotype data and environmental data, respectively; Parallel feature extraction includes independent effect features and synergistic effect features within the feature set: Independent effect features are generated by capturing point-to-point independent weights of each feature dimension in the input data through a multi-layer perceptron network; synergistic effect features are generated by capturing the global dependencies between each feature dimension in the input data through a multi-head self-attention mechanism.

[0012] Furthermore, an adaptive fusion of independent effect features and synergistic effect features is performed through a gating mechanism, specifically including: Gating weights are generated based on synergistic effect characteristics; We use gating weights to perform a weighted summation of independent and synergistic effect features to dynamically adjust the proportion of the two effects in the final feature representation.

[0013] Furthermore, the cross-modal interaction module maps the input feature vector into a sequence containing multiple semantic units, specifically including: The input feature vector is mapped to a predefined hidden layer dimension through a learnable linear projection layer; The mapped feature vectors are reshaped into multiple sub-segments of a specific length, with each sub-segment serving as a semantic unit, thus forming a sequence of semantic units.

[0014] Furthermore, the bidirectional cross-attention between genotype semantic unit sequences and environment semantic unit sequences is calculated, specifically including: Using genotype semantic unit sequences as query vectors and environment semantic unit sequences as key and value vectors, we calculate the attention features of genotypes to the environment. Using the environmental semantic unit sequence as the query vector and the genotype semantic unit sequence as the key vector and value vector, the attention features of the environment to the genotype are calculated. The attention features of genotype to environment and the attention features of environment to genotype are pooled separately, and the pooled results are concatenated and linearly transformed to obtain a fused feature vector.

[0015] Furthermore, the construction and training process of the hybrid expert module includes: Multiple expert networks are configured to work in parallel, each focusing on processing a subdomain of the feature space; the gating unit outputs a sparse probability distribution vector to indicate the selection of the top-k expert networks with the highest confidence. A load balancing auxiliary loss term is introduced into the loss function of model training. The load balancing auxiliary loss term is used to constrain the selection probability and importance distribution of each expert network, so as to avoid the phenomenon of extremely uneven load or collapse of the expert network.

[0016] Furthermore, the genotype-environment interaction prediction method supports multi-task learning and can be used to predict multiple phenotypic traits simultaneously. Different traits share the underlying multimodal feature extraction network and cross-modal interaction module, and output predicted values ​​through independent regression heads.

[0017] Secondly, the present invention provides a genotype-environment interaction prediction device based on multimodal attention and hybrid experts, comprising: The data acquisition module is configured to acquire and preprocess genotype and environmental data of the target species. The dual-path feature extraction module is configured to include a structurally parallel SNP attention submodule and an environment attention submodule; each submodule contains independent attention units, collaborative attention units, and dynamic gating fusion units, which are used to explicitly separate and fuse the independent and collaborative effects of the data. The tokenized cross-modal fusion module is configured to divide the feature vector into a sequence of semantic tokens and capture the fine-grained interaction between genotype tokens and environment tokens through a bidirectional attention mechanism. The hybrid expert prediction module is configured to use a gating network to dynamically route to multiple expert networks based on fusion features and output a weighted phenotypic prediction value.

[0018] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described genotype-environment interaction prediction method based on multimodal attention and hybrid experts.

[0019] Fourthly, the present invention provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the genotype-environment interaction prediction method based on multimodal attention and hybrid experts described above.

[0020] The main contributions and innovations of this invention are as follows: 1. Breakthrough improvement in prediction accuracy and generalization ability: Compared with existing mainstream methods such as GEFormer, this invention demonstrates superior performance in predicting complex traits. Experimental data shows that in corn grain moisture prediction, the validation R... 2 The R value reached 0.809 (an improvement of approximately 58% compared to GEFormer), and its contribution to production forecasting was [missing information]. 2 The accuracy reached 0.528, effectively solving the problem of prediction failure or insufficient accuracy of traditional models in complex environments.

[0021] 2. Refined Feature Extraction (Effect Decoupling): This invention innovatively designs a dual-path feature extraction architecture comprising independent attention submodules and collaborative attention submodules, and fuses them through a dynamic gating mechanism. This design can explicitly distinguish and retain the independent "point-to-point" effects and the collaborative "global dependency" effects in genotype and environmental data, overcoming the shortcomings of ambiguous feature representation in existing technologies.

[0022] 3. Deepening Interactive Modeling (Fine-Grained Fusion): Through a tokenized bidirectional cross-modal fusion module, this invention decomposes high-dimensional features into semantic units, capturing fine-grained associations between specific SNP locus groups and environmental factor groups. Ablation experiments demonstrate that, compared to traditional splicing or global fusion, this structured interaction is a key prerequisite for improving model performance.

[0023] 4. Adaptiveness of Model Decisions (Hybrid Expert Mechanism): A hybrid expert (MoE) layer is introduced to replace the single prediction network, and a gating network is used to dynamically route to different expert networks based on features. This not only enhances the model's capacity to handle heterogeneous G×E patterns, but also ensures balanced expert load through an auxiliary loss function, significantly improving the model's robustness in unseen environments.

[0024] 5. Systemic advantages brought by architectural synergy: The three core modules of this invention (effect separation, tokenization fusion, and MoE) have deep functional dependencies and a synergistic effect of "1+1+1>3". Ablation experiments show that the absence of any module will lead to a sharp non-linear decline in model performance, proving the non-obviousness and holistic nature of the technical solution of this invention.

[0025] Details of one or more embodiments of the present invention are set forth in the following drawings and description, so that other features, objects and advantages of the invention will be more readily understood. Attached Figure Description

[0026] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of a genotype-environment interaction prediction method based on multimodal attention and hybrid experts according to an embodiment of the present invention; Figure 2 This is a comparison chart of the prediction results of maize yield traits according to an embodiment of the present invention; Figure 3 This is a comparison chart of the prediction results of maize moisture properties according to an embodiment of the present invention; Figure 4 This is a diagram showing the ablation experiment results according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0028] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0029] Example 1: A Genotype-Environment Interaction Prediction Method Based on Multimodal Attention and Hybrid Experts like Figure 1 As shown, Figure 1 This is a schematic diagram of the overall architecture of the genotype-environment interaction prediction model based on multimodal attention and hybrid experts (hereinafter referred to as the GE-MoE model) proposed in this invention. The method mainly includes the following five core steps: Step S1: Data Acquisition and Preprocessing First, obtain the genotype data, environmental data, and corresponding phenotypic data of the target species.

[0030] 1. Genotype data: Typically SNP (Single Nucleotide Polymorphism) data. The raw data (e.g., VCF format, containing variation information for each SNP locus in an individual) is converted into a numerical matrix. For example, the Plink tool can be used to perform quality control and linkage disequilibrium filtering on the VCF file, retaining highly independent SNP loci and converting it into a 0 / 12 matrix. Let the sample size be N, and the number of SNP loci be... For each individual, its genotype feature vector is represented as: The value of each locus is usually encoded as {0,1,2}, which represent the homozygous major allele, heterozygote, and homozygous minor allele, respectively.

[0031] 2. Environmental Data: Collect environmental indicators (such as temperature, humidity, rainfall, sunshine duration, soil composition, etc.) throughout the entire growth period. Let the number of environmental variables be... For each individual's environment, its environmental feature vector is represented as: .

[0032] 3. Data standardization: Perform quality control on genotype data (e.g., filter low MAF sites) and Z-score standardization on environmental data to eliminate dimensional differences.

[0033] Step S2: Dual-path feature extraction and effect separation To address the issue of coarse feature extraction in traditional methods, this embodiment designs a parallel SNP attention module and an environment attention module to process the genotype vector G and environment vector E, respectively. These two modules have identical structures, each containing the following three sub-modules to explicitly separate the "independent effect" and "cooperative effect" of features. Taking the processing of genotype feature X (i.e., G) as an example: 1. Independent Attention Sub-module: This submodule is used to capture the independent importance of each feature dimension (such as each SNP site). Independent attention weights are generated using a Multi-Layer Perceptron (MLP):

[0034]

[0035] in, This represents the Hadamard product (i.e., element-wise multiplication). These are the extracted independent effect features.

[0036] 2. Cooperative Attention Sub-module: This submodule is used to capture global dependencies between feature dimensions (such as linkage disequilibrium between SNPs or gene interactions). It employs a multi-head self-attention (MHSA) mechanism:

[0037] in, To extract synergistic effect features, The collaborative attention weights are features.

[0038] 3. Dynamic Gating Fusion Sub-module: To adaptively integrate the two effects mentioned above, a mechanism based on gated linear units (GLUs) is introduced. The model dynamically generates gate weights based on collaborative features. :

[0039]

[0040] in, This is the Sigmoid activation function (used to map the output value to the (0, 1) interval as a gating coefficient). and For learnable parameters, specifically, The learnable weight matrix representing the gating mechanism. This represents the bias vector of the gating mechanism.

[0041] Similarly, the processing of environmental characteristics (i.e., E) follows the same process, resulting in the final environmental characteristics. =

[0042] Through the above process, the optimized genotype characteristics are obtained respectively. and environmental characteristics .

[0043] Step S3: Tokenized bidirectional cross-modal fusion This is one of the core innovations of this invention. To achieve fine-grained interaction, the models are not directly spliced ​​together. and Instead, it transforms it into a sequence of semantic units (Tokens).

[0044] 1. Token segmentation (semantic unitization): By using linear projection and tensor dimension reshape operations, high-dimensional features are divided into multiple subspaces.

[0045] For genotype characteristics Map and reshape it into a sequence ,in d represents the number of SNP semantic units (tokens), and d represents the embedding dimension. For example:

[0046] For environmental characteristics Map and reshape it into a sequence ,in This represents the number of context semantic units (Tokens). For example:

[0047] in For the token sequence, This is a learnable projection matrix. This partitioning through learnable projection allows the model to automatically learn meaningful semantic groupings from the data, rather than relying on fixed prior rules.

[0048] This partitioning allows the model to automatically learn to cluster functionally related SNP loci or environmental factor groups into a single token.

[0049] 2. Bidirectional Cross-Attention: Calculate the interaction in two directions to capture both "genetic response to environment" and "environmental modification of genes": SNP attention to the environment: For the query, mean pooling or The sequence is Key / Value, calculate :

[0050] in, To convert the SNP semantic unit sequence Mapped to a query vector; To sequence environmental semantic units Mapped to key vectors; To sequence environmental semantic units Mapped to a value vector; To calculate the correlation score (dot product) between each SNP unit and each environmental unit; This represents the dimension of the Key vector.

[0051] The main purpose is to allow genotype data to "query" environmental data. That is, to answer the question, "For this specific set of SNP loci, which factors in the current environment (such as temperature and moisture) are most important?"

[0052] Attention from the environment to SNPs: For Query, Calculate for Key / Value :

[0053] in, To map environmental semantic units to query vectors; To map SNP semantic units to key vectors; To map SNP semantic units to value vectors; To calculate the correlation score (dot product) between each environmental unit and each SNP unit.

[0054] The main purpose is to allow environmental data to "query" genotype data. That is, to answer the question, "Under the current specific environmental conditions, which gene loci are activated or significantly affected?"

[0055] 3. Feature fusion: The attention outputs from both directions are subjected to mean pooling and concatenated, and then passed through a fusion MLP layer to obtain a fusion feature vector containing clear interaction patterns. ,For example:

[0056]

[0057]

[0058] in This is for average pooling operations.

[0059] Step S4: Hybrid Expert Layer (MoE) Adaptive Prediction To handle complex heterogeneous interaction patterns, this embodiment introduces a hybrid expert layer at the prediction end.

[0060] 1. Expert Networks: Set up k expert networks (e.g., feedforward neural networks) with the same structure, each used to fit different G×E patterns (e.g., linear dominant pattern, nonlinear dominant pattern, environment-sensitive pattern, etc.).

[0061] 2. Gating Network: Based on fusion characteristics Calculate the weights for each expert network: The gating network activates only the Top-K (Top-k selection) experts (sparse activation) and outputs the final features. This is the weighted sum of the selected experts. For example:

[0062] Where TopK is a function that selects the k highest scores, k represents the number of experts, and W... gate For gating network weights; This represents the i-th expert network. This represents the weight of the i-th expert network.

[0063] 3. Load Balancing: Adding an auxiliary loss function to the training loss function. This includes expert importance loss and load loss, forcing experts to be selected evenly in training batches to prevent model collapse caused by a "winner-takes-all" mentality. For example: The Importance and Load of Computational Experts :

[0064]

[0065] in, This represents the "average contribution" (i.e., importance) of the i-th expert in the current batch. The frequency at which the i-th expert is "activated" in the current batch is represented by N; N represents the batch size during training; B represents the current training batch size. (This means iterating through every sample in the current batch). This represents the gating probability (the weights assigned by the model to the i-th expert for sample x). This refers to an indicator function. This is the load threshold.

[0066] Auxiliary loss function:

[0067] in The coefficient of variation. This is the loss weight.

[0068] Step S5: Regression Prediction Will Input the regression prediction module (such as a fully connected layer), and output the final phenotypic prediction value. .For example:

[0069] in The weights and biases of the regression head.

[0070] Total loss function:

[0071] in Main loss, To balance the hyperparameters.

[0072] Example 2: Specific experimental verification based on multi-environmental data of maize This embodiment uses the Maize dataset as an example to demonstrate the specific application effects of the present invention.

[0073] 1. Data source (Huazhong Agricultural University and China Seed Group Co., Ltd.) and processing: The data includes 9,600 maize samples (each sample has 16,000 molecular markers), covering 44 different environments, with 197 environmental parameters for each environment.

[0074] Genotype: VCF files were processed using the Plink tool, filtering for sites with MAF < 0.05, and linkage disequilibrium (LD) screening was performed (window 50kb, step size 5). With a threshold of 0.1, approximately 16,000 high-quality SNP sites are ultimately retained. For example, the command execution example is as follows: plink --vcf maize_genotype.vcf --maf 0.05 --indep-pairwise 50 5 0.1--make-bed --out rice_genotype_QC plink --bfile rice_genotype_QC --recode A --out rice_SNP_matrix Environment: 197 environmental parameters, including temperature, humidity, light, and soil nitrogen, phosphorus and potassium content at each test site, were time-series aligned and Z-score standardized.

[0075] Phenotype: Focus primarily on "yield" and "grain moisture".

[0076] 2. Model parameter settings: Token partitioning: Set the embedding dimension d=64, and the number of SNP semantic units. Number of environmental semantic units .

[0077] MoE layer: Set the number of experts to 4 and the Top-K selection to 2.

[0078] Optimizer: AdamW, initial learning rate 1e-4, using cosine annealing scheduling.

[0079] Loss function: .

[0080] An early stopping mechanism is enabled during training, and training is terminated when the validation set loss does not decrease for 10 consecutive epochs.

[0081] Performance evaluation: The trained model is used to make predictions on the test set, and the coefficient of determination (R², R-squared) and root mean square error (RMSE) between the predicted and true phenotypic values ​​are calculated. Simultaneously, the attention weights for each SNP locus and environmental variable are output for interpretability analysis of the model's decision-making process.

[0082] 3. Experimental Results: like Figure 2 (where (a) represents the validation of each model) Comparison, (b) indicates the PCC comparison of each model validation) and Figure 3 (where (a) represents the validation of each model) (b) shows the comparison of PCC (Pearson correlation coefficient) for each model. As shown, the present invention (GE-MoE) performs significantly better than the control group algorithms (including GBLUP, DeepGS, GEFormer, etc.) on the test set.

[0083] Grain moisture: R-squared of traditional models (such as GBLUP, GBT) The highest PCC is 0.604 (GBLUP), with some models (such as KNN) only reaching 0.100, and the highest PCC is 0.773 (GBLUP); existing deep learning models (such as GEformer) The value is 0.511; GE-MoE verification. It achieves a score of 0.809, which is the best among all models (an improvement of about 58% over GEformer), and its PCC reaches 0.900, which is significantly better than all other models.

[0084] Output: R-squared of traditional models (such as GBLUP, GBT) The highest score was only 0.306 (GBLUP), with some models (such as KNN and RF) even below 0.03, and the highest PCC was 0.690 (GBT). Existing deep learning models (such as GEformer)... The value is 0.331; while the verification of GE-MoE in this invention... The performance reached 0.528, and the PCC reached 0.727, which is also the best among all models, effectively solving the problem of negative performance in traditional machine learning models under complex interactions. The problem of (i.e., prediction failure).

[0085] 4. Ablation experiment analysis: such as Figure 4 As shown, ablation experiments were conducted to verify the necessity of the architecture: Control group A (removing dynamic gating, only splicing): The dynamic gating fusion submodule in the SNP and environment attention module is replaced with a simple feature splicing operation. The R² for model validation on grain moisture content dropped to 0.61, and the R² for this model decreased to 0.610. This sharp performance drop (approximately 26%) indicates a lack of high-quality feature extraction, the ineffectiveness of the tokenization fusion module, and the generation of semantic units containing significant noise, leading to subsequent interaction failures. It is demonstrated that effect separation and dynamic fusion effectively purify features.

[0086] Control group B (removal of tokenized fusion): The tokenized bidirectional cross-modal fusion module was replaced with the traditional feature stitching method. The R² for the model on grain moisture content is only 0.656, and the validation R² is only 0.65. This slight performance improvement demonstrates that the hybrid expert layer cannot effectively identify different G×E patterns from flat, unstructured features, and its expert routing mechanism is almost ineffective. It is proven that decomposing high-dimensional features into semantic units and performing fine-grained interactions is key to improving accuracy.

[0087] Control group C (MoE layer removed): The hybrid expert layer was replaced with a single fully connected network. The value dropped to 0.702, proving the effectiveness of MoE. On the other hand, compared with groups A and B, it can be seen that the structured output of the preceding module is a necessary condition for MoE to perform effectively.

[0088] Thus, the ablation experiments described above demonstrate that there is a deep functional dependency among the three core modules of this invention. The failure of any module will lead to a chain reaction, causing a sharp decline in performance due to "asymmetry." This strongly proves that the technical solution of this invention is a meticulously designed, indivisible, systematic creation for solving complex G×E prediction problems, and its superior performance stems from the synergistic effect of the overall architecture.

[0089] Example 3: A Genotype-Environment Interaction Prediction System Based on Multimodal Attention and Hybrid Experts This embodiment corresponds to the system implementation of the above method, and the system can run on a server, workstation, or cloud computing platform. The system includes: 1. Data Acquisition Module: Used to read genotype files (such as .bed / .bim / .fam or .vcf) and environmental monitoring data (such as .csv / .xlsx) via an interface, and perform standardized preprocessing.

[0090] 2. Dual-path feature extraction module: This module contains and logically connects the SNP attention submodule and the environment attention submodule. Each submodule integrates an independent attention unit (implemented by MLP), a collaborative attention unit (implemented by Self-Attention), and a dynamic gating unit (implemented by GLU).

[0091] 3. Tokenized cross-modal fusion module: It is equipped with a linear projection layer and a dimension reshaping layer to convert feature vectors into token sequences; and it is equipped with a bidirectional attention computing unit to perform cross-querying and fusion of genotype and environmental features.

[0092] 4. Hybrid expert prediction module: It includes a storage unit that stores multiple expert network parameters, a gated routing logic unit, and a fully connected layer for calculating the final regression value.

[0093] 5. Model Interpretation Module (Optional): This module outputs the attention weight matrix generated during training, showing users the key SNP sites and key environmental factors that determine the phenotypic prediction results.

[0094] Example 4 This embodiment also provides an electronic device, see reference. Figure 5 It includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.

[0095] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.

[0096] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.

[0097] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.

[0098] The processor 402 reads and executes computer program instructions stored in the memory 404 to implement any of the genotype-environment interaction prediction methods based on multimodal attention and hybrid experts in the above embodiments.

[0099] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.

[0100] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0101] Input / output device 408 is used to input or output information.

[0102] Example 5 This embodiment also provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the genotype-environment interaction prediction method based on multimodal attention and hybrid experts according to Embodiment 1.

[0103] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0104] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0105] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 1 Any box in the logical flow can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.

[0106] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been 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.

[0107] The above embodiments are merely illustrative of several implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the appended claims.

Claims

1. A genotype-environment interaction prediction method based on multimodal attention and hybrid experts, characterized in that, Includes the following steps: Obtain genotype and environmental data for the target species; A multimodal feature extraction network is used to encode features in the genotype data and environment data respectively, resulting in genotype feature vectors and environment feature vectors; wherein, the processing of each modality of data by the multimodal feature extraction network includes: Independent effect features and synergistic effect features within the features are extracted in parallel, and the independent effect features and synergistic effect features are adaptively fused through a gating mechanism; The genotype feature vector and the environmental feature vector are fused using a cross-modal interaction module to obtain a fused feature vector; the cross-modal interaction module is configured as follows: The input feature vector is mapped to a sequence containing multiple semantic units. The bidirectional cross-attention between the genotype semantic unit sequence and the environment semantic unit sequence is calculated, and the result of the bidirectional interaction is aggregated into the fused feature vector. A hybrid expert module is used to perform regression prediction on the fused feature vector and output phenotypic prediction values. The hybrid expert module includes a gating unit and multiple expert networks. The gating unit dynamically selects some expert networks to participate in the calculation based on the fused feature vector and weights and combines the outputs of the selected expert networks to obtain the prediction result. The multimodal feature extraction network includes an SNP attention module and an environment attention module with identical structures, which are used to process genotype data and environment data, respectively. The independent effect features and synergistic effect features extracted in parallel include: The independent effect features are generated by capturing the point-to-point independent weights of each feature dimension in the input data through a multi-layer perceptron network; the synergistic effect features are generated by capturing the global dependencies between each feature dimension in the input data through a multi-head self-attention mechanism. The independent effect features and the synergistic effect features are adaptively fused using a gating mechanism, specifically including: Gating weights are generated based on the aforementioned synergistic effect characteristics; The independent effect features and the synergistic effect features are weighted and summed using the gating weights to dynamically adjust the proportion of the two effects in the final feature representation.

2. The genotype-environment interaction prediction method as described in claim 1, characterized in that, The cross-modal interaction module maps the input feature vector into a sequence containing multiple semantic units, specifically including: The input feature vector is mapped to a predefined hidden layer dimension through a learnable linear projection layer; The mapped feature vectors are reshaped into multiple sub-segments of a preset length, with each sub-segment serving as a semantic unit, thus forming a sequence of semantic units.

3. The genotype-environment interaction prediction method as described in claim 2, characterized in that, Calculating bidirectional cross-attention between genotype semantic unit sequences and environment semantic unit sequences specifically includes: Using genotype semantic unit sequences as query vectors and environment semantic unit sequences as key and value vectors, we calculate the attention features of genotypes to the environment. Using the environmental semantic unit sequence as the query vector and the genotype semantic unit sequence as the key vector and value vector, the attention features of the environment to the genotype are calculated. Pooling is performed on the attention features of the genotype to the environment and the attention features of the environment to the genotype, and the pooling results are concatenated and linearly transformed to obtain the fused feature vector.

4. The genotype-environment interaction prediction method as described in claim 3, characterized in that, The construction and training process of the hybrid expert module includes: Multiple expert networks are configured to operate in parallel, each focusing on processing a subdomain of the feature space; the gating unit outputs a sparse probability distribution vector to indicate the selection of the Top-k expert networks with the highest confidence. A load balancing auxiliary loss term is introduced into the loss function of model training. The load balancing auxiliary loss term is used to constrain the selection probability and importance distribution of each expert network, so as to avoid the phenomenon of extremely uneven load or collapse of the expert network.

5. The genotype-environment interaction prediction method according to any one of claims 1 to 4, characterized in that, The genotype-environment interaction prediction method supports multi-task learning and is used to predict multiple phenotypic traits simultaneously. Different traits share the underlying multimodal feature extraction network and cross-modal interaction module, and output predicted values ​​through independent regression heads.

6. An apparatus for implementing the genotype-environment interaction prediction method according to any one of claims 1 to 5, characterized in that, include: The data acquisition module is configured to acquire and preprocess genotype and environmental data of the target species. The dual-path feature extraction module is configured to include a structurally parallel SNP attention submodule and an environment attention submodule; each submodule contains independent attention units, collaborative attention units, and dynamic gating fusion units, which are used to explicitly separate and fuse the independent and collaborative effects of the data. The tokenized cross-modal fusion module is configured to divide the feature vector into a sequence of semantic tokens and capture the fine-grained interaction between genotype tokens and environment tokens through a bidirectional attention mechanism. The hybrid expert prediction module is configured to use a gating network to dynamically route to multiple expert networks based on fusion features and output a weighted phenotypic prediction value.

7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the genotype-environment interaction prediction method according to any one of claims 1 to 5.

8. A readable storage medium, characterized in that, The readable storage medium stores a computer program, the computer program including program code for controlling a process to execute the process, the process including the genotype-environment interaction prediction method according to any one of claims 1 to 5.