Inplanatable machine learning genome prediction method and device

Through the combination of multi-source data processing, dynamic feature engineering and multiple machine learning models, combined with biological prior information and interpretability module of SHAP values, the model hyperparameters are optimized, and the limitations of genomic prediction methods in terms of flexibility, efficiency and interpretability are solved, and efficient and interpretable genomic prediction is achieved.

CN120564828AInactive Publication Date: 2025-08-29CHINA AGRI UNIV

Patent Information

Application Number
CN202510501375.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-08-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing genomic prediction methods have limitations in model flexibility, computational efficiency and interpretability, and it is difficult to capture complex nonlinear relationships such as gene interactions, and manual parameter adjustment is inefficient, and lack the ability to explain key genetic variants.

Method used

Multi-source data processing, dynamic feature engineering, a combination of multiple machine learning models and an automated parameter adjustment framework, combined with biological prior information, dimensionality reduction through PCA or PHATE, and the interpretability module of SHAP values ​​is used to quantify SNP site contributions, optimize model hyperparameters, and realize model interpretability and prediction accuracy.

Benefits of technology

It significantly improves the accuracy and calculation efficiency of genomes, realizes the interpretability of the model, solves the problem of insufficient interpretability in traditional methods, and provides support for precise breeding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120564828A_ABST
    Figure CN120564828A_ABST
Patent Text Reader

Abstract

The invention discloses an interpretable machine learning genome prediction method and device, belongs to the technical field of combination of biological breeding, biological information and machine learning, and utilizes an advanced machine learning algorithm to perform parameter optimization in combination with biological prior information. Through processing of multi-source data (genome, transcriptome and epigenetic data), dynamic feature engineering (PCA and PHATE dimensionality reduction) and organic combination of various machine learning models, and an automatic parameter adjustment framework based on a grid search and sparrow search algorithm, genome prediction precision and calculation efficiency are significantly improved; meanwhile, the interpretability of the model is realized based on the SHAP value, the SNP site contribution is quantified, a reference is provided for precise breeding, and the method is suitable for animal and plant molecular breeding and medical genetic analysis, and can accelerate genetic analysis of high-value characters, assist precise breeding decision and disease risk prediction, and promote leap-forward development from experience breeding to intelligent breeding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of combining biological breeding, bioinformatics and machine learning, and in particular to an interpretable machine learning genome prediction method and device. Background Art

[0002] Breeding technology is gradually shifting from traditional "empirical breeding" to the more targeted and efficient "precision breeding." In current practical applications, parameter estimation methods for common genomic selection and prediction problems mainly include genomic BLUP and Bayesian methods. Among them, the GBLUP method constructs a genomic relationship matrix that represents the genetic relationships of the population and uses a mixed linear model to estimate different variance components to obtain individual genomic breeding values ​​(GEBVs). Due to its fast computing speed and high accuracy, the GBLUP method has been widely used in animal and plant breeding. Bayesian methods, on the other hand, estimate the effect of each marker by combining Bayesian priors in a multiple linear regression model. They rely on MCMC (Markov Chain Monte Carlo) iterative calculations, which take a long time to calculate and are difficult to parallelize. However, they have better prediction results than the BLUP series of methods on specific data sets.

[0003] The main machine learning methods used in genomic prediction research based on machine learning and deep learning for animal and plant breeding include support vector regression (SVR), random forest (RF), kernel ridge regression (KRR), multilayer perceptron (MLP), and convolutional neural network (CNN). Currently, most machine learning-based genomic selection models only directly use whole-genome single nucleotide polymorphisms (SNPs). For species and traits with different genetic structures and heritability levels, there is still a lack of systematic reports on universal machine learning model selection and deep biological association mining. Current applications of machine learning in breeding lack interpretability. Traditional methods rely on single models and linear assumptions, making it difficult to capture complex nonlinear relationships such as gene interactions. Manual parameter adjustment is also inefficient and lacks the ability to explain key genetic variations. Summary of the Invention

[0004] In response to the deficiencies in the prior art, the present invention aims to provide an interpretable machine learning genome prediction method and device to address the technical problems of traditional genome prediction methods in terms of model flexibility, computational efficiency, and interpretability. The present invention utilizes advanced machine learning algorithms and combines biological prior information for parameter optimization, significantly improving genome prediction accuracy while achieving model interpretability to provide services for precision breeding. Specifically, by processing multi-source data (genome, transcriptome, epigenetic data), dynamic feature engineering (PCA and PHATE dimensionality reduction), organically combining multiple machine learning models, and an automated parameter adjustment framework (grid search and sparrow search algorithm), the genome prediction accuracy and computational efficiency are significantly improved. At the same time, the device has a built-in interpretability module based on SHAP values ​​to quantify the contribution of SNP sites.

[0005] In order to solve the above technical problems, the technical solution provided by the present invention is:

[0006] An interpretable machine learning genome prediction method includes the following steps:

[0007] S1. Data preprocessing: collecting the genotype and phenotype data to be tested, preprocessing the genotype and phenotype data to be tested, and obtaining preprocessed genetic data and preprocessed phenotypic data; the preprocessing includes sequencing quality control;

[0008] S2. Genetic evaluation and feature selection: Perform genome-wide association analysis on the genetic and phenotypic data preprocessed in S1, screen for loci significantly associated with the target phenotype, and generate a trait-optimized SNP matrix.

[0009] S3. Model training and multi-model integration: Build multiple models and use the trait-optimized SNP matrix obtained in S2 for machine learning training of multiple models. Dynamically optimize model hyperparameters, learn the mapping relationship between genotype and phenotype, and adjust internal parameters to maximize prediction accuracy to obtain phenotypic prediction results.

[0010] S4. Model evaluation: Pearson correlation coefficient or mean square error was used to evaluate the predictive accuracy of multiple models in S4.

[0011] S5.SHAP interpretability analysis: Calculate the contribution of each trait to the phenotypic prediction results described in S3, and the contribution of global and local explanations to the phenotypic prediction results of S3; screen out important sites that affect the phenotypic prediction results, output the phenotypic prediction results, and obtain the feature importance of each site in the model, the interaction between the site and the sample, and the SHAP value distribution;.

[0012] Preferably,

[0013] To reduce model training time, the feature-optimized SNP matrix obtained by S2 is subjected to dimensionality reduction processing using PCA or PHATE, and the reduced-dimensional SNP matrix is ​​output to optimize the computational speed of subsequent model training and reduce the original genome noise.

[0014] The reduced SNP matrix is ​​input into the multiple models of S3 for machine learning training, the model hyperparameters are dynamically optimized, the mapping relationship between genotype and phenotype is learned, and the internal parameters are adjusted to maximize the prediction accuracy to obtain the phenotype prediction results.

[0015] Preferably,

[0016] The dimensionality reduction processing and its verification are specifically as follows: using the PHATE method, through gradient descent optimization and decomposition of the reduced dimensionality SNP matrix, based on the feature-optimized SNP sites, capturing the local nonlinear structure and global distribution law of the SNP sites, and comparing them with the PCA results to verify the dimensionality reduction effect; at the same time, retaining the unreduced SNP data as the input control group to evaluate the impact of dimensionality reduction on model performance.

[0017] Preferably,

[0018] The sequencing quality control of S1 includes genotype site filtering, SNP site linkage relationship screening, phenotypic data missing value filling, phenotypic data normalization, and removal of abnormal outliers, specifically:

[0019] Minimum allele frequency filtering: remove SNP sites with MAF less than the set value to reduce low-frequency variation noise;

[0020] Linkage disequilibrium filtering: set the LD threshold, remove highly linked redundant sites, and retain high-quality SNP sites; data encoding:

[0021] Genotypes are coded as 0, 1, and 2: 0, homozygous for the reference allele; 1, heterozygous; 2, homozygous for the alternative allele.

[0022] Preferably,

[0023] In the S2, potential functional SNP sites were analyzed by genome-wide association analysis, and P values ​​were calculated based on statistical tests, multiple P value thresholds were set, and linkage disequilibrium r values ​​with different gradients were combined. 2 , screen and filter SNP sites as candidate SNP sites to ensure that the candidate SNP sites are significant; and compare the results of candidate SNP sites with original sites for subsequent machine learning model training.

[0024] Preferably,

[0025] In S3, during training, hyperparameters are optimized using different methods to obtain the best performance, including:

[0026] Grid search: traverses the hyperparameter combinations and selects the optimal hyperparameter combination based on cross-validation performance indicators;

[0027] Sparrow search algorithm: simulates sparrow foraging behavior, dynamically optimizes hyperparameters, and screens the optimal hyperparameter combination.

[0028] Preferably,

[0029] The multiple models in S3 include linear regression, ridge regression, elastic net, K-nearest neighbor algorithm, support vector machine, random forest, decision tree, gradient boosting tree, extreme gradient boosting algorithm, AdaBoost, LightGBM and CatBoost.

[0030] Preferably,

[0031] The model evaluation in S5 was performed and the prediction accuracy of quantitative traits was evaluated using five-fold cross validation.

[0032] Preferably,

[0033] The global explanation in S5 shows the contribution distribution of key SNP sites through a beeswax diagram, and the local explanation shows the prediction logic of a single sample through a waterfall diagram.

[0034] The present invention also provides an interpretable machine learning genome prediction device using any of the above-mentioned interpretable machine learning genome prediction methods.

[0035] The device includes a preprocessing module, a feature selection module, a model training module, a model evaluation module and an explanation module;

[0036] The preprocessing module is used to collect the genotype and phenotype data to be tested and preprocess the data;

[0037] The feature selection module is used to select key features from high-dimensional genomic data using biological prior information or dimensionality reduction methods, reduce redundant information, and improve the computational efficiency and generalization ability of the model;

[0038] The model training module is used to construct a genome prediction model using a machine learning algorithm based on the feature data filtered by the feature selection module, and improve the model performance through a hyperparameter optimization method;

[0039] The model evaluation module is used to evaluate the performance of the trained model, using root mean square error, coefficient of determination, and mean absolute error to measure the model's predictive ability, and to evaluate the model's stability and generalization ability through cross-validation;

[0040] The explanation module is used to analyze the model decision process using the SHAP method, quantify the contribution of each feature to the prediction result, reveal the genetic effect of key gene sites, and improve the interpretability of the model.

[0041] The beneficial effects of the present invention are:

[0042] Compared with the existing technology, the present invention processes multi-source data, effectively uses QTL screening, GWAS analysis, linkage disequilibrium and other methods, combines biological prior information, and uses the SNP information obtained through screening to train multiple machine learning models. In this process, the sparrow search automatic parameter optimization framework is used to significantly improve the genome prediction accuracy and computational efficiency; at the same time, the interpretable machine learning method based on SHAP is combined with omics data to realize the function of evaluating feature weights after prediction, solving the problem of insufficient interpretability of traditional AI prediction methods.

[0043] The method and process of the present invention are applicable to molecular breeding of animals and plants and medical genetic analysis, and are suitable for supervised training models based on features and numerical labels and multiple data sources. It can accelerate the genetic analysis of high-value traits, assist in precise breeding decisions and disease risk prediction, and promote the leapfrog development from "empirical breeding" to "intelligent breeding". BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0045] Figure 1 Flowchart of the interpretable machine learning genome prediction method of the present invention

[0046] Figure 2 This is an overall schematic diagram of the interpretable machine learning genome prediction method of the present invention.

[0047] Figure 3 Results of machine learning methods for different traits

[0048] Figure 4 This is a site importance ranking diagram based on SHAP

[0049] Figure 5 SHAP distribution diagram of the influence of the site on the model prediction and different values

[0050] Figure 6 SHAP waterfall chart of the prediction results for a single sample

[0051] Figure 7 SHAP feature distribution map of multiple samples at different sites DETAILED DESCRIPTION

[0052] The following describes preferred embodiments of the present invention in conjunction with the accompanying drawings. It should be understood that the following embodiments are provided for illustrative purposes only and are not intended to limit the scope of the present invention. Those skilled in the art may make various modifications and substitutions to the present invention without departing from the purpose and spirit of the present invention.

[0053] Traditional methods (such as GBLUP) rely on a single model and linear assumptions, making it difficult to capture complex nonlinear relationships such as gene interactions, and have low efficiency in manual parameter adjustment and lack of ability to explain key genetic variations. Figure 1 As shown, the present invention provides an interpretable machine learning genome prediction method, comprising the following steps:

[0054] S1. Collection and preprocessing of genotype and phenotypic data: Preprocessing includes sequencing quality control, genotype site filtering, SNP site linkage screening, missing value detection for phenotypic data, and phenotypic data normalization, to obtain preprocessed genotype and phenotypic data.

[0055] S2. Genetic evaluation and trait selection: Based on the genetic and phenotypic data preprocessed in S1, genome-wide association studies (GWAS) are performed on the traits to screen for quantitative and qualitative trait loci (QTLs) that are significantly associated with the target phenotypes, thereby generating a trait-optimized SNP matrix.

[0056] S3. Dimensionality reduction: To reduce model training time when time is critical, the feature-optimized SNP matrix obtained in S2 is subjected to dimensionality reduction using PCA (Principal Component Analysis) and PHATE (Potential of Heat-diffusion for Affinity-based Transition Embedding). This optimizes the computational speed of model training, reduces raw genomic noise, and improves computational efficiency.

[0057] S4. Model training and multi-model integration: The feature-optimized SNP matrix obtained in S2 or the SNP matrix after dimensionality reduction in S3 is used for machine learning training of multiple models. This dynamically optimizes model hyperparameters, learns the mapping relationship between genotype and phenotype, and adjusts internal parameters to maximize prediction accuracy to obtain phenotypic prediction results.

[0058] During training, different methods optimize parameters for optimal performance, including single variable search; grid search: traversing hyperparameter combinations to screen for the optimal configuration in the validation set; and the sparrow search algorithm (SSA): simulating sparrow foraging behavior, dynamically optimizing hyperparameters, and screening for the optimal hyperparameter combination.

[0059] S5. Model evaluation: Pearson correlation coefficient (R) or mean square error (MSE) was used to evaluate the prediction accuracy of multiple models in S4.

[0060] S6.SHAP interpretability analysis: Calculate the contribution of each trait to the phenotypic prediction results described in S3, as well as the contribution of global and local explanations to the phenotypic prediction results of S3; screen out important sites that affect the phenotypic prediction results, output the phenotypic prediction results, and obtain the feature importance of each site in the model, the interaction between the site and the sample, and the SHAP value distribution.

[0061] The present invention also provides an interpretable machine learning genome prediction device using the above-mentioned interpretable machine learning genome prediction method, the device comprising a preprocessing module, a feature selection module, a model training module, a model evaluation module and an interpretation module;

[0062] A preprocessing module is used to collect the genotype and phenotype data to be tested and preprocess the data;

[0063] Feature selection module, which is used to select key features from high-dimensional genomic data using biological prior information or dimensionality reduction methods, reduce redundant information, and improve the computational efficiency and generalization ability of the model;

[0064] A model training module is used to construct a genome prediction model using a machine learning algorithm based on the feature data filtered by the feature selection module, and to improve the model performance through a hyperparameter optimization method;

[0065] The model evaluation module is used to evaluate the performance of the trained model. The root mean square error, coefficient of determination, and mean absolute error are used to measure the model's predictive ability. The stability and generalization ability of the model are evaluated through cross-validation.

[0066] The explanation module is used to analyze the model decision process using the SHAP method, quantify the contribution of each feature to the prediction results, reveal the genetic effects of key gene loci, and improve the interpretability of the model.

[0067] Global interpretation: Beeswarm plots are used to show the contribution distribution of key SNP sites. Local interpretation: Waterfall plots reveal the prediction logic of a single sample.

[0068] SHAP interprets Shapely values ​​as an additive feature attribution method. Each feature is a "contributor" to the final prediction value of the model. That is, for each prediction sample, the model will generate a prediction value. The SHAP value is the contribution made by each feature in the sample. The sum of the contribution values ​​of each input feature is the final prediction value of the model. Suppose the jth feature of the i-th sample is x i,j , the model is for the i-th sample x i The predicted value is y i , the baseline of the entire model is y base , then the SHAP value obeys the equation

[0069] y i =y base +f(x i,1 )+f(x i,2 )+...+f(x i,k ) (1)

[0070] y i =y base +f(x i,1 )+f(x i,2 )+...+f(x i,k )

[0071] Among them, f(x i,1 )f(x i,1 ) is x i,1 The SHAP value of f(x i,1 )f(x i,1 ) is the predicted value y of the first feature pair in the i-th sample i The contribution made is as follows: i,1 )>0f(x i,1 )>0, indicating that the feature has a positive effect on the predicted value. Conversely, it indicates that the feature has a negative effect on the predicted value.

[0072] The genotype in S1 is the animal and plant genotype data obtained by SNP chip or sequencing, and the phenotype is the animal and plant production phenotype such as body weight and egg production number. Outliers beyond three times the standard deviation are removed during preprocessing.

[0073] Quality Control: Minimum Allele Frequency (MAF) Filtering: Removes SNPs with a MAF below a set value to reduce low-frequency variant noise. Linkage Disequilibrium (LD) Filtering: Sets an LD threshold to remove highly linked, redundant SNPs while retaining high-quality SNPs. Data Encoding: Genotypes are represented using 0, 1, and 2 codes; 0: homozygous for the reference allele (e.g., AA); 1: heterozygous for the alternative allele (e.g., AB); 2: homozygous for the alternative allele (e.g., BB).

[0074] In S2, potential functional SNP sites are discovered through genome-wide association analysis (GWAS), and P-values ​​are calculated based on statistical tests. SNPs are screened according to different P-value gradients to ensure that the candidate sites have sufficient significance. This process sets multiple P-value thresholds to explore the potential relationship between genes and traits, thereby extracting the most valuable genetic features for prediction. Since SNPs on the genome are not independently distributed and have a certain degree of linkage, in the process of SNP site screening, different gradients of r are combined to determine the potential relationship between genes and traits. 2 Screening and filtering are performed, and the obtained SNP sites are used as features, which are then further combined with machine learning methods for genome prediction.

[0075] When training a model in S4, select an appropriate model based on the characteristics of the data (variable type, distribution of the target variable). For example, for quantitative trait prediction, choose linear regression, random forest, XGBoost, etc.; for qualitative trait prediction, choose logistic regression and other methods.

[0076] In order to obtain the optimal model, it is necessary to optimize the hyperparameters of each candidate model. S4 uses the following two methods for parameter optimization:

[0077] Grid Search: This method searches through all possible hyperparameter combinations and selects the optimal configuration based on cross-validated performance metrics. This method is suitable for models with fewer parameters, but it is computationally expensive.

[0078] Sparrow Search Algorithm (SSA): simulates the foraging behavior of sparrows and uses dynamic optimization to search for the optimal hyperparameter combination.

[0079] Compared with grid search, SSA has better global search capability, is suitable for high-dimensional parameter optimization, and can effectively avoid local optimal problems.

[0080] For parameter optimization in S4, the model automatically searches for and selects optimal hyperparameters. We compared traditional single-parameter methods, grid search, and sparrow search for parameter optimization, effectively combining the sparrow search algorithm with omics data to improve the prediction accuracy of omics data. The results are shown in Table 1.

[0081] Table 1

[0082]

[0083] The Sparrow Search Algorithm (SSA) was introduced to optimize the hyperparameters of the LightGBM model and compared with the traditional Grid Search method. Compared with the problem that Grid Search needs to traverse preset parameter combinations and has high computational cost, SSA, as an intelligent optimization algorithm, can adaptively adjust the search direction, efficiently find the optimal solution in high-dimensional complex space, and avoid the local optimal trap. Experimental results show that SSA significantly improves the model performance in both TW and AGE prediction tasks. Especially in TW prediction, the RMSE is reduced from 9.2 to 4.61, and the Pearson correlation coefficient is increased from 0.17 to 0.27, which is much better than Grid Search. This shows that SSA has high optimization potential in genome prediction. It not only breaks through the computational limitations of traditional hyperparameter search, but also improves the generalization ability and prediction accuracy of the model. This study provides a new optimization strategy for the application of machine learning in bioinformatics and can be extended to other high-dimensional data modeling tasks.

[0084] For model evaluation in S5, for quantitative traits, five-fold cross validation (5-fold CV) was used to estimate the accuracy of genomic predictions. All phenotypes of each trait were randomly divided into 5 groups. For each CV, 4 of the 5 groups were defined as reference groups, and the remaining groups were used as validation groups. Figure 3 As shown in the figure, it can be seen that among the tested methods, the machine learning algorithms all achieved better prediction performance than GBLUP and BayesR. For example, for the sweet flour trait, GBLUP's prediction value was 0.9357, while BayesR's was only 0.2863. However, ensemble learning methods (such as CatBoost) could reach a maximum of 0.9412, a slight improvement over GBLUP. Kernel color showed a similar trend, with GBLUP at 0.7485, BayesR at 0.3031, SVM at 0.7994, and CatBoost at 0.7962, all significantly surpassing traditional genomic selection methods. For the GDD trait, GBLUP's prediction value was only 0.5021, and although BayesR improved somewhat (0.8672), it was still lower than the 0.9001 achieved by CatBoost. For coat color, for example, GBLUP and BayesR were 0.6813 and 0.7502, respectively, but using boosting methods such as CatBoost, this increased to 0.8667, fully demonstrating the potential of ensemble methods. Overall, most machine learning methods are better able to capture nonlinear relationships and interactions in the data, leading to higher prediction accuracy.

[0085] In S6, SHAP (SHapley Additive exPlanations) is a game-theoretic method for explaining model outputs. Introducing SHAP theory for evaluating model interpretability is a highly applicable interpretability method for black-box models. SHAP is based on the game-theoretic Shapley value, where S measures the contribution of each member across all samples, providing a theoretically sound credit division based on the average of all individual contributions. In the context of machine learning, each feature can be considered a single participant representing a coalition of features that collaborate to form a prediction. Therefore, the contribution of each feature can be determined as a measure of feature importance, namely the Shapely value. To estimate feature importance based on Shapely values ​​in practice, the concept of Shapely value additive interpretation is then applied.

[0086] Example 1

[0087] This example uses rooster testicle weight phenotypic data as input data and implements all steps of the interpretable machine learning genomic prediction method, including:

[0088] (1) Data collection and preprocessing

[0089] Data collection: Testis weight phenotypic data of 1,881 roosters were collected. Genotypic data were obtained by low-depth resequencing technology, covering SNP sites across the entire genome.

[0090] Preprocessing: quality control, minimum allele frequency (MAF) filtering: remove SNP sites with MAF < 0.05 to reduce low-frequency variation noise; linkage disequilibrium (LD) filtering: set LD threshold (r 2 <0.5), highly linked redundant sites were removed, and 124,000 high-quality SNP loci were retained. Data encoding: 0, 1, and 2 are used to represent genotypes; 0: homozygous for the reference allele (e.g., AA); 1: heterozygous for the reference allele (e.g., AB); 2: homozygous for the alternative allele (e.g., BB).

[0091] (2) Genetic evaluation and feature selection: The QTL intervals for testicular traits were identified through GWAS analysis, and the sites with biological prior information were screened based on the QTL interval sites to optimize the SNP features.

[0092] (3) Dimensionality reduction: The feature-optimized SNP matrix is ​​reduced to 100 dimensions (q=100) using the PCA method, retaining 90% of the genetic variation information. The reduced-dimensional matrix (1881×100) is output for subsequent model training. The PHATE method is used to capture the local nonlinear structure and global distribution of SNP data based on the feature-optimized SNP sites through gradient descent optimization and matrix decomposition. A 100-dimensional embedding (1881×100) is generated and compared with the PCA results to verify the dimensionality reduction effect. At the same time, the unreduced SNP data is retained as an input control group to evaluate the impact of dimensionality reduction on model performance.

[0093] (4) Sparrow Search Algorithm (SSA) parameter optimization: 5-fold cross validation was used, with R 2 The score is used as an evaluation indicator to screen the optimal hyperparameter combination.

[0094] Performance comparison: PCA and PHATE data after dimensionality reduction outperformed the original data in terms of model training speed. LightGBM and XGBoost performed best in the Boosting method. Optimization process: Initialize the population and randomly generate 20 sets of parameter combinations; Fitness evaluation, calculate Pearson and RMSE based on 5-fold cross-validation; Behavior simulation, global exploration of new parameter combinations in the search phase; Approach the current optimal solution in the tracking phase; Stay away from suboptimal solutions in the escape phase to avoid local optimality; Dynamic adjustment: Narrow the parameter search range according to the number of iterations. Optimization results: Pearson: increased from 0.17 to 0.27 (+58.8%); RMSE: decreased from 9.2 to 4.61 (-49.9%);

[0095] (5) SHAP interpretability analysis: Based on the fitting results of the lightgbm model fine-tuned by the grid search above, the SHAP interaction value of each input feature in the test set is calculated using the SHAP theory. In order to further analyze the contribution of each influencing factor from a global perspective, the SHAP absolute value of each feature variable and its contribution to the phenotype among the top 20 features are calculated. The results are as follows: Figure 4 shown.

[0096] Example 2

[0097] This example uses the phenotypic data of pigs weighing 100 kg per day as input data to implement an interpretable machine learning genome prediction method, taking biologically based feature selection as an example:

[0098] (1) Data collection and preprocessing

[0099] Data collection: Phenotypic data of 100 kg age (AGE) were collected from 2549 pigs. Genotypic data were obtained using low-depth resequencing technology, covering SNP sites across the entire genome.

[0100] Preprocessing: SNP variation detection was performed using BaseVar and STITCH software. To ensure data quality, PLINK was used for SNP filtering and individual screening, eliminating SNPs with minor allele frequency (MAF) less than 0.05 and SNPs with genotype missing rate higher than 5% to ensure high sample quality and data reliability.

[0101] (2) The method based on GWAS prior information was integrated with AI model training, and the P value threshold and linkage disequilibrium (LD) r in genome-wide association analysis were used to analyze the relationship between the two methods. 2 Two core parameters were tested at different gradients for the age-per-hundred-kilogram trait. Based on prior information from genome-wide association studies, markers were identified and screened from millions of SNPs, and the results were compared with the original loci. This method of feature optimization reduced the number of effective feature loci, further facilitating subsequent machine learning model training.

[0102] (3) Model construction and training: Cross-validation and performance evaluation: 5-fold cross-validation was used, and R 2 The scores were used as evaluation metrics to screen for the optimal hyperparameter combination. Pearson's squared error (PSE) improved from 0.45 to 0.50 (+11.1%), while RMSE decreased from 4.03 to 2.94 (-27.0%). By using biological prior information to screen for characteristic loci, prediction accuracy was further improved. Compared to training without prior information for site selection, the prediction accuracy of age per 100 kg was significantly improved. LightGBM and CatBoost achieved prediction improvements of 2.2% and 3.9%, respectively. This is shown in Table 1.

[0103] Example 3

[0104] Implement an interpretable machine learning genomic prediction method and realize the application of machine learning models in egg production phenotypic prediction, taking the optimization of the sparrow search algorithm as an example:

[0105] (1) Data collection and preprocessing

[0106] Data Collection: Phenotypic data on egg production were collected from hens. Genotypic data were obtained using low-depth resequencing technology, covering SNPs across the entire genome. The total number of samples was 4,511.

[0107] Preprocessing: quality control, minimum allele frequency (MAF) filtering: remove SNP sites with MAF < 0.05 to reduce low-frequency variation noise; missing rate (CR) filtering: remove SNP sites with missing rate > 0.90 to ensure data integrity; Hardy-Weinberg equilibrium (HWE) test: remove SNP sites with p value < 0.001 and finally retain high-quality SNP sites; data encoding: use 0, 1, and 2 to represent genotype: 0: reference allele homozygous type (such as AA), 1: heterozygous type (such as AB), 2: alternative allele homozygous type (such as BB).

[0108] (2) Sparrow Search Algorithm (SSA) parameter optimization:

[0109] Optimization objectives: maximize the Pearson correlation coefficient (Pearson) and minimize the root mean square error (RMSE).

[0110] Initialize the population: randomly generate 20 sets of parameter combinations.

[0111] Fitness evaluation: Pearson and RMSE are calculated based on 5-fold cross validation.

[0112] Search phase: Globally explore new parameter combinations.

[0113] Tracking phase: Approaching the current optimal solution.

[0114] Escape stage: stay away from suboptimal solutions and avoid local optimality.

[0115] Dynamic adjustment: Narrow the parameter search range based on the number of iterations.

[0116] Optimization results: SSA avoids the local optimality problem of traditional grid search by dynamically adjusting the search strategy and step size, significantly improving the model's global search capability and convergence speed. It is particularly suitable for complex nonlinear problems and large-scale genomic data.

[0117] (3) Model construction and training

[0118] Model selection and hyperparameter search: Using AI methods for training, Boosting algorithms achieved better results among all methods. Based on the original data, the hyperparameters of LightGBM and CatBoost were optimized using the Sparrow Search Algorithm (SSA), which significantly improved the model performance. For LightGBM, the Pearson correlation coefficient after SSA optimization increased from 0.21 to 0.23 (+9.5%), and the RMSE decreased from 11.2 to 9.5 (-15.2%). The optimal parameter combination was learning_rate = 0.02, num_leaves = 22, max_depth = -1, min_data_in_leaf = 10, and feature_fraction = 0.8. For CatBoost, after SSA optimization, the Pearson correlation coefficient increased from 0.22 to 0.24 (+9.1%), and the RMSE decreased from 10.32 to 9.97 (-3.4%). The optimal parameter combination was learning_rate = 0.04, depth = 7, L2_leaf_reg = 3, iterations = 1200, and border_count = 86, as shown in Table 1.

[0119] Example 4

[0120] Implement an interpretable machine learning genomic prediction method to realize the application of machine learning models in the prediction of testicular heavy phenotype, taking SHAP interpretability as an example:

[0121] (1) Data collection and preprocessing:

[0122] Data collection: Testis weight phenotypic data of 1,881 roosters were collected. Genotypic data were obtained using low-depth resequencing technology, covering SNP sites across the entire genome.

[0123] Preprocessing: quality control, minimum allele frequency (MAF) filtering: remove SNP sites with MAF < 0.05 to reduce low-frequency variation noise; linkage disequilibrium (LD) filtering: set LD threshold (r 2 <0.5), highly linked redundant sites were removed, and 124,000 high-quality SNP sites were finally retained; data encoding: 0, 1, and 2 were used to represent genotypes: 0: homozygous for the reference allele (such as AA), 1: heterozygous (such as AB), and 2: homozygous for the alternative allele (such as BB).

[0124] (2) Model training and evaluation: BayesR (0.2306) and GBLUP (0.2259) achieved the highest prediction accuracy, indicating that these two methods performed best on this dataset. Secondly, Ridge (0.1724), ElasticNet (0.1633), and LightGBM (0.1762) also performed relatively robustly and had certain predictive capabilities. Among traditional machine learning methods, CatBoost (0.1821) had a good prediction effect, slightly better than LightGBM, but still lower than BayesR and GBLUP. Linear's predictive ability was average. In contrast, SVM, KNN, Random Forest, and Decision Tree had lower accuracy, indicating that these methods had poor adaptability on this dataset. For gradient boosting-based models, GBDT (0.0761), XgBoost (0.0842), and AdaBoost (0.0722) had lower accuracy and failed to fully demonstrate their advantages on this dataset.

[0125] Overall, BayesR and GBLUP achieved the highest prediction accuracy, outperforming other methods, while CatBoost and LightGBM were also competitive. In contrast, SVM, decision trees, and some gradient boosting methods had weaker prediction capabilities, possibly due to data characteristics or algorithmic limitations.

[0126] (3) Interpretability: In this method, the SHAP method is used to perform interpretability analysis on the machine learning-based SNP prediction model to further analyze the impact of each site on model prediction. SHAP is used to evaluate SNP importance, individual prediction contributions, site interaction patterns, and population-level impact distribution, revealing the nonlinear effects and genetic interaction patterns of machine learning models in genomic prediction.

[0127] Based on this theory, taking testicular traits as an example, we screened out the important sites that affect the model prediction results, and based on the output results, we obtained the feature importance of each site in the model, the interaction between the site and the sample, and the shap value. Figure 4 , 5, 6. Here, we take the test of LightGBM model in testicular traits as an example, evaluate the contribution of the first 20 features to the model, and sort them in descending order according to the average SHAP value ( Figure 4). This figure shows the top 20 SNPs that have the greatest impact on model predictions, sorted by the mean absolute value of the SHAP value (mean(|SHAP value|)). The three SNPs chr28_1963469, chr4_36997213, and chr28_2107278 have the greatest impact on the model, indicating that these sites play a key role in predicting the target trait. The larger the SHAP value, the greater the contribution of the feature to the model prediction. Figure 4 shown.

[0128] Figure 5 The SHAP value distribution for different SNP loci is shown. The colors represent the SNP genotype (0, 1, 2), and each dot represents a sample. The X-axis shows the SHAP value, which indicates the direction and magnitude of the feature's influence on the prediction result. It can be observed that even for the same genotype (same color), there is still some variation in the SHAP value, indicating that the influence of genotype may be modulated by other SNPs or environmental factors. This reveals the possibility of dominance, overdominance, or epistasis (gene interaction).

[0129] Figure 6 This figure shows the prediction process for an individual, specifically how the model calculates the final predicted value based on that individual's SNP information. The initial average predicted value is 16.173, and the contribution (positive or negative) of different SNPs gradually adjusts the final predicted value. chr28_1963469 contributes the most to the prediction (+0.48), while chr15_10532189 decreases the predicted value (-0.26). This figure clearly illustrates the model's decision path and illustrates how different genotypes influence the final prediction.

[0130] Figure 7 The distribution of SHAP values ​​across the entire sample population is shown, with the horizontal axis representing different individuals and the vertical axis representing the top several significant SNPs. Colors indicate the magnitude of the SHAP value, with red representing a positive contribution (increasing the predicted value) and blue representing a negative contribution (decreasing the predicted value). As can be seen, SHAP values ​​for the same SNP vary significantly across samples, further demonstrating the complexity of genetic effects, including possible gene interactions and environmental influences.

[0131] This study achieved the prediction and interpretability evaluation of genomic data by constructing an efficient genomic data preprocessing, biological prior information screening, feature optimization and machine learning modeling process.

[0132] In summary, the present invention processes multi-source data, effectively uses QTL screening, GWAS analysis, linkage disequilibrium and other methods, combines biological prior information, and SNP information obtained through screening to train multiple machine learning models, explores the impact of feature optimization and parameter optimization methods on the performance of genome prediction models, and significantly improves genome prediction accuracy and computational efficiency; at the same time, the interpretable machine learning method based on SHAP is combined with omics data to realize the function of evaluating feature weights after prediction, identify the key SNP sites that contribute most to prediction, solve the problem of insufficient interpretability of traditional AI prediction methods, and further reveal the relationship between genetic variation and phenotype.

[0133] The contents not described in detail in this specification belong to the prior art known to those skilled in the art.

[0134] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. An interpretable machine learning genome prediction method, characterized in that: The following steps are involved: S1. Data preprocessing: collecting the genotype and phenotype data to be tested, preprocessing the genotype and phenotype data to be tested, and obtaining preprocessed genetic data and preprocessed phenotypic data; the preprocessing includes sequencing quality control; S2. Genetic evaluation and feature selection: Perform genome-wide association analysis on the genetic and phenotypic data preprocessed in S1, screen for loci significantly associated with the target phenotype, and generate a trait-optimized SNP matrix. S3. Model training and multi-model integration: Build multiple models and use the trait-optimized SNP matrix obtained in S2 for machine learning training of multiple models. Dynamically optimize model hyperparameters, learn the mapping relationship between genotype and phenotype, and adjust internal parameters to maximize prediction accuracy to obtain phenotypic prediction results. S4. Model evaluation: Pearson correlation coefficient or mean square error was used to evaluate the predictive accuracy of multiple models in S4. S5. SHAP interpretability analysis: Calculate the contribution of each trait to the phenotypic prediction results described in S3, as well as the contribution of global and local explanations to the phenotypic prediction results of S3; screen out important sites that affect the phenotypic prediction results, output the phenotypic prediction results, and obtain the feature importance of each site in the model, the interaction between the site and the sample, and the SHAP value distribution.

2. The interpretable machine learning genome prediction method according to claim 1, characterized in that: To reduce model training time, the feature-optimized SNP matrix obtained by S2 is subjected to dimensionality reduction processing using PCA or PHATE, and the reduced-dimensional SNP matrix is ​​output to optimize the computational speed of subsequent model training and reduce the original genome noise. The reduced SNP matrix is ​​input into the multiple models of S3 for machine learning training, the model hyperparameters are dynamically optimized, the mapping relationship between genotype and phenotype is learned, and the internal parameters are adjusted to maximize the prediction accuracy to obtain the phenotype prediction results.

3. The interpretable machine learning genome prediction method according to claim 2, characterized in that: The dimensionality reduction processing and its verification are specifically as follows: using the PHATE method, through gradient descent optimization and decomposition of the reduced dimensionality SNP matrix, based on the feature-optimized SNP sites, capturing the local nonlinear structure and global distribution law of the SNP sites, and comparing them with the PCA results to verify the dimensionality reduction effect; at the same time, retaining the unreduced SNP data as the input control group to evaluate the impact of dimensionality reduction on model performance.

4. The interpretable machine learning genome prediction method according to claim 1, characterized in that: The sequencing quality control of S1 includes genotype site filtering, SNP site linkage relationship screening, phenotypic data missing value filling, phenotypic data normalization, and removal of abnormal outliers, specifically: Minimum allele frequency filtering: remove SNP sites with MAF less than the set value to reduce low-frequency variation noise; Linkage disequilibrium filtering: set the LD threshold, remove highly linked redundant sites, and retain high-quality SNP sites; Data encoding: Genotypes are coded as 0, 1, and 2: 0, homozygous for the reference allele; 1, heterozygous; 2, homozygous for the alternative allele.

5. The interpretable machine learning genome prediction method according to claim 1, characterized in that: In the S2, potential functional SNP sites were analyzed by genome-wide association analysis, and P values ​​were calculated based on statistical tests, multiple P value thresholds were set, and linkage disequilibrium r values ​​with different gradients were combined. 2 , screen and filter SNP sites as candidate SNP sites to ensure that the candidate SNP sites are significant; and compare the results of candidate SNP sites with original sites for subsequent machine learning model training.

6. The interpretable machine learning genome prediction method according to claim 1, characterized in that: In S3, during training, hyperparameters are optimized using different methods to obtain the best performance, including: Grid search: traverses the hyperparameter combinations and selects the optimal hyperparameter combination based on cross-validation performance indicators; Sparrow search algorithm: simulates sparrow foraging behavior, dynamically optimizes hyperparameters, and screens the optimal hyperparameter combination.

7. The interpretable machine learning genome prediction method according to claim 1, characterized in that: The multiple models in S3 include linear regression, ridge regression, elastic net, K-nearest neighbor algorithm, support vector machine, random forest, decision tree, gradient boosting tree, extreme gradient boosting algorithm, AdaBoost, LightGBM and CatBoost.

8. The interpretable machine learning genome prediction method according to claim 1, characterized in that: The model evaluation in S5 was performed and the prediction accuracy of quantitative traits was evaluated using five-fold cross validation.

9. The interpretable machine learning genome prediction method according to claim 1, characterized in that: The global explanation in S5 shows the contribution distribution of key SNP sites through a beeswax diagram, and the local explanation shows the prediction logic of a single sample through a waterfall diagram.

10. An interpretable machine learning genome prediction device using the interpretable machine learning genome prediction method according to any one of claims 1 to 9, characterized in that: The device includes a preprocessing module, a feature selection module, a model training module, a model evaluation module and an explanation module; The preprocessing module is used to collect the genotype and phenotype data to be tested and preprocess the data; The feature selection module is used to select key features from high-dimensional genomic data using biological prior information or dimensionality reduction methods, reduce redundant information, and improve the computational efficiency and generalization ability of the model; The model training module is used to construct a genome prediction model using a machine learning algorithm based on the feature data filtered by the feature selection module, and improve the model performance through a hyperparameter optimization method; The model evaluation module is used to evaluate the performance of the trained model, using root mean square error, coefficient of determination, and mean absolute error to measure the model's predictive ability, and to evaluate the model's stability and generalization ability through cross-validation; The explanation module is used to analyze the model decision process using the SHAP method, quantify the contribution of each feature to the prediction result, reveal the genetic effect of key gene sites, and improve the interpretability of the model.

Citation Information

Patent Citations

  • Deep learning discrimination method for SNP pig breed identification based on liquid chip

    CN117275575A

  • Wheat abiotic stress character SNP prediction method based on automatic CNN model

    CN119446290A

  • Gene and disease association analysis method and apparatus, computer device and storage medium

    WO2024217010A1

Cited By

  • Efficient breeding decision support system and method based on Chinese trumpet creeper

    CN120994983A

  • Nasopharyngeal carcinoma differential expression gene automatic detection system based on genetic algorithm

    CN121075441A

  • Self-adaptive feature fusion genotype-phenotype prediction method for forest intelligent breeding

    CN121506238A

  • Fermentation parameter optimization method and system based on machine learning

    CN121543469A

  • Tree phenotype deep learning modeling method for multi-character collaborative prediction

    CN121658995A