Abstract
Protein–RNA interactions play pivotal roles in biological processes. Despite the development of numerous computational models for protein–RNA binding site prediction, they still face critical challenges, including insufficient integration of global and local features, class imbalance undermining precision-recall, and poorly calibrated predictions. To address these issues, we first constructed a larger and more comprehensive data set (Train-1086 and Test-107). Specifically, we developed DGSite, a novel deep learning framework that captures long-range dependencies via the simplified Deformable Attention Transformer and extracts multiscale local contextual features using Graph Attention Networks. To mitigate class imbalance and reduce model uncertainty, we introduced Adaptive Bias Loss (ABL), based on optimal transport theory. On this foundation, we proposed a hybrid loss function, ABL+FL, that adaptively combines the complementary strengths of ABL and Focal Loss (FL) to achieve a superior balance between precision, recall, and calibration. Extensive experiments demonstrated that DGSite achieves high performance on both Test-107 and established classic data sets. The ABL+FL loss not only balanced precision and recall but also significantly reduced model uncertainty, yielding well-calibrated and more trustworthy predictions. Moreover, case-study visualizations confirmed the model’s ability to minimize false positives and provide interpretable insights. Collectively, DGSite serves as a robust, high-performance, and well-calibrated computational tool for pinpointing protein–RNA binding sites.


Introduction
Proteins regulate multiple aspects of biological processes through interactions with RNA. Of significant practical importance is accurately identifying protein–RNA interactions and determining the amino acid residues in proteins responsible for RNA binding, for understanding the molecular mechanisms of proteins, investigating their functions, and designing novel drugs by screening potential therapeutic targets. − In early studies, the identification of protein–RNA interactions primarily relied on X-ray crystallography techniques. As research advanced, in vivo experimental methods such as RIP-seq and CLIP-seq together with high-throughput approaches including RNACompete and HT-SELEX have progressively become the primary investigative tools in this field. However, while these methodologies have propelled related research, they suffer from significant drawbacks, being time-consuming and costly. With the development of machine learning and deep learning, data-driven computational methods have become the mainstream approach.
Early research methods, such as RNABindR and Pprint, utilized sequence features for prediction through machine learning. Subsequent experiments revealed that amino acid residues within RNA–protein binding interfaces exhibit greater protrusion and roughness compared to nonbinding residues, with distinct structural differences between bound and unbound states. This observation prompted the development of numerous methods leveraging protein structural features, such as COACH-D. Notably, with breakthroughs in protein structure prediction methods like AlphaFold2 and ESMFold, the utilization of structural features has significantly improved. To better capture spatial structural information, GraphBind introduced the use of graphs to represent proteins, where nodes denote amino acid residues and edges define their spatial relationships. GraphBind improved performance by employing hierarchical graph neural networks built from traditional evolutionary and structural information. In recent years, pretrained protein language models (pLMs) have advanced substantially in capturing dependencies between amino acid residues. These pLMs have found successful applications in a wide range of downstream tasks. − EquiPNAS leveraged ESM-2 embeddings and the E(3) equivariant graph neural network for protein–RNA binding site prediction, boosting performance while reducing reliance on evolutionary information. GLMSite integrated ESMFold’s predicted structures and ProtTrans embeddings into the geometric vector perceptron network, revealing the critical role of ESMFold’s predicted structures. These methods extracted features from a single scale, potentially overlooking crucial information and limiting performance. Accordingly, multiscale approaches have been proposed to extract information. For example, SOFB employed multiscale CNNs with varying kernel sizes for feature extraction, leading to significant improvements. However, many existing methods only crudely integrated features through simple concatenation, lacking refined processing and ignoring the integration of global and local features, thereby hindering further performance improvement.
The inherent class imbalance in this field forces existing models into a problematic trade-off, where high recall comes with low precision and substantial false positives (FPs). From an economic perspective, if the prediction results are used as prior information for wet experiments, excessively low precision will lead to an excessive number of FPs, thereby wasting experimental costs. Conventional approaches to mitigating class imbalance typically involve the following: (1) Data augmentation , is used during data set construction to increase the proportion of positive samples, though augmented data sets remain highly imbalanced. (2) Modifying classification thresholds is employed to use values other than 0.5 for binary classification. (3) Alternative loss functionssuch as weighted loss functions or Focal Loss (FL)are employed to encourage models to focus on learning from positive samples. Although existing models use these approaches to mitigate class imbalance, precision still remains low. To address the identification problem of long-tail distributions, Lei et al. proposed the Adaptive Bias Loss (ABL) function, which improves the performance of class-imbalanced classification tasks by adjusting the decision boundary.
The black-box nature of deep learning models limits their interpretability and introduces high predictive uncertainty, making model reliability a significant challengeespecially in protein–RNA interaction research. Misidentification of binding sites could misdirect subsequent functional studies and drug discovery. Thus, precise and reliable predictive outcomes can offer more valuable guidance for experimental verification. Parkinson et al. leveraged prediction uncertainty to refine their screening process in the task of identifying tight-binding antibodies, selecting the most trustworthy results and thereby reducing experimental costs. Similarly, Zeng et al. demonstrated that models yielding more reliable predictions lead to better sample-screening outcomes in the task of identifying protein–RNA binding sites. These findings highlighted that studying the reliability of models is of practical significance. Regrettably, existing protein–RNA binding site prediction models have focused on improving performance and lack model calibration to reduce model uncertainty. The ABL offers an interpretable perspective for black-box deep learning models with solid theoretical foundations. It was based on the optimal transport theory, transforming the classification problem into an optimal transport problem and calculating the loss by measuring the difference between the network output distribution and the target distribution. Jin et al. have demonstrated that ABL achieves well-calibrated results on classical image data sets such as ImageNet-LT. This demonstrated the potential of ABL as a calibration technique for the reliability of classification models. Therefore, we considered introducing an ABL to calibrate this classification prediction model for protein–RNA binding sites.
Our work alleviated these issues by first creating the updated and comprehensive data sets and proposed a novel method for predicting protein–RNA binding sites, DGSite. Specifically, for the features of pLMs (ESM-2 and ProtT5), which inherently contain global information, they were independently refined using the simplified Deformable Attention Transformer (DAT). Subsequently, with the goal of integrating global and local information, they were input together with all selected features into a Graph Attention Network (GAT) of different scales to capture local properties at various scales. Meanwhile, by taking advantage of the respective strengths of ABL and FL, a new hybrid loss function, ABL+FL, was proposed and embedded into the DGSite model. Through experiments on Test-107 and the classic benchmark data set Test_117, we found that DGSite can achieve superior performance, effectively alleviate the problem of class imbalance, simultaneously improve precision and recall, and achieve good calibration. Below is a summary of the contributions we have achieved.
-
1.
A high-performance new model, DGSite, is proposed, which fully integrates global and local information through DAT and GAT. Its effectiveness has been verified on different data sets;
-
2.
Tests on real biological data confirm that ABL not only improves model precision but also functions as an effective calibration technique, thereby reducing predictive uncertainty;
-
3.
By combining the advantages of ABL and FL, the hybrid loss function ABL+FL is proposed, which can achieve the best balance between precision and recall, and also ensure that the model is well-calibrated.
Materials and Methods
Data Collection and Processing
We obtained raw protein–RNA binding site data from the BioLip database, as of 11 February 2025. Specifically, we downloaded the data set listed under the “Number of entries for RNA ligands” category. A residue is defined as a binding residue if the minimum distance between the residue and any atom of the ligand is less than the sum of their Van der Waal’s radii plus an allowance of 0.5Å. , A total of 168,446 protein sequences had been collected. The data set includes PDB ID, receptor chain, resolution, binding site number, protein sequence, and other relevant metadata.
Following established protocols, ,, we preprocessed the data using tools including BLAST and CD-HIT. Furthermore, to mitigate the issue of class imbalance, data augmentation was performed: annotations were transferred between identical protein sequences. The final curated data set consists of 1,193 proteins, with the number of binding sites increasing from 22,980 to 29,680. The proportion of binding sites relative to nonbinding sites rose from 7.03% to 9.27%. Based on time division, the latest released 107 proteins were selected as the independent test set (Test-107), while the remaining 1086 proteins constituted the training set (Train-1086). The ratio of the test set to the training set was approximately 1:10. Protein structural information was obtained through ESMFold prediction. The detailed data-processing workflow, including the data augmentation procedure, is described in Text S1, and the specific data sets are shown in Table S1 and Table S2.
Protein Representations
We selected protein features, including one-hot encoding of protein amino acid sequences; position-specific scoring matrix (PSSM) generated using the PSI-BLAST tool; hidden Markov model (HMM) features derived from HHblits; secondary structure information extracted from the Dictionary of Secondary Structure of Proteins (DSSP); and geometric node features, which consist of angular features, distance features, and directional features. The calculation of geometric node features is detailed in Text S2. Additionally, embeddings from two pLMs: ProtTrans (ProtT5-XL-UniRef50) and ESM-2 (esm2_t33_650M_UR50D). All feature-dimension information is shown in Table S3.
Model Framework
Based on the aforementioned protein features, we constructed a novel protein–RNA binding site prediction model named DGSite. The overall architecture of DGSite is illustrated in Figure .
1.
Overall framework of DGSite.
The model primarily employed the simplified DAT and the GAT for feature extraction. While the original DAT module alternates between local and deformable attention mechanisms to capture features flexibly across both local and global contexts, we utilized a simplified version because the deformable attention mechanism was designed for image data. The “DAT” designation is retained because our model incorporates certain components from the original DAT architecture within its design. The specific propagation process is detailed in Text S3. Additionally, multiscale feature extraction was incorporated. For graph construction in GAT, edges were formed based on distance thresholds of 5 Å, 10 Å, and 15 Å between Cα atoms, with no distinction in edge weights.
First, the pLMs features of proteins were processed. The pLMs feature matrix X plm, which was combined with representations from ProtT5 and ESM-2, was passed through two layers of DAT to obtain a 128-dimensional embedding H plm.
| 1 |
Subsequently, the multiscale GATs were employed to further extract information. A graph network was built based on Cα atoms, where each node was represented by a 2634-dimensional feature vector h formed by concatenating the 2,304-dimensional pLMs features, 202-dimensional additional features, and the 128-dimensional H plm obtained from the DAT module. Edges were constructed at three scales based on distances s between Cα atoms, where s ϵ {5 Å, 10 Å, 15 Å}. The message passing process was defined as follows.
| 2 |
| 3 |
where W denoted the weight matrix, referred to the neighbor set of nodes i under threshold s, ∥ indicated vector concatenation, and was the learnable attention vector. Following GAT feature extraction, three 64-dimensional outputs h 5 Å, h 10 Å and h 15 Å were obtained at distinct thresholds.
Subsequently, dynamic feature fusion was performed on the three outputs.
| 4 |
| 5 |
Finally, node-level classification was performed to predict the binding sites.
| 6 |
where W c denoted the weight matrix, b c represented the bias, and σ signified the sigmoid activation function.
Loss Function
The FL, which has been shown to significantly improve performance in highly imbalanced classification tasks such as protein-ATP binding site prediction, , is defined as follows.
| 7 |
Where p t represented the predicted probability for the positive class, αt is the balancing factor used to assign different weights to positive and negative samples, and γ is a modulating factor that controls the emphasis on hard-to-classify examples. In binary cross-entropy loss functions, the loss is dominated by the straightforward classification of numerous negative samples in imbalanced data sets, thereby diminishing the contribution of the rare positive samples. FL addresses this issue by adjusting αt to downweight the loss assigned to well-classified examples while focusing more on misclassified or hard-to-classify samples. This encourages the model to prioritize learning from positive examples, thereby mitigating the impact of class imbalance. By adjusting γ, the loss function can dynamically prioritize difficult examples during training, thus improving the model’s ability to gain discriminative features tailored to the minority class. This leads to improved predictive performance, particularly for critical positive binding sites.
The ABL, which is grounded in optimal transport theory, reformulated the classification task as an optimal transport problem, equivalently representing it as a cell decomposition problema connection supported by rigorous mathematical proof. This approach offered a novel perspective for understanding deep learning classifiers. The ABL is defined as follows.
| 8 |
where N is the number of samples, y represents the labels, z signifies the output of the neural network, h indicates a bias term of the classifier, and t denotes the hyperparameter. By adapting h, ABL dynamically shifts the decision boundary of the classifier without relying on prior class frequency information, thus effectively reducing overfitting to minority classes.
FL enhanced the discrimination of minority classes, whereas ABL reduced the overfitting of minority classes. Both approaches improved the prediction accuracy of minority classes from distinct perspectives. To leverage both advantages, we combined the two losses into a hybrid loss function .
| 9 |
Where W is a weighting parameter that balances the contributions of the two loss terms.
Evaluation and Experimental Setting
Due to the severe class imbalance in the data set, we selected the following metrics to evaluate model performance: the area under the receiver operating characteristic curve (AUCroc), the area under the precision-recall curve (AUCpr), Matthews correlation coefficient (MCC), and F1 score (F1). Recall (Rec) and precision (Pre) are also emphasized. The classical expected calibration error (ECE) metric was additionally chosen to quantify model uncertainty. The specific indicator formulas are provided in Text S4.
To enhance the robustness of the model, all results were obtained by averaging the 5-fold cross-validation on the independent test set. The Adam optimizer was used for training, accompanied by an early-stopping mechanism. The implementation of all models was carried out in a Python 3.8.16 environment with PyTorch 1.13.1. All experiments were executed on a computational platform featuring an NVIDIA GeForce RTX 4070 Ti GPU and an Intel(R) Core(TM) i7-13700KF CPU. The hyperparameters of our model were determined via a grid search. For critical parameters, the weight W of the ABL+FL hybrid loss function was ultimately set to 0.7. Detailed configurations of the other hyperparameters are provided in Table S4.
Results and Discussion
Analysis of the Data Set
During the construction of the data set, we employed data augmentation. Figure illustrates a comparison of experimental results before and after data augmentation.
2.
Performance comparison of DGSite before and after data augmentation on the Test-107.
Experimental results showed that models trained with augmented data consistently outperformed those without augmentation across all evaluation metrics, clearly demonstrating the benefit of this technique. Moreover, both Rec and Pre showed substantial improvement in augmented models compared to their nonaugmented counterparts, indicating that data augmentation enables more effective identification of genuine binding residues. Such findings hold particular significance in highly imbalanced data sets.
Comparison with Methods for RNA-Binding Prediction
To evaluate the performance of the DGSite model, we conducted comparative experiments on a newly constructed Test-107. Since the source codes of many existing models were not fully accessible, we compared DGSite with two representative methods, including the classic GraphBind and the recently developed MGCA.
According to the experimental results in Table , DGSite basically achieved optimal performance. Especially, the Pre saw a significant improvement. Given that MCC is considered a more reliable metric on imbalanced data sets, , the MCC of DGSite was the best among all evaluated methods. Although both MGCA and GraphBind achieved higher Rec, their Pre values were significantly lower. Specifically, the core technical distinction between DGSite and GraphBind lies at the feature representation level: DGSite incorporates the advantageous pLMs features, whereas GraphBind does not utilize such features. This distinction directly translates into performance advantages, with DGSite demonstrating markedly superior overall performance to that of GraphBind. When compared to MGCA, both models employ similar feature usage, with the core technical difference lying in loss function design. DGSite utilizes the ABL+FL hybrid loss function, whereas MGCA employs only the FL. This divergence is directly reflected in the trade-off between Pre and Rec. While MGCA achieved a high Rec, this came at the cost of a significantly lower Pre. Conversely, DGSite, through the regulatory effect of its ABL+FL hybrid loss function, attained considerable levels of both Pre and Rec, achieving a more balanced classification outcome. This suggested that DGSite, leveraging its advantageous features and the ABL+FL hybrid loss function, outperformed mainstream methods in key metrics such as Pre and MCC, while achieving a balanced trade-off between Pre and Rec.
1. State-Of-The-Art Experiments on the Test-107 .
| Model | MCC | F1 | Pre | Rec | AUCroc | AUCpr |
|---|---|---|---|---|---|---|
| GraphBind | 0.410 | 0.469 | 0.395 | 0.586 | 0.866 | 0.433 |
| MGCA | 0.425 | 0.468 | 0.343 | 0.739 | 0.879 | 0.477 |
| DGSite | 0.427 | 0.479 | 0.497 | 0.471 | 0.880 | 0.474 |
Bold indicates optimal performance.
We also evaluated the computational efficiency of each model, as summarized in Table . The average training time per epoch was 2 h for GraphBind, 10 s for MGCA, and 47.8 s for DGSite. The average prediction times were 0.5 h for GraphBind, 2 s for MGCA, and 3 s for DGSite. In terms of parameters, MGCA had the most, GraphBind the fewest, and DGSite a moderate amount. Notably, DGSite achieved state-of-the-art performance while being notably efficient in training.
2. Experimental Duration and Number of Parameters for Different Models on Train-1086 and the Test-107.
| Model | GraphBind | MGCA | DGSite |
|---|---|---|---|
| On average per epoch | 2 h | 10 s | 47.8 s |
| Prediction | 0.5 h | 2 s | 3 s |
| Number of parameters | 186,616 | 11,535,617 | 6,701,828 |
To further assess the robustness and generalization ability of DGSite, we validated it on the independent benchmark data sets (RNA-495 Train and RNA-117 Test) introduced in GraphBind. The results are shown in Table S5. DGSite outperformed earlier models (COACH-D, etc.) across the board, a result attributable to its use of more comprehensive features and a more effective graph network for feature extraction. Compared with several existing graph-based methods (GraphBind, GATBind, SOFB, and MGCA), DGSite also achieved commendable performance, attaining the optimal score in Pre, which can be attributed to the advantage of the ABL+FL hybrid loss function. Overall, this successful application to an external data set validates both the superiority and generalizability of our model.
Module Analysis
We conducted a series of component replacement, reconnection, and ablation experiments on DGSite, thereby validating each module’s contribution and the reasoning behind the architectural connections. The experimental results are shown in Table . Specifically, M1 involved substituting the original GAT with GCN, and M2 entailed replacing the DAT with the Transformer. The DAT output of the original model was integrated into GAT as input, while M3 fused the outputs of both DAT and GAT into the MLP. M4 retains only the 10Å graph network of GAT, while M5 removes GAT. M6 removes DAT. A more intuitive representation diagram is provided in Figure S1.
3. Module Experiment on Test-107 .
| Model | MCC | F1 | Pre | Rec | AUCroc | AUCpr |
|---|---|---|---|---|---|---|
| M1 | 0.381 | 0.432 | 0.483 | 0.395 | 0.860 | 0.435 |
| M2 | 0.417 | 0.472 | 0.490 | 0.458 | 0.875 | 0.464 |
| M3 | 0.412 | 0.455 | 0.535 | 0.401 | 0.876 | 0.472 |
| M4 | 0.413 | 0.467 | 0.480 | 0.464 | 0.875 | 0.454 |
| M5 | 0.419 | 0.470 | 0.464 | 0.510 | 0.874 | 0.467 |
| M6 | 0.421 | 0.477 | 0.484 | 0.472 | 0.875 | 0.464 |
| DGSite | 0.427 | 0.479 | 0.497 | 0.471 | 0.880 | 0.474 |
Bold indicates optimal performance.
DGSite demonstrated the best performance, indicating the high effectiveness of its architecture. In contrast, M1, which replaced GAT with GCN, performed the worst, with an AUCroc of 0.860, AUCpr of only 0.435, MCC of 0.381, F1 of 0.432, Pre of 0.483, and Rec of 0.395, with almost all metrics being the lowest among all models. This confirmed that GAT’s attention mechanism outperforms GCN in feature extraction, and that the synergistic effect between GCN and other modules is inferior to that of GAT in our task. The substitution of DAT with a standard Transformer also yielded respectable performance, as DAT was derived from the Transformer. In contrast to the Transformer, DAT selects the positions of key and value pairs in self-attention based on data dependence, thus capturing more informative features with greater flexibility. This enhancement improved the model’s capacity to model long-distance dependencies, aligning well with the requirements of the protein-based prediction task. Meanwhile, M3, which concatenated DAT and GAT outputs for classification, achieved a higher Pre but weaker performance on other metrics, such as MCC (0.412) and F1 (0.455). We inferred that this fusion method may have amalgamated features excessively, diluting the information and overwhelming the subsequent MLP.
M4, which utilized only the 10Å graph network, exhibited poor performance, with MCC of 0.413, F1 of 0.467, AUCroc of 0.875, and AUCpr of 0.454. This outcome directly underscored the efficacy of the multiscale information extraction strategy. A single scale failed to fully capture the complex structural features of proteins, thereby constraining the model’s performance. M5 and M6 exhibited comparable overall performance, although both fell short of the DGSite standard. Through experimental analysis of different modules, it has been found that each module is crucial, and our selection and interconnection of modules can achieve optimal performance.
Feature Analysis
As described in the Model section, we extracted featuresincluding one-hot encoding, PSSM, and HMMas well as modern pLM features from protein sequences. In addition, structural features such as DSSP and geometric node characteristics were derived from protein structures. In this section, we examined the impact of different feature configurations on DGSite. A is for removing simple sequence features (one-hot encoding, PSSM, HMM); B is for removing structural features (DSSP, geometric node characteristics); C is for removing both simple sequence and structural features; and D is for removing pLMs.
As shown in Figure , the model performance declined most significantly upon the removal of pLMs (D). Specifically, compared to DGSite, MCC decreased from 0.427 to 0.378, representing an 11.48% reduction. F1 decreased from 0.479 to 0.430, a reduction of 10.23%. AUCroc decreased from 0.880 to 0.851, a reduction of 3.30%, and AUCpr decreased from 0.474 to 0.421, a reduction of 11.18%. Conversely, this demonstrated that pLMs provide equivalent enhancement to the model. The paramount importance of pLMs stems from their design: they are specialized protein feature extractors based on mature natural language processing model architectures that have comprehensively learned the intrinsic dependencies within amino acid sequences. Therefore, their contribution to model performance is the most crucial. Among the remaining experimental groups, all models retained pLMs and exhibited relatively minor performance variations.
3.

Performance of different feature ablations on the Test-107.
The removal of either simple sequence features (A) or structural features (B) had a marginal impact on overall performance, but it significantly altered the Pre and Rec. When both simple sequence and structural features were removed concurrently (C), the model’s performance experienced a more pronounced decline, primarily reflected in the AUCpr decreasing from 0.474 to 0.457. This indicated that, while individually less critical, these features jointly provide essential informational support. Ultimately, when all features were integrated, DGSite attained an optimal overall performance. This finding further corroborated the effectiveness of the selected features. Various features captured protein information from multiple dimensions and collaboratively enhanced the model’s comprehensive performance.
Analysis of Loss Function
To demonstrate that our hybrid loss function ABL+FL effectively mitigates class imbalance while balancing Pre and Rec, we trained the model with different loss functions and compared their performance, with the results presented in Table . The loss functions evaluated included the ABL, the classic FL for addressing data imbalance, and our newly constructed hybrid loss function ABL+FL.
4. Performance Comparison of Models Using Different Loss Functions on the Test-107 .
| Loss Function | ECE | MCC | F1 | Pre | Rec | AUCroc | AUCpr |
|---|---|---|---|---|---|---|---|
| ABL | 0.026 | 0.415 | 0.460 | 0.528 | 0.412 | 0.878 | 0.478 |
| FL | 0.085 | 0.424 | 0.483 | 0.426 | 0.565 | 0.871 | 0.462 |
| ABL+FL | 0.027 | 0.427 | 0.479 | 0.497 | 0.471 | 0.880 | 0.474 |
Bold indicates optimal performance.
Evaluation revealed that the hybrid loss achieved the best overall results across both MCC and AUCroc, even though each loss demonstrated distinct advantages. The ABL exhibited the highest Pre, while FL showed the best Rec; however, the hybrid loss performed well in both Pre and Rec. The FL emphasized Rec, tolerating more FPs to improve detection of positive instances, whereas ABL favored Pre, correctly identifying clear positives at the cost of missing some marginal examples. Their complementary nature motivated the hybrid design: FL boosted Rec by accepting more FPs, while ABL prioritized Pre by focusing on clear positives. The ABL+FL hybrid loss leveraged these strengths, using ABL to curb FPs and FL to reduce false negatives (FNs). This synergy produced a more balanced precision-recall trade-off, ensuring both high Pre and broad detection.
We analyzed the weights of our hybrid loss to further validate the distinct roles of FL and ABL. The experimental results are shown in Figure . A larger value of W resulted in the hybrid loss favoring FL, whereas a smaller value indicated a preference for ABL. The experimental results showed that an increase in W corresponds to a rise in Rec while Pre decreases. The resulting strong and statistically significant correlationspositive for Rec and negative for Predirectly confirmed that FL drives Rec upward, whereas ABL boosts Pre.
4.
Analysis of the relationship between the W value and model performance metrics (recall, precision).
Additionally, we investigated the impact of the alpha parameter in the FL on the model’s performance. Given that the number of positive samples in our data set is smaller, we simplified the focus of alpha to its attention weight on positive samples. We considered alpha values in the range [0.5, 0.95] with a step size of 0.05. The results are presented in Figure . Three key metrics are displayed in the figure: Pre, Rec, and the Min–Max comprehensive score. The Min–Max score is a comprehensive quantitative result of six core metrics, including Rec, Pre, F1, MCC, AUCroc, and AUCpr, with detailed calculation procedures provided in Text S5 and Table S6.
5.

Analysis of the relationship between the alpha value and model performance metrics (precision, recall, and the Min–Max comprehensive score).
Experimental results indicated that variation of the alpha parameter exerted a significant impact on Rec and Pre. Rec increases with the increase in alpha, while Pre decreases accordingly. This trend is consistent with the core characteristics of the FL: as the alpha value increases, FL assigns a higher attention weight to hard-to-classify samples, leading the model to be more inclined to classify samples as positive. Consequently, the number of FNs was reduced, but the number of FPs increased, ultimately resulting in an increase in Rec and a decrease in Pre. However, from a comprehensive perspective, the Min–Max score was significantly higher than those under other parameter settings when alpha was set to 0.75. This demonstrated that the alpha parameter was better when neither excessively large nor excessively small; instead, a trade-off between Pre and Rec was required to select the optimal value to ensure the optimal overall performance of the model.
Reliability Analysis
Furthermore, to assess the interpretability of the ABL from the perspective of optimal transport, we performed model reliability analysis using ECE and reliability diagrams for visualization. Results are presented in Table and Figure .
6.
Reliability diagrams using different loss function models on the Test-107.
The FL-trained model showed the highest ECE, indicating poor calibration and generally inflated confidence. Conversely, the model using ABL achieved the lowest ECE, reflecting higher reliability and better calibration. At the same time, it exhibited lower confidence levels, consistent with ABL’s characteristic of preventing model overconfidence. The hybrid ABL+FL model was slightly higher in ECE than ABL alone, but it significantly outperformed FL and achieved a better balance between performance and uncertainty. Thus, ABL+FL emerged as the preferred loss function, delivering robust performance and dependable calibration, confirming that DGSite produces well-calibrated predictions.
Additionally, we adopted an uncertainty-based sample screening strategy to evaluate the real-world utility of model calibration. ,, Specifically, samples with high prediction uncertainty were excluded to retain more reliable prediction results, thereby reducing potential FPs and lowering the cost of experimental verification. We conducted split-bins sample screening on the models trained with different loss functions, and the results are shown in Table .
5. Sample Screening Results of the Model under Different Loss Functions on the Test-107 .
| Top2 |
Top4 |
Top6 |
|||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Loss Function | ECE | Pre | Rec | Total FP | Pre | Rec | FP | Pre | Rec | FP | Pre | Rec | FP |
| ABL | 0.026 | 0.528 | 0.412 | 994 | 0.422 | 0.466 | 269 | 0.435 | 0.461 | 571 | 0.478 | 0.477 | 843 |
| FL | 0.085 | 0.426 | 0.565 | 2061 | 0.303 | 0.545 | 1218 | 0.355 | 0.547 | 1538 | 0.385 | 0.536 | 1622 |
| ABL+FL | 0.027 | 0.497 | 0.471 | 1292 | 0.392 | 0.420 | 373 | 0.445 | 0.441 | 717 | 0.483 | 0.438 | 869 |
Bold indicates optimal performance.
Following sample screening, the number of FPs in nearly all models significantly decreased. Among the models, the one trained with FL produced the highest number of FPs postscreening. In contrast, the model trained with ABL exhibited the fewest FPs after screening. The number of FPs generated by the hybrid loss model exceeded that of the ABL model. These findings suggested that reduced prediction uncertainty could result in more reliable sample screening. Notably, the Pre of the hybrid loss model after sample screening surpassed that of the ABL model, indicating that the hybrid loss model retains a greater number of true positives (TPs). From this perspective, the hybrid loss model proved to be as impressive as the ABL model.
In conclusion, these experiments verified that ABL not only enhances the Pre of the model but also serves as an effective calibration method. The hybrid loss function ABL+FL, which was based on ABL, improved the overall performance of the model while ensuring low uncertainty.
Case Study
In this section, we visualized the 9ash_D protein. The prediction results of the DGSite model, MGCA model, and the models trained with ABL and FL were, respectively, presented, as shown in Figure .
7.
Visualization of 9ash_D.
The 9ash_D protein contains 138 amino acid residues, 10 of which are RNA-binding sites. For this protein, DGSite predicted 6 TPs and 4 FNs. The ABL model predicted 4 TPs and 6 FNs, with neither of the two predictions using the ABL loss function yielding any FPs. This further confirmed the characteristic of ABL in accurately predicting minority classes, indicating a preference for missing a test rather than misjudging it. The MGCA model predicted 7 TPs and 3 FNs, but it also produced 4 FPs. The FL model predicted 6 TPs, 4 FNs, and 1 FP. This also demonstrated the predictive feature of FL for minority classes, suggesting a tendency to misjudge rather than miss. While MGCA detected the most TPs, its high FP count made DGSite the superior model in this instance. Based on the comprehensive evaluation, DGSite showed optimal predictive performance along with the superiority of the hybrid loss function ABL+FL.
Conclusion
This study presents DGSite, a novel computational framework that integrates global and local protein information via a dual-attention architecture. The simplified DAT captures long-range dependencies, and the multiscale GAT module is used to model local structural contexts. These components work synergistically to generate comprehensive protein representations, overcoming limitations of previous methods that often overlook the interplay between global and local features. To tackle the inherent class imbalance and poor calibration in protein–RNA binding data, we propose a novel hybrid loss function, ABL+FL, which combines the strengths of ABL and FL to achieve an optimal balance between precision and recall. This loss function not only enhances predictive performance but also reduces model uncertainty, as confirmed through uncertainty quantification analyses. It also indicates that both the ABL and the hybrid ABL+FL loss function can be effective calibration methods. We process different features in modules to integrate global and local information and adopt a new hybrid loss method that balances precision and recall to achieve calibration purposes simultaneously, providing a new paradigm for other prediction tasks.
Despite these advances, limitations remain. While the current study has validated the effectiveness of feature integration and the ABL+FL hybrid loss function for protein–RNA binding prediction, their generalizability across diverse biomolecular prediction tasks remains a crucial focus for future research, as it directly governs the broadening of the method’s applicability. Therefore, future work will systematically extend this framework and its loss function to other relevant domains. In conclusion, DGSite provides a high-performance and well-calibrated tool for predicting protein–RNA binding sites.
Supplementary Material
Acknowledgments
This work was supported by the National Natural Science Foundation of China (12261060), the Natural Science Foundation of Jiangxi Province (20242BAB26007), and the Project of Jiangxi Society for Science and Education (2025KXJYS029).
The data and code can be available at https://github.com/trustcm/DGSite.
The Supporting Information is available free of charge at https://pubs.acs.org/doi/10.1021/acsomega.5c12723.
It contains additional supplementary explanatory data for the experimental section; text S1: data processing workflow; Text S2: the calculation of geometric node features; Text S3: the propagation process of DAT; Text S4: the indicator formula; Text S5: the calculation of Min–Max score; Table S1: protein–RNA binding site data; Table S2: Train-1086 and Test-107; Table S3: summary of protein features; Table S4: model hyperparameters; Table S5: performance comparison of different models on Test_117. Table S6: performance at different alpha values on Test-107; and Figure S1: Flowchart for different modules (PDF)
X.Z. constructed and validated the data set and models. X.Z. drafted the manuscript. L.Z. and H.W. validated the models together with X.Z. D.Z. and Y.C. revised the manuscript. S.S. contributed to the study conception, supervised the study, and revised the manuscript.
The authors declare no competing financial interest.
References
- Wei J., Chen S., Zong L., Gao X., Li Y.. Protein–RNA interaction prediction with deep learning: structure matters. Briefings Bioinf. 2022;23:bbab540. doi: 10.1093/bib/bbab540. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Konc J., Hodoscek M., Ogrizek M., Trykowska Konc J., Janežič D.. Structure-Based function prediction of uncharacterized protein using binding sites comparison. PLoS Comput. Biol. 2013;9:e1003341. doi: 10.1371/journal.pcbi.1003341. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Schmidtke P., Barril X.. Understanding and predicting druggability. A high-throughput method for detection of drug binding sites. J. Med. Chem. 2010;53:5858–5867. doi: 10.1021/jm100574m. [DOI] [PubMed] [Google Scholar]
- Zheng M., Sun G., Li X., Fan Y.. EGPDI: identifying protein–DNA binding sites based on multi-view graph embedding fusion. Briefings Bioinf. 2024;25:bbae330. doi: 10.1093/bib/bbae330. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Orengo C. A., Michie A. D., Jones S., Jones D. T., Swindells M. B., Thornton J. M.. CATH–a hierarchic classification of protein domain structures. Structure. 1997;5:1093–1108. doi: 10.1016/S0969-2126(97)00260-8. [DOI] [PubMed] [Google Scholar]
- Keene J. D., Komisarow J. M., Friedersdorf M. B.. RIP-Chip: the isolation and identification of mRNAs, microRNAs and protein components of ribonucleoprotein complexes from cell extracts. Nat. Protoc. 2006;1:302–307. doi: 10.1038/nprot.2006.47. [DOI] [PubMed] [Google Scholar]
- Ule J., Jensen K., Mele A., Darnell R. B.. CLIP: A method for identifying protein–RNA interaction sites in living cells. Methods. 2005;37:376–386. doi: 10.1016/j.ymeth.2005.07.018. [DOI] [PubMed] [Google Scholar]
- Ray D., Kazan H., Chan E. T., Castillo L. P., Chaudhry S., Talukder S., Blencowe B. J., Morris Q., Hughes T. R.. Rapid and systematic analysis of the RNA recognition specificities of RNA-binding proteins. Nat. Biotechnol. 2009;27:667–670. doi: 10.1038/nbt.1550. [DOI] [PubMed] [Google Scholar]
- Roulet E., Busso S., Camargo A. A., Simpson A. J. G., Mermod N., Bucher P.. High-throughput SELEX–SAGE method for quantitative modeling of transcription-factor binding sites. Nat. Biotechnol. 2002;20:831–835. doi: 10.1038/nbt718. [DOI] [PubMed] [Google Scholar]
- Yan J., Kurgan L.. DRNApred, fast sequence-based method that accurately predicts and discriminates DNA-and RNA-binding residues. Nucleic Acids Res. 2017;45:e84. doi: 10.1093/nar/gkx059. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Terribilini M., Lee J.-H., Yan C., Jernigan R. L., Honavar V., Dobbs D.. Prediction of RNA binding sites in proteins from amino acid sequence. RNA. 2006;12:1450–1462. doi: 10.1261/rna.2197306. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kumar M., Gromiha M. M., Raghava G. P. S.. Prediction of RNA binding sites in a protein using SVM and PSSM profile. Proteins. 2008;71:189–194. doi: 10.1002/prot.21677. [DOI] [PubMed] [Google Scholar]
- Towfic F., Caragea C., Gemperline D. C., Dobbs D., Honavar V.. Struct-NB: predicting protein-RNA binding sites using structural features. Int. J. Data Min. Bioinf. 2010;4:21–43. doi: 10.1504/IJDMB.2010.030965. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wu Q., Peng Z., Zhang Y., Yang J.. COACH-D: improved protein–ligand binding sites prediction with refined ligand-binding poses through molecular docking. Nucleic Acids Res. 2018;46:W438–W442. doi: 10.1093/nar/gky439. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jumper J. M., Evans R., Pritzel A., Green T., Figurnov M., Ronneberger O., Tunyasuvunakool K., Bates R., Žídek A., Potapenko A., Bridgland A., Meyer C., Kohl S. A. A., Ballard A. J., Cowie A., Romera-Paredes B., Nikolov S., Jain R., Adler J., Back T., Petersen S., Reiman D., Clancy E., Zielinski M., Steinegger M., Pacholska M., Berghammer T., Bodenstein S., Silver D., Vinyals O., Senior A. W., Kavukcuoglu K., Kohli P., Hassabis D.. Highly accurate protein structure prediction with AlphaFold. Nature. 2021;596:583–589. doi: 10.1038/s41586-021-03819-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lin Z., Akin H., Rao R., Hie B., Zhu Z., Lu W., Smetanin N., Verkuil R., Kabeli O., Shmueli Y.. et al. Evolutionary-scale prediction of atomic-level protein structure with a language model. Science. 2023;379:1123–1130. doi: 10.1126/science.ade2574. [DOI] [PubMed] [Google Scholar]
- Xia Y., Xia C.-Q., Pan X., Shen H.-B.. GraphBind: protein structural context embedded rules learned by hierarchical graph neural networks for recognizing nucleic-acid-binding residues. Nucleic Acids Res. 2021;49:e51. doi: 10.1093/nar/gkab044. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Scarselli F., Gori M., Tsoi A. C., Hagenbuchner M., Monfardini G.. The graph neural network model. IEEE Trans. Neural Netw. 2009;20:61–80. doi: 10.1109/TNN.2008.2005605. [DOI] [PubMed] [Google Scholar]
- Sobolevsky, S. . Hierarchical graph neural networks. arXiv. 2021 doi: 10.48550/arXiv.2105.03388. [DOI] [Google Scholar]
- Wang H., Zhao L., Yu Z., Zeng X., Shi S.. CoNglyPred: Accurate prediction of N-linked Glycosylation sites using ESM-2 and structural features with graph network and Co-Attention. Proteomics. 2025;25:e202400210. doi: 10.1002/pmic.202400210. [DOI] [PubMed] [Google Scholar]
- Zhao L., Wang H., Shi S.. PocketDTA: an advanced multimodal architecture for enhanced prediction of drug–target affinity from 3D structural data of target binding pockets. Bioinformatics. 2024;40:btae594. doi: 10.1093/bioinformatics/btae594. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gou W., Tan Y., Liu C., Li M., Fan G., Yu H.. Graph with residue-based cross-modal framework enhances cell function-related protein properties prediction. J. Chem. Inf. Model. 2025;65:7493–7506. doi: 10.1021/acs.jcim.5c00856. [DOI] [PubMed] [Google Scholar]
- Wei S.-S., Jhang W.-E., Liu Y.-C., Chuang C.-C., Ou Y.-Y.. RTK_RAG: Leveraging retrieval augmented generation with multi-window convolutional neural networks for superior ATP binding site prediction in receptor tyrosine kinases. J. Chem. Inf. Model. 2025;65:7277–7284. doi: 10.1021/acs.jcim.5c00766. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Roche R., Moussad B., Shuvo M. H., Tarafder S., Bhattacharya D.. EquiPNAS: improved protein–nucleic acid binding site prediction using protein-language-model-informed equivariant deep graph neural networks. Nucleic Acids Res. 2024;52:e27. doi: 10.1093/nar/gkae039. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Satorras, V. G. ; Hoogeboom, E. ; Welling, M. . E(n) Equivariant graph neural networks. arXiv. 2021 doi: 10.48550/arXiv.2102.09844. [DOI] [Google Scholar]
- Song Y., Yuan Q., Zhao H., Yang Y.. Accurately identifying nucleic-acid-binding sites through geometric graph learning on language model predicted structures. Briefings Bioinf. 2023;24:bbad360. doi: 10.1093/bib/bbad360. [DOI] [PubMed] [Google Scholar]
- Elnaggar A., Heinzinger M., Dallago C., Rehawi G., Wang Y., Jones L., Gibbs T., Feher T., Angerer C., Steinegger M.. et al. ProtTrans: Toward understanding the language of life through self-supervised learning. IEEE Trans. Pattern Anal. Mach. Intell. 2022;44:7112–7127. doi: 10.1109/TPAMI.2021.3095381. [DOI] [PubMed] [Google Scholar]
- Jing, B. ; Eismann, S. ; Suriana, P. ; Townshend, R. J. L. ; Dror, R. O. . Learning from Protein Structure with Geometric Vector Perceptrons In International Conference on Learning Representations OpenReview; 2021. [Google Scholar]
- Zhang B., Hou Z., Yang Y., Wong K.-c., Zhu H., Li X.. SOFB is a comprehensive ensemble deep learning approach for elucidating and characterizing protein-nucleic-acid-binding residues. Commun Biol. 2024;7:679. doi: 10.1038/s42003-024-06332-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Huang, T. ; Song, Z. ; Ying, R. ; Jin, W. . Protein-nucleic acid complex modeling with frame averaging transformer. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, OpenReview; 2024. [Google Scholar]
- Zeng X., Wang H., Zhao L., Cheng Y., Zhou D., Shi S.. Uncertainty quantification and temperature scaling calibration for protein-RNA binding site prediction. J. Chem. Inf. Model. 2025;65:6310–6321. doi: 10.1021/acs.jcim.5c00556. [DOI] [PubMed] [Google Scholar]
- Jin L., Lang D., Lei N.. An optimal transport view of class-imbalanced visual recognition. Int. J. Comput. Vis. 2023;131:2845–2863. doi: 10.1007/s11263-023-01831-9. [DOI] [Google Scholar]
- Parkinson J., Hard R., Wang W.. The RESP AI model accelerates the identification of tight-binding antibodies. Nat. Commun. 2023;14:454. doi: 10.1038/s41467-023-36028-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jin, L. Research on long-tailed recognition based on optimal transport. Dalian University of Technology, 2024. [Google Scholar]
- Xia, Z. ; Pan, X. ; Song, S. ; Li, L. E. ; Huang, G. ; Vision transformer with deformable attention. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) IEEE; 2022; pp 4784–4793. [Google Scholar]
- Veličković, P. ; Cucurull, G. ; Casanova, A. ; Romero, A. ; Liò, P. ; Bengio, Y. . Graph attention networks. arXiv. 2018 doi: 10.48550/arXiv.1710.10903. [DOI] [Google Scholar]
- Yang J., Roy A., Zhang Y.. BioLiP: a semi-manually curated database for biologically relevant ligand-protein interactions. Nucleic Acids Res. 2012;41:D1096–D1103. doi: 10.1093/nar/gks966. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Yuan Q., Tian C., Yang Y.. Genome-scale annotation of protein binding sites via language model and geometric deep learning. eLife. 2024;13:RP93695. doi: 10.7554/eLife.93695. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Altschul S. F., Madden T. L., Schaffer A. A., Zhang J., Zhang Z., Miller W, Lipman D. J.. Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. Nucleic Acids Res. 1997;25:3389–3402. doi: 10.1093/nar/25.17.3389. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gao Y., Li W., Huang Y., Niu B., Fu L.. CD-HIT Suite: A web server for clustering and comparing biological sequences. Bioinformatics. 2010;26:680–682. doi: 10.1093/bioinformatics/btq003. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Remmert M., Biegert A., Hauser A., Söding J.. HHblits: lightning-fast iterative protein sequence searching by HMM-HMM alignment. Nat. Methods. 2012;9:173–175. doi: 10.1038/nmeth.1818. [DOI] [PubMed] [Google Scholar]
- Kabsch W., Sander C.. Dictionary of protein secondary structure: pattern recognition of hydrogen-bonded and geometrical features. Biopolymers. 1983;22:2577–2637. doi: 10.1002/bip.360221211. [DOI] [PubMed] [Google Scholar]
- Wu J.-S., Liu Y., Ge F., Yu D.-J.. Prediction of protein-ATP binding residues using multi-view feature learning via contextual-based co-attention network. Comput. Biol. Med. 2024;172:108227. doi: 10.1016/j.compbiomed.2024.108227. [DOI] [PubMed] [Google Scholar]
- Lin, T. Y. ; Goyal, P. ; Girshick, R. ; He, K. ; Dollár, P. . Focal loss for dense object detection. In IEEE International Conference on Computer Vision (ICCV), IEEE; 2017; pp 2999–3007. [DOI] [PubMed] [Google Scholar]
- Guo, C. A. ; Pleiss, G. ; Sun, Y. ; Weinberger, K. Q. . On calibration of modern neural networks. In 34th International Conference on Machine Learning, PMLR; 2017; Vol. 70. [Google Scholar]
- Diederik, K. ; Jimmy, B. . Adam: a method for stochastic optimization. In International Conference on Learning Representations. IEEE; 2014. [Google Scholar]
- Chicco D., Jurman G.. The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genomics. 2020;21:6. doi: 10.1186/s12864-019-6413-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Shen, S. ; Wu, S. ; Chen, J. ; Huang, Z. ; Deng, L. . GATBind: Accurate protein-RNA binding sites prediction via graph attention networks with pre-trained language model. In IEEE International Conference on Bioinformatics and Biomedicine (BIBM), IEEE; 2024; pp 85–90. [Google Scholar]
- Larose, D. T. ; Larose, C. D. . Discovering Knowledge in Data: an Introduction to Data Mining. John Wiley & Sons: Hoboken, NJ, 2005. [Google Scholar]
- Degroot M. H., Fienberg S. E.. The comparison and evaluation of forecasters. J. R. Stat. Soc. Ser. D: Stat. 1983;32:12–22. doi: 10.2307/2987588. [DOI] [Google Scholar]
- Ko Y. S., Parkinson J., Liu C., Wang W.. TUnA: an uncertainty-aware transformer model for sequence-based protein–protein interaction prediction. Briefings Bioinf. 2024;25:bbae359. doi: 10.1093/bib/bbae359. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Goswami H. N., Ahmadizadeh F., Wang B., Addo-Yobo D., Zhao Y., Whittington A. C., He H., Terns M. P., Li H.. Molecular basis for cA6 synthesis by a type III-A CRISPR-Cas enzyme and its conversion to cA4 production. Nucleic Acids Res. 2024;52:10619–10629. doi: 10.1093/nar/gkae603. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The data and code can be available at https://github.com/trustcm/DGSite.





