Method for genetic evaluation of boars based on image-based feature coding and dual-stream residual network

CN122551878APending Publication Date: 2026-08-11CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]1.单一深度模型缺乏稳定的遗传先验约束:单纯的卷积神经网络在应对有限的样本时,极易对环境噪音产生过拟合,且往往摒弃了经典统计遗传模型中极具稳健性的线性遗传先验,导致复杂性状的预测结果存在严重的方差波动与稳定性瓶颈

Benefits of technology

[0035] 1. This invention maps one-dimensional single nucleotide polymorphism sequences into two-dimensional single-channel images according to linkage disequilibrium block rules, breaking the traditional paradigm of processing one-dimensional genotype data. This method can completely preserve the spatial association features of the genome sequence, effectively capture various nonlinear genetic associations such as epistatic effects and dominant effects, and make up for the shortcomings of traditional linear models such as GBLUP, which can only fit additive genetic effects and cannot resolve complex gene interaction relationships. It improves the ability to mine complex genetic information from the data input end. At the same time, this invention combines the kinship matrix to screen the neighbor groups with the highest kinship coefficients and constructs a two-stream feature input tensor of the target individual and the neighbor groups. It is no longer limited to the genotype information of a single target individual, but fully incorporates the background genetic features of the breeding pig lineage and kinship groups, enriching the model input dimension and significantly improving the robustness of genetic features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122551878A_ABST
    Figure CN122551878A_ABST
Patent Text Reader

Abstract

This invention discloses a genetic evaluation method for breeding pigs based on image-based feature encoding and a two-stream residual network, comprising the following steps: S100: preprocessing and image-mapping the whole-genome single nucleotide polymorphism data of breeding pigs; S200: constructing and initializing a two-stream residual network; S300: dynamically calculating the estimated breeding value of individuals in the test set using a kernel ridge regression model based on the kinship matrix, and using it as a prior feature characterizing the additive effect of the whole genome; S400: splicing and fusing the nonlinear genetic features and the prior features, and outputting the final phenotypic prediction value using adaptive regularization. This invention establishes a clear advantage in the low heritability range, where traditional methods are weakest, while maintaining competitiveness in the high heritability range. It possesses robust predictive capabilities for complex genetic scenarios, which is of great significance for improving the reliability of genetic evaluation and shortening the breeding cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interdisciplinary technology of genome-based intelligent breeding and deep learning, specifically to a genetic evaluation method for breeding pigs based on image-based feature encoding and two-stream residual networks. Background Technology

[0002] Driven by the profound empowerment of artificial intelligence and the rapid development of high-throughput sequencing technology, genomic selection has become a core technology in modern pig genetic breeding to improve the accuracy of phenotypic prediction and shorten the genetic improvement process. Relying on the accumulation of massive amounts of multi-omics information, artificial intelligence tools such as machine learning and deep learning are widely used to explore the complex mapping patterns between genotypes and phenotypes. However, the characteristics of pig whole-genome information, such as extremely high dimensionality, low value density, and complex inter-data associations, pose a dual challenge to the stability and accuracy of traditional genetic evaluation methods when dealing with massive amounts of data.

[0003] Existing genome prediction methods primarily rely on linear regression models based on the additive genetic effect hypothesis, which have limitations in capturing non-additive effects such as epistatic and dominance effects between genes. In recent years, image-based genome prediction using convolutional neural networks has shown great potential. By mapping discrete single nucleotide polymorphism (SNP) sequences into two-dimensional spatial features, the network can effectively capture linkage disequilibrium blocks and potential non-additive effects between genomes. However, existing genome image prediction methods still have the following shortcomings in practical applications:

[0004] 1. Single deep models lack stable genetic prior constraints: When dealing with limited samples, simple convolutional neural networks are prone to overfitting to environmental noise, and often abandon the highly robust linear genetic priors in classical statistical genetic models, resulting in serious variance fluctuations and stability bottlenecks in the prediction results of complex traits.

[0005] 2. Neglecting inter-individual kinship context: Most existing deep learning prediction models focus on feature extraction of a single target individual and lack collaborative modeling of background information of kinship neighbors in the breeding population, thus failing to make full use of genetic information in the family background to increase the robustness of features.

[0006] 3. Gradient instability and loss of dimensionality reduction features in deep networks: When processing high-dimensional genotype images, as the network depth increases, traditional convolutional neural networks are prone to gradient vanishing or network degradation due to the lack of reasonable residual connection design. At the same time, the pooling operation in traditional models may lead to the loss of key genetic features when processing genome sequences that are highly sensitive to absolute physical location, thereby reducing the stability of genetic evaluation results.

[0007] In summary, in the whole-genome selection genetic evaluation task during the breeding and improvement of pigs, facing high-dimensional genotype data and its complex genetic effects, how to design a method that can deeply mine nonlinear effects through image-based feature encoding, coordinate with the background information of neighboring populations, and utilize stable residual structures to improve prediction robustness has become a key technical problem that urgently needs to be solved to improve the reliability of genetic evaluation and shorten the breeding cycle. Summary of the Invention

[0008] The purpose of this invention is to overcome the above-mentioned defects in the existing technology and provide a genetic evaluation method for breeding pigs based on image-based feature encoding and two-stream residual networks.

[0009] To address the aforementioned technical problems, this invention proposes a genetic evaluation method for breeding pigs based on image-based feature encoding and a two-stream residual network, comprising the following steps: S100: Preprocessing and image-mapping the whole-genome single nucleotide polymorphism (SNP) data of breeding pigs, and constructing a two-stream feature input tensor for the target individual and its neighboring populations by combining the kinship matrix; wherein, the SNP data preprocessing includes data quality control, missing value imputation, and marker screening operations, and the image-mapping is performed according to the genomic linkage disequilibrium block rule; S200: Constructing and initializing a two-stream residual network, and extracting the nonlinear genetic features of the target individual and its family through the master and slave paths respectively; the two-stream residual network is the master and slave path network framework. S300: Within the cross-validation training set, the estimated breeding values ​​of individuals in the test set are dynamically calculated using a kernel ridge regression model based on the kinship matrix, and these values ​​are used as prior features characterizing the additive effect of the whole genome. The kernel ridge regression model only uses the training set data within the current cross-validation fold to model the model, and the introduction of global dataset information is prohibited. S400: In the fully connected layer of the network, the nonlinear genetic features extracted in step S200 are concatenated and fused with the prior features obtained in step S300, and the final phenotypic prediction value is output using adaptive regularization. The adaptive regularization dynamically adjusts the regularization coefficient according to the genetic effect type of the trait.

[0010] Further, step S100 includes:

[0011] S101: Mapping a one-dimensional single nucleotide polymorphism (SNP) marker sequence into a two-dimensional single-channel image with spatial structure, wherein... This represents a two-dimensional single-channel image generated by individual i. The single nucleotide polymorphism marker sequence represents the individual, Φ represents the mapping function, and LD represents the spatial arrangement rule based on linkage disequilibrium blocks. The mapping process completes the conversion from one-dimensional sequence to two-dimensional image by chromosome partitioning and continuous arrangement of linkage disequilibrium blocks. When the sequence length is less than the image size, zero values ​​are padded.

[0012]

[0013] S102: Read the kinship matrix G of the population. For the target individual i, select the top N valid individuals with the highest kinship coefficient as the neighbor group, where Mi is the neighbor index set of individual i, P is the breeding group, Gi,j represents the kinship coefficient between individual i and individual j, and N is the preset neighbor threshold.

[0014]

[0015] S103: Extract N two-dimensional single-channel images corresponding to the selected neighbor group and construct them into a neighbor image tensor with dimensions N×C×H×W. The input is a path, where Stack is a tensor stacking operator. This is a two-dimensional single-channel gene image of individual k. Let C be the set of neighbor indexes for individual i, where C is the channel dimension, H is the height dimension, and W is the width dimension.

[0016] .

[0017] Furthermore, in step S200, the main path and the secondary path are residual networks with the same architecture but independent weight parameters to decouple the target features from the background noise; the secondary path is internally a Siamese network architecture, that is, the N neighbor individual images input to the secondary path share the same set of weights when extracting features to ensure the statistical consistency of family background feature measurement; the main path extracts features from the target individual image separately, while the secondary path completes parallel feature extraction of all neighbor individual images based on the Siamese network.

[0018] Further, step S300 includes:

[0019] S301: The kernel function parameters of the kernel ridge regression are pre-computed. In each fold cross-validation, only the kinship slices of the current fold training set individuals and phenotypic data are allowed to fit the model. The models of different folds are independent of each other and the parameters are not shared.

[0020] S302: Input the kinship slices of individuals in the current test set into the fitted model to calculate the pure estimated breeding value, completely blocking global data leakage. To estimate the breeding value of individuals in the test set, Slice the kinship matrix between the test set and the training set. The kinship matrix within the training set. For ridge regression coefficients, It is the identity matrix. For the training set phenotypic vectors,

[0021] .

[0022] Further, step S400 includes:

[0023] S401: Individual genetic characteristics extracted from the main path Genetic characteristics of neighboring groups extracted from the path and the prior genetic values ​​generated by nuclear ridge regression Perform nonlinear spatial splicing to construct a fused genetic feature vector. , where ⊕ represents the vector concatenation operator;

[0024]

[0025] S402: During the model training phase, in order to constrain the neural network to fuse the feature vectors in step S401... The learning intensity is used to define the adaptive target loss function. Where ⊖ is the set of parameters to be learned by the neural network, λ is the regularization coefficient, and λ is the parameter that will be learned according to... The proportion of linear and nonlinear genetic information contained within is dynamically adjusted. For low regularization coefficient, It has a high regularization coefficient and satisfies ;

[0026]

[0027]

[0028] S403: After completing the network update under the adaptive criterion established in step S402, the feature vector constructed in step S401 is concatenated using the trained multilayer perceptron. Mapped to phenotypic space, where and These are the weight matrices for the hidden layer and output layer of the fully connected layer, respectively. For hidden layer bias terms, ReLU is the output layer bias term, and it is a non-linear activation function.

[0029] .

[0030] Furthermore, the neighbor threshold N=10; the image dimension parameters are set as follows: channel dimension C=1, height H=224, width W=224.

[0031] Furthermore, after extracting individual neighbor features from the twin network of the path, multiple sets of neighbor features are aggregated using global pooling to obtain a neighborhood group genetic feature with uniform dimensions. .

[0032] Furthermore, the ridge regression coefficient The optimal value is determined by cross-validation by iterating through the training set, and the value range is real numbers greater than 0.

[0033] Furthermore, the method is applicable to the genetic assessment of various economic traits in breeding pigs with low, medium, and high heritability.

[0034] The present invention has the following beneficial effects:

[0035] 1. This invention maps one-dimensional single nucleotide polymorphism sequences into two-dimensional single-channel images according to linkage disequilibrium block rules, breaking the traditional paradigm of processing one-dimensional genotype data. This method can completely preserve the spatial association features of the genome sequence, effectively capture various nonlinear genetic associations such as epistatic effects and dominant effects, and make up for the shortcomings of traditional linear models such as GBLUP, which can only fit additive genetic effects and cannot resolve complex gene interaction relationships. It improves the ability to mine complex genetic information from the data input end. At the same time, this invention combines the kinship matrix to screen the neighbor groups with the highest kinship coefficients and constructs a two-stream feature input tensor of the target individual and the neighbor groups. It is no longer limited to the genotype information of a single target individual, but fully incorporates the background genetic features of the breeding pig lineage and kinship groups, enriching the model input dimension and significantly improving the robustness of genetic features.

[0036] 2. This invention employs a two-stream residual network to extract nonlinear genetic features, effectively solving the problems of gradient vanishing and network degradation that easily occur with increasing network depth in traditional convolutional neural networks, thus ensuring the training stability of the deep feature extraction process. This invention sets up identical network architectures for the master and slave paths, but with independent weights, effectively decoupling the core genetic features of the target individual from the background noise of the population. Simultaneously, the slave path uses a Siamese network architecture, where all neighboring individual images share the same set of weight parameters for feature extraction, ensuring statistical consistency in family background feature measurement, avoiding measurement bias during multi-sample feature extraction, and further improving the accuracy of feature extraction.

[0037] 3. This invention strictly constructs a kernel ridge regression model based on data within the cross-validation training set, using only the phylogenetic slices and phenotypic data of the current fold of the training set to calculate estimated breeding values. This completely blocks the leakage of the global dataset, ensuring the authenticity and objectivity of the prediction results. The genome-wide additive effect breeding values ​​output by the classical statistical genetic model are introduced as prior features into the deep learning network, supplementing the pure deep model with mature and robust linear genetic prior constraints. This effectively improves the shortcomings of single deep learning models, such as overfitting, large variance fluctuations in prediction results, and insufficient stability when the sample size is limited. It achieves a complementary advantage between the high stability of traditional statistical genetic methods and the strong nonlinear mining capabilities of deep learning methods.

[0038] 4. This invention completes multi-source feature splicing and fusion at the fully connected layer and dynamically adjusts the regularization coefficient using an adaptive regularization strategy. It fuses the genetic characteristics of the target individual, the genetic characteristics of neighboring populations, and additive effect prior features to achieve multi-dimensional genetic information complementarity. Simultaneously, it adaptively switches between high and low regularization strengths based on the proportion of linear and nonlinear genetic characteristics within the trait, adapting to different types of economic traits in breeding pigs, such as low, medium, and high heritability. Regularization is weakened for low-heritability traits dominated by nonlinear effects, fully leveraging the network's nonlinear fitting ability; regularization is strengthened for high-heritability traits dominated by linear effects, suppressing model overfitting and significantly improving the model's generalization ability, thus solving the technical problem that a single regularization strategy cannot adapt to multiple types of genetic traits.

[0039] 5. From a practical breeding application perspective, this invention can complete the genetic evaluation of breeding pigs based on genomic data, without waiting for the pigs to grow and develop and complete phenotypic determination. This significantly shortens the breeding cycle and reduces the breeding and labor costs associated with large-scale performance testing. Experimental verification shows that this invention significantly improves the prediction accuracy of low-heritability economic traits (such as litter size and disease resistance) where traditional methods are weak. It also maintains competitiveness comparable to mainstream classical models for medium- and high-heritability traits. It can be widely applied to large-scale breeding pig selection. The entire scheme is logically rigorous and highly implementable, effectively improving the overall reliability of breeding pig genetic evaluation, accelerating the selection and promotion of superior pig breeds, and has significant practical implications for promoting the development of the intelligent pig genome breeding industry.

[0040] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0041] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0042] Figure 1 This is a flowchart illustrating a preferred embodiment of the genetic evaluation method for breeding pigs based on image-based feature encoding and a two-stream residual network.

[0043] Figure 2 This is a system framework diagram of a preferred embodiment of the genetic evaluation method for breeding pigs based on image-based feature encoding and two-stream residual networks of the present invention;

[0044] Figure 3This is an experimental comparison diagram of a preferred embodiment of the genetic evaluation method for breeding pigs based on image-based feature coding and two-stream residual networks. Detailed Implementation

[0045] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.

[0046] Furthermore, unless otherwise defined, the technical or scientific terms used in this application description shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "upper," "lower," "left," "right," "center," "vertical," "horizontal," "inner," and "outer," etc., used in this application description to indicate relative direction or positional relationship are used only to indicate relative orientation or positional relationship, and do not imply that the device or component must have a specific orientation, or be constructed and operated in a specific orientation. When the absolute position of the described object changes, its relative positional relationship may also change accordingly, and therefore should not be construed as a limitation on this application. The terms "first," "second," "third," and similar terms used in this application description are used only for descriptive purposes to distinguish different components, and should not be construed as indicating or implying relative importance. The terms "a," "one," or "the," etc., used in this application description should not be construed as an absolute limitation on quantity, but should be construed as indicating the existence of at least one. The terms "including," "comprising," etc., used in this application description mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, without excluding other elements or objects.

[0047] It should also be noted that, unless otherwise explicitly specified and limited, the terms such as “installation,” “connection,” and “linkage” used in the description of this application should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can also refer to the internal connection of two components. Those skilled in the art can understand its specific meaning in this application according to the specific circumstances.

[0048] This example presents a genetic evaluation method for breeding pigs based on image-based feature encoding and two-stream residual networks. The aim is to address the problem that traditional methods in whole-genome selection of breeding pigs are unable to fully capture nonlinear genetic effects and ignore complex family background information.

[0049] The main process of the evaluation method (IGDR) proposed in this invention is as follows: Figure 1 As shown, the following steps will be implemented in detail:

[0050] S100: Preprocessing and image mapping of whole-genome single nucleotide polymorphism (SNP) data from breeding pigs to construct a two-stream feature input tensor. This step first completes the preprocessing of the whole-genome SNP data from breeding pigs. Preprocessing includes data quality control, missing value imputation, and SNP marker screening. After removing unqualified samples and marker sites, subsequent image mapping operations are performed. The specific implementation logic is as follows:

[0051] S101 (Genome Data Visualization Mapping): Maps one-dimensional single nucleotide polymorphism marker sequences into two-dimensional single-channel images with spatial structure.

[0052]

[0053] in This represents a two-dimensional single-channel image generated by individual i. The single nucleotide polymorphism marker sequence represents the individual, Φ represents the mapping function, and LD represents the spatial arrangement rule based on linkage disequilibrium blocks. The mapping process completes the conversion from one-dimensional sequence to two-dimensional image by chromosome partitioning and continuous arrangement of linkage disequilibrium blocks. When the sequence length is less than the image size, zero values ​​are padded.

[0054] S102 (Neighbor Group Selection): Read the kinship matrix G of the group. For the target individual i, select the top N valid individuals with the highest kinship coefficient as the neighbor group. For the set of neighbor indices of individual i:

[0055]

[0056] P represents the breeding population. This represents the affinity coefficient between individual i and individual j, and N is a preset neighbor threshold; N is a positive integer, and in this embodiment, the neighbor threshold N=10;

[0057] S103 (Constructing a Two-Stream Input Tensor): Extract 10 two-dimensional single-channel images corresponding to the selected neighbor group and construct them into a neighbor image tensor with dimensions N×C×H×W. Input from path:

[0058]

[0059] Where Stack is the tensor stacking operator. This is a two-dimensional single-channel gene image of individual k. Let C be the set of neighbor indexes for individual i, where C is the channel dimension, H is the height dimension, and W is the width dimension. In this embodiment, C=1, H=224, and W=224 are set.

[0060] This embodiment maps one-dimensional single nucleotide polymorphism sequences into two-dimensional single-channel images according to linkage disequilibrium block rules, breaking the traditional paradigm of processing one-dimensional genotype data. This method can completely preserve the spatial association features of the genome sequence, effectively capture various nonlinear genetic associations such as epistatic effects and dominance effects, and make up for the shortcomings of traditional linear models such as GBLUP, which can only fit additive genetic effects and cannot resolve complex gene interaction relationships. It improves the ability to mine complex genetic information from the data input end. At the same time, this embodiment combines the kinship matrix to screen the neighbor groups with the highest kinship coefficients and constructs a two-stream feature input tensor of the target individual and the neighbor groups. It is no longer limited to the genotype information of a single target individual, but fully incorporates the background genetic features of the breeding pig lineage and kinship groups, enriching the model input dimension and significantly improving the robustness of genetic features.

[0061] S200 (Building Network Structure): Construct a two-stream residual network. The main path (Network A) receives a single genotype image of the target pig to extract the nonlinear genetic features of the target individual. The path (Network B) receives the neighbor image tensors of the above (10,1,224,224) dimensions to extract the nonlinear genetic features of the family.

[0062] Specifically, the overall structure of the two-stream residual network is as follows: Figure 2 As shown, the network includes two branches: a main path (Network A) and a secondary path (Network B), an image input module, a feature stitching module, and a fully connected layer. The main path (Network A) receives a single genotype image of the target pig to extract the nonlinear genetic features of the target individual. The secondary path (Network B) receives neighbor image tensors of the above (10, 1, 224, 224) dimensions to extract the nonlinear genetic features of the family. The network architecture of the main path and the secondary path is exactly the same, both using a residual network as the basic backbone. The network contains an initial convolutional block and multiple levels of residual blocks. Each residual block includes multiple convolutional layers, a batch normalization layer (BatchNorm), a ReLU activation function, and a max pooling layer. The weight parameters of the main and secondary paths are independent of each other, achieving decoupling between the genetic features of the target individual and the background noise of the family. In this architecture, the secondary path (Network B) employs a Siamese network architecture. Multiple neighboring individual gene images share the same set of network weights throughout the entire feature extraction process, including convolution and pooling, ensuring statistical consistency of feature measurements across different related neighbors. The main path performs feature extraction independently on a single target individual image and does not share weights with the secondary path. After feature extraction, both branches obtain one-dimensional feature vectors through a flattening operation. The main path outputs the genetic features of the target individual. The feature vectors of multiple neighbor samples from the path are aggregated using global pooling to obtain the genetic features of the neighbor group with uniform dimensions. The feature vectors output from the two branches, together with the estimated breeding value EBV output from the kernel ridge regression model, are input into the splicing module to complete the multi-source feature fusion. Finally, the fusion is sent to the regression module composed of a multilayer perceptron to output the phenotypic prediction results of the breeding pigs.

[0063] This embodiment employs a dual-stream residual network to extract nonlinear genetic features, effectively addressing the issues of gradient vanishing and network degradation that arise with increasing network depth in traditional convolutional neural networks. This ensures the training stability of the deep feature extraction process. The embodiment sets up identical network architectures for the master and slave paths, but with independent weights, effectively decoupling the core genetic features of the target individual from the background noise of the population. Simultaneously, the slave path uses a Siamese network architecture, where all neighboring individual images share the same set of weight parameters for feature extraction, ensuring statistical consistency in family background feature measurement and avoiding measurement bias during multi-sample feature extraction, further improving the accuracy of feature extraction.

[0064] S300 (Calculating Prior Features): Within the cross-validated training set, the estimated breeding values ​​of individuals in the test set are dynamically calculated using a kernel ridge regression model based on the kinship matrix, and these values ​​are used as prior features characterizing the additive effect across the entire genome. The specific calculation logic is as follows:

[0065] S301 (Kernel Function Parameter Restriction): The kernel function parameters of kernel ridge regression are restricted to a pre-computed mode. In each fold cross-validation, only the kinship slices of individuals in the current fold training set and phenotypic data are allowed to fit the model. The models of different folds are independent of each other and the parameters are not shared.

[0066] S302 (Calculate Prior Breeding Values): Input the kinship slices of individuals in the current test set into the fitted model to calculate pure estimated breeding values, completely preventing global data leakage.

[0067]

[0068] in To estimate the breeding value of individuals in the test set, Slice the kinship matrix between the test set and the training set. The kinship matrix within the training set. For ridge regression coefficients, It is the identity matrix. The training set phenotypic vectors; the ridge regression coefficients The optimal value is determined by cross-validation by iterating through the training set, and the value range is real numbers greater than 0.

[0069] This embodiment strictly constructs a kernel ridge regression model based on the data within the cross-validation training set, and only uses the phylogenetic slices and phenotypic data of the current fold of the training set to calculate the estimated breeding value. This approach completely blocks the leakage of the global dataset, ensuring the authenticity and objectivity of the prediction results. By introducing the whole-genome additive effect breeding value output by the classical statistical genetic model as a prior feature into the deep learning network, it supplements the pure deep model with mature and robust linear genetic prior constraints. This effectively improves the shortcomings of single deep learning models, such as overfitting, large variance fluctuations in prediction results, and insufficient stability when the sample size is limited. It achieves the complementary advantages of the high stability of traditional statistical genetic methods and the strong nonlinear mining capabilities of deep learning methods.

[0070] S400 (Multidimensional Feature Concatenation and Adaptive Fusion Prediction): In the fully connected layer of the network, the nonlinear genetic features extracted in step S200 are concatenated and fused with the prior features obtained in step S300. Adaptive regularization is used to output the final phenotypic prediction value. The specific implementation logic is as follows:

[0071] S401 (Feature Concatenation): Combines individual genetic features extracted from the main path. Genetic characteristics of neighboring groups extracted from the path and the prior genetic values ​​generated by nuclear ridge regression Perform nonlinear spatial splicing to construct a fused genetic feature vector. :

[0072]

[0073] Where ⊕ denotes the vector concatenation operator, =EBV.

[0074] S402 (Construction of Adaptive Target Loss Function): During the model training phase, in order to constrain the neural network to adapt to the fused feature vectors in step S401... The learning intensity is used to define the adaptive target loss function. :

[0075]

[0076]

[0077] Where ⊖ represents the set of parameters to be learned by the neural network, and λ is the regularization coefficient, which will be determined according to... The proportion of linear and nonlinear genetic information contained within is dynamically adjusted. For low regularization coefficient, It has a high regularization coefficient and satisfies It should be noted that the higher the heritability, the higher the proportion of linear traits, and the lower the heritability, the higher the proportion of non-linear traits.

[0078] S403 (Phenomenon Space Mapping): After completing the network update under the adaptive criterion established in step S402, the feature vector constructed in step S401 is concatenated using the trained multilayer perceptron. Mapping to phenotypic space:

[0079]

[0080] in and These are the weight matrices for the hidden layer and output layer of the fully connected layer, respectively. For hidden layer bias terms, is the output layer bias term, and ReLU is a non-linear activation function.

[0081] This embodiment completes the multi-source feature splicing and fusion in the fully connected layer, and uses an adaptive regularization strategy to dynamically adjust the regularization coefficient λ, thus incorporating individual genetic features. Neighboring population genetic characteristics Prior genetic value This approach integrates genetic information across multiple dimensions to achieve complementarity. Simultaneously, it adaptively switches between high and low regularization strengths based on the proportion of linear and nonlinear genetic features within a trait, adapting to different types of economic traits in breeding pigs, such as low, medium, and high heritability. Regularization is weakened for low-heritability traits dominated by nonlinear effects, fully leveraging the network's nonlinear fitting capability; regularization is strengthened for high-heritability traits dominated by linear effects, suppressing overfitting and significantly improving the model's generalizability. This solves the technical challenge of a single regularization strategy being unable to adapt to multiple types of genetic traits.

[0082] To verify the robustness and accuracy of the proposed pig genetic evaluation method based on image-based feature encoding and two-stream residual networks in pig genetic evaluation scenarios, this example compares the proposed method with four other methods: GBLUP (Genomic Best Linear Unbiased Prediction), ReaGP (Residual Attention Genomic Prediction), LightGBM (Light Gradient Boosting Machine), and CNN (Convolutional Neural Network). Five traits with different heritability were selected for comparative evaluation, with heritability values ​​of t1=0.07, t2=0.16, t3=0.38, t4=0.58, and t5=0.62, covering a complete lineage from low to high heritability.

[0083] Experimental results are as follows Figure 3 As shown, the IGDR (Imaged-Coding Genomic Dual-Stream Residual Network) method proposed in this invention outperforms the comparative methods in terms of overall performance across five different heritability traits. The following analysis will focus on three dimensions: correlation coefficient (PCC), mean squared error (MSE), and mean absolute error (MAE).

[0084] Correlation coefficient (PCC): IGDR's PCC values ​​were leading or close to the optimal level across all five traits. For the extremely low heritability trait t1, IGDR's PCC reached 0.074, exceeding GBLUP, ReaGP, and CNN by 21.7%, 42.9%, and 49.2%, respectively, indicating that even under extremely weak genetic signals, this method still possesses significant advantages in sample ranking and correlation discrimination. For the low heritability traits t2 and t3, IGDR's PCC led ReaGP by 6.5% and 10.8%, respectively, and CNN by 8.7% and 19.6%, respectively, and GBLUP by 4.3% and 5.8%, respectively. This systematic lead indicates that the introduction of neighbor population information in the multimodal fusion design significantly contributes to the prediction accuracy of low and medium heritability traits. For the moderate heritability trait t4, IGDR's PCC was 0.453, close to the optimal GBLUP (0.455) within the error range, while leading CNN by 19.4%. On the highly heritable trait t5, although IGDR's PCC of 0.483 is slightly lower than GBLUP's 0.494, it is still significantly better than other deep learning methods, leading CNN by 10.9%.

[0085] Mean Squared Error (MSE): IGDR achieved the lowest or near-lowest MSE for traits with low to moderate heritability. At t2, IGDR's MSE was 5.1% lower than ReaGP, 3.6% lower than GBLUP, and 5.4% lower than CNN. At t3, IGDR's MSE was 2.6% lower than ReaGP, 3.5% lower than CNN, and 1.4% lower than GBLUP. At t1, IGDR's MSE (1.463) and GBLUP's (1.453) were within the error range. At t4, IGDR's MSE was 4.9% lower than CNN, and the difference with GBLUP was within the error range. At t5, GBLUP achieved the best MSE with 2770.58, which is consistent with the theoretical expectation of additive genetic models in high heritability scenarios, but IGDR's MSE is still lower than ReaGP and CNN, maintaining its leading position among deep learning methods.

[0086] Mean Absolute Error (MAE): IGDR's MAE performance for low to medium heritability traits is consistent with the trends of MSE and r. At t2, IGDR's MAE was 0.761, 2.0% lower than ReaGP, 1.6% lower than GBLUP, and 2.7% lower than CNN, ranking first among all methods. At t3, IGDR's MAE was 0.695, 2.1% lower than CNN, outperforming the other comparative methods. At t4, IGDR's MAE was 1.592, 3.0% lower than CNN, and the difference with GBLUP (1.583) was basically the same within the error range. At t5, IGDR's MAE was 41.93, better than CNN's 43.34. At t1, the differences in MAE among the methods were small, and IGDR was basically on par with the baselines. The MAE dimension further confirms IGDR's systematic advantage in low to medium heritability scenarios and its competitiveness in high heritability scenarios. It is close to the best GBLUP (0.455) within the error range, while outperforming CNN by 19.4%. On the highly heritable trait t5, IGDR's PCC of 0.483 is slightly lower than GBLUP's 0.494, but it is still significantly better than other deep learning methods, outperforming CNN by 10.9%.

[0087] In summary, the genetic evaluation method for breeding pigs based on image-based feature encoding and two-stream residual networks proposed in this invention has established a clear advantage in the low heritability range, where traditional methods are weakest, while maintaining competitiveness in the high heritability range. It has robust predictive capabilities for complex genetic scenarios and is particularly suitable for predicting economic traits with heritability in the range of 0.1 to 0.4 during actual breeding processes.

[0088] This embodiment of the pig genetic evaluation method based on image-based feature encoding and two-stream residual networks, from a practical breeding application perspective, can complete the genetic evaluation of pigs based solely on genomic data, without waiting for the pigs to grow and develop and complete phenotypic determination. This significantly shortens the pig breeding cycle and reduces the breeding and labor costs associated with large-scale performance testing. Experimental verification shows that this embodiment significantly improves the prediction accuracy of low-heritability economic traits (such as litter size and disease resistance) where traditional methods are weak. It also maintains competitiveness comparable to mainstream classical models for medium- and high-heritability traits. It can be widely applied to large-scale pig breeding. The entire scheme is logically rigorous and highly implementable, effectively improving the overall reliability of pig genetic evaluation, accelerating the selection and promotion of superior pig breeds, and has significant practical implications for promoting the development of the intelligent pig genome breeding industry.

[0089] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks, characterized in that, Includes the following steps: S100: Preprocessing and image mapping of whole-genome single nucleotide polymorphism (SNP) data of breeding pigs, and constructing a two-stream feature input tensor of the target individual and its neighboring populations by combining the kinship matrix; among which, the SNP data preprocessing includes data quality control, missing value imputation, and label screening operations, and the image mapping is performed according to the genomic linkage disequilibrium block rules; S200: Construct and initialize a two-stream residual network, and extract the nonlinear genetic features of the target individual and its family from the master and slave paths respectively; the two-stream residual network is a residual network structure with consistent master and slave path network architectures and independent weight parameters. S300: Within the training set of cross-validation, the estimated breeding value of individuals in the test set is dynamically calculated using a kernel ridge regression model based on the kinship matrix, and used as a priori feature characterizing the additive effect of the whole genome; the kernel ridge regression model only uses the training set data within the current cross-validation fold to model, and the introduction of global dataset information is prohibited; S400: In the fully connected layer of the network, the nonlinear genetic features extracted in step S200 are spliced ​​and fused with the prior features obtained in step S300, and the final phenotypic prediction value is output using adaptive regularization. The adaptive regularization dynamically adjusts the regularization coefficient according to the genetic effect type of the trait.

2. The method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks according to claim 1, characterized in that, Step S100 includes: S101: Mapping a one-dimensional single nucleotide polymorphism (SNP) marker sequence into a two-dimensional single-channel image with spatial structure, wherein... This represents a two-dimensional single-channel image generated by individual i. The single nucleotide polymorphism marker sequence represents the individual, Φ represents the mapping function, and LD represents the spatial arrangement rule based on linkage disequilibrium blocks. The mapping process completes the conversion from one-dimensional sequence to two-dimensional image by chromosome partitioning and continuous arrangement of linkage disequilibrium blocks. When the sequence length is less than the image size, zero values ​​are padded. S102: Read the kinship matrix G of the population. For the target individual i, select the top N valid individuals with the highest kinship coefficient as the neighbor group. Let P be the set of neighbor indices for individual i, and let P be the breeding population. This represents the affinity coefficient between individual i and individual j, where N is a preset neighbor threshold. S103: Extract N two-dimensional single-channel images corresponding to the selected neighbor group and construct them into a neighbor image tensor with dimensions N×C×H×W. The input is a path, where Stack is a tensor stacking operator. This is a two-dimensional single-channel gene image of individual k. Let C be the set of neighbor indexes for individual i, where C is the channel dimension, H is the height dimension, and W is the width dimension. 。 3. The method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks according to claim 1, characterized in that, In step S200, the internal architecture of the path is a Siamese network, that is, the N neighbor individual images input to the path share the same set of weights when extracting features, so as to ensure the statistical consistency of family background feature measurement; the main path extracts features from the target individual image separately, and the path completes parallel feature extraction of all neighbor individual images based on the Siamese network.

4. The method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks according to claim 1, characterized in that, Step S300 includes: S301: The kernel function parameters of the kernel ridge regression are pre-computed. In each fold cross-validation, only the kinship slices of the current fold training set individuals and phenotypic data are allowed to fit the model. The models of different folds are independent of each other and the parameters are not shared. S302: Input the kinship slices of individuals in the current test set into the fitted model to calculate the pure estimated breeding value, completely blocking global data leakage. To estimate the breeding value of individuals in the test set, Slice the kinship matrix between the test set and the training set. The kinship matrix within the training set. For ridge regression coefficients, It is the identity matrix. For the training set phenotypic vectors, 。 5. The method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks according to claim 1, characterized in that, Step S400 includes: S401: Individual genetic characteristics extracted from the main path Genetic characteristics of neighboring groups extracted from the path and the prior genetic values ​​generated by nuclear ridge regression Perform nonlinear spatial splicing to construct a fused genetic feature vector. , where ⊕ represents the vector concatenation operator; S402: During the model training phase, in order to constrain the neural network to fuse the feature vectors in step S401... The learning intensity is used to define the adaptive target loss function. Where ⊖ is the set of parameters to be learned by the neural network, λ is the regularization coefficient, and λ is the parameter that will be learned according to... The proportion of linear and nonlinear genetic information contained within is dynamically adjusted. For low regularization coefficient, It has a high regularization coefficient and satisfies ; S403: After completing the network update under the adaptive criterion established in step S402, the feature vector constructed in step S401 is concatenated using the trained multilayer perceptron. Mapped to phenotypic space, where and These are the weight matrices for the hidden layer and output layer of the fully connected layer, respectively. For hidden layer bias terms, ReLU is the output layer bias term, and it is a non-linear activation function. 。 6. The method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks according to claim 2, characterized in that... , The neighbor threshold N=10; the image dimension parameters are set as follows: channel dimension C=1, height H=224, width W=224.

7. The method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks according to claim 3, characterized in that, After extracting individual neighbor features from the twin network of the path, multiple sets of neighbor features are aggregated using global pooling to obtain a neighborhood group genetic feature with uniform dimensions. .

8. The method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks according to claim 4, characterized in that, The ridge regression coefficient The optimal value is determined by cross-validation by iterating through the training set, and the value range is real numbers greater than 0.

9. The method for genetic evaluation of breeding pigs based on image-based feature encoding and two-stream residual networks according to claim 4, characterized in that, The method is applicable to the genetic assessment of various economic traits in breeding pigs with low, medium, and high heritability.