Abstract
Deep learning (DL) methods have significantly advanced RNA secondary structure prediction. However, their ability to generalize to unseen, out-of-distribution RNA families remains a major challenge. We present BPfold, a framework that addresses this "generalization gap" by integrating thermodynamic physical priors into a neural network. By utilizing a pre-computed library of thermodynamic energies for local base-pair motifs, BPfold maintains high accuracy across diverse RNA families. Experiments demonstrate that BPfold outperforms state-of-the-art approaches in both accuracy and generalizability, offering a robust tool for discovering RNA structures and functionalities.
Introduction
Predicting the secondary structure of RNA—the specific pattern of base pairing—is essential for understanding its biological role and for therapeutic design. Traditional thermodynamic models, while grounded in physics, often struggle with complex structures like pseudoknots. Conversely, modern deep learning models offer speed and high accuracy on known datasets but often fail when encountering "out-of-distribution" sequences from unfamiliar RNA families. This lack of generalizability stems from the scarcity of experimentally validated RNA structures. BPfold bridges this gap by anchoring a deep learning architecture with fundamental thermodynamic priors, ensuring the model remains physically grounded even when data is sparse.
Methods: The BPfold Framework
BPfold combines the pattern-recognition capabilities of Transformers and Convolutional Neural Networks (CNNs) with the physical constraints of thermodynamics. The framework relies on two primary innovations: a comprehensive motif library and a specialized attention-based architecture.
The Base Pair Motif Library
The core of BPfold's physical grounding is a library of 75,990 motifs. Using de novo tertiary structure modeling (via BRIQ), the researchers calculated the thermodynamic energy for every possible "three-neighbor" base pair motif. This library serves as a physical "cheat sheet," allowing the model to query the stability of potential pairings for any input sequence.
BP-Former Architecture
The BP-Former architecture processes the RNA sequence alongside an "energy map" derived from the motif library. A custom Base Pair Attention Block fuses these features, allowing the attention mechanism to be "informed" by the thermodynamic stability of potential pairs. This ensures that the model's predictions are not just statistically likely based on training data, but also physically plausible.
Following the neural network's output, BPfold applies post-processing constraints to ensure biological validity, such as preventing "sharp loops" (fewer than two bases) and restricting pairings to canonical types like Watson-Crick and Wobble pairs.
Key Results and Generalization
BPfold was evaluated against gold-standard benchmarks, including RNAStrAlign and bpRNA-1m for training, and ArchiveII and Rfam for testing.
- Superior Generalization: On unseen RNA families in the Rfam dataset, BPfold achieved an F1 score of 0.791, significantly outperforming both previous DL models (e.g., SPOT-RNA at 0.777) and traditional thermodynamic models (~0.70).
- High Accuracy: On the ArchiveII dataset, BPfold reached an F1 score of 0.918, representing a 12.2% improvement over the next best method.
- Computational Efficiency: With a time complexity of $O(L^2)$, BPfold can predict structures for RNAs up to 1,000 nucleotides in less than 10 seconds.
The model also includes a "Confidence Index," which measures the alignment between the raw neural network output and the final constrained structure. This index correlates strongly with actual F1 scores, providing researchers with a reliable metric for assessing prediction quality on novel sequences.
Conclusion
By integrating physical laws directly into a deep learning framework, BPfold overcomes the traditional trade-off between the accuracy of data-driven models and the generalizability of physics-based models. While future work may expand the motif window size or further refine predictions for pseudoknots, BPfold represents a significant step forward in robust RNA structure prediction.
Summary updated