RNA Structure Prediction Algorithms
By Dr. Zubair Khalid, DVM, MS, PhD ·

Key Takeaways
- RNA structure prediction is foundational for understanding viral pathogenesis, genome packaging, replication, and immune evasion, with applications in veterinary diagnostics and systems biology.
- Traditional thermodynamic dynamic programming methods (e.g., Nussinov, Zuker algorithms) excel at predicting minimum free energy secondary structures for shorter RNAs but struggle with pseudoknots and long sequences.
- Machine learning and deep learning approaches, including CNNs, transformers, and GNNs, are increasingly employed to capture complex sequence-structure relationships and improve prediction accuracy, especially for longer and more intricate RNA architectures.
- Predicting conformational ensembles, rather than a single minimum free energy structure, is crucial as RNA molecules exist as dynamic populations of conformations, influencing cellular activity and function.
- Specialized algorithms are being developed for challenging RNA structures like circular RNAs and those involved in triplet repeats, as well as for predicting RNA-protein and RNA-small molecule interactions critical for antiviral drug design.
- The field is rapidly advancing with new methods integrating diverse data types (e.g., NMR, cryo-EM, SHAPE) and focusing on improving generalization across RNA families and enabling the prediction of tertiary contacts and large viral RNA genomes.
Introduction
Ribonucleic acid (RNA) molecules are central to a vast array of biological functions, including information transfer, enzymatic catalysis, and regulatory control. In viral systems, RNA structure determines genome packaging, replication efficiency, translation regulation, and evasion of host immune responses. Accurate prediction of RNA structure from sequence data is therefore a critical computational challenge in veterinary virology, diagnostics, and systems biology. This review provides an exhaustive, biophysically grounded analysis of the algorithmic approaches to RNA structure prediction, covering thermodynamic models, dynamic programming, machine learning, deep learning, and graph-based methods, with reference to the most recent literature.
The Hierarchical Nature of RNA Structure
RNA folding is a hierarchical process. Primary structure (the linear sequence of nucleotides) determines secondary structure (canonical base pairs: A-U, G-C, and G-U wobble pairs, stacked in helices, with unpaired regions forming loops, bulges, and junctions). Tertiary structure results from long-range interactions primarily mediated by pseudoknots, base triples, and non-canonical contacts. The nearest-neighbor thermodynamic model (NNTM) provides a free-energy parametrization for secondary structure formation. Algorithms for structure prediction can be classified by the level of detail they target and by the core computational strategy employed.
Thermodynamic and Dynamic Programming Methods
The foundation of secondary structure prediction rests on free-energy minimization through dynamic programming (DP). The Nussinov algorithm (1978) maximises the number of base pairs. The Zuker algorithm (1981) implements a recursive partition function formalism that computes the minimum free energy (MFE) structure using experimentally determined thermodynamic parameters.
Modern implementations such as RNAfold (ViennaRNA Package) and mfold extend these principles. The nearest-neighbor parameters for stacking and loop entropies are derived from optical melting experiments. Prediction accuracy for a single MFE structure is typically 70-80% for sequences shorter than 400 nucleotides, but declines with length and for sequences containing pseudoknots.
Pseudoknots represent a major structural class in viral RNAs (e.g., ribosomal frameshifting elements in coronaviruses and retroviruses). Pseudoknot prediction is NP-complete under the standard thermodynamic model. Heuristic DP algorithms such as PKnotsRG and IPknot use iterative or integer programming approaches. A recent advancement is Spark, a sparse hierarchical energy minimization framework that enables scalable pseudoknot prediction [<a href="#ref-1">1</a>]. Spark reduces computational complexity by exploiting the sparsity of base-pairing possibilities. The hierarchical analysis of pseudoknots via sections [<a href="#ref-2">2</a>] provides a formal decomposition method that can be integrated into DP engines. Additionally, chord diagrams and intersection graphs offer a topological formalism for classifying pseudoknot types [<a href="#ref-3">3</a>].
Machine Learning and Deep Learning Approaches
The limitations of purely thermodynamic methods have motivated a surge of machine learning (ML) and deep learning (DL) solutions. A comprehensive review by Sacco et al. [<a href="#ref-4">4</a>] categorises these approaches into sequence-based, contact-map-based, and hybrid models.
Convolutional Neural Networks and Attention Mechanisms
Convolutional neural networks (CNNs) capture local sequence motifs. The combination of convolutional block attention networks with ensemble learning enhances generalizability across RNA families [<a href="#ref-5">5</a>]. The TVAE-RNA method uses a transformer variational autoencoder to generate an ensemble of plausible structures [<a href="#ref-6">6</a>]. Transformer architectures, initially developed for natural language processing, can process long-range dependencies via attention layers. NTFold introduces structure-sensing nucleotide attention learning, where the attention matrix is explicitly guided by secondary structure constraints [<a href="#ref-7">7</a>].
Graph Neural Networks
RNA structure is naturally represented as a graph where nucleotides are nodes and base pairs are edges. Graph neural networks (GNNs) can learn to score candidate structures. Siciliano et al. [<a href="#ref-8">8</a>] apply graph transformers to infer the quality of protein-RNA models, while Jiang et al. [<a href="#ref-9">9</a>] develop a graph-learning-based scoring function for RNA-protein complexes. The TRAMbio package provides graph rigidity analysis of macromolecular structures, enabling evaluation of mechanical stability [<a href="#ref-10">10</a>]. For ncRNA-protein interaction prediction, personalized subgraph attention models improve accuracy [<a href="#ref-11">11</a>].
Language Models and Embeddings
Pre-trained RNA language models (e.g., RNA-BERT, RNA-MSM) generate context-aware embeddings that capture syntactic and structural features. These embeddings can be fine-tuned for downstream tasks such as binding site prediction. The CoBRA method predicts compound binding sites using an RNA language model [<a href="#ref-12">12</a>]. BioLLMNet employs a cross-LLM transformation network for RNA-interaction prediction [<a href="#ref-13">13</a>]. These models are particularly valuable when limited experimental structures are available for a given RNA family.
Conformational Ensembles and Equilibrium Folding
RNA molecules in solution do not adopt a single static structure but exist as an ensemble of conformations. The partition function approach (e.g., RNAfold -p) computes the probability of every possible base pair. Reweighting techniques based on NMR data can refine ensemble distributions. Leopold et al. [<a href="#ref-14">14</a>] integrated NMR and molecular dynamics (MD) to reveal differences in the conformational ensembles of GAAG and GCAA tetraloops after reweighting.
Geng et al. [<a href="#ref-15">15</a>] demonstrate that thermodynamic prediction of RNA cellular activity from sequence can be achieved via conformational ensembles, linking in vitro folding predictions to in vivo function. The RNAprecis method predicts full-detail RNA conformation from the experimentally best-observed sparse parameters, such as those from SHAPE or cryo-EM data [<a href="#ref-16">16</a>].
Probabilistic and Integer Programming Models
Integer programming (IP) offers an exact optimization framework for RNA structure prediction. Kato and Sato [<a href="#ref-17">17</a>] model joint secondary structures of interacting RNA molecules as an IP problem, enabling co-folding prediction. These methods are particularly applicable for viral genome packaging signals where two RNA segments must base-pair. The hierarchical analysis using sections [<a href="#ref-2">2</a>] also lends itself to IP formulations. Bayesian approaches, such as those underlying the MODENA web server [<a href="#ref-18">18</a>], allow in silico design of interacting RNA sequences by sampling from a posterior distribution of structures. Such methods are useful for engineering RNA-based therapeutics and for modelling viral recombination hotspots.
Specialized Algorithmic Domains
Circular RNAs
Circular RNAs (circRNAs) are covalently closed loops that form during back-splicing. Their structure prediction requires algorithms that enforce a circular constraint. Bernhart et al. [<a href="#ref-19">19</a>] provide a dedicated review of circRNA secondary structure prediction and target identification. The circIRES-DAF framework identifies internal ribosome entry sites in circRNAs [<a href="#ref-20">20</a>]. For circRNA-drug sensitivity associations, collaborative feature learning with graph structure learning has been applied [<a href="#ref-21">21</a>].
RNA Triplet Repeats and Branching
Triplet repeat expansions (e.g., in certain viral or host transcripts) form stable hairpins. Boehmer et al. [<a href="#ref-22">22</a>] present improved algorithms for predicting the structure of RNA triplet repeats and their interactions. Branching complexity is explored by Poznanovic et al. [<a href="#ref-23">23</a>, <a href="#ref-24">24</a>], who examine the interplay between geometric combinatorics and thermodynamic models to improve branching predictions.
RNA-Protein and RNA-Small Molecule Interactions
Predicting binding sites on RNA is crucial for understanding viral replication and for drug design. PROBind [<a href="#ref-25">25</a>] provides a web server for protein-nucleic acid binding residue prediction. The RLSFmode approach uses deep learning on molecular surfaces to predict RNA-small molecule binding modes [<a href="#ref-26">26</a>]. For small interfering RNA (siRNA) design, Ren et al. [<a href="#ref-27">27</a>] review computational resources that incorporate structure predictions. Sun et al. [<a href="#ref-28">28</a>] review advances and challenges in ML-based RNA-small molecule interaction modeling.
Databases and Benchmarking
Structure prediction algorithms rely on high-quality training data. The StructRMDB database catalogs RNA modification sites that affect secondary structure [<a href="#ref-29">29</a>]. The diverse database of de Lajarte et al. [<a href="#ref-30">30</a>] aims to narrow the generalization gap by including non-coding RNAs from multiple families. Blind code competitions, such as the one reported by Lee et al. [<a href="#ref-31">31</a>], compare template-based and ab initio predictions. Such benchmarks drive algorithmic refinement.
Mitigating Family Effects and Generalization
A persistent challenge is overfitting to structurally similar RNA families (family effects). Mokkedem et al. [<a href="#ref-32">32</a>] employ latent-space continual learning to mitigate these effects. The use of diverse training datasets [<a href="#ref-30">30</a>] and ensemble methods [<a href="#ref-5">5</a>] also improves cross-family generalization.
Algorithm Comparison: Strengths and Limitations
| Algorithm Category | Representative Methods | Strengths | Limitations |
|---|---|---|---|
| Thermodynamic DP | RNAfold, mfold, GernFold | Well-calibrated parameters; fast for short RNAs | No pseudoknots; single-structure bias |
| Pseudoknot DP | Spark, IPknot, PKnotsRG | Handles canonical pseudoknots | NP-complete for complex pseudoknots; slower |
| Deep Learning | TVAE-RNA, NTFold, SPOT-RNA | Captures complex patterns; high accuracy | Requires large training sets; black-box |
| Graph-based | GraphIRL, TRAMbio, GNN scoring | Interpretable; integrates with physics | Limited to known contact predictions |
| Conformational Ensemble | RNAfold -p, RNAprecis | Provides Boltzmann ensemble; accounts for dynamics | Computationally intensive for long RNAs |
| Integer Programming | IP for joint structures | Exact optimization; handles constraints | Scalability to long sequences |
Mermaid Diagram: Algorithm Selection Workflow
graph TB
A["RNA Sequence Input"] --> B{"Sequence Length?"}
B -->|"< 400 nt"| C{"Random coil or structured?"}
B -->|"> 400 nt"| D["Use deep learning or divide into domains"]
C -->|"Structured"| E["Thermodynamic DP (MFE)"]
C -->|"Random coil"| F["Partition function (ensemble)"]
E --> G{"Pseudoknots expected?"}
G -->|"Yes"| H["Sparse hierarchical DP (Spark)"]
G -->|"No"| I["Output MFE structure"]
F --> J["Use sparse reweighting (NMR/SHAPE constraints)"]
D --> K["Convolutional / Transformer model (NTFold, TVAE-RNA)"]
K --> L{"Pseudoknots?"}
L -->|"Yes"| M["Graph neural network with pseudoknot edges"]
L -->|"No"| N["Output structure probability map"]
H --> O["Validate against sequence covariation"]
O --> P["Final secondary+tertiary model"]
N --> P
M --> P
Conclusions and Future Directions
RNA structure prediction has evolved from purely thermodynamic DP to a rich ecosystem of ML, DL, and hybrid methods. For veterinary applications, accurate structure models are essential for understanding mechanisms of viral pathogenesis (e.g., internal ribosome entry sites in porcine coronaviruses, frameshifting signals in avian reoviruses), designing diagnostic probes, and predicting RNA-small molecule interactions for antiviral development. Key challenges include predicting long-range tertiary contacts from sequence alone, modeling large RNAs (viral genomes exceeding 10 kb), and integrating dynamic information from experimental constraints. The recent explosion of methods in the 2025-2026 literature indicates a rapid maturation of the field. Continued benchmarking and the development of interpretable models will be essential for clinical translation in veterinary medicine.