Enzymatic peptide fragment prediction model construction method and device, and enzymatic peptide fragment prediction method

CN122889073APending Publication Date: 2026-10-09BEIJING YUEKANGKECHUANG PHARM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611384073.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0005]本发明提供了一种酶切肽段预测模型构建方法、装置及酶切肽段预测方法,以解决现有技术中在预测酶切肽段时容易出现边界定位模糊的问题

Benefits of technology

确定每条蛋白质序列中所有真实酶切肽段的N端起始位置与C端终止位置;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122889073A_ABST
    Figure CN122889073A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of bioinformatics, and discloses an enzyme digestion peptide segment prediction model construction method and device and an enzyme digestion peptide segment prediction method. The method comprises the following steps: constructing a training data set; encoding a protein sequence to generate network input features, and constructing an enzyme digestion peptide segment double-end asymmetric distance field boundary penalty mask; constructing a sequence labeling fine-tuning network; inputting the network input features into a protein large language model encoder to output a full sequence class logit tensor; inputting the full sequence class logit tensor, enzyme digestion peptide segment labeling labels and the enzyme digestion peptide segment double-end asymmetric distance field boundary penalty mask into a boundary perception double-branch loss calculation module to calculate boundary perception focal loss and region dice loss; updating learnable parameters of the sequence labeling fine-tuning network based on the boundary perception focal loss and the region dice loss, and obtaining a trained enzyme digestion peptide segment prediction model after iterative convergence. The application improves the prediction accuracy and integrity of protein sequence enzyme digestion peptide segments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bioinformatics technology, specifically to a method, apparatus, and method for predicting enzyme-digested peptides. Background Technology

[0002] In the field of peptide vaccine development, accurately predicting the endogenous enzyme cleavage sites of protein sequences (a core step in antigen processing and presentation) is a prerequisite for screening novel antigens with high immunogenicity. Traditional methods rely on rule-based motif matching or shallow machine learning models (such as support vector machines), but their prediction accuracy suffers from serious theoretical bottlenecks because they cannot capture the long-distance physical dependencies of amino acid sequences in three-dimensional folding and evolutionary conservation.

[0003] In recent years, large protein language models, represented by ESM (Evolutionary Scale Modeling), have implicitly encoded complex biological rules through unsupervised pre-training on hundreds of millions of natural protein sequences. However, when fine-tuning such large protein models for the highly specific sequence labeling task of "enzyme-cleaved peptide identification," the problem of ambiguous peptide boundaries is commonly encountered.

[0004] Enzyme cleavage is a physicochemical reaction that occurs on the proteasome at specific amino acid residue cleavage sites. The accurate determination of the N-terminal and C-terminal cleavage sites directly determines the biological validity of the predicted peptide. Existing conventional methods generally use the standard cross-entropy loss function to apply equal supervision constraints to all positions of the entire amino acid sequence, making it difficult for the model to accurately locate the beginning and end boundaries of the peptide. The predicted peptides often shift or are truncated, which fails to meet the stringent accuracy requirements of downstream studies such as tumor neoantigen screening. Summary of the Invention

[0005] This invention provides a method, apparatus, and method for constructing a prediction model for enzyme-digested peptides, in order to solve the problem of ambiguous boundary positioning that easily occurs when predicting enzyme-digested peptides in the prior art.

[0006] In a first aspect, the present invention provides a method for constructing a prediction model for enzyme-digested peptides, the method comprising: Construct a training dataset, which includes multiple protein sequences and corresponding enzyme digestion peptide labels for each protein sequence. Protein sequences are encoded to generate network input features, and a boundary penalty mask for the bi-terminal asymmetric distance field of enzyme-digested peptide segments is constructed. Construct a sequence labeling fine-tuning network; the sequence labeling fine-tuning network includes a protein large language model encoder for extracting sequence evolution semantics and a boundary-aware bi-branch loss calculation module for gradient optimization; Input the network input features into the protein large language model encoder, and output the whole sequence class log-probability tensor. The whole sequence category log odds tensor, the enzyme-cleaved peptide label, and the boundary penalty mask of the double-ended asymmetric distance field of the enzyme-cleaved peptide are input into the boundary-aware bi-branch loss calculation module to calculate the boundary-aware focal loss and the region dice loss. The learnable parameters of the sequence labeling fine-tuning network are updated based on boundary-aware focus loss and regional dice loss, and the trained enzyme cleavage peptide prediction model is obtained after iterative convergence.

[0007] The restriction peptide prediction model obtained by the construction method of this invention effectively overcomes the shortcomings of traditional single cross-entropy loss, which is insufficient for the boundary constraints of restriction peptides and easy fragment truncation and shifting, and significantly improves the prediction accuracy and completeness of protein sequence restriction peptides.

[0008] In one alternative implementation, the training dataset is constructed, including: Obtain the raw protein sequence dataset; The positions of enzyme-cleaved peptides in the original protein sequence dataset that have been experimentally verified are labeled as positive samples, and all other sequence positions other than the positive samples are labeled as unlabeled samples. Unlabeled samples are screened, and those that meet the preset conditions are marked as reliable negative samples; The preset conditions include: Not containing any known restriction enzyme sequence of the human proteasome; The evolutionary conservation score in the homologous protein family is lower than the preset score; The confidence level of the site predicted by the gold standard tool as a non-cleavage site is higher than the preset threshold; Construct a label validity mask based on the labeling results of all samples; The dataset after the label validity mask is constructed is selected as the training dataset.

[0009] This implementation method effectively filters label noise and blocks invalid fuzzy sites by labeling and classifying the original dataset, filtering high-confidence negative samples, and constructing a validity mask, thus providing low-interference, standardized, and high-quality training samples for model training.

[0010] In one optional implementation, constructing a bi-terminal asymmetric distance field boundary penalty mask for the enzymatically cleaved peptide includes: Determine the N-terminal start position and C-terminal end position of all real enzyme-digested peptides in each protein sequence; Independent distance attenuation weighted windows are set for the starting position at N and the ending position at C, respectively; The first boundary weight corresponding to the distance attenuation weighted window at the N-end is calculated using the first preset attenuation function. The second boundary weight corresponding to the distance attenuation weighted window at point C is calculated using the second preset attenuation function. A boundary penalty mask for the bi-terminal asymmetric distance field of the enzyme-digested peptide is constructed based on the first boundary weight and the second boundary weight, wherein the non-boundary regions are assigned preset basic weights.

[0011] In this embodiment, a dynamic distance decay mechanism is adopted based on the biological characteristics of enzyme digestion. Taking the two ends of the actual enzyme-digested peptide as the base point, combined with an independent distance decay weighted window, the boundary weights of the two ends are calculated by the corresponding decay function and a distance field boundary penalty mask is constructed. This can effectively enhance the model's learning of the beginning and end boundaries of the peptide, greatly improve the prediction defects of enzyme digestion site shift and peptide truncation, and improve the accuracy of boundary localization.

[0012] In one optional implementation, the protein large language model encoder includes a basic backbone network, random deactivation layers, and a linear classifier; the network input features are input into the protein large language model encoder, and the output is a full-sequence class log-odds tensor, including: The network input features are fed into the basic backbone network to extract deep semantic hidden state features; The deep semantic hidden state features are input into a random deactivation layer for random deactivation processing; The features after random deactivation are input into a linear classifier, which projects the features onto the target class space and outputs a log-odds tensor of the whole sequence classes.

[0013] In one optional implementation, the boundary-aware bi-branch loss calculation module includes: a boundary focusing branch and a region-level topology fitting branch; the boundary focusing branch is input with the full sequence class log-odds tensor, the enzyme-cut peptide label, and the boundary penalty mask of the enzyme-cut peptide's bi-terminal asymmetric distance field to calculate the boundary-aware focus loss; wherein, it includes: Calculate the basic cross-entropy loss between the whole sequence class log-odds tensor and the labeling of the enzyme-digested peptide segments; Based on the basic cross-entropy loss, the predicted probability of the true target category is determined; Based on the predicted probability, a decay factor is generated; The basic focus loss matrix is ​​determined based on the basic cross-entropy loss and the decay factor; The boundary-aware focus loss is determined by element-wise multiplying the basic focus loss matrix with the boundary penalty mask of the asymmetric distance field at both ends of the enzyme-digested peptide.

[0014] In one optional implementation, the boundary-aware bi-branch loss calculation module includes: a boundary focusing branch and a region-level topology fitting branch; the region-level topology fitting branch inputs the full sequence class log-odds tensor, the enzyme-cut peptide label, and the boundary penalty mask of the enzyme-cut peptide's bi-terminal asymmetric distance field to calculate the region dice loss; wherein, it includes: The whole sequence class log-probability tensor is activated and the probability of enzyme-digested peptides is extracted for prediction. Based on the labeling tags of enzyme-digested peptides, the target positive class indicator vector and the effective state mask are determined; Based on the predicted probability of enzyme-digested peptides, the target positive class indicator vector, and the effective state masking mask, the intersection space dot product and the union feature accumulation result between the predicted probability of enzyme-digested peptides and the target positive class indicator vector are determined. The regional dice loss is determined based on the intersection space dot product and the sum of the union features.

[0015] In one alternative implementation, the sequence labeling fine-tuning network further includes a conditional random field decoder for implementing temporal constraints on the label states; Input the class log-odds tensor of the entire sequence into the conditional random field decoder to determine the time transition loss; The temporal transfer loss is used in conjunction with the boundary-aware focus loss and the region dice loss to update the learnable parameters of the sequence labeling fine-tuning network.

[0016] By jointly optimizing network parameters through temporal transfer loss, boundary-aware focus loss, and regional dice loss, high-precision end-to-end peptide segment recognition with multidimensional constraints is achieved, which together improves the accuracy of enzyme-digested peptide segment boundary determination.

[0017] Secondly, the present invention provides a method for predicting enzyme-digested peptides, the method comprising: Obtain the protein sequence to be evaluated; The protein sequence to be evaluated is encoded to generate network input features; The network input features are input into the enzyme-digested peptide prediction model, and the enzyme-digested peptide prediction results are output. The enzyme-digested peptide prediction model is constructed according to the enzyme-digested peptide prediction model construction method of the first aspect or any of its corresponding embodiments.

[0018] This prediction method, based on a trained enzyme-digested peptide prediction model, can effectively suppress boundary shifts and invalid fragment outputs, thereby improving the accuracy of the final prediction results for enzyme-digested peptides.

[0019] In one optional implementation, the network input features are input into the enzyme-digested peptide prediction model, and the output enzyme-digested peptide prediction results are included: The protein large language model encoder in the enzyme-cut peptide prediction model processes the network input features and outputs a class log-odds tensor. The conditional random field decoder included in the enzyme-digested peptide prediction model performs global optimal path decoding on the class log-odds tensor to generate a variable-length prediction state sequence. The variable-length predicted state sequences are filtered according to a preset length range to determine the continuous candidate peptide intervals; For each candidate peptide segment interval, the N-terminal cleavage score, C-terminal cleavage score, interval continuity score, and length prior score are calculated separately, and then weighted to obtain a comprehensive score. The predicted peptide segment is determined based on the comprehensive score of each candidate peptide segment interval.

[0020] This implementation method uses a conditional random field decoder to solve for the globally optimal label path, suppresses fragmented prediction output, and further verifies candidate intervals by combining peptide length screening and multi-dimensional comprehensive scoring, so that the predicted peptides can remain continuous and complete, effectively improving the fragmentation defect and ensuring the biological integrity of peptide prediction results.

[0021] Thirdly, the present invention provides an apparatus for constructing a prediction model for enzyme-digested peptides, the apparatus comprising: The dataset construction module is used to build the training dataset, which includes multiple protein sequences and corresponding enzyme digestion peptide labels for each protein sequence. The processing module is used to encode protein sequences to generate network input features and construct boundary penalty masks for the bi-terminal asymmetric distance field of enzyme-digested peptide segments. The network construction module is used to build the sequence labeling fine-tuning network; the sequence labeling fine-tuning network includes a protein large language model encoder for extracting sequence evolution semantics and a boundary-aware bi-branch loss calculation module for gradient optimization. The training module is used to input network input features into the protein large language model encoder and output a whole sequence class log-odds tensor. The whole sequence class log-odds tensor, enzyme-cleaved peptide label, and enzyme-cleaved peptide bi-terminal asymmetric distance field boundary penalty mask are input into the boundary-aware bi-branch loss calculation module to calculate the boundary-aware focus loss and the region dice loss. Based on the boundary-aware focus loss and the region dice loss, the learnable parameters of the sequence label fine-tuning network are updated. After iterative convergence, the trained enzyme-cleaved peptide prediction model is obtained.

[0022] The device for constructing a prediction model for enzyme-digested peptides can effectively overcome the shortcomings of traditional single cross-entropy loss, such as insufficient boundary constraints on enzyme-digested peptides and easy fragment truncation and displacement, and significantly improve the prediction accuracy and completeness of enzyme-digested peptides in protein sequences. Attached Figure Description

[0023] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating the method for constructing a prediction model for enzyme-digested peptides according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the training process of the enzyme-cut peptide prediction model according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the boundary-aware bi-branch loss calculation module according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the model training process loss and F1 score change curves according to an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the performance of token-level classification of test data according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the area under the PR curve of test data according to an embodiment of the present invention; Figure 7 This is a structural block diagram of an apparatus for constructing a prediction model of enzyme-digested peptides according to an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0027] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0028] According to an embodiment of the present invention, an embodiment of a method for constructing a prediction model for enzyme-digested peptides is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0029] This embodiment provides a method for constructing a prediction model for enzyme-digested peptides, which can be used on servers, terminals, mobile terminals, etc. Figure 1 This is a flowchart of a method for constructing a prediction model for enzyme-digested peptides according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Construct the training dataset. The training dataset includes multiple protein sequences and corresponding enzyme digestion peptide labels for each protein sequence.

[0030] In this embodiment, raw protein sequences can be collected, the collected raw protein sequences can be cleaved and labeled with peptide tags, and the dataset can be divided to finally obtain a training dataset consisting of multiple protein sequences and tag information.

[0031] In some alternative implementations, step S101 includes: Step S1011: Obtain the original protein sequence dataset.

[0032] This embodiment uses the IEBDB (Immune Epitope Database) v3.0 dataset as the original protein sequence training set, which contains 726,235 non-redundant human protein sequences. Only experimentally verified positive restriction peptides are included in this dataset. Unlabeled regions on the sequences only represent "unobserved" restriction fragments at that location, not that there are actually no negative restriction sites.

[0033] Specifically, the positive enzyme-digested peptides verified by experiments are derived from the publicly available IEBDB (Immunotope Database), a biologically recognized database with reliable data sources. The positive labels are all confirmed by specific biological wet experiments, including but not limited to mass spectrometry elution analysis, MHC multimer staining identification, or T-cell reactivity experiments, to ensure that the positive sample labels have genuine biological and physical evidence of fragmentation.

[0034] Step S1012: Mark the positions of enzyme-digested peptides in the original protein sequence dataset that have been experimentally verified as positive samples, and mark all other sequence positions except the positive samples as unlabeled samples.

[0035] The original protein sequence dataset is initially labeled and divided into states. All experimentally verified real restriction peptide positions in each protein sequence are labeled as positive samples (state 1), and all other positions are labeled as unlabeled samples (state -1), and are not directly regarded as background.

[0036] Step S1013: Filter unlabeled samples and mark unlabeled samples that meet the following three preset conditions as reliable negative samples; The preset conditions include: Motion filtering: Any known restriction motifs of the human proteasome (including hydrophobic residue preferred motifs, acidic residue repulsion motifs, etc.) are not included. Conservation filter: The evolutionary conservation score in the homologous protein family is lower than the preset score (e.g., 0.3). Tool pre-filtering: The confidence level of non-cleavage sites predicted by the gold standard tool (such as NetChop 3.1) is higher than the preset threshold (such as 0.9).

[0037] This embodiment employs a multi-dimensional reliable negative sample screening strategy to handle label noise. It uses a combination of proteasome digestion motif filtering, evolutionary conservation analysis, and prediction results from the NetChop 3.1 tool to screen and label high-confidence negative samples, avoiding the direct consideration of unlabeled positions in the sequence as background negative samples.

[0038] Step S1014: Construct a label validity mask based on the labeling results of all samples.

[0039] Specifically, a label_mask tensor of the same length as the sequence is generated, with positive samples and reliable negative samples at positions 1, and other unlabeled samples at positions 0; all subsequent loss functions are calculated only for the positions where label_mask=1.

[0040] The following are examples: Assume a protein sequence has a total of 7 amino acid sites: Site 1: Experimentally confirmed to be cleavable by enzymes, indicating a positive sample; Site 2: Triple screening determines that it cannot be digested by enzymes, making it a reliable negative sample; Sites 3, 4, 5, 6, and 7: No experimental data were available; these are unlabeled samples. Generate a label_mask array of equal length. The mask length must be exactly the same as the number of amino acid sites. For positive samples and reliable negative samples, fill in 1 (effective, participates in the calculation). For unlabeled samples, fill in 0 (masked, does not participate in the calculation). The final mask is: [1, 1, 0, 0, 0, 0, 0].

[0041] Step S1015: The dataset after the label validity mask construction is completed is determined as the training dataset.

[0042] After completing the construction of the label validity mask, standardize the storage structure of individual samples in the dataset and construct the training dataset.

[0043] Each sample in the constructed training dataset contains two core fields: input_context: A protein amino acid sequence fragment, containing the peptide sequence and 0 to 30 amino acids randomly extended to its left and right sides, serving as the original protein sequence; `output_peptide`: Experimentally verified actual peptide sequences (8-15 amino acids in length); sequences without peptide digestion are uniformly labeled as...<NO_CLEAVAGE> ; The processed training dataset is randomly divided into training, validation, and test sets in a ratio of 8:1:1. All divisions ensure that different fragments of the same protein do not appear in both the training and test sets simultaneously, thus avoiding data leakage.

[0044] This implementation method effectively filters label noise and blocks invalid fuzzy sites by labeling and classifying the original dataset, filtering high-confidence negative samples, and constructing a validity mask, thus providing low-interference, standardized, and high-quality training samples for model training.

[0045] Step S102: Encode the protein sequence to generate network input features and construct the boundary penalty mask of the double-ended asymmetric distance field of the enzyme-digested peptide.

[0046] In this embodiment, the ESM2 (Evolutionary Scale Modeling Second Generation) dedicated amino acid tokenizer (EsmTokenizer) is used to discretize and encode the protein sequence. That is, each amino acid character is mapped to a unique integer token ID, and the tokens are uniformly padded to a preset maximum sequence length (e.g., 50). Any shortfall is filled with a special padding character. <pad>Complete the sequence. Transform the protein sequence from text to a sequence of numeric tokens (the smallest processing unit of the model) that can be input into the ESM2 model through sequence encoding.

[0047] In addition to sequence encoding, an adaptive asymmetric distance field boundary penalty mask is generated for the beginning and end boundaries of the actual peptide segments. This mask is used to amplify the signal weights at critical breakpoints during subsequent training. The asymmetric distance field boundary penalty mask is a sequence weight tensor generated by constructing independent attenuation windows at the N-terminal aminopeptidase pruning region and the C-terminal proteasome fixed cleavage site of the peptide segment, and then weighting and fusing them using a differentiated attenuation function. This tensor is used to apply asymmetric loss penalties to both ends of the peptide segment.

[0048] In some optional implementations, a boundary penalty mask for the biterminal asymmetric distance field of the enzymatically cleaved peptide is constructed, including: Step a1: Determine the N-terminal start position and C-terminal end position of all real enzyme-digested peptides in each protein sequence.

[0049] Iterate through all experimentally validated positive cleavage peptides within each protein sequence, and extract the N-terminal start position (N-terminal start position falling within the aminopeptidase trimming window) of each actual cleavage peptide. idx End of C-terminal termination position (proteasome direct cleavage site) idx .

[0050] The essence of this step is to identify the core boundary breakpoints that the model needs to focus on reinforcement learning, thus setting a benchmark for subsequent distance field weighting.

[0051] Step a2: Set independent distance attenuation weighted windows for the starting position of N end and the ending position of C end respectively.

[0052] The distance attenuation weighted window for the starting position of N can be: [start] idx -3, start idx +1] ; The distance attenuation weighted window for the termination position at end C can be: [end idx -1, end idx +3] ; The specific settings can be adjusted according to actual needs, and no specific limitations are made here.

[0053] Step a3: Calculate the first boundary weight corresponding to the distance attenuation weighted window at the N end using the first preset attenuation function.

[0054] In this embodiment, the first preset attenuation function is: ; In some alternative implementations, the N-terminal starts at [start]. idx -3, start idx Within the range of +1], by Calculate the weights; the maximum weight is 2.0. Step a4: Calculate the second boundary weight corresponding to the distance attenuation weighted window at end C using the second preset attenuation function.

[0055] In this embodiment, the second preset attenuation function is: ; In some alternative implementations, the C-end termination position is at [end] idx -1, end idx Within the range of +3], by Calculate the weights; the maximum weight is 3.0. The mask value for all other positions is set to 1.0, and the overlapping area is assigned the maximum weight.

[0056] Step a5: Construct a boundary penalty mask for the bi-terminal asymmetric distance field of the enzyme-digested peptide based on the first boundary weight and the second boundary weight, wherein the non-boundary regions are assigned preset basic weights.

[0057] For amino acid sites that fall only within the N-terminal distance decay weighted window, the boundary weight value corresponding to the first boundary weight is directly assigned. For amino acid sites that fall only within the C-terminal distance decay weighted window, the boundary weight value corresponding to the second boundary weight is directly assigned; If a certain point is located in the overlapping area of ​​the N-end distance attenuation weighted window and the C-end distance attenuation weighted window, the final boundary weight of the overlapping position can be determined by taking the maximum value of the weight; the mask value of all other positions is set to the preset basic weight value, such as 1.0.

[0058] According to the original amino acid sequence of the protein sequence, the boundary weight value of each site and the basic weight value of the non-boundary region are bound in sequence, and finally a weight tensor boundary_mask with the same length as the input protein sequence is generated. This tensor is the boundary penalty mask of the double-ended asymmetric distance field of the enzyme-digested peptide in this embodiment.

[0059] In this embodiment, a dynamic distance decay mechanism is adopted based on the biological characteristics of enzyme digestion. Taking the two ends of the actual enzyme-digested peptide as the base point, combined with an independent distance decay weighted window, the boundary weights of the two ends are calculated by the corresponding decay function and a distance field boundary penalty mask is constructed. This can effectively enhance the model's learning of the beginning and end boundaries of the peptide, greatly improve the prediction defects of enzyme digestion site shift and peptide truncation, and improve the accuracy of boundary localization.

[0060] Step S103: Construct the sequence labeling fine-tuning network. The sequence labeling fine-tuning network includes a protein large language model encoder for extracting sequence evolutionary semantics and a boundary-aware bi-branch loss calculation module for gradient optimization.

[0061] The protein big language model in this embodiment includes, but is not limited to, ESM2, protBert, ProtT5, ProtGPT2, Ankh-Large and other series of models.

[0062] In this embodiment, a pre-trained ESM2-t33-650M model is loaded as the feature extraction backbone. The core configuration is add_pooling_layer=False, disabling global average pooling and max pooling layers to ensure that the output retains complete amino acid residue-level temporal resolution and avoids losing fine features of peptide boundaries, thereby extracting residue-level hidden state features containing deep evolutionary semantics. This embodiment also supports other model specifications such as ESM2-t30-150M and ESM2-t36-3B, which can be flexibly selected according to computational power and accuracy requirements.

[0063] The boundary-aware dual-branch loss calculation module serves as the core of gradient optimization. This module comprises two parallel branches: a boundary focusing branch and a region-level topology fitting branch. The boundary focusing branch applies differentiated weighted penalties to the N-terminal and C-terminal cutting boundaries of the peptide segment based on a bi-directional asymmetric distance field boundary penalty mask, correcting the head-tail boundary offset problem. The region-level topology fitting branch focuses on optimizing the overall overlap of the complete peptide segment region, improving the prediction effect of the integrity of the complete peptide segment.

[0064] Step S104: Input the network input features into the protein large language model encoder and output the whole sequence class log-probability tensor.

[0065] The network input features are fed into the ESM2 protein big language model encoder. The model transforms the amino acid token sequence into a high-dimensional embedding vector containing evolutionary features and structural information. After mapping and transformation, it outputs a full sequence class log probability tensor that corresponds one-to-one with the length of the protein sequence, providing predictive data for the next step of boundary-aware bi-branch loss calculation.

[0066] Step S105: Input the whole sequence category log-probability tensor, the enzyme-digested peptide label, and the boundary penalty mask of the enzyme-digested peptide bi-terminal asymmetric distance field into the boundary-aware bi-branch loss calculation module to calculate the boundary-aware focal loss and the region dice loss.

[0067] The full-sequence class log-odds tensor output by the protein large language model encoder, the enzymatic peptide labeling obtained from dataset preprocessing, and the pre-constructed bi-terminal asymmetric distance field boundary penalty mask are input into the boundary-aware dual-branch loss calculation module, which includes a boundary focusing branch and a region-level topology fitting branch. The boundary focusing branch calculates the boundary-aware focus loss based on the bi-terminal asymmetric distance field boundary penalty mask of the enzymatic peptide, applying asymmetric weight penalties to sites within the distance decay weighted windows at the N-terminus and C-terminus of the peptide to enhance boundary recognition accuracy. The region-level topology fitting branch calculates the region dice loss based on the predicted distribution and the true labels, optimizing the overall matching degree of the complete enzymatic peptide region. Finally, the two losses are weighted and summed according to preset coefficients to obtain the total loss value, which is used for subsequent backpropagation iterations to optimize network parameters.

[0068] Step S106: Update the learnable parameters of the sequence labeling fine-tuning network based on boundary-aware focus loss and regional dice loss, and obtain the trained enzyme cleavage peptide prediction model after iterative convergence.

[0069] The weighted fusion of the two branch losses is used as the total loss for backpropagation to update the network parameters. This approach balances precise boundary localization with overall region segmentation accuracy. The resulting enzyme-digested peptide prediction model effectively overcomes the shortcomings of traditional single cross-entropy loss, which is insufficient for boundary constraints of enzyme-digested peptides and prone to fragment truncation and displacement. It significantly improves the prediction accuracy and completeness of protein sequence enzyme-digested peptides.

[0070] This embodiment also provides a method for constructing a prediction model for enzyme-digested peptides, which can be used on servers, terminals, mobile terminals, etc. The process includes the following steps: Step S201: Construct the training dataset, which includes multiple protein sequences and corresponding enzyme digestion peptide labels for each protein sequence. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.

[0071] Step S202 involves encoding the protein sequence to generate network input features and constructing a boundary penalty mask for the paired-end asymmetric distance field of the enzyme-digested peptides. For details, please refer to [link to relevant documentation]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.

[0072] Step S203: Construct a sequence labeling fine-tuning network; the sequence labeling fine-tuning network includes a protein large language model encoder for extracting sequence evolution semantics, a conditional random field decoder for implementing label state temporal constraints, and a boundary-aware dual-branch loss calculation module for gradient optimization.

[0073] Unlike the previous embodiment, the sequence labeling fine-tuning network in this embodiment also includes a Conditional Random Field (CRF) decoder (see reference). Figure 2 The numerically stable CRF layer training flow in the model. The protein large language model encoder includes a basic backbone network (ESM2), random deactivation layers, and a linear classifier. The boundary-aware bi-branch loss calculation module includes: boundary focusing branch ( Figure 3 Token-level boundary focusing flow and region-level topology fitting branch (in the context of the flow) Figure 3 (Regional-level topology fitting flow in the context of the process).

[0074] Reference Figure 2 As shown, the overall architecture of the model training in this embodiment can be divided into four main stages. The first stage is feature vectorization and mask construction. The input sources for this stage include the input protein sequence, attention mask, true peptide labels, N / C asymmetric distance field boundary penalty mask, and data processed by reliable negative sample screening and label validity masking. Subsequently, the feature data enters the protein large language model encoder, which sequentially passes through the Esm Tokenizer for discretization encoding, the ESM2 backbone network combining effective sequence length / computation masking for feature extraction, and then sequentially passes through a Dropout random inactivation layer and a linear classifier, finally outputting a class log-probability tensor for subsequent calculations. This tensor is then distributed to two main branches: a numerically stable CRF layer training flow (this process sequentially includes constructing a validity mask, performing negative log-likelihood estimation, and calculating the temporal transition loss); and a boundary-aware focus dice loss calculation module (this module constructs a validity mask and calculates the boundary-aware focus loss and region dice loss respectively). Finally, all losses are aggregated and backpropagated to obtain the total global loss, which drives the AdamW optimizer parameter update.

[0075] Reference Figure 3 As shown, the core processing logic of the loss function algorithm is as follows: First, it receives the forward propagation input source of the computation graph, including the class log odds, true peptide labels, boundary penalty masks, and the aforementioned temporal transition loss. Then, the boundary-aware dual-branch loss calculation module unfolds in two parallel computational streams: a region-level topology fitting stream, which sequentially performs Softmax distributed activation, generates target positive class indicator vectors and effective state masking, then performs union feature accumulation and intersection space dot product operations, and finally calculates the region dice loss through continuous spatial topological distance measurement; and a token-level boundary focusing stream, which introduces a weighted cross-entropy operator and performs boundary weight broadcasting, sequentially performs target class probability mapping and difficulty modulation attenuation calculations to obtain the basic focus loss matrix, and then accurately calculates the boundary-aware focus loss through element-wise multiplication with the boundary mask. The calculation results of the two streams are finally merged into the loss aggregation and global optimization stage, where heterogeneous loss linear weighting of different losses is applied to achieve automatic differentiation and parameter updates of the computation graph.

[0076] Step S204: Input the network input features into the protein large language model encoder and output the whole sequence class log-probability tensor.

[0077] In some alternative implementations, step S204 includes: Step S2041: Input the network input features into the basic backbone network and extract the deep semantic hidden state features.

[0078] Before inputting the network input features into the basic backbone network, an attention mask (attention_mask) can be generated based on the protein sequence, where effective amino acid positions are marked as 1 and padding positions as 0. Simultaneously, sequence labeling tags (labels) are generated, where the amino acid positions corresponding to the actual enzyme-digested peptides are marked as 1, background amino acid positions are marked as 0, and padding positions are marked as -100.

[0079] The network input features (Token ID sequence) processed in step S202 and the attention mask are input together into the ESM2 basic backbone network for deep semantic feature extraction.

[0080] In this embodiment, the Token ID sequence and the attention mask are fed into the ESM2 backbone network together. This not only completes the embedding and encoding of amino acid semantics and evolutionary features, but also uses the attention mask to block invalid placeholder characters, avoiding invalid tokens from participating in self-attention calculations and causing feature interference and wasted computing power, thereby improving the effectiveness of feature extraction and computational efficiency.

[0081] To ensure that the fine features of peptide boundaries are not compressed and lost, the core of the ESM2 basic backbone network is configured with add_pooling_layer=False (i.e., global average pooling layer is disabled). The model uses a multi-head self-attention mechanism to implicitly encode the evolutionary constraints, physicochemical properties and three-dimensional folding interactions of amino acids in the sequence, thereby outputting the last layer hidden state tensor that retains the complete residue-level sequence dimension.

[0082] Step S2042: Input the deep semantic hidden state features into the random deactivation layer for random deactivation processing (Dropout). The deactivation probability can be set to 0.1 to alleviate overfitting caused by network co-adaptation.

[0083] Step S2043: Input the features after random deactivation into the linear classifier, project the features into the target class space, and output the log-probability tensor of the whole sequence class.

[0084] That is, the high-dimensional space is reduced and projected onto the target category space (i.e., two categories: "background" and "peptide"), and finally a category log-probability tensor of the whole sequence is generated. This tensor will be used as the final calculation result of forward propagation and distributed downstream to the boundary-aware dual-branch loss calculation module and CRF decoder.

[0085] In step S205, the whole sequence category log-odds tensor, the enzyme-digested peptide label, and the boundary penalty mask of the enzyme-digested peptide double-end asymmetric distance field are input into the boundary-aware dual-branch loss calculation module to calculate the boundary-aware focal loss and the region dice loss; the whole sequence category log-odds tensor is input into the conditional random field decoder to determine the temporal transition loss.

[0086] In some optional implementations, the whole sequence class log-odds tensor, the enzyme-cleaved peptide label, and the boundary penalty mask of the enzyme-cleaved peptide's bi-terminal asymmetric distance field are input into the boundary focusing branch to calculate the boundary-aware focus loss; refer to Figure 3 As shown, it includes: Step b1: Calculate the basic cross-entropy loss between the full sequence class log-odds tensor and the enzyme-digested peptide label.

[0087] Based on the actual peptide tags in the enzyme-digested peptide labeling, valid positions are extracted (ignoring padding characters). Combined with preset adaptive class weights, the basic cross-entropy loss between the total sequence class log odds and the actual tags is calculated. ).

[0088] Step b2: Determine the predicted probability of the true target category based on the basic cross-entropy loss.

[0089] pass The predicted probability of the true target class is obtained from the calculated cross-entropy loss. .

[0090] Step b3: Based on the predicted probability, generate the attenuation factor. That is, generate the attenuation factor. .

[0091] When faced with a large number of easily distinguishable background samples, the model's predictions are accurate. As the value approaches 1, the attenuation factor will approach 0, thus automatically and significantly reducing the weight contribution of these background noise samples in the overall loss. Conversely, for marginal samples that are difficult to classify, the factor will maintain a large value.

[0092] Step b4: Based on the basic cross-entropy loss and the decay factor, determine the basic focus loss matrix. The basic focus loss matrix is ​​as follows: , This is the focus coefficient.

[0093] Step b5: Multiply the basic focus loss matrix element-wise with the boundary penalty mask of the asymmetric distance field at both ends of the enzyme-digested peptide to determine the boundary-aware focus loss.

[0094] Weighted Boundary Awareness Focus Loss The calculation formula satisfies: ; in This is a boundary penalty mask for the asymmetric distance field at both ends of the enzyme-cleaved peptide segment. The default boundary penalty weight coefficient.

[0095] This step forces the model to focus the huge gradients on the outermost amino acid break surface where enzymatic cleavage occurs during backpropagation, ultimately resulting in the boundary-aware focus loss (L) after mean dimensionality reduction. Focal ).

[0096] In some optional implementations, the whole sequence class log-odds tensor, the enzyme-cleaved peptide label, and the boundary penalty mask of the enzyme-cleaved peptide's bi-terminal asymmetric distance field are input into the region-level topology fitting branch to calculate the region dice loss; refer to Figure 3 As shown, it includes: Step c1 involves activating the whole sequence class log-odds tensor and extracting the predicted probabilities of enzyme-digested peptides.

[0097] This step extracts the class prediction probabilities by performing Softmax activation on the class log-odds tensor along the class dimension and slicing it to extract the prediction probabilities of the positive class (peptide class) to obtain the prediction probability matrix (probs).

[0098] Step c2: Based on the labeling tags of the enzyme-digested peptides, determine the target positive class indicator vector and the effective state mask.

[0099] First, a target positive class indicator vector is generated based on the truth labels of each amino acid site. A value of 1 is assigned to the position corresponding to the actual cleaved peptide, and a value of 0 is assigned to the remaining non-peptide regions. This vector characterizes the range of the target region to be predicted. Simultaneously, a valid state mask is generated, removing invalid padding positions. This mask can follow the logic of the label_mask constructed in the dataset preprocessing stage, marking only validated positive samples and reliable negative samples as valid positions, and marking ambiguous unlabeled sites as masked positions.

[0100] Step c3: Based on the predicted probability of the enzyme-digested peptide, the target positive class indicator vector, and the effective state mask, determine the intersection space dot product and the union feature accumulation result between the predicted probability of the enzyme-digested peptide and the target positive class indicator vector.

[0101] Within the effective space, calculate the predicted probability of the enzyme-digested peptide (prediction probability matrix) and the positive class indicator vector of the true target (…). The dot product of the intersection space of ) is, i.e. .

[0102] Simultaneously calculate the sum of the union features of the two, that is... ,in, To prevent zero smoothing terms.

[0103] Step c4: Determine the regional dice loss based on the intersection space dot product and the sum of the union features.

[0104] The regional dice loss is calculated based on the intersection-union ratio principle, using the following formula: .

[0105] The dice loss in this region no longer treats each amino acid in isolation, but rather regards the predicted peptide as a complete topological region, effectively penalizing fragmented predictions of peptide breaks within the peptide.

[0106] The regional dice loss branch borrows from the regional overlap calculation idea of ​​the intersection-union ratio (IoU), which upgrades the discrete single-point residue prediction to peptide topological region fitting, and measures the overall overlap between the predicted peptide and the actual enzyme-digested peptide. This constrains the peptide fragments, ensures the continuity and integrity of the output peptides, and makes up for the defect of fragment breakage and incompleteness caused by single-point classification loss.

[0107] In some alternative implementations, the entire sequence class log-odds tensor is input into the conditional random field decoder to determine the temporal transition loss, including: Negative log-likelihood estimation is performed based on the whole sequence class log-probability tensor and the label validity mask to determine the time transition loss.

[0108] Specifically, the CRF decoder receives the full-sequence class log-odds tensor, treating it as the emission matrix. This matrix represents the probability distribution of a single amino acid residue independently belonging to either the "background" or "peptide" state. Simultaneously, the CRF decoder internally maintains and updates a learnable state transition matrix to quantify the probabilities of legitimate state transitions between adjacent positions (e.g., "background to peptide," "peptide hold," "peptide to background").

[0109] Negative Log-Likelihood Estimation (NLL): A label validity mask is constructed based on the real peptide labels, masking all padding markers. The forward algorithm is used to compute the global partition function of the current input sequence under all possible state paths, and the joint probability score of the paths corresponding to the real labels is extracted.

[0110] Calculate the timing transition loss ( The conditional probability of the true state sequence in all possible sequence combinations is calculated, and its negative log-likelihood is taken as the temporal transition loss. During backpropagation, this loss function strongly penalizes illegal temporal transitions (such as an unwarranted interruption within a peptide that reverts to the background), thus strictly constraining the biological temporal transition logic between the "background state" and the "peptide state" at the mathematical level.

[0111] In this implementation step, temporal constraints are constructed using real peptide tags to restrict the model to only have reasonable state transitions of "background → peptide → background", and to prohibit fragmented predictions that insert background in the middle of peptides. This allows the calculation of the corresponding CRF loss and its participation in the aggregation of the total loss.

[0112] Step S206: Update the learnable parameters of the sequence labeling fine-tuning network based on temporal transfer loss, boundary-aware focus loss, and regional dice loss. After iterative convergence, obtain the trained enzyme cleavage peptide prediction model.

[0113] In this embodiment, the timing transition loss calculated by the CRF decoder ( The two heterogeneous losses mentioned above are linearly weighted and aggregated according to hyperparameters: The AdamW optimizer is driven by the aggregated global total loss to automatically perform computational graph differentiation and model parameter updates. After iterative convergence, the trained enzyme cleavage peptide prediction model is obtained.

[0114] In this embodiment, by jointly optimizing network parameters through temporal transfer loss, boundary-aware focus loss, and regional dice loss, high-precision end-to-end peptide identification with multidimensional constraints is achieved. By working together from multiple dimensions such as boundary penalty of microscopic amino acid tokens and regional overlap (IoU) of macroscopic peptide fragments, the technical pain points of fuzzy enzyme cleavage site boundaries and fragmented predicted fragments are solved, and the accuracy of enzyme cleavage peptide boundary determination is improved.

[0115] By introducing a custom dynamic boundary weighting mechanism, the model significantly improves the localization accuracy of peptide initiation and termination sites, overcoming the ambiguity of traditional large-scale models in edge prediction and significantly enhancing boundary prediction accuracy. By introducing region dice loss, the sequence labeling problem is transformed into a one-dimensional spatial region segmentation problem, completely eliminating breakage and fragmentation within predicted peptides and ensuring the biological coherence of neoantigen candidate sequences. By fusing the global semantic capture capability of ESM, the temporal logical constraints of CRF, and the efficient gradient guidance of Focal-Dice, the model exhibits strong robustness and industrial-grade high recall on extremely imbalanced biological sequence data.

[0116] This embodiment performs model training and verifies the model's prediction performance. The model training process is as follows: Figure 4 As shown, a total of 144 training rounds were conducted. The training loss decreased continuously from the initial value of 0.8542 to 0.0071. The validation set peptide-level F1 score steadily increased from 0.2785 to 0.8778, without showing a downward trend throughout the process. This indicates that the regularization strategy proposed in this invention effectively suppressed overfitting.

[0117] The independent test set contains non-redundant human protein sequences, covering experimentally validated cleaved peptides of varying lengths and sources. The test data exhibit typical extreme class imbalance characteristics, with background amino acid residues accounting for over 94%, consistent with the distribution of enzymatic cleavage reactions in real organisms. Model performance was evaluated using industry-standard metrics commonly used in bioinformatics. Precision: measures the reliability of the model's prediction results, i.e. the proportion of residues predicted as peptides that are actually peptides. Recall: Measures the model's ability to cover real peptides, i.e., the proportion of real peptide residues that are correctly identified. F1 score: The harmonic mean of precision and recall, which comprehensively reflects the overall performance of the model.

[0118] The final performance of the model of this invention on the test set is as follows: Figure 5 and Figure 6 As shown, the token-level classification performance has an accuracy of 83.14%, a recall of 78.50%, and an area under the PR curve (AUC) of 0.957.

[0119] In addition to the common problem of ambiguous boundary localization, existing conventional methods also suffer from fragmented and discontinuous predicted fragments. The actual cleaved peptide is a continuous topological region in sequence (typically 8 to 11 amino acids). Existing token-based classification models ignore this regional continuity, resulting in often fragmented predictions that disrupt the biological integrity of the peptide.

[0120] Therefore, this embodiment provides a method for predicting enzyme-digested peptides, which can be used on servers, terminals, mobile terminals, etc. It can capture macroscopic evolutionary semantics and accurately locate microscopic break boundaries while ensuring the continuity of peptide region topology. The process includes the following steps: Step S301: Obtain the protein sequence to be evaluated.

[0121] Step S302: Encode the protein sequence to be evaluated to generate network input features.

[0122] Step S303: Input the network input features into the enzyme-digested peptide prediction model and output the enzyme-digested peptide prediction results; the enzyme-digested peptide prediction model is constructed according to the enzyme-digested peptide prediction model construction method in any of the above embodiments and corresponding implementation methods.

[0123] This prediction method, based on a trained enzyme-digested peptide prediction model, can effectively suppress boundary shifts and invalid fragment outputs, thereby improving the accuracy of the final prediction results for enzyme-digested peptides.

[0124] In some optional implementations, the network input features are input into the enzyme-digested peptide prediction model, and the output enzyme-digested peptide prediction results are included: Step d1 involves processing the network input features using the protein large language model encoder in the enzyme-digested peptide prediction model, and outputting a class log-probability tensor.

[0125] Step d2 involves using the conditional random field decoder included in the enzyme-digested peptide prediction model to perform global optimal path decoding on the class log-odds tensor, generating a variable-length predicted state sequence.

[0126] This implementation employs Viterbi dynamic programming for decoding. In prediction scenarios without real labels, the system no longer calculates the loss but directly calls the Viterbi algorithm for decoding. This algorithm does not rely on the local maximum probability of a single residue position. Instead, it integrates the emission matrix (class log-probability tensor) of the current sequence with the optimal state transition matrix learned during training. From an exponentially large number of possible state sequence combinations, it recursively searches for a legal state path with the highest global probability of occurrence that fully meets the transition constraints. Through global dynamic programming, it ultimately outputs a highly coherent variable-length binary predicted state sequence. This process fundamentally eliminates isolated false-positive residue predictions and fragmentation within predicted segments, providing downstream candidate multi-dimensional sorting with clearly defined and structurally complete precise enzymatic peptide regions.

[0127] Step d3: Filter the variable-length predicted state sequences according to the preset length range to determine the continuous candidate peptide intervals.

[0128] Step d4: For each candidate peptide interval, calculate the N-terminal cleavage score, C-terminal cleavage score, interval continuity score, and length prior score, and then weight them to obtain a comprehensive score.

[0129] Step d5: Based on the comprehensive score of each candidate peptide segment interval, determine the predicted result of the enzyme-digested peptide segment.

[0130] The execution logic of the Conditional Random Field Decoder is as follows: During the training phase, an effectiveness mask is constructed based on the real peptide labels, and the negative log-likelihood probability of the whole sequence class log-odds tensor under the real state sequence is calculated to constrain the biological time-series transition logic between the "background state" and the "peptide state".

[0131] During the inference phase, the Viterbi algorithm is used to perform globally optimal path decoding on the full sequence class log-probability tensor to generate a variable-length predicted state sequence. Then, a length constraint Span (specifically referring to the length of a continuous amino acid interval occupied by a complete predicted cleavage peptide from the N-terminal start site to the C-terminal termination site) post-processing is performed to enumerate all continuous candidate peptide intervals with lengths between 8 and 15 amino acids, excluding all intervals whose lengths do not conform to the pattern of human proteasome cleavage products. For each candidate peptide interval, a weighted sum of the N-terminal cleavage point score, C-terminal cleavage point score, interval continuity score, and length prior score is calculated as a comprehensive score. Candidate peptides are ranked according to their comprehensive scores, and the top K peptide intervals with the highest scores and their confidence scores are output (in this embodiment, their comprehensive score is used as the confidence score of the corresponding peptide).

[0132] This embodiment adds Span post-processing based on biological length prior to the CRF decoding results, further improving prediction accuracy.

[0133] Specifically, a comprehensive score across four dimensions is calculated for each candidate peptide region, as detailed below: N-terminal cleavage point score: the sum of the background class probability of the amino acid preceding the start position of the candidate interval and the peptide class probability of the start position; C-terminal cut-off score: the sum of the peptide class probability at the termination position of the candidate interval and the background class probability of the amino acid following the termination position; Interval continuity score: the average peptide probability of all amino acids within the candidate interval; Prior score based on length: The prior probability calculated based on the length distribution of the actual enzyme-digested peptide segments. Peptides with a length of 9-11 amino acids receive the highest prior score. All candidate peptides are sorted according to their overall scores, and the top 50 peptide intervals with the highest scores and their confidence scores (i.e., overall scores) are output.

[0134] The output enzyme-digested peptides can be directly fused with multi-dimensional biological indicators for neoantigen screening to generate a comprehensive priority ranking: Extracted sequence information and digestion confidence scores of the top-50 enzyme-digested peptides. ; Calculate multidimensional biological scores: MHC binding affinity score The binding affinity of peptides to patient HLA alleles was predicted using NetMHCpan 4.1, and the IC50 value was linearly mapped to a 0-1 score. Gene expression level score Based on RNA-seq data from patient tumor tissue, TPM values ​​of peptide-derived genes were extracted and standardized to a score of 0-1. The specific standardization rules were as follows: if the gene was not expressed at all, i.e., the extracted TPM value was 0, the standardized score was 0; if 0 < TPM < 10, the standardized score was calculated as TPM / 10; if TPM ≥ 10, the gene was considered to be fully expressed, and the standardized score was directly assigned the highest value of 1.0.

[0135] Mutation specificity score For mutated peptides, if the non-synonymous mutation site is located inside the peptide and is a tumor-specific mutation, the value is 1.0; otherwise, the value is 0. Immunogenicity score The IEDB T-cell immunogenicity prediction tool was used to output a 0-1 standardized score. Overall priority score calculation: using a clinically validated weighted fusion formula: ; according to Sort the candidates from highest to lowest priority and output the top 20 high-priority neoantigen candidates, along with scores for each sub-item.

[0136] The weighting coefficients in the weighted fusion formula were determined through grid search and validation experiments on a real clinical sequencing dataset, which is a publicly available test dataset recognized in the field. The specific validation experiments are detailed below, using the TCGA melanoma (TCGA-SKCM) clinical cohort dataset, which includes sequencing data from 126 patients receiving immunotherapy and 317 real immunogenic neoantigens as positive controls. Comparative results show that compared to the traditional baseline algorithm relying solely on MHC binding affinity, the weighted fusion formula of this invention increases the detection rate of real immunogenic neoantigens among the top 10 candidate peptides from 28% to 42%, while reducing the false positive rate by 33%, demonstrating the significant effectiveness of this formula in clinical neoantigen screening scenarios.

[0137] This invention uses a conditional random field decoder to solve for the globally optimal label path, suppressing fragmented prediction outputs. It then combines peptide length screening and multi-dimensional comprehensive scoring to further verify candidate intervals, ensuring that the predicted peptides remain continuous and complete. This effectively improves fragmentation defects and guarantees the biological integrity of peptide prediction results.

[0138] To verify the independent contribution of each core technical module of this invention to the completeness and boundary accuracy of peptide prediction, a univariate controlled ablation experiment was designed: all experiments used the same ESM2-t33-650M backbone, the same training hyperparameters, and the same dataset partitioning, only gradually adding or replacing the loss function and decoding module. The experimental results are shown in Table 1: Table 1

[0139] The calculation methods for the two core task indicators in this experiment are as follows: Boundary localization error (%): For all experimentally validated real enzymatically digested peptides in the test set, if the predicted start or end position of the peptide deviates from the actual position by ≥1 amino acid, it is considered a boundary localization error; the calculation formula is: ; Fragmentation prediction rate (%): For all experimentally validated real enzyme-digested peptides in the test set, if the predicted result for a peptide is split into ≥2 discontinuous fragments, it is considered a fragmentation prediction; the calculation formula is: ; In this example, the public TCGA melanoma benchmark dataset is used for comparative verification, and all comparison methods adopt the default parameters of standard tools in the field. The weight coefficients are determined based on the molecular mechanism of neoantigen presentation and published clinical verification data, which are consistent with the weight system of mainstream neoantigen screening platforms in the industry.

[0140] The cleaved peptides output by the model of the present invention can be directly fused with the core indicators of neoantigen screening to construct an end-to-end prioritization process, and the specific implementation is as follows: 1. Extract the sequence information and cleavage confidence scores of the Top-10 cleaved peptides output by the model ; 2. Calculate multi-dimensional biological scores: MHC binding affinity score : NetMHCpan 4.1 is used to predict the binding affinity between the peptide and the patient's HLA allele (the binding thresholds for strong and weak MHC affinity are 50nM and 500nM respectively), and the IC50 value is normalized to the 0-1 interval through piecewise linear mapping. The specific interval mapping rules are set as: when IC50 ≤ 50nM (strong binding), the score is 1.0; when 50nM < IC50 < 500nM (weak binding), the score is linearly attenuated according to the formula 1-(IC50-50) / 450; when IC50 ≥ 500nM (no binding), the score is 0; Gene expression score : Based on the RNA-seq data of the patient's tumor tissue, the TPM value of the peptide-derived gene is extracted and normalized to a score of 0-1: when TPM ≥ 10, the score is 1.0; when 0 < TPM < 10, the score is linearly attenuated; Mutation-specific score : For mutant peptides, if the non-synonymous mutation site is located inside the peptide and is a tumor-specific mutation, the score is 1.0; otherwise, the score is 0; Immunogenicity score : The IEDB T cell immunogenicity prediction tool is used to output a standardized score of 0-1; 3. Comprehensive priority score calculation: a clinically verified weighted fusion formula is adopted: ; Wherein the weight allocation is based on the biological mechanism of neoantigen presentation: MHC binding and cleavage efficiency are the two core steps determining antigen presentation, therefore the highest weight is assigned; 4. According to Sort from high to low, output the top 20 high-priority neoantigen candidates, and provide the scores of each sub-item at the same time.

[0141] Experimental validation: On the TCGA melanoma dataset (containing 317 experimentally validated immunogenic neoantigens from 126 patients), the comprehensive ranking method of this invention achieved a detection rate of 42% for true immunogenic neoantigens among the top 10 candidate peptides, which is significantly better than the traditional ranking method based solely on MHC binding affinity (28%), and the false positive rate is reduced by 33%.

[0142] Experimental results show that the method of this invention exhibits excellent robustness in real-world scenarios with extreme class imbalance: the high precision effectively reduces false positive predictions and decreases the workload of subsequent experimental verification; the good recall ensures comprehensive coverage of real enzymatically digested peptides; and the balanced F1 score reflects the excellent balance between accuracy and coverage of the model.

[0143] The above performance verifies the effectiveness of the boundary-aware joint loss mechanism proposed in this invention, which significantly improves the problems of ambiguous enzyme cleavage boundary localization and fragmented predicted peptides in traditional methods, and can provide high-precision and high-reliability enzyme cleavage peptide prediction results for neoantigen screening in peptide vaccine development.

[0144] This embodiment also provides an apparatus for constructing a prediction model for enzyme-digested peptides. This apparatus is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0145] This embodiment provides a device for constructing a prediction model for enzyme-digested peptides, such as... Figure 7 As shown, it includes: The dataset construction module 401 is used to construct the training dataset, which includes multiple protein sequences and corresponding enzyme digestion peptide labels for each protein sequence. The processing module 402 is used to encode protein sequences to generate network input features and construct a boundary penalty mask for the double-ended asymmetric distance field of enzyme-digested peptide segments. Network building module 403 is used to build a sequence labeling fine-tuning network; the sequence labeling fine-tuning network includes a protein large language model encoder for extracting sequence evolution semantics and a boundary-aware bi-branch loss calculation module for gradient optimization; Training module 404 is used to input network input features into the protein large language model encoder and output the whole sequence class log-odds tensor. The whole sequence class log-odds tensor, enzyme-cleaved peptide label, and enzyme-cleaved peptide double-end asymmetric distance field boundary penalty mask are input into the boundary-aware bi-branch loss calculation module to calculate the boundary-aware focus loss and the region dice loss. The learnable parameters of the sequence label fine-tuning network are updated based on the boundary-aware focus loss and the region dice loss. After iterative convergence, the trained enzyme-cleaved peptide prediction model is obtained.

[0146] In one alternative implementation, the dataset construction module 401 is specifically used for: Obtain the raw protein sequence dataset; The positions of enzyme-cleaved peptides in the original protein sequence dataset that have been experimentally verified are labeled as positive samples, and all other sequence positions other than the positive samples are labeled as unlabeled samples. Unlabeled samples are screened, and those that meet the preset conditions are marked as reliable negative samples; The preset conditions include: Not containing any known restriction enzyme sequence of the human proteasome; The evolutionary conservation score in the homologous protein family is lower than the preset score; The confidence level of the site predicted by the gold standard tool as a non-cleavage site is higher than the preset threshold; Construct a label validity mask based on the labeling results of all samples; The dataset after the label validity mask is constructed is selected as the training dataset.

[0147] In one alternative implementation, the processing module 402 is specifically used for: Determine the N-terminal start position and C-terminal end position of all real enzyme-digested peptides in each protein sequence; Independent distance attenuation weighted windows are set for the starting position at N and the ending position at C, respectively; The first boundary weight corresponding to the distance attenuation weighted window at the N-end is calculated using the first preset attenuation function. The second boundary weight corresponding to the distance attenuation weighted window at point C is calculated using the second preset attenuation function. A boundary penalty mask for the bi-terminal asymmetric distance field of the enzyme-digested peptide is constructed based on the first boundary weight and the second boundary weight, wherein the non-boundary regions are assigned preset basic weights.

[0148] In one alternative implementation, the protein large language model encoder includes a basic backbone network, a random deactivation layer, and a linear classifier; the boundary-aware bi-branch loss calculation module includes a boundary focusing branch and a region-level topology fitting branch; the sequence labeling fine-tuning network also includes a conditional random field decoder for implementing label state temporal constraints.

[0149] In one alternative implementation, the training module 404 is specifically used for: The network input features are fed into the protein large language model encoder, which outputs a full-sequence class log-odds tensor, including: The network input features are fed into the basic backbone network to extract deep semantic hidden state features; The deep semantic hidden state features are input into a random deactivation layer for random deactivation processing; The features after random deactivation are input into a linear classifier, which projects the features onto the target class space and outputs a log-odds tensor of the whole sequence classes.

[0150] In one alternative implementation, the training module 404 is specifically used for: Calculate the basic cross-entropy loss between the whole sequence class log-odds tensor and the labeling of the enzyme-digested peptide segments; Based on the basic cross-entropy loss, the predicted probability of the true target category is determined; Based on the predicted probability, a decay factor is generated; The basic focus loss matrix is ​​determined based on the basic cross-entropy loss and the decay factor; The boundary-aware focus loss is determined by element-wise multiplying the basic focus loss matrix with the boundary penalty mask of the asymmetric distance field at both ends of the enzyme-digested peptide.

[0151] In one alternative implementation, the training module 404 is specifically used for: The whole sequence class log-probability tensor is activated and the probability of enzyme-digested peptides is extracted for prediction. Based on the labeling tags of enzyme-digested peptides, the target positive class indicator vector and the effective state mask are determined; Based on the predicted probability of enzyme-digested peptides, the target positive class indicator vector, and the effective state masking mask, the intersection space dot product and the union feature accumulation result between the predicted probability of enzyme-digested peptides and the target positive class indicator vector are determined. The regional dice loss is determined based on the intersection space dot product and the sum of the union features.

[0152] In one alternative implementation, the training module 404 is specifically used for: Input the class log-odds tensor of the entire sequence into the conditional random field decoder to determine the time transition loss; The temporal transfer loss is used in conjunction with the boundary-aware focus loss and the region dice loss to update the learnable parameters of the sequence labeling fine-tuning network.

[0153] This embodiment provides a device for predicting enzyme-digested peptides, including: The prediction module is used to obtain the protein sequence to be evaluated; encode the protein sequence to be evaluated to generate network input features; input the network input features into the enzyme-digested peptide prediction model and output the enzyme-digested peptide prediction results; the enzyme-digested peptide prediction model is constructed according to the enzyme-digested peptide prediction model construction method of any of the above embodiments or corresponding implementation methods.

[0154] In one alternative implementation, the prediction module is specifically used for: The protein large language model encoder in the enzyme-cut peptide prediction model processes the network input features and outputs a class log-odds tensor. The conditional random field decoder included in the enzyme-digested peptide prediction model performs global optimal path decoding on the class log-odds tensor to generate a variable-length prediction state sequence. The variable-length predicted state sequences are filtered according to a preset length range to determine the continuous candidate peptide intervals; For each candidate peptide segment interval, the N-terminal cleavage score, C-terminal cleavage score, interval continuity score, and length prior score are calculated separately, and then weighted to obtain a comprehensive score. The predicted peptide segment is determined based on the comprehensive score of each candidate peptide segment interval.

[0155] The enzyme-digested peptide prediction model construction device provided in this embodiment of the invention can execute the enzyme-digested peptide prediction model construction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments above, and will not be repeated here.

[0156] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.< / pad>

Claims

1. A method for constructing a prediction model for enzyme-digested peptides, characterized in that, The method includes: Construct a training dataset, which includes multiple protein sequences and corresponding enzyme digestion peptide labels for each protein sequence. The protein sequence is encoded to generate network input features, and a boundary penalty mask for the double-ended asymmetric distance field of the enzyme-digested peptide is constructed. Construct a sequence labeling fine-tuning network; the sequence labeling fine-tuning network includes a protein large language model encoder for extracting sequence evolution semantics and a boundary-aware dual-branch loss calculation module for gradient optimization; The network input features are input into the protein large language model encoder, and the output is a whole sequence class log-probability tensor. The whole sequence category log odds tensor, the enzyme-cleaved peptide label, and the enzyme-cleaved peptide bi-terminal asymmetric distance field boundary penalty mask are input into the boundary-aware bi-branch loss calculation module to calculate the boundary-aware focal loss and the region dice loss. The learnable parameters of the sequence labeling fine-tuning network are updated based on the boundary-aware focus loss and the region dice loss, and the trained enzyme cleavage peptide prediction model is obtained after iterative convergence.

2. The method according to claim 1, characterized in that, The construction of the training dataset includes: Obtain the raw protein sequence dataset; The positions of enzyme-digested peptides in the original protein sequence dataset that have been experimentally verified are labeled as positive samples, and all other sequence positions other than the positive samples are labeled as unlabeled samples. Unlabeled samples are screened, and those that meet the preset conditions are marked as reliable negative samples; The preset conditions include: Not containing any known restriction enzyme sequence of the human proteasome; The evolutionary conservation score in the homologous protein family is lower than the preset score; The confidence level of the site predicted by the gold standard tool as a non-cleavage site is higher than the preset threshold; Construct a label validity mask based on the labeling results of all samples; The dataset after the label validity mask is constructed is determined as the training dataset.

3. The method according to claim 1, characterized in that, The construction of the bi-terminal asymmetric distance field boundary penalty mask for the enzyme-digested peptide includes: Determine the N-terminal start position and C-terminal end position of all real enzyme-digested peptides in each protein sequence; Independent distance attenuation weighted windows are set for the starting position at N and the ending position at C, respectively; The first boundary weight corresponding to the distance attenuation weighted window at the N-end is calculated using the first preset attenuation function. The second boundary weight corresponding to the distance attenuation weighted window at point C is calculated using the second preset attenuation function. Based on the first boundary weight and the second boundary weight, a bi-terminal asymmetric distance field boundary penalty mask for the enzyme-digested peptide is constructed, wherein non-boundary regions are assigned preset base weights.

4. The method according to claim 1, characterized in that, The protein large language model encoder includes a basic backbone network, a random deactivation layer, and a linear classifier; the step of inputting the network input features into the protein large language model encoder and outputting a full sequence class log-probability tensor includes: The network input features are input into the basic backbone network to extract deep semantic hidden state features; The deep semantic hidden state features are input into the random deactivation layer for random deactivation processing; The features after random deactivation are input into a linear classifier, the features are projected onto the target class space, and the log-probability tensor of the whole sequence class is output.

5. The method according to claim 1, characterized in that, The boundary-aware dual-branch loss calculation module includes: a boundary focusing branch and a region-level topology fitting branch; the boundary focusing branch is input with the whole sequence class log-odds tensor, the enzyme-cleaved peptide label, and the boundary penalty mask of the enzyme-cleaved peptide bi-terminal asymmetric distance field to calculate the boundary-aware focus loss; wherein, it includes: Calculate the basic cross-entropy loss between the full sequence class log-odds tensor and the enzyme-labeled peptide tag; Based on the aforementioned basic cross-entropy loss, the predicted probability of the true target category is determined; Based on the predicted probability, a decay factor is generated; Based on the basic cross-entropy loss and the decay factor, determine the basic focus loss matrix; The boundary-aware focus loss is determined by multiplying the basic focus loss matrix element-wise with the boundary penalty mask of the bi-terminal asymmetric distance field of the enzyme-digested peptide.

6. The method according to claim 1, characterized in that, The boundary-aware bi-branch loss calculation module includes: a boundary focusing branch and a region-level topology fitting branch; the region-level topology fitting branch inputs the whole sequence class log-odds tensor, the enzyme-cleaved peptide label, and the boundary penalty mask of the enzyme-cleaved peptide's bi-terminal asymmetric distance field to calculate the region dice loss; wherein, it includes: The log-probability tensor of the whole sequence class is activated, and the predicted probability of the enzyme-digested peptide is extracted. Based on the enzyme-labeled peptide segments, the target positive class indicator vector and the effective state mask are determined; Based on the predicted probability of the enzyme-digested peptide, the target positive class indicator vector, and the effective state masking mask, the intersection space dot product and the union feature accumulation result between the predicted probability of the enzyme-digested peptide and the target positive class indicator vector are determined. The regional dice loss is determined based on the intersection space dot product and the union feature accumulation result.

7. The method according to claim 1, characterized in that, The sequence labeling fine-tuning network also includes a conditional random field decoder for implementing temporal constraints on label states; The log-probability tensor of the entire sequence category is input into the conditional random field decoder to determine the temporal transition loss; The temporal transition loss is used in conjunction with the boundary-aware focus loss and the region dice loss to update the learnable parameters of the sequence labeling fine-tuning network.

8. A method for predicting enzyme-digested peptides, characterized in that, The method includes: Obtain the protein sequence to be evaluated; The protein sequence to be evaluated is encoded to generate network input features; The network input features are input into the enzyme-digested peptide prediction model, and the enzyme-digested peptide prediction results are output; the enzyme-digested peptide prediction model is constructed according to the enzyme-digested peptide prediction model construction method according to any one of claims 1 to 7.

9. The method according to claim 8, characterized in that, The step of inputting the network input features into the enzyme-digested peptide prediction model and outputting the enzyme-digested peptide prediction results includes: The protein large language model encoder in the enzyme-cut peptide prediction model processes the network input features and outputs a class log-probability tensor. The conditional random field decoder included in the enzyme-digested peptide prediction model performs global optimal path decoding on the class log-odds tensor to generate a variable-length prediction state sequence. The variable-length predicted state sequence is filtered according to a preset length range to determine the continuous candidate peptide interval; For each candidate peptide segment interval, the N-terminal cleavage score, C-terminal cleavage score, interval continuity score, and length prior score are calculated and weighted to obtain a comprehensive score. The predicted result of the enzyme-digested peptide is determined based on the comprehensive score of each candidate peptide interval.

10. A device for constructing a predictive model for enzyme-digested peptides, characterized in that, The device includes: The dataset construction module is used to construct a training dataset, which includes multiple protein sequences and corresponding enzyme digestion peptide labels for each protein sequence. The processing module is used to encode the protein sequence to generate network input features and construct a boundary penalty mask for the double-ended asymmetric distance field of the enzyme-digested peptide segments. A network construction module is used to construct a sequence labeling fine-tuning network; the sequence labeling fine-tuning network includes a protein large language model encoder for extracting sequence evolution semantics and a boundary-aware dual-branch loss calculation module for gradient optimization. The training module is used to input the network input features into the protein large language model encoder and output a whole sequence class log-odds tensor. The whole sequence class log-odds tensor, the enzyme-digested peptide label, and the enzyme-digested peptide bi-terminal asymmetric distance field boundary penalty mask are input into the boundary-aware bi-branch loss calculation module to calculate the boundary-aware focus loss and the region dice loss. Based on the boundary-aware focus loss and the region dice loss, the learnable parameters of the sequence labeling fine-tuning network are updated, and after iterative convergence, the trained enzyme-digested peptide prediction model is obtained.