Phage host prediction method based on weighted integrated convolutional neural network
By employing a lightweight one-dimensional convolutional neural network and an ensemble learning strategy, the problems of data dependence and high model complexity in phage host prediction are solved, achieving highly accurate and widely applicable phage-host interaction prediction.
Patent Information
- Application Number
- CN202511006517.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-12-12
AI Technical Summary
Existing phage host prediction methods struggle to achieve high accuracy, broad coverage, and strong generalization when faced with problems such as unknown sequences, incomplete data, data dependencies, and high model complexity, which limits their application, especially in phage therapy.
A lightweight one-dimensional convolutional neural network model is adopted, which combines traditional bioinformatics features with automatically learned deep features. Multiple sub-models are trained through an ensemble learning strategy, and a weighted fusion technique is used to improve the ability to identify a small number of positive samples and the overall prediction accuracy.
It significantly improves the prediction accuracy and robustness of phage-host interactions, simplifies the data preparation process, reduces computational complexity, adapts to different data distribution conditions, and achieves efficient phage-host matching prediction.
Smart Images

Figure CN121122415A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of bioinformatics and artificial intelligence, specifically relating to a method for phage host prediction based on weighted ensemble convolutional neural networks. Background Technology
[0002] With the increasing prevalence of antibiotic resistance, phage therapy has emerged as an alternative treatment. However, traditional experimental validation methods suffer from bottlenecks such as long processing times, high costs, and difficulty in covering uncultured microorganisms within the metagenomic genome. Breakthroughs in computational prediction technology are urgently needed. Existing phage host prediction methods have limitations in several aspects, specifically in the following areas:
[0003] First, sequence alignment methods rely excessively on known highly similar sequences in reference databases. When the phage genome is novel or undergoes significant mutations, these methods often fail to find reliable homologous sequences, leading to prediction failures. Furthermore, if the host bacteria lack specific sequence signals for alignment, such as CRISPR, sequence matching methods (e.g., BLAST search, CRISPR spacer sequence matching) will struggle to provide results, exhibiting low coverage. Even if some optimization tools (e.g., PHIST) can accelerate alignment and improve accuracy on known genomes, their accuracy and applicability significantly decrease when encountering incomplete genome fragments or frequent viral recombination. Therefore, pure alignment methods are inherently difficult to handle novel sequences and incomplete data, exhibiting predictive blind spots when dealing with unknown phages.
[0004] Secondly, statistical feature-based modeling methods (such as using k-mer frequencies or Markov models for prediction) only utilize low-order sequence composition information, ignoring the more complex biological relationships between bacteriophages and hosts, thus limiting prediction accuracy. For example, the typical model WIsH has a genus-level prediction accuracy of only about 60%–70% for short sequences, showing a high error rate; similarly, the PHP method based on k-mer differential Gaussian mixture models has a genus-level prediction accuracy of less than 40% for some datasets. Furthermore, these methods are highly sensitive to sequence length and quality: when the bacteriophage genome sequence to be predicted is too short, incomplete, or has base composition biases, the predictive performance of the statistical model drops sharply. If the bacteriophage has a wide host range or its genome exhibits frequent horizontal transfers, relying solely on statistical models such as k-mer will make it difficult to distinguish it from different hosts, easily leading to confusion. Therefore, statistical feature-oriented methods are limited by single features and high data requirements, exhibiting insufficient accuracy and universality in practical applications.
[0005] Secondly, while traditional machine learning and deep learning methods improve prediction accuracy, they also expose a series of problems. Firstly, these data-driven models heavily rely on large-scale, high-quality known phage-host pairing data and feature extraction techniques. For example, the PredPHI model requires thousands of known interactions and pre-extracted protein sequence features as a training basis; the vHULK method relies on a viral protein family database (pVOGs) containing nearly 10,000 features; and the RaFAH method requires building an HMM model with tens of thousands of protein clusters. If newly discovered phages contain a large number of unknown proteins or lack complete feature annotations, the predictive performance of these models will be significantly reduced. Secondly, the imbalance and selection bias of positive and negative samples affect the model's generalization ability. Because validated phage-host relationships (positive samples) are scarce in real-world data, while the potential combinations of negative relationships are extremely large, inappropriate selection of negative samples can lead to skewed model training. Existing studies, such as PredPHI, use clustering to screen negative samples to enhance robustness, but this still cannot cover all non-interaction scenarios. Third, these models often have limited generalization performance: they are trained on existing host categories, and their predictive performance drops significantly when encountering host species that are evolutionarily distant or never seen before. Finally, deep learning models generally suffer from high training costs, high parameter complexity, and the potential for overfitting to known data, limiting their efficiency and scalability in practical scenarios such as large-scale metagenomic analysis. In summary, machine learning methods, constrained by factors such as data scale, feature completeness, and model complexity, are insufficient when dealing with unknown or rare hosts.
[0006] Furthermore, while recent advancements in multi-source information fusion and network inference methods (such as combining sequence features, protein interactions, phylogenetic relationships, and knowledge graphs for prediction) have improved overall accuracy, they have also introduced new challenges. First, these methods are typically complex and costly to implement. For example, the CHERRY method requires constructing a knowledge graph containing multiple biological information sources and training a graph neural network; the GE-PHI method combines hypercurvature embeddings with large pre-trained models, resulting in significant computational and storage overhead; iPHoP employs a two-step integration framework, requiring the cascading of multiple tools, making the process cumbersome and lengthy, hindering rapid application. Second, they have high requirements for the completeness of multimodal biological data—for example, PHISDetector needs to simultaneously detect 18 types of signals, including CRISPR sequences, prophage insertions, and protein interactions, but this information is often incomplete in many environmental samples, and missing signals will render the model ineffective. Third, fusion methods often fail to provide intuitive and clear discriminatory criteria, resulting in poor model interpretability: when a model integrates numerous heterogeneous features and black-box networks, it struggles to produce convincing explanations for biologists in a timely manner, hindering guidance for subsequent experimental verification. Finally, the performance of different fusion models fluctuates significantly across different datasets or application scenarios, requiring parameter tuning and optimization for specific scenarios, and lacking sufficient robust generalization. It is evident that although multi-source fusion and network methods utilize more comprehensive information, they still face challenges such as high algorithm complexity, heavy data dependence, and insufficient practicality, thus limiting their widespread adoption.
[0007] In summary, current technologies in the field of phage host prediction are insufficient to simultaneously meet the requirements of high accuracy, broad coverage, and strong generalization. Specifically, they suffer from a lack of effective methods for handling unknown sequences, sensitivity to imbalanced data and noise, reliance on manual features or prior knowledge with limited scalability, and complex models that are difficult to deploy. These shortcomings severely restrict the ability to rapidly match phages with hosts in applications such as phage therapy. Summary of the Invention
[0008] The main objective of this invention is to overcome the shortcomings and deficiencies of existing technologies and provide a phage host prediction method based on a weighted ensemble convolutional neural network. This invention designs a lightweight and efficient 1D convolutional neural network as the base model, combines traditional bioinformatics features with automatically learned deep features, and performs multi-level characterization of phage and host sequences. Furthermore, it employs an ensemble learning strategy to train multiple sub-models, and adaptively weights and fuses the prediction results of each sub-model according to their performance, thereby improving the ability to identify a small number of positive samples and the overall prediction accuracy.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] In a first aspect, the present invention provides a phage host prediction method based on a weighted ensemble convolutional neural network, comprising the following steps:
[0011] For the input phage protein sequence and host receptor protein sequence, amino acid composition (AAC), chemical element composition (AC), and molecular weight (MW) features are extracted respectively to obtain phage 26-dimensional feature vectors and host 26-dimensional feature vectors. The phage 26-dimensional feature vectors and host 26-dimensional feature vectors are concatenated to form a 52-dimensional joint feature vector.
[0012] Known phage-host interaction pairs are used as positive samples. For each phage, non-host bacteria are randomly selected to generate negative samples, which do not contain known real interaction pairs. The negative sample set is divided into M subsets, and each subset is merged with all positive samples to form M balanced training subsets.
[0013] For each balanced training subset, an independent one-dimensional convolutional neural network model is trained. The one-dimensional convolutional neural network model can slide to extract local patterns in the input 52-dimensional joint feature vector. When processing protein feature sequences, it not only preserves the correlation between adjacent features in the sequence, but also has lower computational complexity and parameter size.
[0014] Train a one-dimensional convolutional neural network sub-model independently for each balanced training subset to obtain multiple sub-models with different performance.
[0015] Based on the performance metrics of each sub-model on the validation set, weights are assigned to the predicted probabilities of the M sub-models, and the final host interaction probability is output.
[0016] As a preferred technical solution, the formula for calculating the amino acid composition AAC is as follows:
[0017] t∈20 common amino acids;
[0018] Where N is the protein sequence length, N t Let t be the number of amino acid residues of type t in the sequence. The AAC feature calculates a 20-dimensional vector to describe the percentage distribution of amino acid composition in the sequence.
[0019] The formula for calculating the chemical elemental composition AC is as follows:
[0020] AC c =N c c∈C,H,O,N,S;
[0021] Where, N cLet c be the total number of elements c in the sequence, including carbon, hydrogen, oxygen, nitrogen, and sulfur. This results in a 5-dimensional vector representing the chemical elemental composition of the protein sequence. The abundance of elements can reflect the content of sulfur-containing amino acids and the overall chemical characteristics of the sequence.
[0022] The formula for calculating the molecular weight (MW) is as follows:
[0023]
[0024] Where m is the total number of amino acids in the protein sequence, w i MW represents the molecular weight of the i-th amino acid residue in the sequence, in Daltons (Da); 18.01 Da is the mass correction value for the loss of one water molecule when each peptide bond is formed. The calculated MW is a scalar representing the approximate molecular weight of the protein sequence.
[0025] As a preferred technical solution, a hybrid undersampling and oversampling method is used to partition and reuse the negative sample set, specifically as follows:
[0026] First, the huge set of negative samples is divided into M subsets on an equal basis. Then, all positive samples are fixed and merged with each negative sample subset to construct M relatively balanced training subsets.
[0027] In each subset, the ratio of positive to negative samples is close to 1:1, thereby reducing skewness during model training.
[0028] Since positive samples in each subset are reused, the model learns positive signals repeatedly on different subsets, which helps to improve the ability to identify rare patterns.
[0029] As a preferred technical solution, the one-dimensional convolutional neural network classifier includes:
[0030] Input layer: Receives 52-dimensional feature vectors;
[0031] The first convolutional module contains 64 convolutional kernels of length 3, followed by ReLU activation, batch normalization, max pooling layers with stride of 2, and a 5% Dropout layer;
[0032] The second convolutional module contains 128 convolutional kernels of length 3, followed by ReLU activation, batch normalization, max pooling layers with a stride of 2, and a 5% Dropout layer.
[0033] Global average pooling layer: reduces the dimensionality of the convolutional output to 128 dimensions;
[0034] Fully connected layer: contains a hidden layer with 256 neurons and a 25% dropout layer;
[0035] Output layer: Softmax classification layer with 2 neurons.
[0036] As a preferred technical solution, a one-dimensional convolutional neural network sub-model is independently trained for each balanced training subset, specifically:
[0037] During training, the cross-entropy loss function is used as the optimization objective to iteratively update the model parameters. For any training sample, its true label is y, where y = 1 represents the positive class and y = 0 represents the negative class. The model predicts the positive class probability as follows: The cross-entropy loss for this sample is calculated as follows:
[0038]
[0039] The model's ability to distinguish between positive and negative classes is improved by minimizing the average cross-entropy loss of all training samples. The training uses a gradient descent-based optimization algorithm, which is iterated until the loss converges or the preset number of epochs is reached.
[0040] As a preferred technical solution, the weighted fusion strategy is as follows:
[0041] First, using pre-divided validation set data, the classification performance metrics of each one-dimensional convolutional neural network model are evaluated, and the basic weights w of each model are determined based on the performance metrics. i ;
[0042] Next, the basic weights are normalized: Let Then α1, α2, ..., α M This represents the probability distribution of the relative contributions of each model.
[0043] In actual prediction, for any phage-host sample to be predicted, its features are first input into all M sub-models to obtain $ probability outputs regarding "whether the pair interacts". Subsequently, based on the aforementioned weighting coefficients, these output probabilities are weighted and summed to obtain the final predicted probability of the fusion model.
[0044]
[0045] in Therefore It is also a probability value between 0 and 1, representing the prediction confidence after comprehensively considering all models.
[0046] As a preferred technical solution, performance indicators include overall accuracy, sensitivity, specificity, and AUC and AUPR, which are more valuable for reference under unbalanced data.
[0047] Secondly, the present invention provides a phage host prediction system based on a weighted ensemble convolutional neural network, which is applied to the aforementioned phage host prediction method based on a weighted ensemble convolutional neural network, including a feature extraction module, a data processing module, a model building module, a multi-model training module, and a weighted fusion module;
[0048] The feature extraction module is used to extract amino acid composition (AAC), chemical element composition (AC), and molecular weight (MW) features from the input phage protein sequence and host receptor protein sequence, respectively, to obtain a 26-dimensional feature vector of the phage and a 26-dimensional feature vector of the host. The 26-dimensional feature vector of the phage and the 26-dimensional feature vector of the host are then concatenated to form a 52-dimensional joint feature vector.
[0049] The data processing module is used to take known phage-host interaction pairs as positive samples, randomly select non-host bacteria for each phage to generate negative samples, and the negative samples do not contain known real interaction pairs; the negative sample set is divided into M subsets, and each subset is merged with all positive samples to form M balanced training subsets.
[0050] The model building module is used to train an independent one-dimensional convolutional neural network model for each balanced training subset. The one-dimensional convolutional neural network model can slide to extract local patterns in the input 52-dimensional joint feature vector. When processing protein feature sequences, it not only preserves the correlation between adjacent features in the sequence, but also has lower computational complexity and parameter scale.
[0051] The multi-model training module is used to independently train a one-dimensional convolutional neural network sub-model for each balanced training subset to obtain multiple sub-models with different performance.
[0052] The weighted fusion module assigns weights to each sub-model based on its performance metrics on the validation set, performs weighted fusion of the prediction probabilities of the M sub-models, and outputs the final host interaction probability.
[0053] Thirdly, the present invention provides an electronic device, the electronic device comprising:
[0054] At least one processor; and,
[0055] A memory communicatively connected to the at least one processor; wherein,
[0056] The memory stores computer program instructions that can be executed by the at least one processor, which enables the at least one processor to perform the weighted ensemble convolutional neural network-based phage host prediction method.
[0057] Fourthly, the present invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the phage host prediction method based on a weighted ensemble convolutional neural network as described in the claims.
[0058] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0059] (1) The ensemble 1D-CNN model proposed in this invention achieves accuracy far exceeding that of existing technologies in terms of metrics. For example, the model achieves an AUC of approximately 0.968 and an AUPR of 0.976 in independent tests, with a prediction accuracy of approximately 88% and a sensitivity (recall) of approximately 91.1%. Its MCC is about 40% higher than that of the existing PredPHI model. Compared to the less than 70% accuracy of existing methods in strain-level prediction, this invention significantly improves the accuracy and reliability of phage-host interaction prediction. This leap in accuracy stems from several innovative methodological designs in this invention, including more effective protein sequence feature extraction methods, a specially optimized lightweight convolutional network structure, and a weighted ensemble strategy for imbalanced data. The combination of these technologies makes the model more accurate in distinguishing whether a phage can infect a specific host, demonstrating significantly better predictive performance than existing models in experiments.
[0060] (2) This invention effectively alleviates the problems of model overfitting and sample skew by using hybrid sampling and multi-model ensemble, thus possessing excellent generalization performance and robustness. During training, constructing multiple balanced sample sets and training independent sub-models avoids overfitting caused by repeated use of minority class samples; Dropout regularization and ensemble voting mechanisms further improve the model's adaptability to unknown data. Test results show that even under extremely imbalanced positive and negative samples, the model of this invention can still maintain a high level of prediction performance: for example, it achieved an AUPR of 0.976, demonstrating excellent recognition ability for minority positive samples. At the same time, the model's MCC is significantly improved, indicating that it can maintain stable prediction quality for both positive and negative classes, which is particularly important on imbalanced datasets. Overall, due to the introduction of feature processing and ensemble strategies specifically for imbalanced data into the algorithm, the model of this invention exhibits more stable and consistent performance under different datasets and distribution conditions, and is less prone to significant degradation due to data noise or distribution changes; its robustness is significantly better than traditional single-model methods.
[0061] (3) The method of this invention has the advantages of simple implementation and low application threshold. The model input only requires the amino acid sequence information of the phage protein and the host receptor protein to complete the prediction, without relying on complex data such as whole genome sequence alignment, CRISPR sequence detection or strain typing. This means that this method can be used for phage-host matching prediction even in the absence of comprehensive experimental data or genome annotation, which greatly reduces the difficulty of data preparation. At the same time, due to the use of a compact 52-dimensional feature vector and a lightweight network structure with two convolutional layers, the model parameter scale and computational overhead are relatively small. Compared with some existing methods that rely on large pre-trained models or complex multi-step pipelines, the solution of this invention simplifies the model complexity while ensuring high accuracy, and has higher execution efficiency and portability. In summary, this invention achieves accurate prediction of phage-host interactions with only basic sequence information, demonstrating the lightweight, efficient and widely applicable nature of the method. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0063] Figure 1 This is a flowchart of a phage host prediction method based on a weighted ensemble convolutional neural network according to an embodiment of the present invention;
[0064] Figure 2 This is a flowchart of the weighted fusion strategy according to an embodiment of the present invention;
[0065] Figure 3 This is a block diagram of a phage host prediction system based on a weighted ensemble convolutional neural network, according to an embodiment of the present invention.
[0066] Figure 4 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0067] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.
[0068] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0069] CNN (Convolutional Neural Network): A feedforward neural network structure that includes convolutional layers, pooling layers, and fully connected layers. It can automatically extract local features from input data and is often used for image and sequence data processing.
[0070] RNN (Recurrent Neural Network): A deep neural network trained on sequential or time-series data, capable of remembering information from previous inputs and using it to influence the current output. RNNs can generate output sequences based on input sequences and are suitable for tasks such as language processing and time series analysis.
[0071] LSTM (Long Short-Term Memory Network): A special type of RNN designed to learn long-term dependencies. LSTM uses gating mechanisms (input gate, forget gate, output gate) to control the transmission of information in a sequence, enabling it to more effectively capture long-distance dependencies within a sequence.
[0072] Transformer: A deep learning model based on self-attention for parallel processing of sequential data. Transformer weights different parts of the input sequence to capture global contextual information, demonstrating excellent performance in fields such as natural language processing and computer vision.
[0073] AAC (Amino Acid Composition): One of the protein sequence characteristics, representing the relative frequency or proportion of different amino acid types in the sequence. By statistically analyzing the proportion of each amino acid in a protein sequence, a compositional feature vector for each amino acid is obtained.
[0074] AC (Chemical Composition): One of the characteristics of a protein sequence, representing the abundance of the chemical elements (such as C, H, O, N, S, etc.) that make up the protein. This characteristic characterizes the sequence chemical composition by calculating the total content of each chemical element in the protein.
[0075] MW (Molecular Weight): One of the characteristics of a protein sequence, referring to the molecular weight (or average molecular weight) of the protein molecule. The overall molecular weight of the protein is usually obtained by statistically analyzing the molecular weights of each amino acid in the sequence.
[0076] Weighted Ensemble: An ensemble learning strategy that weights and fuses the predictions of multiple base models according to preset weights to obtain a final comprehensive prediction. Compared to simple voting, this strategy can assign different importance to different models to improve overall performance.
[0077] Sampling strategy: A method used in data preprocessing to balance positive and negative samples or generate more training samples. Common practices include negative sample sampling (drawing samples from unlabeled pairs as negative examples to balance the positive and negative ratio) and data augmentation. In phage-host prediction tasks, due to the scarcity of positive samples, negative sample sampling is usually used to obtain a more balanced training set.
[0078] Soft voting: An ensemble classification method that allows each classifier to output predicted probabilities or confidence scores for each category, and then weighted voting is performed based on these probabilities to produce the final classification result. Unlike hard voting (majority voting), soft voting utilizes the probabilistic information output by the model, resulting in a smoother and more accurate overall prediction.
[0079] Bacteriophage: A virus that specifically infects bacteria, spreading by infecting host bacteria and replicating itself. The genome of a bacteriophage typically carries proteins or sequence information associated with its host-specific recognition.
[0080] Host: The target bacteria that the bacteriophage infects. The specific binding between the bacteriophage and its host determines the success of infection and replication.
[0081] Phage-host interaction (PHI): The interaction or infection relationship between a bacteriophage and its bacterial host. PHI studies typically aim to predict or validate which bacteriophage can infect which bacterial host, and are crucial for understanding ecological processes and developing phage therapeutics.
[0082] AUC (Area Under the ROC Curve): A metric used to evaluate the performance of a binary classifier, representing the area under the Receiver Operating Characteristic (ROC) curve. AUC values range from 0 to 1; the closer to 1, the stronger the classifier's ability to distinguish between positive and negative samples. An AUC of 0.5 indicates that the model's performance is comparable to random guessing. Specifically, AUC can be interpreted as the probability that, given a randomly selected positive example and a negative example, the model correctly scores the positive example higher than the negative example.
[0083] AUPR (Area Under the Precision-Recall Curve): The area under the precision-recall curve is used to comprehensively evaluate the accuracy of a model in predicting positive samples at different thresholds. A higher AUPR indicates better predictive performance for the positive class when there is an imbalance between positive and negative samples. When positive samples are far fewer than negative samples, AUPR reflects the model's ability to distinguish positive samples better than AUC.
[0084] MCC (Matthews Correlation Coefficient): A comprehensive binary classification metric used to evaluate model performance, particularly suitable for imbalanced datasets. MCC considers four values: True Positive Example (TP), True Negative Example (TN), False Positive Example (FP), and False Negative Example (FN), and gives a value between -1 and +1, where +1 represents a perfect prediction, 0 represents a random prediction, and -1 represents a completely wrong prediction. MCC provides a more stable performance evaluation for imbalanced data.
[0085] like Figure 1 As shown, this invention provides a phage-host prediction method based on a weighted ensemble convolutional neural network. This novel method for predicting phage-host interactions requires only sequence information, takes into account both biological priors and the advantages of deep learning, is robust to imbalanced data, and possesses high generalization performance, thus better meeting the needs of practical scientific research and applications. The method specifically includes the following steps:
[0086] S1. Input phage protein sequence and host receptor protein sequence;
[0087] Using each phage-host protein sequence pair as an input sample, various informational features are first extracted for modeling, including two main parts: statistical features and sequence composition features. Statistical features employ traditional bioinformatics descriptors to quantify the fundamental properties of the protein sequence, such as amino acid composition (AAC), atomic composition (AC), and molecular weight (MW). These features can be directly calculated through sequence analysis and are used to summarize the overall composition and physicochemical properties of the sequence. Specifically: amino acid composition reflects the relative frequency of 20 common amino acid residues in the sequence, defined as the proportion of each amino acid's occurrence to the total length; atomic composition counts the total number of atoms of the five elements (carbon, hydrogen, oxygen, nitrogen, and sulfur) in the sequence; and molecular weight represents the total molecular mass of the protein sequence.
[0088] Furthermore, the specific formula for calculating the above features is as follows:
[0089] The formula for calculating the amino acid composition AAC is as follows:
[0090] t∈20 common amino acids;
[0091] Where N is the protein sequence length, N t Let t be the number of amino acid residues of type t in the sequence. The AAC feature calculates a 20-dimensional vector to describe the percentage distribution of amino acid composition in the sequence.
[0092] The formula for calculating the chemical elemental composition AC is as follows:
[0093] AC c =N c c∈C,H,O,N,S;
[0094] Where, N c Let c be the total number of elements c in the sequence, including carbon, hydrogen, oxygen, nitrogen, and sulfur. This results in a 5-dimensional vector representing the chemical elemental composition of the protein sequence. The abundance of elements can reflect the content of sulfur-containing amino acids and the overall chemical characteristics of the sequence.
[0095] The formula for calculating the molecular weight (MW) is as follows:
[0096]
[0097] Where m is the total number of amino acids in the protein sequence, w i MW represents the molecular weight of the i-th amino acid residue in the sequence, in Daltons (Da); 18.01 Da is the mass correction value for the loss of one water molecule when each peptide bond is formed. The calculated MW is a scalar representing the approximate molecular weight of the protein sequence.
[0098] Through the above calculations, this invention can obtain a statistical feature vector (20-dimensional AAC + 5-dimensional element AC + 1-dimensional MW) containing 26 components for each phage protein sequence and each host protein sequence. Then, the 26-dimensional features of the phage sequence are concatenated with the 26-dimensional features of the corresponding host sequence to form a comprehensive feature vector of length 52, which serves as the input representation of the phage-host pair sample. This 52-dimensional vector condenses the basic compositional information of the phage and host sequences and can be used for subsequent model training and prediction.
[0099] This invention extracts fixed-length feature vectors from the protein sequences of bacteriophages and host bacteria, reflecting their sequence composition and physicochemical properties. Specifically, by calculating the amino acid composition (AAC), the abundance of key chemical elements (AC, the content of carbon, hydrogen, oxygen, nitrogen, and sulfur in the sequence), and the molecular weight (MW), each pair of bacteriophage-host protein sequences is encoded into fixed-length numerical features (26 dimensions for the bacteriophage and 26 dimensions for the host, totaling 52 dimensions) as model input. This encoding method differs from existing technologies that rely on whole-genome sequence alignment or single-sequence features: this invention does not require sequence alignment or reference to host classification information, but extracts key features entirely based on the protein's own sequence. Compared to traditional methods that can mostly only predict the genus-level classification of the host and cannot directly locate specific strains, this invention captures key information about bacteriophage-host interactions at the microscopic composition level through the above-mentioned sequence feature extraction methods, which is technically different from existing schemes that rely on sequence similarity matching.
[0100] S2. Construction of positive and negative sample sets and data balancing;
[0101] After feature extraction, a training dataset needs to be constructed, including labeled positive samples (phage-host pairings) and negative samples (phage-non-host pairings). Since the number of actual phage-host interaction pairs (positive examples) is relatively limited, while the total number of possible phage-bacteria combinations is extremely large, directly treating all unobserved combinations as negative examples would lead to severe data imbalance. Therefore, this invention employs a strategy combining negative sample extraction and resampling to balance the training dataset.
[0102] In one specific implementation, negative samples are generated from a known set of phages and hosts according to the following principles: for each known phage, several non-host bacteria are randomly selected for pairing and marked as non-interactive negative samples; simultaneously, it is ensured that the generated negative samples do not contain any reported real interaction pairs. Next, to alleviate the problem of a large disparity in the positive-to-negative ratio, a hybrid sampling method (combining undersampling and oversampling) is used to partition and reuse the negative sample set: first, the massive negative sample set is evenly divided into M subsets (i.e., partitioning and undersampling the majority class negative examples); then, all positive samples are fixed and merged with each negative sample subset to construct M relatively balanced training subsets. In each subset, the ratio of positive to negative samples is significantly balanced (e.g., close to 1:1), thereby reducing skewness during model training. Furthermore, since positive samples in each subset are reused (equivalent to oversampling the minority class positive examples), the model repeatedly learns positive class signals on different subsets, which helps improve the ability to identify rare patterns. Through the aforementioned data preprocessing strategies, this invention transforms the original severely imbalanced data into multiple smaller training sets with relatively balanced positive and negative classes, laying the foundation for subsequent model ensemble. It is worth noting that this partitioned sampling method, while retaining as much negative sample information as possible, avoids model bias caused by introducing too many negative examples at once, effectively improving the model's robustness to class imbalance.
[0103] S3. Construct a one-dimensional convolutional neural network model;
[0104] This invention employs a one-dimensional convolutional neural network (1D CNN) as the base model to automatically extract features and classify the sequence feature vectors obtained in step 1. 1D CNN can slide to extract local patterns within the input numerical sequence, preserving the correlation between adjacent features in the sequence when processing protein feature sequences. It also has lower computational complexity and parameter size than high-dimensional convolutional models, making it suitable for tasks with relatively limited feature dimensions.
[0105] In the specific network architecture design, the following layers are included:
[0106] First, the 52-dimensional input feature vector of each sample is treated as a one-dimensional signal sequence of length 52 (which can be viewed as a tensor of shape 52:1), and input into a convolutional neural network for processing. The model's convolution extraction module consists of two cascaded one-dimensional convolutional layers: the first convolutional layer contains several convolutional kernels (e.g., kernel length 3, number of convolutional channels 64), which perform local pattern scanning on the input sequence;
[0107] Next, non-linearity is added to the convolution result through the rectified linear function (ReLU) to enrich the feature representation, and batch normalization is applied to accelerate convergence and stabilize training;
[0108] Then, max pooling (e.g., stride and pooling window length of 2) is performed to reduce the length of the feature sequence, thereby reducing dimensionality, and a small probability of random dropout (e.g., zeroing rate of 5%) is added to prevent overfitting.
[0109] The second convolutional layer repeats a similar structure, but doubles the number of convolutional channels (e.g., 128 convolutional filters) to extract higher-level features, and also connects ReLU activation, batch normalization, pooling, and Dropout layers. After two convolutional modules, the original 52-dimensional features have been transformed into feature maps with several channels.
[0110] Subsequently, a global average pooling layer is used to reduce the dimensionality of the output of the last convolutional layer. The feature maps of each channel are averaged to obtain a fixed-length vector representation (the length of which is equal to the number of channels in the previous convolutional layer, for example, 128 dimensions). This operation is equivalent to reducing the dimensionality of the sequence, enabling the network to output a fixed-length overall feature.
[0111] Next, the extracted feature vectors are mapped to the classification decision space through fully connected layers: first, a hidden fully connected layer (e.g., 256 neurons) is used with an appropriate activation function to non-linearly combine the convolutional features; then, a final fully connected layer is used to output the prediction result. In binary classification tasks, the final output layer can be set to 2 neurons and use the Softmax activation function to convert the network output into probability distributions for two categories: "interactive" (positive class) and "non-interactive" (negative class); equivalently, a single neuron with a sigmoid activation function can be used to output the probability p of the positive class. ^ This invention uses the Softmax output form of 2D probability, which facilitates the normalization constraint of the probabilities of both positive and negative sides.
[0112] Through the aforementioned network architecture design, the 1D CNN model can automatically learn deep patterns from the input sequence features, such as associated specific amino acid combinations and important patterns in sequence fragments, thereby providing a basis for distinguishing whether bacteriophages can infect the host. It is worth mentioning that during network training, this invention inserts Dropout regularization (e.g., a 25% Dropout rate in hidden layers) between convolutional layers and fully connected layers to further reduce the risk of overfitting and enhance the model's generalization performance. Through a reasonable convolutional network architecture, the base model of this invention ensures sufficient model capacity to fit complex relationships while avoiding overfitting to the training data through structural and regularization methods.
[0113] This invention designs a lightweight one-dimensional convolutional neural network (1D-CNN) model for the aforementioned sequence feature vectors, efficiently extracting sequence patterns while avoiding excessive model complexity. The model consists of two stacked one-dimensional convolutional layers. Each convolutional layer is followed by batch normalization and ReLU activation, along with max pooling for feature dimensionality reduction, and Dropout regularization is added at appropriate locations to prevent overfitting. Furthermore, global average pooling is used to aggregate features after the convolutional modules, followed by a fully connected layer and the softmax output for binary classification. Compared to existing technologies, the CNN architecture of this invention is customized for protein sequence features: on the one hand, compared to traditional methods using high-dimensional convolutions or large-scale fully connected networks, 1D-CNN can efficiently capture local patterns of sequence features with fewer parameters; on the other hand, through the combination of hierarchical feature extraction using convolution and pooling and Dropout anti-overfitting measures, the model of this invention improves the retention rate of key patterns and the ability to suppress noise while maintaining model capacity. This lightweight network structure design differs from the general architecture or overly deep and complex networks of previous deep learning models, enabling more targeted extraction and processing of protein sequence features.
[0114] S4. Train a one-dimensional convolutional neural network sub-model independently for each balanced training subset;
[0115] After defining the CNN base model structure, in step S4, this invention independently trains a CNN model for each balanced subset of data generated in step S2, thereby obtaining multiple sub-classifiers with varying performance. Specifically, for the i-th balanced subset of data, a model is initialized using the 1D CNN architecture designed in step 3 (e.g., using random small initial weights), and then trained using samples from that subset. During training, the cross-entropy loss function is used as the optimization objective to iteratively update the model parameters. For any training sample, its true label y (y=1 represents the positive class, y=0 represents the negative class), the model predicts the positive class probability as follows: The cross-entropy loss for this sample is calculated as follows:
[0116]
[0117] By minimizing the average cross-entropy loss of all training samples, the model's ability to distinguish between positive and negative classes can be effectively improved. Training employs a gradient descent-based optimization algorithm (such as the Adam optimizer), iterating repeatedly until the loss converges or the preset number of epochs is reached.
[0118] It should be noted that, because each sub-training set is of moderate size and class balance, the model training process can converge stably, while avoiding the negative class dominance phenomenon caused by one-time training on massive datasets. After the above process, this invention will obtain M trained CNN sub-models M1, M2, ..., M M These sub-models, due to differences in their training data, learn complementary feature patterns: on the one hand, each model performs well on its own subset of data, capturing certain unique pattern information; on the other hand, the prediction biases between different models are independent of each other, thus providing a foundation for subsequent fusion. It is important to note that in practical applications, a portion of known data can be reserved as a validation set to evaluate the performance of each sub-model and assist in formulating the fusion strategy (as described below). The strategy of training multiple sub-models in parallel fully utilizes existing data, improves the model's coverage of different sample patterns, and also improves training efficiency (parallel training is possible), laying the foundation for the high accuracy of the final integrated model.
[0119] S5. Based on the performance metrics of each sub-model on the validation set, assign weights to the predicted probabilities of the M sub-models, perform weighted fusion, and output the final host interaction probability.
[0120] After training multiple sub-models, this invention uses an ensemble learning strategy to weightedly fuse the prediction results of these models, as follows: Figure 2 As shown, the final discrimination output is obtained. Unlike simple majority voting or average fusion, this invention introduces a weighted soft voting mechanism, which assigns different weight coefficients to each sub-model based on its performance on the validation set. The better the model's performance, the greater its contribution to the final result, thereby improving the accuracy and robustness of the overall prediction.
[0121] Furthermore, the specific implementation of the fusion strategy is as follows:
[0122] First, using pre-split validation set data, the classification performance of each CNN sub-model is evaluated, focusing on metrics including overall accuracy, sensitivity (recall), specificity, and, more reliably in imbalanced data, AUC (area under the ROC curve) and AUPR (area under the precision-recall curve). Taking all these metrics into account, the base weights w for each model are determined. i (For example, weights can be set based on the model's AUC or AUPR values, so that models that perform better receive higher weight coefficients).
[0123] Next, the weights are normalized: Let Then α1, α2, ..., α MThis represents the probability distribution of the relative contributions of each model. In actual prediction, for any phage-host sample to be predicted, its features are first input into all M sub-models, resulting in $ probability outputs regarding whether the pair interacts. Subsequently, based on the aforementioned weighting coefficients, these output probabilities are weighted and summed to obtain the final predicted probability of the fusion model.
[0124]
[0125] in Therefore This is also a probability value between 0 and 1, representing the prediction confidence after comprehensively considering all models. Compared to a single model, the weighted fusion probability output fully leverages the strengths of each sub-model: for simple samples that most models can successfully detect, the fusion result is consistent with the single-model approach; while for some complex or marginal samples, if a sub-model can give a relatively confident correct judgment, its larger weight will increase the final probability, thereby compensating for the shortcomings of other models. Through this soft-voting fusion strategy, this invention significantly improves the detection rate of the positive class (samples with interactions), while ensuring low false positives and improving the recognition performance and overall accuracy of the minority class. It should be noted that if the final output probability... If the value is higher than a preset threshold (e.g., 0.5), the phage-host pair is considered to have an interaction; otherwise, it is considered to have no interaction. The threshold can be adjusted according to actual needs (e.g., preference for high recall or high precision).
[0126] To address the severe imbalance problem in the PHI dataset, where positive samples far outnumber negative samples, this invention proposes a hybrid sampling combined with weighted ensemble learning strategy. First, a stratified sampling method is used to sample a large number of negative samples: the negative sample set is divided into several subsets, and each subset is combined with all positive samples to form a relatively balanced training subset used to train an independent CNN sub-model. This hybrid sampling method, which "undersamples the majority class on one hand and reuses all minority classes on the other," ensures that each sub-model sees complete positive class information without being overwhelmed by massive negative samples, technically overcoming the information loss and overfitting problems caused by simple oversampling or undersampling. Second, in the model fusion stage, this invention employs a weighted ensemble strategy: each sub-model is assigned different weights based on its performance on the validation set, and the prediction results of multiple sub-models are weighted and fused to obtain the final decision. Compared to existing techniques that typically rely on a single model combined with simple negative sample extraction to address imbalance, this invention significantly improves the ability to identify minority class samples and the robustness of model decisions through the training and combination of multiple sub-models. On the one hand, training multiple models on different data subsets allows model ensemble to cover richer negative sample patterns, maximizing the use of majority class information and avoiding excessive repetitive learning of minority class samples; on the other hand, weighted fusion gives the better-performing model greater influence, achieving higher overall accuracy compared to traditional hard voting or average voting ensemble methods.
[0127] S6. Based on the calculations of the above fusion model, this invention can output a probability value P for any given phage-host protein sequence pair. ^The score is used as a prediction score for the presence of an infection relationship. A binary classification judgment can be completed using an appropriate decision threshold, outputting a final prediction result of "yes" or "no". In the model deployment and practical use phases, only the phage receptor protein sequence and the host surface receptor protein sequence need to be provided as input to quickly obtain the corresponding interaction predictions, which is expected to accelerate the identification of the host range of unknown phages. To verify the effectiveness of the method of this invention, various indicators were used to evaluate the model performance in the study. These included conventional classification indicators such as accuracy, precision, and recall, as well as indicators that are more meaningful for imbalanced data, such as the area under the ROC curve (AUC), the area under the precision-recall curve (AUPR), and the Matthews correlation coefficient (MCC). Experimental results show that the weighted ensemble 1D CNN model of this invention significantly outperforms existing methods in these indicators. For example, on a certain benchmark set, the integrated model achieved an AUC of over 0.96 and an AUPR of over 0.97, with an accuracy approaching 90%, a sensitivity (recall rate for the positive class) exceeding 0.90, and an MCC improvement of tens of percentage points compared to a single model, demonstrating extremely high discriminative ability and generalization performance. Therefore, this invention, by fusing traditional features and deep learning models and combining a weighted ensemble strategy, achieves more accurate and reliable predictions of phage-host interactions. While maintaining computational efficiency, it significantly improves the accuracy, robustness, and applicability of predictions, providing strong technical support for the development of novel phage therapies and metagenomic analysis.
[0128] It should be noted that, for the sake of simplicity, the aforementioned method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously.
[0129] Based on the same idea as the weighted ensemble convolutional neural network-based phage host prediction method in the above embodiments, this invention also provides a weighted ensemble convolutional neural network-based phage host prediction system, which can be used to execute the above-described weighted ensemble convolutional neural network-based phage host prediction method. For ease of explanation, the structural diagram of the embodiment of the weighted ensemble convolutional neural network-based phage host prediction system only shows the parts related to the embodiments of this invention. Those skilled in the art will understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0130] Please see Figure 3In another embodiment of this application, a phage host prediction system 100 based on a weighted ensemble convolutional neural network is provided. The system includes a feature extraction module 101, a data processing module 102, a model building module 103, a multi-model training module 104, and a weighted fusion module 105.
[0131] The feature extraction module 101 is used to extract amino acid composition (AAC), chemical element composition (AC), and molecular weight (MW) features from the input phage protein sequence and host receptor protein sequence, respectively, to obtain a 26-dimensional feature vector of the phage and a 26-dimensional feature vector of the host. The 26-dimensional feature vector of the phage and the 26-dimensional feature vector of the host are then concatenated to form a 52-dimensional joint feature vector.
[0132] The data processing module 102 is used to take known phage-host interaction pairs as positive samples, randomly select non-host bacteria to generate negative samples for each phage, and the negative samples do not contain known real interaction pairs; the negative sample set is divided into M subsets, and each subset is merged with all positive samples to form M balanced training subsets.
[0133] The model building module 103 is used to train an independent one-dimensional convolutional neural network model for each balanced training subset. The one-dimensional convolutional neural network model can slide to extract local patterns in the input 52-dimensional joint feature vector. When processing protein feature sequences, it not only preserves the correlation between adjacent features in the sequence, but also has lower computational complexity and parameter scale.
[0134] The multi-model training module 104 is used to independently train a one-dimensional convolutional neural network sub-model for each balanced training subset to obtain multiple sub-models with different performance.
[0135] The weighted fusion module 105 assigns weights to the prediction probabilities of the M sub-models based on their performance metrics on the validation set, and outputs the final host interaction probability.
[0136] It should be noted that the weighted ensemble convolutional neural network-based phage host prediction system of the present invention corresponds one-to-one with the weighted ensemble convolutional neural network-based phage host prediction method of the present invention. The technical features and beneficial effects described in the embodiments of the weighted ensemble convolutional neural network-based phage host prediction method described above are applicable to the embodiments of the weighted ensemble convolutional neural network-based phage host prediction. For details, please refer to the description in the embodiments of the method of the present invention, which will not be repeated here.
[0137] Furthermore, in the above embodiments of the phage host prediction system based on weighted ensemble convolutional neural networks, the logical division of each program module is merely illustrative. In practical applications, the above functions can be assigned to different program modules as needed, for example, for the sake of corresponding hardware configuration requirements or the convenience of software implementation. That is, the internal structure of the phage host prediction system based on weighted ensemble convolutional neural networks can be divided into different program modules to complete all or part of the functions described above.
[0138] Please see Figure 4 In one embodiment, an electronic device is provided for implementing a phage host prediction method based on a weighted ensemble convolutional neural network. The electronic device 200 may include a first processor 201, a first memory 202, and a bus, and may also include a computer program stored in the first memory 202 and executable on the first processor 201, such as a weighted ensemble convolutional neural network-based phage host prediction program 203.
[0139] The first memory 202 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the first memory 202 can be an internal storage unit of the electronic device 200, such as the portable hard drive of the electronic device 200. In other embodiments, the first memory 202 can also be an external storage device of the electronic device 200, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 200. Furthermore, the first memory 202 can include both internal storage units and external storage devices of the electronic device 200. The first memory 202 can be used not only to store application software and various types of data installed on the electronic device 200, such as the code of the weighted ensemble convolutional neural network phage host prediction program 203, but also to temporarily store data that has been output or will be output.
[0140] In some embodiments, the first processor 201 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The first processor 201 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the first memory 202 and calls data stored in the first memory 202 to perform various functions of the electronic device 200 and process data.
[0141] Figure 4 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 4 The structure shown does not constitute a limitation on the electronic device 200, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0142] The phage host prediction program 203 based on a weighted ensemble convolutional neural network, stored in the first memory 202 of the electronic device 200, is a combination of multiple instructions. When run in the first processor 201, it can achieve the following:
[0143] For the input phage protein sequence and host receptor protein sequence, amino acid composition (AAC), chemical element composition (AC), and molecular weight (MW) features are extracted respectively to obtain phage 26-dimensional feature vectors and host 26-dimensional feature vectors. The phage 26-dimensional feature vectors and host 26-dimensional feature vectors are concatenated to form a 52-dimensional joint feature vector.
[0144] Known phage-host interaction pairs are used as positive samples. For each phage, non-host bacteria are randomly selected to generate negative samples, which do not contain known real interaction pairs. The negative sample set is divided into M subsets, and each subset is merged with all positive samples to form M balanced training subsets.
[0145] For each balanced training subset, an independent one-dimensional convolutional neural network model is trained. The one-dimensional convolutional neural network model can slide to extract local patterns in the input 52-dimensional joint feature vector. When processing protein feature sequences, it not only preserves the correlation between adjacent features in the sequence, but also has lower computational complexity and parameter size.
[0146] Train a one-dimensional convolutional neural network sub-model independently for each balanced training subset to obtain multiple sub-models with different performance.
[0147] Based on the performance metrics of each sub-model on the validation set, weights are assigned to the predicted probabilities of the M sub-models, and the final host interaction probability is output.
[0148] Furthermore, if the modules / units integrated in the electronic device 200 are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0149] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0150] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0151] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A phage host prediction method based on weighted ensemble convolutional neural networks, characterized in that, Includes the following steps: For the input phage protein sequence and host receptor protein sequence, amino acid composition (AAC), chemical element composition (AC), and molecular weight (MW) features are extracted respectively to obtain phage 26-dimensional feature vectors and host 26-dimensional feature vectors. The phage 26-dimensional feature vectors and host 26-dimensional feature vectors are concatenated to form a 52-dimensional joint feature vector. Known phage-host interaction pairs are used as positive samples, and non-host bacteria are randomly selected for each phage to generate negative samples, which do not contain known real interaction pairs. The negative sample set is divided into M subsets, and each subset is merged with all positive samples to form M balanced training subsets; For each balanced training subset, an independent one-dimensional convolutional neural network model is trained. The one-dimensional convolutional neural network model can slide to extract local patterns in the input 52-dimensional joint feature vector. When processing protein feature sequences, it not only preserves the correlation between adjacent features in the sequence, but also has lower computational complexity and parameter size. Train a one-dimensional convolutional neural network sub-model independently for each balanced training subset to obtain multiple sub-models with different performance. Based on the performance metrics of each sub-model on the validation set, weights are assigned to the predicted probabilities of the M sub-models, and the final host interaction probability is output.
2. The phage host prediction method based on weighted ensemble convolutional neural networks according to claim 1, characterized in that, The formula for calculating the amino acid composition AAC is as follows: One common amino acid; Where N is the protein sequence length, N t Let t be the number of amino acid residues of type t in the sequence. The AAC feature calculates a 20-dimensional vector to describe the percentage distribution of amino acid composition in the sequence. The formula for calculating the chemical elemental composition AC is as follows: AC c =N c ,c∈C,H,O,N,S; Where, N c Let c be the total number of elements c in the sequence, including carbon, hydrogen, oxygen, nitrogen, and sulfur. This results in a 5-dimensional vector representing the chemical elemental composition of the protein sequence. The abundance of elements can reflect the content of sulfur-containing amino acids and the overall chemical characteristics of the sequence. The formula for calculating the molecular weight (MW) is as follows: Where m is the total number of amino acids in the protein sequence, w i MW represents the molecular weight of the i-th amino acid residue in the sequence, in Daltons (Da); 18.01 Da is the mass correction value for the loss of one water molecule when each peptide bond is formed. The calculated MW is a scalar representing the approximate molecular weight of the protein sequence.
3. The phage host prediction method based on weighted ensemble convolutional neural networks according to claim 1, characterized in that, The negative sample set is partitioned and reused using a hybrid undersampling and oversampling method, specifically as follows: First, the huge set of negative samples is divided into M subsets on an equal basis. Then, all positive samples are fixed and merged with each negative sample subset to construct M relatively balanced training subsets. In each subset, the ratio of positive to negative samples is close to 1:1, thereby reducing skewness during model training. Since positive samples in each subset are reused, the model learns positive signals repeatedly on different subsets, which helps to improve the ability to identify rare patterns.
4. The phage host prediction method based on weighted ensemble convolutional neural networks according to claim 1, characterized in that, The one-dimensional convolutional neural network classifier includes: Input layer: Receives 52-dimensional feature vectors; The first convolutional module contains 64 convolutional kernels of length 3, followed by ReLU activation, batch normalization, max pooling layers with stride of 2, and 5% Dropout layers. The second convolutional module contains 128 convolutional kernels of length 3, followed by ReLU activation, batch normalization, max pooling layers with stride of 2, and 5% Dropout layers. Global average pooling layer: reduces the dimensionality of the convolutional output to 128 dimensions; Fully connected layer: contains a hidden layer with 256 neurons and a 25% dropout layer; Output layer: Softmax classification layer with 2 neurons.
5. The phage host prediction method based on weighted ensemble convolutional neural networks according to claim 1, characterized in that, For each balanced training subset, a one-dimensional convolutional neural network sub-model is trained independently, specifically as follows: During training, the cross-entropy loss function is used as the optimization objective to iteratively update the model parameters. For any training sample, its true label is y, where y = 1 represents the positive class and y = 0 represents the negative class. The model predicts the positive class probability as follows: The cross-entropy loss for this sample is calculated as follows: The model's ability to distinguish between positive and negative classes is improved by minimizing the average cross-entropy loss of all training samples. The training uses a gradient descent-based optimization algorithm, which is iterated until the loss converges or the preset number of epochs is reached.
6. The phage host prediction method based on weighted ensemble convolutional neural networks according to claim 1, characterized in that, The weighted fusion strategy is as follows: First, using pre-divided validation set data, the classification performance metrics of each one-dimensional convolutional neural network model are evaluated, and the basic weights w of each model are determined based on the performance metrics. i ; Next, the basic weights are normalized: Let Then α1, α2, ..., α M This represents the probability distribution of the relative contributions of each model. In actual prediction, for any phage-host sample to be predicted, its features are first input into all M sub-models to obtain $ probability outputs regarding "whether the pair interacts". Subsequently, based on the aforementioned weighting coefficients, these output probabilities are weighted and summed to obtain the final predicted probability of the fusion model. in Therefore It is also a probability value between 0 and 1, representing the prediction confidence after comprehensively considering all models.
7. The phage host prediction method based on weighted ensemble convolutional neural networks according to claim 6, characterized in that, Performance metrics include overall accuracy, sensitivity, specificity, and AUC and AUPR, which are more relevant for imbalanced data.
8. A phage host prediction system based on weighted ensemble convolutional neural networks, characterized in that, The phage host prediction method based on weighted ensemble convolutional neural networks, as described in any one of claims 1-7, includes a feature extraction module, a data processing module, a model building module, a multi-model training module, and a weighted fusion module; The feature extraction module is used to extract amino acid composition (AAC), chemical element composition (AC), and molecular weight (MW) features from the input phage protein sequence and host receptor protein sequence, respectively, to obtain a 26-dimensional feature vector of the phage and a 26-dimensional feature vector of the host. The 26-dimensional feature vector of the phage and the 26-dimensional feature vector of the host are then concatenated to form a 52-dimensional joint feature vector. The data processing module is used to take known phage-host interaction pairs as positive samples, randomly select non-host bacteria for each phage to generate negative samples, and the negative samples do not contain known real interaction pairs; the negative sample set is divided into M subsets, and each subset is merged with all positive samples to form M balanced training subsets. The model building module is used to train an independent one-dimensional convolutional neural network model for each balanced training subset. The one-dimensional convolutional neural network model can slide to extract local patterns in the input 52-dimensional joint feature vector. When processing protein feature sequences, it not only preserves the correlation between adjacent features in the sequence, but also has lower computational complexity and parameter scale. The multi-model training module is used to independently train a one-dimensional convolutional neural network sub-model for each balanced training subset to obtain multiple sub-models with different performance. The weighted fusion module assigns weights to each sub-model based on its performance metrics on the validation set, performs weighted fusion of the prediction probabilities of the M sub-models, and outputs the final host interaction probability.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor to enable the at least one processor to perform the phage host prediction method based on a weighted ensemble convolutional neural network as described in any one of claims 1-7.
10. A computer-readable storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the phage host prediction method based on weighted ensemble convolutional neural networks as described in any one of claims 1-7.
Citation Information
Cited By
Thyroid papillary carcinoma lymph node metastasis risk prediction method based on integrated machine learning model
CN122224275A
Protein phase separation prediction method and system based on physical information neural network, electronic equipment and storage medium
CN122266477A