Phosphorylation site prediction method and system based on negative sample purification and imbalance optimization
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2026-07-09
- Publication Date
- 2026-08-07
AI Technical Summary
因此,尽管传统机器学习预测器具有一定可解释性并可作为基线方法,其对全长蛋白质上下文、长距离残基依赖关系以及结构依赖性调控信息的建模能力仍然有限
本发明技术方案针对负样本提纯和类别不平衡引起的偏置缓解,采用基于具有激酶注释信息的阳性样本构建高置信阳性样本集。随后,根据多个位点水平特征相似性,以负样本为中心、以阳性样本为邻居构建多视图 KNN图。为整合多个视图的信息,采用 SNF 算法进行融合。最后,基于融合后的 KNN图剔除伪负样本。本发明技术方案在提纯数据集的基础上,采用强化学习方法处理类别不平衡引起的偏置。具体而言,首先采用静态非对称奖励方案,在奖励层面显式区分正负样本,验证了强化学习处理数据不平衡问题的有效性。随后,提出动态自适应奖励机制,以提升模型在不同训练批次下的泛化能力。
Smart Images

Figure CN122531475A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of phosphorylation site prediction technology, and particularly relates to a phosphorylation site prediction method and system based on negative sample purification and imbalance optimization. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Accurate prediction of protein phosphorylation sites is crucial for improving our understanding of cellular regulatory networks and identifying novel biomarkers and therapeutic targets. Although high-throughput mass spectrometry and immunological assays have accumulated a wealth of phosphorylation data, which is publicly available in resources such as PhosphoSitePlus, dbPTM, and UniProt, experimental identification at the proteomic level remains expensive, time-consuming, condition-dependent, and incomplete. Therefore, computational prediction has become an indispensable strategy for large-scale phosphorylation site screening.
[0004] Early phosphorylation site prediction methods primarily relied on traditional machine learning classifiers and manually designed features. However, these methods typically depend on manually designed features and predefined peptide windows. Therefore, although traditional machine learning predictors offer some interpretability and can serve as baseline methods, their ability to model full-length protein context, long-distance residue dependencies, and structure-dependent regulatory information remains limited.
[0005] Furthermore, most deep learning-based predictors still primarily use fixed-length local peptide fragments to represent candidate sites, which limits their ability to model full-length protein context, long-distance residue dependencies, and structure-mediated interactions. Recent PTM prediction studies have also pointed out that deep models based on local fragments are insufficient to fully capture global sequence and structural information, and do not directly address two particularly important data problems in phosphorylation site prediction: the presence of potential positive samples in the negative sample set and severe imbalance between positive and negative sample classes. Summary of the Invention
[0006] To overcome the shortcomings of the prior art, this invention provides a phosphorylation site prediction method and system based on negative sample purification and imbalance optimization, which can improve the reliability of the negative sample set before model training and reduce label noise caused by pseudo negative samples.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: Firstly, a phosphorylation site prediction method based on negative sample purification and imbalance optimization is disclosed, including: Phosphorylation site data were acquired and redundancy was removed to obtain positive and negative samples. For each candidate negative sample site, sequence features and structural features are extracted separately, and then processed separately to obtain fused sequence features and structural parameters; Based on the fused sequence features and structural parameters, candidate negative sample sites are compared with high-confidence positive sites. Candidate negative samples with a set fusion similarity to positive reference samples are regarded as potential false negative samples and are removed. Negative sample purification is performed to obtain the purified dataset. The purified dataset is used to train two complementary branches. The first branch introduces adaptive rewards to correct class bias at the decision level. The second branch reweights the binary classification loss based on the class frequency in the current batch to enhance minority class learning. The outputs of the two branches are mapped and combined using interactive features to generate the final prediction result.
[0008] As a further technical solution, in the phosphorylation site data, experimentally verified phosphorylation sites are defined as positive samples, and unannotated serine, threonine, and tyrosine residues in the same substrate protein are considered as negative samples.
[0009] As a further technical solution, when extracting sequence features, the following are included: For each candidate site, local and global sequence features are constructed based on a protein big language model; Local sequence features are derived from a window centered on the target site with a radius of a set number of amino acids, used to capture short sequence contexts related to phosphorylation. Global sequence features are extracted from the complete substrate protein sequence to characterize the relative position of the target site in the whole protein and its potential association with neighboring and distant residues. Local and global sequence features are embedded and projected into a unified space, and then input into the encoder for encoding; Next, a modal attention pooling module is used to adaptively aggregate information from the two sequence perspectives; The fusion network is trained on the constructed dataset, and the checkpoint with the best performance is selected as the final dual-view representation model. Finally, a fusion feature vector is output for each phosphorylation candidate site.
[0010] As a further technical solution, the extraction of structural features includes: Download the protein structure and extract residue-level structural features for each candidate site; DSSP assigns secondary structure types to each amino acid residue in a protein sequence by identifying main chain hydrogen bond patterns in the protein's three-dimensional structure and combining them with a determination threshold based on main chain geometry; in addition, DSSP directly calculates the solvent-accessible surface area of each residue.
[0011] As a further technical solution, during negative sample purification, two KNN similarity matrices are constructed and integrated using a scalable graph fusion strategy inspired by SNF. When constructing sequence feature KNN similarity matrices and structural feature KNN similarity matrices: A high-confidence positive set A was constructed by experimentally verifying phosphorylation sites with well-defined kinase annotations; Using candidate negative samples as anchor samples, for each candidate negative sample i All positive sites As candidate neighbors, their relationship with the sample is calculated under different feature views. i Similarity; For each mode m First, for candidate negative samples i and positive reference sites j Normalize the eigenvectors; Subsequently, the similarity between sites was calculated; For each candidate negative sample i Only the first two with the highest similarity are retained. k A positive reference site is used to obtain a KNN similarity matrix centered on the negative sample, where each row corresponds to a candidate negative sample, and each preserved edge connects the negative sample to one of its most similar high-confidence positive sites.
[0012] As a further technical solution, the first branch is the PPO branch, and the second branch is the adaptive loss branch.
[0013] Secondly, a phosphorylation site prediction system based on negative sample purification and imbalance optimization is disclosed, including: The data acquisition module is configured to acquire phosphorylation site data and perform redundancy removal to obtain positive and negative samples. The feature extraction module is configured to extract sequence features and structural features for each candidate negative sample site, and process them separately to obtain fused sequence features and structural parameters. The purification module is configured to: compare candidate negative sample sites with high-confidence positive sites based on the fused sequence features and structural parameters; treat candidate negative samples with high fusion similarity to positive reference samples as potential false negative samples and remove them; perform negative sample purification to obtain the purified dataset. The branching module is configured such that the purified dataset is used to train two complementary branches. The first branch introduces adaptive rewards to correct class bias at the decision level. The second branch reweights the binary classification loss based on the class frequency in the current batch to enhance minority class learning. The prediction module is configured to map the outputs of the two branches and combine them using interactive features to generate the final prediction result.
[0014] The above one or more technical solutions have the following beneficial effects: This invention addresses the bias caused by negative sample purification and class imbalance by constructing a high-confidence positive sample set based on positive samples with kinase annotation information. Subsequently, based on the similarity of multiple site-level features, a multi-view KNN graph is constructed with negative samples as centers and positive samples as neighbors. To integrate information from multiple views, the SNF algorithm is used for fusion. Finally, spurious negative samples are removed based on the fused KNN graph. This invention, based on dataset purification, employs reinforcement learning to handle the bias caused by class imbalance. Specifically, a static asymmetric reward scheme is first used to explicitly distinguish between positive and negative samples at the reward level, verifying the effectiveness of reinforcement learning in handling data imbalance. Then, a dynamic adaptive reward mechanism is proposed to improve the model's generalization ability across different training batches.
[0015] This invention further transfers the reward design concept to loss function optimization, successfully proposing an adaptive loss function based on class frequency. Experimental results show that both methods can effectively alleviate the bias caused by class imbalance. Finally, a logistic regression model is used to learn the logit-level features of the two schemes, and an ensemble framework is constructed. Experimental verification shows that the ensemble framework achieves superior performance.
[0016] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0018] Figure 1 This is a schematic diagram outlining the overall framework of an embodiment of the present invention; Figure 2 These are the dynamic curves showing the changes in model sensitivity, specificity, and the difference between the two under different reward strategies. Among them, (a) is the change in sensitivity (Sn) with the training process, (b) is the change in specificity (Sp) with the training process, and (c) is the change in the difference between sensitivity and specificity (Sn-Sp) with the training process. Figure 3 shows the performance of different balance optimization strategies, where (a) is the performance of the MCC strategy, (b) is the performance of the F1 strategy, (c) is the performance of the GAP strategy, and (d) is the performance of the BACC strategy. Detailed Implementation
[0019] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used in these embodiments have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0020] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0021] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0022] Terminology Explanation: Post-translational modifications (PTMs) refer to the chemical modifications that occur after protein translation, and are a key step in protein biosynthesis. These modifications, through diverse biochemical and structural alterations, including N-terminal amino acid removal, disulfide bond formation, and chemical modifications, transform inactive precursor proteins into functionally mature proteins. Studies have shown that PTMs regulate protein function by adding biochemical functional groups or altering protein structure.
[0023] Among the various post-translational modification (PTM) types, protein phosphorylation is one of the most extensively studied reversible modifications, involving the covalent addition of a phosphate group to the side chain of a specific amino acid, typically mediated by a kinase. This modification is most common on serine (S), threonine (T), and tyrosine (Y) residues. It is a crucial mechanism regulating protein activity and function, responsible for intracellular processes such as cell growth and development, signal transduction, and metabolism.
[0024] Early phosphorylation site prediction methods primarily relied on traditional machine learning classifiers and manually designed features. Representative methods include the GPS series, which predicts phosphorylation sites based on a grouping scoring strategy; PhosphoSVM, a phosphorylation site prediction model based on support vector machines that combines various sequence-derived attributes with support vector machines; and PhosPred-RF, a phosphorylation site prediction model based on random forests that utilizes sequence information and random forests for phosphorylation site prediction. These studies have shown that effective phosphorylation discrimination signals are contained in local sequence motifs, residue biochemical properties, and evolutionary or physicochemical descriptors.
[0025] With the development of deep learning, phosphorylation site prediction has gradually shifted from manual feature engineering to automatic representation learning. Representative models include MusiteDeep (a deep learning-based phosphorylation site prediction model), DeepPhos, and TransPhos (a Transformer-based phosphorylation site prediction model): MusiteDeep uses convolutional neural networks to extract local sequence patterns related to phosphorylation; DeepPhos employs densely connected convolutional modules to enhance hierarchical feature propagation and reuse; and TransPhos introduces a Transformer encoder to capture richer contextual dependencies in protein sequences. Compared to traditional machine learning predictors, these models reduce reliance on manually designed descriptors and enhance the ability to learn nonlinear phosphorylation-related patterns.
[0026] Training methods based on pre-trained protein language models (PLMs) have demonstrated high effectiveness in PTM site prediction. In recent years, embeddings from various pre-trained PLMs, such as ESM2, ProtBERT, and ProtT5, have been used to replace or supplement manually designed descriptors, enabling prediction models to capture both local sequence motifs and broader sequence context. For example, PLM-based PTM predictors have used ProtT5, ESM series models, and other pre-trained embeddings for glycosylation, O-GlcNAc (O-linked N-acetylglucosamine modification), and general PTM site prediction. These studies show that pre-trained representations can provide richer biological contextual information than manually trained features. However, most PLM-based predictors still primarily focus on improving representation quality and do not directly address two particularly important data problems in phosphorylation site prediction: the presence of potentially positive samples in the negative sample set and severe class imbalance between positive and negative samples.
[0027] Because negative samples originate from sites that have not yet been experimentally verified as positive, some of these negative samples may actually be undiscovered true positive sites. This issue introduces significant label noise into model training. Furthermore, the number of negative samples is typically much larger than that of experimentally verified positive samples, easily leading to a severely imbalanced training dataset and further causing model bias.
[0028] Example 1 See appendix Figure 1 As shown, this embodiment discloses a phosphorylation site prediction method based on negative sample purification and imbalance optimization, including: Step 1) Data Preparation. Phosphorylation data were obtained from iPTMnet, a comprehensive protein post-translational modification network database, and redundancy removal was performed using CD-HIT, a redundancy removal tool based on sequence similarity clustering. Phosphorylation sites with kinase annotations were used as high-confidence positive samples, while unannotated S / T / Y (serine / threonine / tyrosine) residues were considered as candidate negative sample sites, also known as negative samples.
[0029] Step 2) Feature Characterization. For each site, sequence features were extracted from the local residue window and the full-length protein sequence, respectively, and encoded using ESM-2, followed by fusion using a Transformer-based module. For structural features, the predicted structure from AlphaFold (the protein 3D structure prediction model) was first obtained; then, DSSP (a program for assigning secondary structures and calculating solvent-accessible surface areas based on the protein 3D structure) was used to calculate the residue-level secondary structure and ASA (solvent-accessible surface area). Simultaneously, pLDDT (the residue-level structure confidence score output by AlphaFold) was extracted from AlphaFold as the structure confidence score.
[0030] Step 3) Negative Sample Purification. Candidate negative sample sites are compared with high-confidence positive sites from both sequence and structural perspectives. Two KNN similarity matrices are constructed and integrated using a scalable graph fusion strategy inspired by SNF. Candidate negative samples with high fusion similarity to positive reference samples are considered potential false negative samples and are eliminated.
[0031] Step 4) Imbalance-aware optimization. The purified dataset is used to train two complementary branches. The PPO branch introduces adaptive rewards for TP, TN, FP, and FN results to correct class bias at the decision level. The adaptive loss branch reweights the binary classification loss based on the class frequency within the current batch to enhance minority class learning.
[0032] Step 5) Output Fusion and Evaluation. The predicted probabilities of the two branches are converted into log-odds form to obtain the original discriminant scores on a unified scale, and then combined through interaction features. The logistic regression fusion model generates the final prediction results, and the Matthews Correlation Coefficient (MCC), Balanced Accuracy (BACC), F1 score (F1), Sensitivity (Sn), Specificity (Sp), and the difference between sensitivity and specificity (GAP) are used as evaluation metrics for evaluation.
[0033] In one implementation example, in step 1), regarding data preparation: phosphorylation site data were collected from iPTMnet. To improve the generalization ability of the proposed method, the dataset was not limited to a single species, but covered 287 species, including humans. The CD-HIT tool was used to reduce sequence homology with a 60% similarity threshold. Experimentally validated phosphorylation sites in the database were defined as positive samples, while unannotated serine, threonine, and tyrosine residues in the same substrate protein were considered negative samples.
[0034] In one implementation example, in step 2), sequence feature construction: for each site, local and global sequence features are constructed based on the Protein Large Language Model (ESM). Local sequence features are derived from a window with a radius of 8 amino acids centered on the target site's S / T / Y (serine / threonine / tyrosine) sequence, used to capture short sequence contexts associated with phosphorylation. Each positive sample or candidate negative sample is located on a substrate protein sequence. The substrate protein sequence is the source sequence for the sample site, from which both the local window and global sequence features are extracted. In contrast, global sequence features are extracted from the complete substrate protein sequence, aiming to characterize the target site's relative position within the entire protein and its potential associations with neighboring and distant residues. Neighboring residues are residues adjacent to or within the window of the target site in the substrate protein sequence, providing local sequence context; distant residues are residues in the same substrate protein sequence that are farther from the target site but may have an impact through global sequence or structural relationships. Both are used together to describe the sequence environment of the sample site.
[0035] In one implementation example, let the first... i The local and global sequence inputs for each site are respectively and Local sequences refer to short sequence windows formed by truncating a fixed radius of amino acids to both sides of the target site; global sequences refer to the complete substrate protein sequence containing the target site. They capture local motif information and whole-protein context information, respectively. Encoding them yields local and global sequence features, respectively. The ESM-2 protein sequence encoder is denoted as... The two primitive embedding representations are as follows:
[0036] in, , in the formula Indicates the first i Local sequence input at each site, This indicates its global substrate protein sequence input. (.) indicates an ESM-2 sequence encoder. and These represent the 2560-dimensional embedding vectors of the local and global sequences after ESM-2 encoding, respectively.
[0037] To better integrate dual-view sequence representations, a single-layer Transformer-based encoder was designed. First, local and global sequence features were embedded and projected into a unified latent space, then input into a single-layer Transformer encoder with four attention heads. Next, a modal attention pooling module was employed to adaptively aggregate information from both sequence perspectives. The Transformer fusion network was trained on the dataset constructed in step 1, and the model parameter file with the best performance was selected as the final dual-view representation model. Finally, a 512-dimensional fusion feature vector was output for each phosphorylation candidate site. This fusion feature vector was used as a sequence modality feature. On one hand, it participated in the similarity calculation between candidate negative samples and high-confidence positive reference samples, and in the purification of multi-view negative samples; on the other hand, it was concatenated with structural features and other auxiliary features and input into a classification model for phosphorylation site prediction.
[0038] The final dual-view representation model refers to a local-global sequence representation model composed of an ESM-2 encoder and a single-layer Transformer fusion network. Its inputs are the local sequence of the target site and the global sequence of the corresponding substrate protein. First, the local sequence features and global sequence features are obtained separately through ESM-2. Then, the two types of features are input into the single-layer Transformer fusion network for fusion, and finally, a 512-dimensional dual-view fusion representation of the target site is output.
[0039] The modal attention pooling module uses local and global sequence representations as two modal tokens. First, it calculates the importance score for each modality using an attention scoring function. Then, it normalizes the results using softmax to obtain weights. Finally, it weights the two modal representations and sums them to obtain the fused sequence representation. The attention weights are dynamically calculated from the local and global features of the current site. For different sites, the model can automatically increase the weights of more discriminative local motif information or global protein background information.
[0040] Structural features are calculated for sites in the sample dataset from Step 1: Based on the corresponding UniProt accession, the protein structures predicted by AlphaFold are downloaded, and residue-level structural features are extracted for each candidate site. DSSP identifies the main chain hydrogen bond patterns in the three-dimensional protein structure of sites in the sample dataset from Step 1 and, combined with a judgment threshold based on the main chain geometry, assigns a secondary structure type to each amino acid residue in the protein sequence. Furthermore, DSSP can directly calculate the solvent-accessible surface area (ASA) of each residue. DSSP is a tool for assigning secondary structure types and calculating the solvent-accessible surface area of residues based on the three-dimensional protein structure. It labels each residue with secondary structure categories such as α-helices, β-sheets, and turns by analyzing main chain hydrogen bond patterns and geometry.
[0041] The AlphaFold prediction structure is used to calculate structural features for each candidate site. These structural features then participate in two parts: first, they are used in multi-view similarity calculations and SNF fusion with sequence features to identify suspicious false negatives; second, they are used as part of the input to the classification model for final prediction. After forming a 10-dimensional residue-level vector, the structural features, together with the sequence fusion features, are used for KNN similarity calculations from candidate negative samples to the high-confidence positive set A; in the final prediction model, they can also be concatenated with sequence and functional features as input.
[0042] Protein secondary structure refers to the regular local conformation of a polypeptide chain, primarily maintained by hydrogen bonds between amide groups in the backbone. It is a crucial structural level connecting the primary amino acid sequence to the three-dimensional protein structure and determines the local backbone organization that supports protein function.
[0043] Protein secondary structure is derived from the DSSP calculations of the target protein's three-dimensional structure. Specifically, the AlphaFold predicted protein three-dimensional structure is first obtained based on the UniProt ID, and then DSSP determines the secondary structure type of each amino acid residue based on the main chain hydrogen bond patterns and geometric relationships within this three-dimensional structure. Therefore, the secondary structure in this example is a residue-level structural feature obtained through further analysis of the protein's three-dimensional structure.
[0044] Solvent-accessible surface area (ASA) of a residue is a fundamental indicator for measuring the extent to which a single amino acid residue is exposed to solvents.
[0045] The predicted local distance difference test (pLDDT) score is a residue-level confidence index provided by AlphaFold, ranging from 0 to 100. A higher value indicates more reliable predictions of the residue's 3D coordinates and a closer approximation to the experimentally resolved structure. pLDDT is the residue-level confidence score output by the AlphaFold model during structure prediction. In this example, the pLDDT value corresponding to the target residue is directly read, divided by 100, and normalized to the 0-1 range as the structure confidence feature.
[0046] The final structural representation comprises 10 dimensions. The first eight dimensions correspond to the one-hot encoding of the secondary structure type, the ninth dimension represents the scaled ASA value, and the tenth dimension represents the normalized pLDDT score. Let... Represents a two-dimensional structure one-hot vector. This indicates its scaled-down ASA. The normalized pLDDT score represents the locus. i The structural feature vector is defined as:
[0047] Site structure feature vector It is subsequently used in two stages: in the negative sample purification stage, it participates as a structural modality in the similarity calculation between candidate negative samples and high-confidence positive samples; in the final classification stage, it is concatenated with sequence fusion features to form the input of the classification model.
[0048] In one implementation example, in step 3), the site KNN similarity matrix is used to construct a high-confidence positive set A first, using experimentally verified phosphorylation sites with explicit kinase annotations to ensure the reliability of pseudo-negative sample identification. Subsequently, candidate negative samples are used as anchor samples. For each candidate negative sample... i All positive sites As candidate neighbors, their relationship with the sample is calculated under different feature views. i The similarity.
[0049] In this implementation example, each candidate negative sample is used as the central query sample, and its similarity with each positive site in the high-confidence positive set A is calculated. The K positive reference sites with the highest similarity are retained.
[0050] For each mode m First, for candidate negative samples i and positive reference sites j L2 normalization of the feature vectors:
[0051] m Representing characteristic modes, such as sequence mode (seq) and structure mode (struct); Indicates candidate negative sample i In modality m The eigenvectors below; Indicates a high-confidence positive reference site j In modality m The eigenvectors below.
[0052] Subsequently, the similarity between sites is calculated as follows:
[0053] in, Similarity is used to construct a KNN similarity map from candidate negative samples to high-confidence positive reference samples. For each candidate negative sample, only the top K positive reference sites with the highest similarity are retained. Subsequently, KNN maps of different modalities are fused to obtain the spurious negative risk score of the candidate negative sample.
[0054] For each candidate negative sample i Only the top 50 positive reference sites with the highest similarity are retained. This process yields a KNN matrix centered on the negative samples, where each row corresponds to a candidate negative sample, and each retained edge connects the negative sample to its most similar high-confidence positive site.
[0055] To integrate similarity information from sequence representation and structural representation, a scalable graph fusion strategy inspired by Similarity Network Fusion (SNF) is proposed. Classical SNF integrates multiple similar networks by constructing global and local affinity matrices and iteratively propagating neighborhood information between different views. The graph diffusion process is described. While this propagation mechanism works well in multi-view biological network integration, its computational cost is high when applied to large-scale sparse graphs constructed from phosphorylated site samples. Therefore, this example does not directly adopt the standard method. Instead of a standard diffusion process, a lightweight iterative fusion scheme based on convex combinations is employed. Specifically, the KNN similarity matrices for each modality are first normalized to obtain modality-specific transition matrices. Then, in each iteration, the current similarity matrix of each modality is updated by convex combination with the average similarity matrix of all modalities, gradually bringing the modality similarity graphs closer to cross-modality neighborhood consensus. Finally, the fused graph is obtained by averaging the updated modality-specific similarity matrices, followed by top-K truncation and row normalization. This simplified strategy borrows from the multi-view consensus fusion concept of SNF, enabling the final edge weights to reflect the comprehensive neighborhood evidence provided by different biological views, while reducing the computational overhead of the standard diffusion process on large-scale phosphorylation site datasets, thus improving computational stability and scalability.
[0056] The fusion graph is a sparsely weighted graph obtained by integrating the KNN similarity graphs of sequence modalities and structural modalities. In the sparsely weighted graph, one side represents candidate negative samples and the other side represents high-confidence positive reference samples. The edge weights represent the comprehensive similarity between the two under multi-view features.
[0057] First, the modality-specific KNN graph is normalized to obtain the initial transition matrix for round 0:
[0058] For each modality, first calculate the cosine similarity between the candidate negative sample and the positive reference sites in set A. Then, retain the K neighbors with the highest similarity for each candidate negative sample and set the remaining edges to zero to obtain the sparse KNN similarity graph for that modality. .in, m This indicates the modality index. Since this example uses two modalities, therefore... m =2. Representing modes m The KNN similarity matrix below, It is a diagonal matrix formed by its rows and sums. Indicates candidate negative sample i In this modality, the total similarity with the retained positive neighbors is This represents the initial transition matrix after row normalization. Physically, it transforms the similarity between each candidate negative sample and its positive neighbors into a comparable weight distribution, preventing different samples from being affected by different similarity scales during fusion.
[0059] Subsequently, Repeat the following two steps: First step, calculate the... t Cross-modal consensus matrix of the wheel:
[0060] It should be noted that formula (5) yields the initial normalized transition matrix for each mode. Formula (6) in the first t In the next iteration, the current matrix for all modes... The average is calculated to obtain the cross-modal consensus matrix. Therefore, formula (6) is the cross-modal information aggregation step based on the initialization of formula (5).
[0061] The second step is to use this consensus matrix to synchronously update the transition matrix for each mode:
[0062] in, These are modality preservation coefficients, used to control the weighting between the original similarity structure of this modality and cross-modal consensus information. When When the size is large, the updated matrix retains more features of the current mode; when When the similarity is smaller, the updated matrix absorbs more of the average similarity relationships formed by other modalities. Through the above iterations, the similarity matrices of each modality gradually converge towards a common cross-modal similarity structure.
[0063] After T iterations, the final transition matrices of each mode are averaged to obtain the fusion transition matrix:
[0064] Finally, for each row, only the first K neighbors are retained, and row normalization is performed. The resulting matrix is still denoted as... .
[0065] In addition, this example also calculates the original mean similarity based on the original top-50 sparse similarity matrices of the two modalities:
[0066] The final fusion weights used for negative sample purification are not solely determined by... The decision is made not by the initial decision, but by multiplying the transition matrix element-wise with the original mean similarity.
[0067] It is the final fusion edge weight matrix used for negative sample purification. This reflects the neighborhood consensus achieved through multimodal iterative fusion. To preserve the original similarity strength, element-wise multiplication ensures that the final edge weights are constrained by both cross-modal fusion consensus and the original similarity strength: only edges that receive high overall support in the fused neighborhood and have strong original similarity will retain a larger weight in the final matrix. For each candidate negative sample, the highest fused edge weight is taken as the pseudo-negative risk score; a higher score indicates a closer resemblance to a high-confidence positive sample, and such samples should be prioritized for elimination or weight reduction.
[0068] In one implementation example, in step 4), reinforcement learning modeling is performed; this example modeles the imbalanced binary classification task as a sequence decision problem based on a sample stream. t Each decision step, the feature vector of the current sample is denoted as the state. The policy network outputs an action distribution based on the current state. ,in This indicates the current strategy. Below, the model targets the sample state. Take action The probability of . When If the model predicts a sample as positive, it will do so; otherwise, it will predict a sample as negative. Subsequently, based on the consistency between the prediction and the true label, an immediate reward is generated by a reward mechanism to guide the optimization of the policy network.
[0069] This example uses an actor-critic framework for policy optimization. Both the actor and the critic are two-layer multilayer perceptrons (MLPs). Policy function This refers to the probability distribution of actions in the current state, generated by the actor. State value function. The output representation of the sample features after forward propagation by the critic, where This represents the parameters of the value network. The critic represents the current sample state. The expected return under the current strategy is estimated, and a baseline is provided for subsequent advantage function calculation and strategy update.
[0070] The reinforcement learning algorithm used in this example is PPO. The advantage function is calculated using generalized advantage estimation (GAE), that is:
[0071] in, This represents the attenuation coefficient of GAE. GAE improves the stability of policy gradient estimation by exponentially accumulating the multi-step TD residuals, striking a trade-off between bias and variance. In this task, GAE is primarily used to smooth reward fluctuations in the continuous sample decision-making process to obtain a more stable optimization signal.
[0072] Let the old strategy be The new strategy is The importance sampling ratio is defined as:
[0073] PPO constrains the policy update magnitude through a pruning mechanism, which can be expressed as follows:
[0074] in, This is the clipping threshold. When... When, optimization tends to increase the probability of the corresponding action; when In such cases, optimization tends to reduce the probability of the corresponding action. Since the reward further affects the advantage estimation through the advantage function, different reward mechanisms ultimately directly affect the direction of model parameter updates.
[0075] In addition to the policy term, PPO also optimizes the value function and introduces an entropy regularization term to enhance training stability. The overall PPO objective function is:
[0076] in, For critical regression loss, This is the entropy regularization term.
[0077] In binary classification tasks, each prediction can be categorized into one of four cases: true positive (TP), true negative (TN), false negative (FN), and false positive (FP). Therefore, in the reward design, the model receives different rewards or penalties based on the category to which the current prediction belongs. This example first designs two static reward schemes. The first is a symmetric static reward, where positive and negative categories receive the same amount of reward. This scheme does not explicitly compensate for class imbalance and can therefore be considered a basic reward form under unbiased adjustment conditions. Its core feature is that the model treats positive and negative samples equally, and the reward structure does not change with class distribution. The specific reward model is as follows:
[0078] Given that the number of negative samples in the training set is significantly greater than that of positive samples, if symmetric rewards are still used, policy optimization may be dominated by majority class samples, thus favoring the output of negative classes. Therefore, the second approach is an asymmetric static reward. When the model correctly predicts a positive sample or incorrectly predicts an event related to the positive class, a larger reward or penalty is assigned, while negative-related events receive smaller rewards and penalties. This design enhances the influence of positive samples in the policy update process, thereby suppressing the excessive pull of majority negative samples on the decision boundary. The specific reward model is as follows:
[0079] While the aforementioned asymmetric reward methods can alleviate the bias caused by data imbalance, large reward discrepancies in the early stages of training can lead to high reward variance, causing the policy to oscillate violently in high-variance regions and hindering stable convergence. To address this issue, this example further proposes a dynamic asymmetric reward scheme. This scheme no longer fixes the reward magnitude for the four types of events, but instead designs it as a function of the training progress, allowing the reward structure to be gradually adjusted during training. In each reinforcement learning process, 14,000 samples are randomly selected and denoted as the total training steps T. During training, the current step... i Each sample is considered as the current training step. t Therefore, the global training progress is:
[0080] The specific dynamic asymmetric reward scheme is as follows:
[0081] in, Hyperparameters for controlling the baseline amplitude of four types of events.
[0082] The dynamic reward scheme does not simply increase or decrease certain rewards, but rather systematically adjusts the optimal decision boundary of the strategy by dynamically changing the relative costs of the four types of prediction outcomes. Let... For the sample x The posterior probability of belonging to the positive category. If the model predicts a positive category, the expected reward is:
[0083] If the model predicts a negative class, the expected reward is:
[0084] Therefore, the model tends to predict a positive class if and only if the following condition is met:
[0085] Furthermore, we can obtain:
[0086] Because this threshold varies f As the value increases, it monotonically decreases, meaning that in the later stages of training, the model only needs weaker evidence of a positive class to tend to predict positive, thus mitigating the long-term dominance of most negative samples in the optimization direction. Meanwhile, The absolute value of the value will also increase with the training progress, preventing the strategy from degenerating into over-positive predictions and maintaining the suppression of false positives while reducing false negatives.
[0087] This example further introduces a balanced feedback adaptive compensation branch, which dynamically adjusts the reward based on the model's recent balanced behavior. The core idea of this branch is to construct a continuous confusion statistic using the model's probability output for the current sample, and determine the model's current bias based on the difference between recent continuous sensitivity and continuous specificity, thereby compensating or penalizing the reward accordingly. Let the true label of the sample be... ,in Indicates a true positive sample. This represents a true negative sample. Let... Let be the probability that the current sample is predicted to be positive by the model.
[0088] Subsequently, an exponential moving average (EMA) is accumulated over the four soft increments. Let the EMA decay coefficient of the balanced feedback branch be... ,but:
[0089] In the experiment, all four states were initialized with a minimal positive value, let it be denoted as . This is to avoid zero denominator in the early stages of training. In the current experiment, Therefore, this statistic essentially corresponds to an exponentially weighted recent average, which can pay more attention to recent behavior while avoiding drastic oscillations caused by single-step fluctuations.
[0090] Based on the above cumulative EMA, and The calculation is as follows:
[0091] Based on this, the signed bias signal is defined as:
[0092] in, Used to determine which side the current model is biased towards. When At that time, the model is more biased towards negative classes, and the recall ability of positive classes is relatively weak. .when At that time, the model was more biased towards the positive class, and the specificity of the negative class was relatively weak. .therefore, The sign of the calibrator provides directional information for the correction, while its magnitude reflects the severity of the current deviation. Controlling signed bias enter Sensitivity after function.
[0093] Therefore, the reward scheme is designed as follows:
[0094] in, This indicates the basic strength of the balanced feedback correction term.
[0095] Since this branch directly uses GAP as the feedback signal source, if no activation threshold is set, the correction signal may fluctuate significantly in the early statistically unstable stage, thus affecting training and potentially causing a decrease in the main metric MCC.
[0096] Therefore, this example uses a triggering mechanism based on the following form:
[0097] The gating of the balanced feedback compensation branch is:
[0098] in, This means mapping the excess portion of the GAP to gating weights. magnification factor, For the threshold, This is the upper bound for balancing the feedback branch gating.
[0099]
[0100] Although the proposed dynamic reward scheme, combined with a feedback correction and compensation reward mechanism, can significantly alleviate the bias caused by class imbalance, it is essentially still an indirect correction at the decision outcome level. Considering that imbalanced learning can also directly redistribute gradient contributions at the loss function level, this example further introduces a simpler adaptive loss design from the perspective of the loss function.
[0101] Let the current batch size be n The number of positive samples and negative samples are respectively:
[0102] Based on this, the inverse frequency factor is defined as:
[0103] In the implementation, it is further normalized to:
[0104] Therefore, the adaptive loss function is defined as:
[0105] In this embodiment, reinforcement learning is not used to control the external physical environment, but rather to optimize the sample-level decision-making strategy of the phosphorylation site binary classification model. After the aforementioned data preparation, feature construction, and negative sample purification, each site to be predicted corresponds to a training sample. This sample consists of the site's features, including local-global sequence fusion features and structural features. Let the first... The feature vector of each training sample is Its real label is ,in This indicates that the site is a phosphorylation-positive site. This indicates that the site is a negative site or a candidate negative site.
[0106] In reinforcement learning modeling, state That is, the feature vector of the current position; action. This indicates the predicted category for that site by the model. When When the model predicts that the site is a positive phosphorylation site, then... At that time, the model predicted the site to be a negative site. (Policy network) Output the action probability based on the current state, where This can be understood as the probability that the model considers the current location to belong to the positive category. Value Network It is used to estimate the expected return of the current sample state under the current policy, providing a baseline for subsequent advantage function calculation.
[0107] After the model completes a prediction, it takes action based on the prediction. With real labels The relationship categorizes the sample into one of four types of events: if If then it is a true example TP; if If , then it is a true negative example TN; if If , then it is a false negative example FN; if If the result is not positive, it is considered a false positive (FP). The reward function assigns different rewards or penalties based on the four types of events mentioned above. Thus, sample-level binary classification training is transformed into a sequential decision-making process on a continuous sample stream, and the model adjusts the classification decision boundary by maximizing the cumulative reward.
[0108] During a reinforcement learning training session, according to the preset number of training steps... A sample stream is formed from the training set. For the first... For each sample, the model receives an immediate reward. Since the reward for a single sample can fluctuate significantly due to factors such as category, difficulty, and spurious negative sample noise, this embodiment employs Generalized Advantage Estimation (GAE) to smooth and accumulate the multi-step temporal difference residuals. The temporal difference residuals can be written as:
[0109] The advantage is estimated as follows:
[0110] in, This indicates the discount factor for future rewards. This represents the GAE attenuation coefficient. This advantage value... In this application, it means whether the current model's prediction action for a certain location is better or worse than the model's current average decision-making level. This indicates that the predicted action yielded a good reward result, and subsequent optimizations will increase the probability of this action; if This indicates that the action is detrimental to the current task objective, and subsequent optimizations will reduce the probability of this action. Therefore, the role of GAE is to transform the reward feedback of TP, TN, FN, and FP into stable parameter update signals, avoiding drastic oscillations in the model due to fluctuations in the reward of a single sample.
[0111] Subsequently, the PPO (Plan-Do-Check-Act) pruning strategy is used to constrain the magnitude of change between the old and new strategies. Let the old strategy be... The new strategy is The importance sampling ratio is:
[0112] The PPO trimming target is:
[0113] in, This is the pruning threshold. The mechanism in this application limits the magnitude of each parameter update in the model, preventing a sudden and significant shift in the classification boundary due to a few high-reward or high-penalty samples, thereby improving stability under imbalanced sample training. In addition to the policy term, this embodiment also trains a value network and may introduce an entropy regularization term; therefore, the overall PPO objective includes a policy term, a value function term, and an entropy regularization term. The value function term is used to improve... The entropy regularization term is used to improve the accuracy of the expected return estimate and prevent the policy from prematurely collapsing into a single-class prediction.
[0114] Regarding reward design, if a completely symmetrical reward is applied to TP, TN, FN, and FP—for example, TP and TN receive the same positive reward, and FN and FP receive the same penalty—the model is prone to being dominated by a large number of negative samples when there are significantly more negative samples than positive samples. This can lead to a tendency to output the negative category, resulting in missed detections of positive phosphorylation sites. To mitigate this problem, this embodiment first designs an asymmetric static reward, assigning higher weights to positively related events, thus giving positive samples a greater influence in policy updates.
[0115] Furthermore, this embodiment proposes a dynamic asymmetric reward. Let the global training progress be:
[0116] in, This indicates the number of decision steps that have been processed so far. This represents the total number of steps in this reinforcement learning training session. The dynamic reward system uses the reward and penalty magnitudes for four types of events—TP, TN, FN, and FP—to correlate with training progress. Functions. For example:
[0117] in, For the overall reward standard, This represents the ratio of negative samples to positive samples in the training set. The baseline amplitudes for the four event categories are controlled separately. The physical meaning of this design is: in the early stages of training, a strong TN reward is retained, allowing the model to establish a stable basic discrimination boundary using a large number of negative samples; as training progresses, the TP reward and FN penalty are gradually increased, causing the model to focus more on identifying positive phosphorylation sites in the later stages, reducing false negatives. Simultaneously, the FP penalty also increases with training progress, preventing the model from simply predicting a large number of samples as positive.
[0118] From the perspective of decision boundary, let the sample... The posterior probability of belonging to the positive category is If the model predicts a positive result, the expected reward is:
[0119] If the model predicts a negative result, the expected reward is:
[0120] When the expected reward for a positive prediction is greater than the expected reward for a negative prediction, the model tends to output the positive category. Substituting this with a dynamic reward, we can obtain a reward that varies with training progress. The changing positive threshold. With... As the threshold increases, it gradually decreases, indicating that the model tends to predict positive results with only weaker positive evidence in the later stages of training, thus alleviating the long-term pull of most negative samples on the model's decision boundary. In the context of this application, this mechanism means allowing the model to first stably learn the negative background and then gradually restore its sensitivity to potential positive phosphorylation sites.
[0121] Building upon dynamic rewards, this embodiment further introduces a balanced feedback adaptive compensation branch to dynamically adjust the reward direction based on the model's recent performance in positive and negative categories. Let the positive prediction probability of the current sample be... The real label is Then, a continuous form of confusion statistic can be constructed:
[0122] The quantities mentioned above are not the hard-classified TP, TN, FN, and FP, but rather soft counts formed using predicted probabilities. An exponential moving average is then used to accumulate recent model behavior.
[0123] in, This is the EMA decay coefficient. The physical meaning of this step in this application is: instead of judging model bias based solely on a single sample, it statistically analyzes the overall recognition trend of positive and negative samples over a recent period, thereby avoiding large fluctuations in rewards caused by single-step noise.
[0124] Based on the above soft statistics, continuous sensitivity and continuous specificity can be calculated:
[0125] when When this occurs, it indicates that the model is better at identifying negative samples but has insufficient positive recall, meaning the model is biased towards the negative category; when This indicates that the model may be overly biased towards positive predictions. Therefore, a signed balance bias signal is defined:
[0126] in, The sensitivity of the control deviation signal after it enters the hyperbolic tangent function. If This indicates that the model is biased towards negative predictions, and it is necessary to increase the reward for positive related events or reduce false negatives; if This indicates that the model is biased towards positive predictions, and the constraints on negative correlations need to be strengthened. Based on this signal, compensation can be applied to the rewards for four types of events:
[0127] The final reward is:
[0128] in, The weights of the feedback branch are gated to balance the performance. The reason for this gate is that soft statistics are unstable in the early stages of training; immediate forced correction could cause the model to oscillate excessively before a basic discrimination boundary is established. Therefore, the balancing feedback compensation is gradually increased only when the current class difference exceeds a preset threshold. The advantage of this mechanism is that it does not fixedly increase the weight of a particular class, but dynamically adjusts the reward direction based on the model's recent actual bias, thus more precisely compressing the gap between sensitivity and specificity.
[0129] In addition to reward-level optimization, this embodiment also introduces adaptive imbalance optimization at the loss function level. For a mini-batch, let the number of samples be... The number of positive samples and the number of negative samples are respectively:
[0130] Define the category inverse frequency factor:
[0131] And normalize it:
[0132] The adaptive loss function can then be written as:
[0133] in, The model predicts the first... The probability that a sample is a positive phosphorylation site. When there are few positive samples in a batch, Increasing the number of positive samples improves their contribution to the loss function and gradient update; however, when there are fewer negative samples... The corresponding increase. This mechanism reduces the dominant role of majority class samples in updating model parameters from the gradient optimization level, complementing the aforementioned dynamic reward mechanism: dynamic reward adjusts the cost of TP, TN, FN, and FP from the decision outcome level, while adaptive loss adjusts the contribution of positive and negative samples from the training gradient level.
[0134] In summary, PPO, GAE, dynamic reward, balanced feedback, and adaptive loss in this embodiment all directly correspond to the phosphorylation site prediction task. Multi-view negative sample purification is used to reduce spurious negative noise in candidate negative samples; dynamic reward and PPO are used to adjust the model's discrimination boundary between positive and negative samples during the sample-level decision-making process; balanced feedback is used to dynamically correct class bias based on recent differences in sensitivity and specificity; and adaptive loss is used to compensate for the imbalance in the number of positive and negative samples at the batch level. Through the above combination, this application can improve the identification ability of positive phosphorylation sites, reduce the performance difference between positive and negative categories, and improve model training stability even when there are many negative samples and spurious negative sample interference.
[0135] The two methods described above address the class imbalance problem in predicting post-translational modification sites for proteins from two different perspectives. The adaptive reward scheme dynamically adjusts the reward and penalty magnitudes corresponding to different prediction results, using model balance as a constraint to guide the model to correct its bias during policy updates. The adaptive loss function dynamically allocates class weights based on the frequency of positive and negative samples in the current batch, increasing the contribution of minority class samples from a gradient optimization perspective.
[0136] In one implementation example, regarding step 5), since the two methods have different starting points, their outputs may contain different discriminative information. To fuse the different discriminative information in the two branches, this implementation example further designs a post-fusion strategy at the output level to integrate the prediction results of the two branches.
[0137] Let the positive class prediction probabilities output by the adaptive loss scheme and the adaptive reward scheme be respectively... and First, map it to the logit space:
[0138] Based on this, the input features of the meta-classifier are constructed as follows:
[0139] in, This term reflects whether the prediction directions of the two branches are consistent. It is positive when the signs are the same and negative when the signs are opposite. This indicates the degree of inconsistency between the outputs of the two branches. and This indicates the overall strength of the fused evidence. Through these interactive features, the fusion model can simultaneously utilize the independent judgments, consistency information, and divergence information of the two branches.
[0140] Subsequently, the logistic regression fusion model was trained:
[0141] in, This represents the interaction feature vector after standardization using validation set statistics. σ represents the parameters of the logistic regression fusion model. This represents the sigmoid function. The validation set is used only to determine the parameters of the fusion model, the normalization statistics, and the regularization strength, while the test set is used only for the final performance evaluation.
[0142] It should be noted that, to alleviate the contamination problem caused by potential positive sites in the negative sample set, this embodiment proposes a negative sample purification method based on multi-view site similarity fusion. This method uses experimentally verified phosphorylation sites as high-confidence positive reference samples and treats unannotated sites as candidate negative samples. Subsequently, multiple site similarity networks are constructed based on sequence features and structural features, respectively. Furthermore, the SNF algorithm is used to fuse the sample neighborhood relationships under different feature views to obtain a unified multi-view fused similarity network, and a KNN similarity matrix is constructed on this basis. For each candidate negative sample, if it shows a high proximity to high-confidence positive samples in the fused KNN similarity matrix, it is considered a potential positive site that has not yet been experimentally verified and is removed from the negative sample set. This method can improve the reliability of the negative sample set before model training and reduce label noise caused by pseudo-negative samples. To suppress the bias caused by imbalanced data, this embodiment designs a differentiated dynamic reward scheme for the prediction results of positive and negative samples. This reward design encourages the model to pay more attention to minority class identification. Furthermore, this example extends the reward mechanism to a feedback-adaptive form driven by balance bias, enabling the reward scheme to dynamically adjust based on the current imbalance between positive and negative prediction behaviors. This design transforms manually preset reward rules into an adaptive optimization mechanism.
[0143] To further alleviate class imbalance from the perspective of gradient optimization, this example proposes an adaptive loss function based on class frequency. During training, class weights are dynamically calculated according to the distribution of positive and negative samples in each mini-batch. Subsequently, the loss function is adaptively reweighted, allowing minority class samples to participate more fully in parameter updates. This mechanism reduces the dominant role of the majority class in gradient optimization and improves the model's sensitivity to positive phosphorylation sites. To integrate the complementary discriminative information in the adaptive reward branch and the adaptive loss branch, this example further designs a late-stage fusion strategy at the output level. The positive class probabilities output by the two branches are first mapped to the logit space, and then interactive features are constructed to train a lightweight logistic regression fusion model.
[0144] Experimental Results and Analysis To evaluate the classification performance of the model under class imbalance conditions, this example uses MCC, BACC, F1, Sn, Sp, and GAP as the main evaluation metrics. In the binary classification task, true positives, true negatives, false positives, and false negatives are denoted as TP, TN, FP, and FN, respectively.
[0145] Sensitivity (Sn): Sensitivity, also known as recall or true positive rate, is used to measure the model's ability to identify positive samples. It is defined as follows:
[0146] A higher Sn indicates fewer missed positive samples, reflecting the model's stronger coverage of the positive category. In this task, a higher Sn indicates that the model is better able to capture potential positive samples. However, simply pursuing Sn may increase the number of false positives, so it needs to be evaluated in conjunction with other metrics.
[0147] Specificity (Sp): Specificity, also known as the true negative rate, is used to measure the model's ability to correctly exclude negative samples. It is defined as follows:
[0148] A higher Sp indicates that the model is more conservative in identifying negative samples and produces fewer false positives. However, in scenarios where the number of negative samples significantly exceeds the number of positive samples, a high Sp alone is usually insufficient to indicate good overall model performance, as the model may simply be biased towards classifying the majority of samples as negative.
[0149] Balanced Accuracy (BACC): Traditional accuracy is easily dominated by the majority class. Therefore, this example uses balanced accuracy to more fairly evaluate the model's average recognition ability for both classes of samples, defined as:
[0150] BACC considers the recognition performance of both positive and negative classes. Therefore, in imbalanced class tasks, BACC offers better interpretability compared to conventional accuracy. A higher BACC indicates that the model does not only perform well on a single class, but achieves a more balanced classification result overall.
[0151] F1 Score (F1): The F1 score is the harmonic mean of precision and recall. First, precision is defined as:
[0152] Subsequently, F1 was defined as:
[0153] Equivalent land, can also be written as:
[0154] F1 score emphasizes the quality of positive category identification, reflecting both the model's ability to detect positive samples and the reliability of positive prediction results. In this task, F1 can be used to determine whether the model has truly improved its ability to identify positive categories, rather than simply increasing recall at the expense of precision.
[0155] Matthews Correlation Coefficient (MCC): MCC is an evaluation metric based on correlation coefficients that comprehensively considers TP, TN, FP, and FN. Its definition is:
[0156] The value range of MCC is [-1, 1]. When MCC=1, it indicates that the classification is completely correct; when MCC=0, the performance is close to random prediction; and when MCC<0, the prediction result is negatively correlated with the true label. Since MCC considers all four components of the confusion matrix and has strong robustness to class imbalance, this example uses it as the main comprehensive evaluation index.
[0157] GAP: To further characterize the balance between positive and negative category recognition capabilities, this example defines the following:
[0158] GAP describes the degree of difference between a model's ability to identify positive and negative samples. A smaller GAP indicates that the model performs more evenly across the two classes. For example, when Sn is significantly lower than Sp, the model is generally more conservative, meaning it is better at identifying negative samples but more likely to miss positive samples. Conversely, when Sn is significantly higher than Sp, the model is more aggressive, meaning it is more likely to detect positive samples but may introduce more false positives. Therefore, in this implementation example, GAP is a balance indicator, and a smaller value is better.
[0159] In terms of their functions, Sn and Sp characterize the model's recognition ability on the positive and negative sides, respectively, while BACC reflects the average level of both. GAP describes whether the recognition abilities on both sides are balanced. In contrast, F1 emphasizes the quality of positive class recognition, while MCC, by jointly integrating TP, TN, FP, and FN, can provide a more stable overall classification performance evaluation under class imbalance conditions.
[0160] Evaluation of a Negative Sample Removal Method Based on Multi-View Site Similarity Fusion: After integrating the multi-view KNN similarity matrix using the Similarity Network Fusion (SNF) algorithm, this example uses threshold sensitivity analysis to determine 0.038 as a conservative scoring threshold for pseudo-negative sample removal. The selection of this threshold follows these principles: setting the threshold too low may over-filter true negative samples, leading to unnecessary loss of effective training data; setting the threshold too high will significantly reduce the efficiency of pseudo-negative sample identification, making the noise suppression effect insufficient to support downstream model training.
[0161] By establishing a quantitative relationship between the threshold and the sample retention rate, a threshold of 0.038 strikes a balance between retaining true negative samples and eliminating false negative samples. This threshold avoids data loss caused by over-purification while ensuring effective noise filtering, thus providing a high-quality data foundation for subsequent model training.
[0162] Table 1 Performance of negative sample purification methods based on fusion sequence and structural similarity. plan Matthews correlation coefficient (MCC) Balanced Accuracy (BACC) F1 score Difference between sensitivity and specificity After purification 0.451752 0.725426 0.686748 0.333506 Before purification 0.369194 0.643587 0.482767 0.618442 Experimental data analysis shows that the proposed negative sample purification method can effectively improve the quality of the dataset. After purification, all performance indicators of the model are significantly improved. In particular, the core evaluation metric MCC is improved by 8.26%, and the F1 score is improved by 20.4%, verifying the effectiveness of the method in removing spurious negative samples.
[0163] To verify the effectiveness of the multi-view fusion strategy, this example compares the performance of KNN similarity matrices constructed by two conventional feature fusion methods on the same dataset: Mean fusion and Concat fusion. The Mean fusion strategy is implemented as follows: First, the similarity score matrix between the negative sample and the positive anchor set (A) is calculated based on both sequence representation and structural representation. Then, the scores of the two views are arithmetically averaged to generate the fused similarity score. The Concat fusion strategy employs a feature-level concatenation scheme. Specifically, the sequence feature vector and structural feature vector are first L2 normalized, and then concatenated along the feature dimensions to construct a joint feature space. In this space, the maximum cosine similarity between each negative sample and the positive anchor sample is calculated. Experimental results show that the KNN similarity matrices constructed by these two conventional fusion methods have only limited noise filtering effects in the pseudo-negative sample identification task and fail to improve the performance of downstream models.
[0164] Table 2 Comparison of similarity fusion strategies in negative sample purification method Matthews correlation coefficient (MCC) Balanced Accuracy (BACC) F1 score Difference between sensitivity and specificity This article's method 0.451752 0.725426 0.686748 0.333506 Mean fusion 0.368342 0.643671 0.483750 0.616302 Feature splicing and fusion 0.368838 0.643612 0.483054 0.618007 This experiment compared the data cleaning performance when constructing KNN similarity matrices using only single sequence features and single structural features. The results show that KNN similarity matrices based on single-view features not only have low cleaning efficiency but may also introduce feature bias and have adverse effects. This phenomenon indicates that KNN similarity matrices constructed solely based on sequence or structural modality features cannot accurately represent the biological similarity between sites. Therefore, a more comprehensive site-level similarity representation is needed through multimodal feature fusion.
[0165] Table 3 Ablation experiments of sequence view and structure view in negative sample purification
[0166] Traditional methods first calculate the positive class center, then calculate the similarity between each negative sample and that positive class center. Negative samples with a similarity exceeding a fixed threshold are considered potential positive samples. This example also evaluates this method as a control experiment on the dataset used, and the specific results are as follows: Table 4 Comparison with positive center screening methods method Matthews correlation coefficient (MCC) Balanced Accuracy (BACC) F1 score Difference between sensitivity and specificity This article's method 0.451752 0.725426 0.686748 0.333506 Positive center strategy 0.434718 0.703860 0.621705 0.366495 Compared to the traditional positive center strategy, the proposed method achieves superior performance under all three random seeds. Specifically, the MCC improves from 0.434718 to 0.451752, the BACC from 0.703860 to 0.725426, and the F1 score from 0.621705 to 0.686748. Simultaneously, the GAP decreases from 0.366495 to 0.333506, indicating that the proposed purification strategy not only improves overall discrimination performance but also achieves a more balanced recognition behavior between positive and negative classes.
[0167] The poor performance of the positive center method stems from its oversimplification by assuming that positive phosphorylation sites can be represented by a single global center. However, phosphorylation sites exhibit biological heterogeneity, potentially corresponding to different sequence motifs, structural environments, and kinase-specific recognition patterns. Therefore, a single positive center is insufficient to characterize the multimodal distribution of positive sites. In contrast, the proposed method constructs local KNN neighborhoods based on high-confidence positive samples and integrates sequence and structural similarity information, enabling a more comprehensive characterization of site-level biological similarity and thus more effectively eliminating spurious negative samples.
[0168] Evaluation of the Dynamic Adaptive Reward Scheme: In the aforementioned pseudo-negative sample removal experiment, after data purification, the ratio of positive to negative samples in the training set changed from 1:4 to 1:2. However, to further verify the effectiveness of the proposed method in handling class imbalance, this example reconstructs an imbalanced training set from the purified data. Specifically, negative samples are retained, and positive samples are randomly downsampled to achieve a positive to negative sample ratio of 1:12.
[0169] Table 5. Baseline performance at a 1:12 positive and negative sample ratio Model Matthews correlation coefficient (MCC) Balanced Accuracy (BACC) F1 score Sensitivity Specificity Difference between sensitivity and specificity Baseline 0.2030 0.5571 0.2224 0.1260 0.9881 0.8621 As shown in the table, under extremely imbalanced data conditions, the baseline model exhibits severe prediction imbalance. Its specificity (Sp) reaches 0.9881, close to 1, while the sensitivity (Sn), used to measure the recall of positive samples, is only 0.12. This indicates that the prediction results are significantly biased towards the negative class, and the MCC and F1 scores are also severely reduced.
[0170] This example first systematically compares three reward mechanisms: static symmetric reward, static asymmetric reward, and dynamic reward. The results are shown in Table 6.
[0171] Table 6 Ablation experiments of reward schemes in PPO unbalanced optimization plan Matthews correlation coefficient (MCC) Balanced Accuracy (BACC) F1 score Sensitivity Specificity Difference between sensitivity and specificity Static symmetric reward 0.1970 0.5544 0.2138 0.1206 0.9881 0.8675 Static asymmetric rewards 0.3596 0.6582 0.5233 0.3655 0.9509 0.5855 Dynamic rewards 0.4098 0.6955 0.6171 0.4679 0.9231 0.4552 Adaptive reward 0.4532 0.7285 0.7020 0.5847 0.8722 0.2876 As shown in Table 6, among the three basic reward mechanisms, static asymmetric reward significantly outperforms static symmetric reward. Compared to static symmetric reward, static asymmetric reward increases the MCC from 0.1970 to 0.3596, the BACC from 0.5544 to 0.6582, and the F1 score from 0.2138 to 0.5233. Simultaneously, Sn increases from 0.1206 to 0.3655, a 24.49 percentage point improvement, indicating that asymmetric reward significantly enhances the model's ability to identify positive samples. Meanwhile, GAP decreases from 0.8675 to 0.5855, an absolute decrease of 0.2820, indicating that the bias in class identification between positive and negative categories is alleviated.
[0172] Furthermore, the dynamic reward scheme further improves model performance based on the static asymmetric reward. Compared with the static asymmetric reward, the dynamic reward increases MCC from 0.3596 to 0.4098, BACC from 0.6582 to 0.6955, F1 from 0.5233 to 0.6171, Sn from 0.3655 to 0.4679, while decreasing GAP from 0.5855 to 0.4552. These results indicate that the dynamic reward does not simply amplify the reward allocated to positive samples, but rather adjusts the relative reward and penalty magnitudes of TP, TN, FN, and FP according to the training progress, gradually reducing the dominant role of the majority of negative samples on the decision boundary, thus achieving a better trade-off between positive class recall and overall classification performance.
[0173] After incorporating adaptive feedback compensation into the dynamic reward scheme, the model performance was further improved, achieving the best overall performance as shown in the table. Compared with dynamic rewards, adaptive rewards increased MCC from 0.4098 to 0.4532, BACC from 0.6955 to 0.7285, F1 from 0.6171 to 0.7020, and Sn from 0.4679 to 0.5847. Simultaneously, GAP further decreased from 0.4552 to 0.2876, an absolute decrease of 0.1676 and a relative decrease of approximately 36.8%. This indicates that the feedback compensation mechanism can dynamically adjust the reward direction based on the model's recent bias in positive and negative class identification, thereby enhancing the ability to identify positive classes while further improving class balance.
[0174] Overall, under static symmetric rewards, the model is severely biased towards the negative class, as shown by Sp=0.9881 and Sn=0.1206, indicating extremely weak positive class recognition ability. Static asymmetric rewards alleviate this problem by increasing the reward and penalty weights for events related to the positive class. Dynamic rewards further adjust the reward structure according to the training progress, improving policy optimization stability and positive class recall. Adaptive rewards introduce balanced feedback correction on the basis of dynamic rewards, further reducing GAP while improving MCC, BACC, and F1. Therefore, experimental results verify the effectiveness of the proposed dynamic adaptive feedback compensation mechanism in the prediction of imbalanced phosphorylation sites.
[0175] Figure 2 To balance the dynamic changes of categories under different reward mechanisms, among which, Figure 2 In the diagram, (a) represents the change in the sensitivity value (Sn) as the training process progresses. Figure 2 In the diagram, (b) represents the change in specificity (Sp) as the training process progresses. Figure 2 (c) shows the change in the difference between sensitivity and specificity (Sn-Sp) as training progresses. The training curves indicate that all reward schemes gradually increase Sn and decrease Sp, reflecting a shift in the model from biased negative class prediction to improving positive class recognition. Compared to static and dynamic rewards, adaptive rewards further narrow the gap between Sn and Sp, resulting in a more balanced prediction behavior. Combined with the improvement results of MCC, BACC, and F1 in Table 6, these results demonstrate that the adaptive feedback compensation mechanism can improve class balance without reducing overall discriminative performance.
[0176] Table 7. Impact of Category Frequency Adaptive Loss on Prediction of Unbalanced Phosphorylation Sites
[0177] As shown in Table 7, incorporating class frequency information into the loss function to construct an adaptive loss significantly improved all evaluation metrics. The class balance index (GAP) decreased from 0.86 to 0.12, indicating a significant improvement in class balance. BACC increased by approximately 18.35%, and MCC increased by 26.61%, demonstrating an overall improvement in classification performance, rather than simply increasing positive class recall by reducing negative class recall. Furthermore, F1 score improved by 53.02%, indicating a significant enhancement in the model's ability to identify positive samples.
[0178] Table 8 Comparison of purification and resampling strategies on the dataset
[0179] As shown in Table 8, the proposed method achieves superior results on the three comprehensive performance metrics, MCC, BACC, and F1, reaching 0.492, 0.750, and 0.790, respectively. Simultaneously, its GAP is controlled at 0.022, indicating that the model significantly improves overall discriminative ability while maintaining good class balance. Compared with the Base model, the proposed method improves MCC by 0.2791, BACC by 0.1878, and F1 by 0.5506, while reducing GAP by 0.8282. These results demonstrate that the proposed method can effectively alleviate the majority class bias of the original model under imbalanced data conditions.
[0180] Compared to traditional resampling strategies, negative sample undersampling achieves a lower GAP, but its MCC, BACC, and F1 scores are all lower than the proposed method. This indicates that excessive pursuit of class balance may come at the cost of losing informative negative samples. Positive sample oversampling and SMOTE further degrade performance with high GAP values, suggesting that simple sample duplication or synthetic sample generation cannot accurately characterize the complex distribution of phosphorylation sites. Overall, the proposed method achieves a better trade-off between classification performance and class balance, validating its effectiveness in predicting imbalanced phosphorylation sites.
[0181] To systematically evaluate the innovative optimization strategy proposed in this embodiment for the problem of imbalance between positive and negative classes, Figure 3 The results of comparing the three methods with the initial model used as a baseline on key performance metrics are presented. Figure 3 (a) in the diagram illustrates the performance of the MCC strategy. Figure 3 (b) in the diagram illustrates the performance of the F1 strategy. Figure 3 (c) in the diagram illustrates the performance of the GAP strategy. Figure 3 (d) in the diagram illustrates the performance of the BACC strategy. From the perspective of reward scheme optimization, the dynamic adaptive reward mechanism finally constructed in this embodiment achieves better overall performance. It significantly outperforms the static asymmetric reward scheme in core metrics such as MCC and F1 score, effectively promoting the joint improvement of classification balance and overall discriminative ability.
[0182] Further analysis shows that the adaptive loss function based on dynamic class frequency adjustment exhibits stronger robustness in controlling GAP. This validates the effectiveness and generalization of the adaptive optimization framework in addressing the problem of class imbalance in protein post-translational modification site prediction.
[0183] As shown in Table 9, the ensemble framework achieves superior performance on MCC, BACC, F1, and GAP, reaching 0.492, 0.750, 0.790, and 0.022, respectively. Compared to the adaptive reward branch, the ensemble framework improves MCC, BACC, and F1 by 0.039, 0.021, and 0.088, respectively, while reducing GAP by 0.266. Compared to the adaptive loss branch, the ensemble framework further improves MCC, BACC, and F1 by 0.023, 0.009, and 0.037, respectively, and reduces GAP from 0.124 to 0.022. Although the ensemble framework's Sp is lower than that of the two individual branches, its Sn is improved to 0.761, significantly narrowing the difference between Sn and Sp. These results demonstrate that the ensemble framework can effectively integrate complementary decision information from the adaptive reward and adaptive loss branches, thereby improving positive category recognition ability while maintaining strong overall classification performance.
[0184] Table 9. Effectiveness of the integrated framework combining adaptive reward and adaptive loss.
[0185] Table 10 shows the baseline performance of other phosphorylation site prediction models on the original imbalanced dataset used in this experiment. Experimental results show that the evaluation metrics of the conventional models differ significantly from the final ensemble model of this embodiment, thus validating the effectiveness of the proposed negative sample purification and adaptive optimization strategy.
[0186] Table 10 Comparison with representative phosphorylation site prediction models on independent test sets. Model Matthews correlation coefficient (MCC) Balanced Accuracy (BACC) F1 score Difference between sensitivity and specificity This article's model 0.492 0.750 0.790 0.022 TransPhos 0.384 0.655 0.512 0.580 GPS 6.0 0.376 0.646 0.488 0.616 Protpsp 0.374 0.647 0.493 0.606 Musitedeep 0.372 0.645 0.487 0.613 Deepmpsf 0.367 0.642 0.477 0.626 Example 2 The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described method.
[0187] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0188] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the above method.
[0189] Example 4 The purpose of this embodiment is to provide a phosphorylation site prediction system based on negative sample purification and imbalance optimization, including: The data acquisition module is configured to acquire phosphorylation site data and perform redundancy removal to obtain positive and negative samples. The feature extraction module is configured to extract sequence features and structural features for each candidate negative sample site, and process them separately to obtain fused sequence features and structural parameters. The purification module is configured to: compare candidate negative sample sites with high-confidence positive sites based on the fused sequence features and structural parameters; treat candidate negative samples with high fusion similarity to positive reference samples as potential false negative samples and remove them; perform negative sample purification to obtain the purified dataset. The branching module is configured such that the purified dataset is used to train two complementary branches. The first branch introduces adaptive rewards to correct class bias at the decision level. The second branch reweights the binary classification loss based on the class frequency in the current batch to enhance minority class learning. The prediction module is configured to map the outputs of the two branches and combine them using interactive features to generate the final prediction result.
[0190] Example 5 The purpose of this embodiment is to provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the methods and functions involved in any of the above embodiments.
[0191] The steps and methods involved in the apparatus of the above embodiments correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0192] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0193] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A phosphorylation site prediction method based on negative sample purification and imbalance optimization, characterized by: include: Phosphorylation site data were acquired and redundancy was removed to obtain positive and negative samples. For each candidate negative sample site, sequence features and structural features are extracted separately, and then processed separately to obtain fused sequence features and structural parameters; Based on the fused sequence features and structural parameters, candidate negative sample sites are compared with high-confidence positive sites. Candidate negative samples with a set fusion similarity to positive reference samples are regarded as potential false negative samples and are removed. Negative sample purification is performed to obtain the purified dataset. The purified dataset is used to train two complementary branches. The first branch introduces adaptive rewards to correct class bias at the decision level. The second branch reweights the binary classification loss based on the class frequency in the current batch to enhance minority class learning. The outputs of the two branches are mapped and combined using interactive features to generate the final prediction result.
2. The phosphorylation site prediction method based on negative sample purification and imbalance optimization as described in claim 1, characterized in that, In the phosphorylation site data, experimentally verified phosphorylation sites are defined as positive samples, while unannotated serine, threonine, and tyrosine residues in the same substrate protein are considered negative samples.
3. The phosphorylation site prediction method based on negative sample purification and imbalance optimization as described in claim 1, characterized in that, When extracting sequence features, the following are included: For each candidate site, local and global sequence features are constructed based on a protein big language model; Local sequence features are derived from a window centered on the target site with a radius of a set number of amino acids, used to capture short sequence contexts related to phosphorylation. Global sequence features are extracted from the complete substrate protein sequence to characterize the relative position of the target site in the whole protein and its potential association with neighboring and distant residues. Local and global sequence features are embedded and projected into a unified space, and then input into the encoder for encoding; Next, a modal attention pooling module is used to adaptively aggregate information from the two sequence perspectives; The fusion network is trained on the constructed dataset, and the checkpoint with the best performance is selected as the final dual-view representation model. Finally, a fusion feature vector is output for each phosphorylation candidate site.
4. The phosphorylation site prediction method based on negative sample purification and imbalance optimization as described in claim 1, characterized in that, When extracting structural features, the following are included: Download the protein structure and extract residue-level structural features for each candidate site; DSSP assigns secondary structure types to each amino acid residue in a protein sequence by identifying main chain hydrogen bond patterns in the protein's three-dimensional structure and combining them with a determination threshold based on main chain geometry; in addition, DSSP directly calculates the solvent-accessible surface area of each residue.
5. The phosphorylation site prediction method based on negative sample purification and imbalance optimization as described in claim 1, characterized in that, When purifying negative samples, two KNN similarity matrices are constructed and integrated using a scalable graph fusion strategy inspired by SNF. When constructing the KNN similarity matrix: A high-confidence positive set A was constructed by experimentally verifying phosphorylation sites with well-defined kinase annotations; Using candidate negative samples as anchor samples, for each candidate negative sample i All positive sites As candidate neighbors, their relationship with the sample is calculated under different feature views. i Similarity; For each mode m First, for candidate negative samples i and positive reference sites j Normalize the eigenvectors; Subsequently, the similarity between sites was calculated; For each candidate negative sample i Only a set of pre-defined positive reference sites with the highest similarity are retained to obtain a KNN similarity matrix centered on the negative sample. Each row corresponds to a candidate negative sample, and each retained edge connects the negative sample to one of its most similar high-confidence positive sites.
6. The phosphorylation site prediction method based on negative sample purification and imbalance optimization as described in claim 1, characterized in that, The first branch is the PPO branch, and the second branch is the adaptive loss branch.
7. A phosphorylation site prediction system based on negative sample purification and imbalance optimization, characterized by including: The data acquisition module is configured to acquire phosphorylation site data and perform redundancy removal to obtain positive and negative samples. The feature extraction module is configured to extract sequence features and structural features for each candidate negative sample site, and process them separately to obtain fused sequence features and structural parameters. The purification module is configured to: based on the fused sequence features and structural parameters, compare candidate negative sample sites with high-confidence positive sites, regard candidate negative samples with a set fusion similarity to positive reference samples as potential pseudo-negative samples and remove them, perform negative sample purification, and obtain the purified dataset. The branching module is configured such that the purified dataset is used to train two complementary branches. The first branch introduces adaptive rewards to correct class bias at the decision level. The second branch reweights the binary classification loss based on the class frequency in the current batch to enhance minority class learning. The prediction module is configured to map the outputs of the two branches and combine them using interactive features to generate the final prediction result.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method described in any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it performs the steps of the method described in any one of claims 1-6 above.