Abstract
The prediction accuracy of RNA’s tertiary structure remains a core challenge in the field of computational biology. Existing models frequently encounter significant challenges due to the complexities of diverse topologies and the intricate nature of long-range interactions. We introduce RNAFoldDiff, a generative framework that integrates a sequence-aware graph transformer with a geometric diffusion process for end-to-end RNA 3D structure prediction. RNA sequences and secondary structures are converted into graph representations that capture backbone connectivity and base pair topology. The transformer models local motifs and global dependencies, while the diffusion module iteratively denoises coordinates into physically consistent conformations. The model was pretrained on more than 15,000 structural motifs from the RNA 3D Hub and fine-tuned on complete RNAs from the RNA-Puzzles dataset. In benchmarking tests, RNAFold-Diff achieved an average root mean square deviation (RMSD) of 2.64 Å, a Global Distance Test (GDT) score of 68.7%, and a base pair accuracy of 89.5%, reducing RMSD by nearly 30% and improving GDT by 9 points compared to RoseTTAFoldNA. The framework also outperformed FARFAR2, SimRNA, and RNAformer. Ablation experiments confirmed the contributions of diffusion refinement, edge-aware graph encoding, and motif-level pretraining, while qualitative analyses showed biologically plausible folds including helices, junctions, and multiloops. By combining topology-aware graph learning with generative diffusion, RNAFoldDiff advances RNA tertiary structure modeling and provides a practical tool for RNA design, ribozyme analysis, and structure-guided drug discovery.
1. Introduction
RNA molecules fold into complex three-dimensional conformations that enable catalysis, regulation, and molecular recognition. Beyond their canonical role in gene expression, functional RNAs such as ribozymes, riboswitches, long non-coding RNAs, and viral genomes demonstrate that tertiary structure is central to biological activity [1,2]. Accurate prediction of RNA tertiary structure from sequence is therefore both a fundamental problem in molecular biology and a key enabler of RNA-based therapeutics, vaccine development, and synthetic biology [3].
Despite its importance, accurately predicting the three-dimensional structure of RNA remains a significant challenge. Classical methods, such as FARFAR2, SimRNA, and VFold3D, use thermodynamic modeling or coarse-grained sampling. These methods are highly susceptible to being fooled by simple environments [4]. Physical heuristics guide these methods. Such methods struggle to handle long-range interactions and complex junctions. Their dependence on manual feature extraction and energy functions often leads to incomplete or inaccurate predictions, especially in flexible or irregular folds [5].
In protein structure prediction, deep learning has transformed the field. AlphaFold2 demonstrated that end-to-end learning from sequence to structure can achieve high accuracy [6]. More recently, diffusion-based generative models reframed structure prediction as a stochastic denoising process, producing conformations that are both accurate and physically consistent [7]. These advances suggest that data-driven generative modeling can overcome many of the limitations of deterministic or rule-based pipelines.
Extending these innovations to RNA has proven more challenging. Early learning-based frameworks such as RNAformer, RoseTTAFoldNA, and SPOT-RNA emphasized base pair probabilities or secondary structure features rather than full 3D atomic coordinates [8]. More recent systems, including DRfold and RhoFold+, have advanced tertiary modeling with transformer and graph-based architectures. However, these approaches still face trade-offs between geometric fidelity, secondary structure preservation, and biological plausibility. To date, no unified generative model has successfully integrated sequence, secondary topology, and three-dimensional coordinates into a single data-driven framework [9].
To address this gap, we present RNAFoldDiff, a generative framework that unifies a sequence-aware graph transformer with a geometric diffusion model for RNA 3D prediction. RNAFoldDiff encodes nucleotide identity and secondary structure into topology-preserving graphs, processes them with a motif-pretrained transformer, and refines coordinates through a denoising diffusion generator. Pretraining on motifs from the RNA 3D Hub followed by fine-tuning on RNA-Puzzles full-length RNAs enables the model to capture both local motifs and global folds. Extensive evaluations show that RNAFoldDiff outperforms both classical and learning-based baselines in terms of RMSD, GDT, torsion angle accuracy, and base pair fidelity.
The contributions of this work are summarized as follows:
- 1.
- Sequence-aware graph transformer encoder. A topology-preserving encoder that integrates nucleotide identity, positional context, and base pair interactions.
- 2.
- Geometric diffusion generator. A denoising diffusion process conditioned on graph embeddings to reconstruct full-atom RNA 3D structures.
- 3.
- Two-stage training strategy. Motif-level pretraining on RNA 3D Hub followed by fine-tuning on RNA-Puzzles to balance local motif knowledge with global fold formation.
- 4.
- Comprehensive evaluation. Benchmarking against classical and learning-based baselines with ablation studies confirming the role of each module.
The remainder of this paper is organized as follows. Section 2 reviews prior work relevant to RNAFoldDiff. We first examine classical and learning-based approaches for RNA structure prediction, highlighting their strengths and limitations in capturing tertiary folds. We then discuss advances in graph-based learning that motivate our sequence-aware graph representation. Finally, we will discuss the present status of research into the biomolecular structure diffusion models, which offer the basis of our geometric refinement approach. This places the RNAFoldDiff method among existing algorithms and clarifies how the proposed framework addresses gaps in accuracy, generalization, and biological plausibility. Section 3 describes the datasets, graph construction, model architecture, diffusion process, and training methodology. Section 4 presents the evaluation metrics, baseline comparisons, ablation studies, and qualitative analyses. Section 5 interprets the findings and discusses biological relevance and limitations. Finally, Section 6 concludes the study and outlines future research directions.
2. Related Work
Predictions of RNA structures have evolved from classical computer simulations to various energy-based modeling and fragment assembly techniques to modern machine learning methods, although precise recovery of the full 3D prediction of folds purely from sequence information has remained an open challenge. This one examines four main approaches from previous work: traditional RNA modeling approaches, learning-based models for RNA prediction, graph-based learning for representation, and diffusion-based generative models for generating 3D structures. A comparison across these directions highlights persistent gaps in unifying sequence information with topology-aware graph encoding and in applying generative diffusion directly to RNA. The following subsections examine each of these paradigms in detail, beginning with traditional RNA structure prediction methods.
2.1. Traditional RNA Structure Prediction Methods
Early computational methods for RNA 3D modeling were grounded in thermodynamic optimization, fragment assembly, and physics-inspired sampling. These approaches established the foundation for RNA folding studies, yet they often struggled to capture tertiary interactions and the diversity of global topologies observed in non-coding RNAs.
Zhou et al. [10] introduced FebRNA, a fragment-ensemble method that assembles non-redundant coarse-grained fragments guided by secondary structure, ranks candidates with a statistical scoring function (cgRNASP-Feb), and rebuilds top candidates into all-atom models for refinement. FebRNA achieved competitive RMSD on RNA-Puzzles and RNA-New, often surpassing 3dRNA and RNAComposer. However, the method lacks data-driven learning, which restricts its ability to leverage sequence information directly.
Watkins et al. [11] developed FARFAR2, a Rosetta-based pipeline that generates candidate structures by fragment sampling and optimizes them with an improved all-atom energy function. Automated fragment ranking and enhanced scoring improved accuracy on non-canonical motifs and global folds, and evaluations on RNA-Puzzles showed gains in RMSD and native contact recovery over earlier Rosetta variants. The approach depends on predefined secondary structures and extensive sampling, which limits scalability and generalization across diverse RNA families.
Together, classical methods [10,11] have demonstrated the feasibility of RNA tertiary modeling but also underscore the limitations of physics-based heuristics and exhaustive sampling. Their reliance on handcrafted rules has left a gap for end-to-end frameworks that combine sequence awareness with generative modeling. These limitations have motivated the development of deep learning approaches for RNA structure prediction, reviewed in the next subsection.
The foundational methods, such as MC-Fold/MC-Sym, FARNA, SimRNA, and RNAComposer, among others (e.g., TiRNA, BRiQ, iFold), are efficient in modeling small- to large-sized structured RNAs based on their given secondary structures. However, the limited number of experimental structures in the Protein Data Bank (PDB) makes it difficult to find appropriate template RNAs for a given target RNA [12,13].
2.2. Deep Learning-Based Approaches in RNA
Deep learning has advanced RNA structure modeling, particularly for secondary structure prediction and contact map estimation. Convolutional, recurrent, and transformer-based models have improved efficiency and base pairing accuracy, yet most frameworks stop short of reconstructing full 3D conformations, which limits their impact on tertiary prediction.
Wang et al. [14] surveyed deep learning methods for RNA, covering Convolutional Neural Networks (CNNs), Long Short-Term Memory networks (LSTMs), transformers, and large language models such as RNA Foundation Model (RNA-FM) and RNA Multiple Sequence Model (RNA-MSM). They categorized approaches into contact-map predictors, geometry-based regressors, and end-to-end pipelines such as RhoFold and RoseTTAFoldNA, and also discussed diffusion-inspired models including RNADiffFold. The review highlighted accuracy gains but noted persistent generalization issues, particularly for synthetic RNAs and RNA–protein complexes.
Tan et al. [15] proposed RNAstructureNet, an end-to-end pipeline with graph-based message passing and residual refinement for RNA tertiary prediction. The model outperformed fragment-based methods in RMSD and base pair accuracy but still relied on sequential heuristics and did not incorporate a generative mechanism for 3D coordinate modeling.
Szikszai et al. [16] introduced RNA3DB, a curated dataset that reduces redundancy and prevents data leakage in training and evaluation. This resource supports more reliable benchmarking of folding models and mitigates overfitting, although it is not a predictive framework.
Ahmed et al. [17] applied DeepSHAP to interpret AlphaFold2’s predictions, underscoring the importance of explainability in structural modeling. Yang et al. [18] developed TU-Fold, a transformer–U-Net hybrid for RNA secondary structure that improved F1 and Infinity (INF) scores over UFold and E2Efold, but it remains limited to secondary prediction. Additional deep learning applications in RNA biology and molecular modeling [19,20] illustrate the breadth of techniques but do not address full 3D RNA folding.
Wang et al. [21] presented trRosettaRNA, an automated deep learning approach for RNA 3D structure prediction. The proposed methodology uses a transformer network to predict 1D and 2D geometries, and 3D structure folding by energy minimization. This method highlights the promise of deep learning in advancing RNA tertiary structure prediction, while synthetic RNAs remain challenging.
Abramson et al. [22] proposed AlphaFold3. This model expands the deep learning breakthroughs of AlphaFold2 by incorporating RNA and RNA–protein complexes, enabling atomic-level predictions beyond proteins. Early benchmarks show that AlphaFold3 achieves competitive accuracy against experimental data, but it struggles with highly flexible or synthetic RNAs.
Together, these studies [14,15,16,17,18,19,20,21,22] demonstrate the potential of deep learning for RNA modeling but also reveal persistent gaps: the absence of unified generative frameworks for 3D coordinate prediction, limited integration of topology-aware graph encodings, and insufficient explainability for biological interpretation. These limitations motivate the use of graph-based learning frameworks, which are reviewed in the next subsection.
2.3. Geometric Deep Learning and Graph Neural Networks (GNNs) in Molecular Modeling
Graph-based learning fits RNA molecules well because nucleotides and their interactions, such as canonical and non-canonical base pairs, stacking, and tertiary contacts, create a graph-structured system. While graph neural networks (GNNs) effectively capture these relational dependencies, most studies on RNA have focused on contact prediction or sequence-level tasks instead of reconstructing full 3D coordinates.
Recent work in geometric deep learning demonstrates that equivariant graph models can represent both local and global geometric features in complex biological structures, as shown in [23] through the analysis of 3D cellular morphology. Shah et al. [24] employed convolutional and transformer-based classifiers for RNA methylation site prediction, and ref. [25] developed a transformer model for RNA–protein interactions; however, these efforts remain focused on functional or sequence-level predictions rather than tertiary structure formation. Zhou et al. [26] highlighted the potential of GNNs and equivariant learning for modeling RNA’s conformational diversity in RNA-directed drug discovery. Haga et al. [27] applied GCN, GAT, and GIN architectures to identify small-molecule inhibitors of miR-21, thereby further illustrating the application of graph-based approaches within RNA-related workflows. Thill et al. [28] introduced DeepFoldRNA, a method that captures complex, long-range interactions, making it efficient and highly accurate for ribozymes, riboswitches, and other challenging RNA families.
Collectively, these works [23,24,25,26,27,28] demonstrate the promise of GNNs and geometric learning for biomolecular modeling. However, their application to RNA remains limited, particularly regarding the generation of full 3D structures. RNA’s flexible backbone, long-range dependencies, and diverse tertiary motifs require models that can directly encode structural constraints rather than focusing solely on sequence or contact prediction. These gaps motivate the need for a generative mechanism capable of exploring RNA’s conformational landscape, setting the stage for the diffusion-based approaches introduced in the next subsection.
2.4. Diffusion Models for Molecular Structure Generation
Diffusion-based generative modeling enables high-fidelity sampling of 3D structures through iterative denoising. These methods have shown strong performance in proteins, ligands, and small molecules, but their application to RNA remains at an early stage.
Isert et al. [29] surveyed geometric deep learning in drug design and emphasized symmetry-aware architectures for diffusion-based generation in docking. Baillif et al. [30] reviewed 3D generative models spanning autoencoders, flows, and diffusion, noting significant success in small-molecule design. Choi et al. [31] introduced PIDiff, a physics-informed diffusion model for protein–ligand interactions that combined physical constraints with equivariant denoising. Hu et al. and Wang et al. [32,33] developed AlphaPanda for antibody design, integrating transformers, 3D CNNs, and diffusion. Xu et al. [34] proposed 3D-EDiffMG, a scaffold-based equivariant diffusion framework for molecular optimization, and Yang et al. [35] presented Conf-GEM, which generates 3D conformations using graph-based geometric encodings.
While these works [29,30,31,32,33,34,35] show that diffusion-based generative models can create diverse, chemically valid, and geometrically accurate 3D structures, they do not address the specific challenges of RNA tertiary structure prediction. RNA molecules have unique properties, such as extensive non-canonical base pairing, long-range tertiary contacts, and modular motifs, which differ fundamentally from proteins and small molecules. Current diffusion-based frameworks do not include RNA-specific graph encodings, secondary structure constraints, or motif-aware geometric priors.
To our knowledge, no prior work integrates RNA-tailored graph representations with an equivariant geometric diffusion process for end-to-end RNA 3D structure prediction. Addressing this methodological gap is the key motivation for developing RNAFoldDiff, and the limitations of current approaches are summarized in the following subsection on the research gap.
2.5. Research Gap
Despite steady progress, existing RNA structure prediction approaches remain limited in two fundamental ways. First, traditional and learning-based pipelines often treat sequence and topology separately, without fully integrating graph-aware encodings that capture the hierarchical dependencies of RNA folding. Second, although diffusion models have transformed protein and molecular modeling, their application to RNA is largely unexplored, and no framework currently unifies RNA-specific graph transformers with geometric denoising for direct 3D coordinate generation. This lack of an integrated generative framework defines a critical challenge in the field. A summary of representative methods and their limitations is provided in Table 1, which positions RNAFoldDiff relative to existing approaches. RNAFoldDiff addresses this challenge by combining sequence-aware graph representation, motif-level pretraining, and diffusion-based refinement into a unified architecture. The following section details the datasets, graph construction, model design, and training methodology of the proposed framework.
Table 1.
Representative methods for RNA 3D structure prediction, grouped by paradigm with their inputs, core strategies, and key limitations.
Recent community-wide assessments, such as CASP16, show that fully data-driven methods have not yet consistently outperformed hybrid or human-assisted techniques in predicting RNA 3D structures. This highlights the difficulties linked to the limited availability of high-quality RNA structural data, which can restrict the generalization ability of purely AI-driven models. Additionally, while recent deep learning frameworks like trRosettaRNA and AlphaFold 3 perform well on well-studied RNA families, their effectiveness decreases for RNAs that lack homologous sequence or structural information. These limitations emphasize the need for further development of hybrid approaches that combine data-driven learning with physical modeling and domain-specific knowledge. They also stress the importance of expanding high-quality RNA structural datasets.
3. Methodology
RNAFoldDiff is an end-to-end generative framework that integrates a sequence-aware graph encoder with a geometric diffusion model to predict RNA 3D structure. The pipeline takes sequence and secondary structure as inputs, constructs a topology-preserving graph, encodes this graph with a transformer, and refines atomic coordinates through an iterative denoising process. Figure 1 summarizes the major stages. The following subsections describe datasets, graph construction, feature encoding, the transformer and diffusion modules, and the training procedure.
Figure 1.
RNAFoldDiff architecture overview. Input RNA sequence and secondary structure are converted into a graph representation enriched with biologically meaningful features. A sequence-aware graph transformer encoder produces latent embeddings, which condition the geometric diffusion module to iteratively denoise coordinates into accurate 3D RNA structures.
3.1. Dataset Summary
To develop and evaluate RNAFoldDiff, we used two well-established RNA structural resources: RNA-Puzzles and the RNA 3D Hub. These datasets were selected to support two complementary phases of the pipeline: pretraining on localized structural motifs and fine-tuning on full-length RNA molecules with experimentally validated 3D structures.
The RNA-Puzzles dataset [36] contains approximately 180 high-quality RNA structures derived from community-wide blind prediction challenges. These molecules are typically medium-length (80–120 nucleotides) and are resolved at atomic resolutions ranging from to 3.5 Å. Due to their biological diversity and availability as complete structures, RNA-Puzzles was primarily used for fine-tuning RNAFoldDiff on global tertiary conformation prediction.
The RNA 3D Hub [37] provides a large repository of recurrent RNA structural motifs, including hairpins, internal loops, and multi-way junctions. From this source, we extracted more than 15,000 unique fragments with average lengths between 10 and 30 nucleotides. These motif-level structures were employed for pretraining the graph transformer component of RNAFoldDiff, allowing the model to learn localized folding patterns and topological priors before being applied to full-length molecules.
Both datasets are experimentally validated, publicly available, and widely cited in RNA structural biology. The key statistics are summarized in Table 2, which highlights the number of structures, sequence lengths, resolution ranges, and their roles within the RNAFoldDiff pipeline. A statistical distribution of sequence lengths, base pair counts, and motif diversity is shown in Figure 2.
Table 2.
Summary of datasets used in RNAFoldDiff. RNA-Puzzles provides full-length RNAs for fine-tuning, while RNA 3D Hub provides motif-level fragments for pretraining.
Figure 2.
Dataset statistics and distribution for RNA-Puzzles and RNA 3D Hub. (A) Sequence-length distribution for RNA-Puzzles; (B) Motif diversity across hairpins, internal loops, junctions, and multiloops for RNA-Puzzles; (C) Base pair counts for RNA 3D Hub motifs; (D) Motif diversity across hairpins, internal loops, junctions, and multiloops for RNA 3D Hub.
RNAFoldDiff was trained under a two-stage protocol that enforces strict boundaries between pretraining, fine-tuning, and final testing. During pretraining, RNA 3D Hub motifs were partitioned at the motif-cluster level to prevent structural redundancy across splits. RNA-Puzzles entries were then split into training and validation sets for fine-tuning, with a fully held-out subset reserved exclusively for final evaluation. Leakage was controlled through three complementary measures: excluding homologous or highly similar RNAs across partitions, removing overlapping motif fragments shared between RNA 3D Hub and evaluation targets, and ensuring that no test structure informed model selection or hyperparameter tuning. Baseline methods were grouped by input requirements—secondary-structure-dependent approaches (e.g., RNAComposer, 3dRNA, and Vfold-type methods) versus sequence-to-structure or geometry-prediction systems (e.g., trRosettaRNA and AlphaFold3-like models)—and the manuscript explicitly reports whether each baseline was run with native secondary structures, predicted secondary structures, or no secondary structure constraints.
3.2. Structural Motif Extraction
Motif-level structures represent fundamental building blocks of RNA tertiary organization, and pretraining RNAFoldDiff on these motifs provides inductive priors that improve generalization to full-length RNAs. By focusing on hairpins, internal loops, junctions, and multiloops, the model learns geometric and topological patterns that frequently recur in naturally occurring RNAs.
Structural motifs were obtained from the RNA 3D Hub, a curated resource of experimentally validated, non-redundant fragments. To ensure reliability, we applied strict filtering criteria: only motifs with resolution ≤ 3.5 Å were retained, overlapping entries with downstream RNA-Puzzles targets were removed, and incomplete fragments were excluded.
Each motif is modeled as a graph , where vertices are nucleotides and edges are canonical base pair interactions. The motifs were also labeled with class labels (), which enabled the encoder to learn structural regularities across different contexts. The resulting collection comprised more than 15,000 distinct motifs, balanced across different classes. Their distribution is summarized in Table 3, while Figure 2 illustrates overall motif diversity in the dataset. This balanced coverage ensured that the encoder was exposed to representative folding events during pretraining.
Table 3.
Distribution of RNA structural motifs from the RNA 3D Hub used for pretraining.
These curated motif graphs establish localized structural priors for the encoder, which are later enriched with the sequence and secondary structure annotations described in the following subsection.
3.3. Sequence Annotation and Secondary Structure Prediction
To bridge the gap between raw nucleotide sequence and spatial folding, RNAFoldDiff employs a structured preprocessing pipeline that augments sequence data with predicted secondary structure information. Raw sequence alone is insufficient to guide tertiary modeling, as base pairing interactions and contextual constraints are critical determinants of RNA folding. Therefore, thermodynamic priors are integrated at this stage to ensure biologically grounded inputs for downstream graph construction.
Secondary structure was predicted using the ViennaRNA package, which computes the base pairing probability matrix for a sequence of length L. Each element represents the probability that nucleotide forms a pair with nucleotide . For graph construction, base pairs with probabilities exceeding a fixed threshold were retained as edges according to the rule in Equation (1).
Beyond secondary structure, each nucleotide was annotated with additional biologically relevant descriptors, including nucleotide identity, sequential index, pairing status (paired/unpaired), and local context such as loop or junction membership. These annotations provided strong node-level features that informed the attention mechanism in the graph transformer encoder so that it could combine primary sequence information with priors on structure. By directly embedding thermodynamic priors into node and edge representations, RNAFoldDiff balances physical realism with flexibility in learning. This differs from previous energy-based approaches such as FARFAR2 and SimRNA, which depend significantly on manually crafted energy functions. Instead, RNAFold-Diff uses predicted base pairing probabilities to initialize structural constraints, whereas its generative diffusion process refines data-driven geometry at the atomic level.
The annotated sequence and base pair probability matrix thus provide the foundation for graph construction, where nucleotides are transformed into nodes and edges that encode both sequential continuity and structural adjacency. The details of this graph representation are described in the next subsection.
3.4. Graph Construction from Sequence and Structure
To enable learning over structured RNA inputs, each molecule was transformed into a graph representation that encodes both primary sequence information and predicted secondary structure. This transformation provides the foundation for the graph transformer encoder in RNAFoldDiff.
An RNA molecule of length L is represented as an undirected graph , where the node set corresponds to nucleotides and the edge set encodes biologically meaningful connections. Each node is initialized with a feature vector describing nucleotide identity, positional index, and pairing status, while edges denote sequential or structural interactions.
Graph construction involves three biologically motivated principles: (1) Backbone connectivity: Each nucleotide is connected to its sequential neighbours and , preserving the linear RNA chain. (2) Secondary structure interactions: Base pairing probability matrices are returned from secondary structure prediction. An edge is added if , and annotated with base pair type (A–U, G–C, G–U). (3) Motif-level extensions: For motif pretraining, other tertiary interactions, such as loop closures or junctions, are also included. It also includes the addition of cross-links to enrich graph diversity. Figure 3 illustrates this representation, where nodes correspond to nucleotides labeled by base identity and index. Colors distinguish bases (A = green, U = orange, G = blue, C = purple), black edges represent backbone continuity, and dashed edges denote predicted base pairs.
Figure 3.
RNA-to-graph conversion. Nodes represent nucleotides, colored and indexed for their identity (A = green, U = orange, G = blue, C = purple). Black lines show the linkage between backbone residues, and dotted lines show inferred base pair bonding based on the secondary structure.
These graph inputs with structure capture both sequential continuity and folding constraints, providing the inductive bias required for biologically realistic 3D reconstruction. In the next subsection, we detail the node and edge feature encoding scheme that enriches this representation with biologically meaningful descriptors.
3.5. Node and Edge Feature Encoding
In the case of RNAFoldDiff, every RNA graph contains biologically meaningful features at both the node and edge levels. This guarantees that the graph transformer encoder is provided with structured representation that combines the information of the sequence and the secondary structure, and topological constraints.
3.5.1. Node Features
Each node , representing nucleotide i, is initialized with a feature vector . This vector combines four descriptors: (1) one-hot encoding of nucleotide identity (A, U, G, C), (2) positional embedding to encode sequence order, (3) secondary structure flag indicating paired/unpaired state or loop context, and (4) optional experimental annotations such as normalized chemical reactivity scores.
The expression for the node feature vector is given by Equation (2):
where ǁ denotes concatenation, encodes base identity, provides positional context, encodes secondary structure state, and is optional reactivity input.
3.5.2. Edge Features
Edges are annotated with categorical and numeric attributes to characterize nucleotide–nucleotide interactions. Each edge feature vector includes (1) the type of edge (backbone, canonical base pair, non-can base pair), (2) the probability of observing the base pairing probability matrix, (3) Relative Sequence Distance , and (4) motif level tag to distinguish loop or junction edges.
This enables the incorporation of both the sequential continuity and structural constraints in the downstream tasks by the model. The entire description of the node and edge descriptors has been presented in Table 4; this table outlines the characteristics used in the construction of the graphs with their biological interpretations.
Table 4.
Node and edge features used in RNA graph representation.
By integrating these node and edge features, RNAFoldDiff constructs graphs of enriched RNA that retain local interaction patterns. Additionally, it can build global dependencies. This representation serves as the structured basis for the architecture outlined in the subsequent subsection.
3.6. RNAFoldDiff Architecture Overview
RNAFoldDiff involves designing an end-to-end generative model that predicts the tertiary structure of RNAs based solely on RNA sequences and secondary structures. The model combines graph representation learning with geometric diffusion processes, allowing for the framework to capture both the local motifs and the overall spatial arrangement. The architecture encompasses four key stages: graph construction, sequence-aware representation learning using a graph transformer encoder, generative diffusion for structural creation, followed by coordinate reconstruction.
Formally, given an RNA sequence of length L and its predicted secondary structure , RNAFoldDiff constructs a graph enriched with node and edge features as described in Section 3.5. The model then learns a mapping in Equation (3):
where determines the predicted 3D coordinates of all nucleotides.
A mapping which is realized in two steps: First, a graph transformer encoder processes the enriched graph to yield latent embeddings that capture both sequence continuity and structural dependencies. Second, a geometric Diffusion module generates 3D coordinates through iterative H-conditioned denoising in Equation (4):
The overall transformation can be given by Equation (5):
This emphasizes the integration of graph-based encoding and generative diffusion with a unified framework.
Figure 1 represents the RNAFoldDiff architecture. The input is transformed into graphs, to which vectors are added, before a comparison Table is enriched by node and edge features, and represented by graph transformer. Latent embeddings guide the geometric diffusion process, which reconstructs full-atom RNA coordinates consistent with biochemical constraints.
This architecture overview highlights how RNAFoldDiff unifies sequence-aware graph learning and geometric denoising into a single generative pipeline. In the following subsection, we describe the graph transformer encoder, which forms the representational backbone of the framework.
3.7. Graph Transformer Encoder
The graph transformer encoder in RNAFoldDiff is designed to integrate sequence identity with structural topology, enabling modeling of both local motifs and global dependencies. Unlike conventional transformers that operate on linear sequences, this encoder consumes sequence–structure graphs, where nodes represent nucleotides and edges encode backbone continuity and base pairing interactions (see Figure 1). This allows the encoder to learn biologically meaningful representations that respect RNA topology.
3.7.1. Multi-Head Graph Attention
For each node with embedding at layer l, attention coefficients are computed across its neighbors . The attention weight from node to is given in Equation (6):
where and are learned projection matrices and is the attention dimension. Node embeddings are then updated by Equation (7):
with the value projection and a non-linear activation.
3.7.2. Multi-Head Aggregation
To capture heterogeneous dependencies, multiple attention heads are used in parallel. For H heads, the aggregated representation is given by Equation (8):
where ǁ denotes concatenation. This enables the encoder to simultaneously capture canonical base pairs, non-canonical interactions, and sequential backbone continuity.
3.7.3. Gated Feature Fusion
To balance sequence-driven and structure-driven information, a gating mechanism is introduced by Equation (9):
where is the message-passing output from Equation (7), and is a learned scalar gate.
3.7.4. Motif-Level Pretraining
During pretraining on RNA 3D Hub motifs, the encoder was supervised to classify structural classes (hairpin, internal loop, junction, multiloop) while reconstructing latent embeddings. This motif-aware supervision exposed the encoder to recurrent folding templates, improving generalization to full-length RNAs. The core components of the graph transformer encoder and their roles are summarized in Table 5. This table links each mechanism to its purpose and corresponding equations.
Table 5.
Summary of graph transformer encoder components in RNAFoldDiff.
In summary, the graph transformer encoder leverages multi-head attention (Equation (6)–(8)), gated fusion (Equation (9)), and motif-level pretraining to generate structural embeddings. These embeddings preserve both nucleotide identity and topological context, and form the conditioning backbone for the diffusion-based generative module downstream.
3.8. Geometric Diffusion Module
The geometric diffusion module forms the generative backbone of RNAFoldDiff, responsible for transforming noisy conformations into realistic RNA 3D structures. Unlike deterministic coordinate regressors, the diffusion process explicitly models structural variability and captures the conformational heterogeneity of RNA molecules. The module is composed of a forward noise corruption process, a reverse denoising trajectory conditioned on graph embeddings, and a training objective that combines denoising score matching with geometric fidelity.
3.8.1. Forward Diffusion Process
In the forward process, experimentally resolved RNA coordinates are gradually corrupted by Gaussian noise over T timesteps, producing intermediate states . Formally, the transition at step t is shown in Equation (10):
where is the variance schedule at timestep t. At the final step T, approximates an isotropic Gaussian distribution, providing the starting point for generative sampling.
Different noise schedules can be used to define the variance sequence . Figure 4 compares linear and cosine schedules over timesteps. Linear schedules increase variance uniformly, while cosine schedules introduce noise more smoothly at early steps and more aggressively at later steps, which has been observed to improve convergence stability.
Figure 4.
Cumulative noise schedules over timesteps. Linear scheduling increases variance uniformly, while cosine scheduling introduces smoother early noise and stronger late noise. The cosine strategy provides more stable training and lower RMSD in RNAFoldDiff.
The comparison between linear and cosine schedules is summarized quantitatively in Table 6. While both strategies are valid, the cosine schedule consistently produced lower RMSD and improved stability, making it the default setting in RNAFoldDiff.
Table 6.
Comparison of linear and cosine noise schedules in RNAFoldDiff (averaged over 5 runs). Cosine scheduling yields lower RMSD and improved training stability.
3.8.2. Reverse Denoising Process
To recover valid RNA geometries, the reverse process is parameterized by a score network conditioned on graph embeddings . Starting from an isotropic Gaussian , the network iteratively denoises to reconstruct . At each timestep t, the score function is defined by Equation (11):
where G encodes nucleotide identity, base pair connectivity, and topological features. The score network predicts gradients that guide the trajectory toward valid molecular geometries, ensuring that base pair interactions, torsional constraints, and backbone connectivity are preserved throughout the denoising process.
3.8.3. Training Objective
The network is trained with a combination of denoising score matching (DSM) and geometric reconstruction loss. DSM minimizes the squared distance between the score and the actual noise perturbation, while the geometric loss constrains the geometry to be faithful to the shape, which is known as a root mean square deviation (RMSD).The component will be given by Equation (12):
where L is the number of nucleotides and and denote predicted and experimental coordinates, respectively. The final training objective combines both terms by Equation (13):
where is the balancing coefficient, which maintains the contribution of geometric fidelity. This common objective allows RNAFoldDiff in generating conformations that were both physically feasible, plausible, and consistent with experimentally resolved folds.
In summary, the geometric diffusion module combines the forward corruption process (Equation (10)), the reverse denoising (Equation (11)), and the joint DSM + RMSD training objective (Equation (13)). This will make RNAFoldDiff capable of generating RNA tertiary structures which retain constraints on secondary structure while reaching atomic accuracy. In the next section, the training strategy employed for optimization on this framework will be described.
3.9. Training Strategy
The training strategy for RNAFoldDiff was designed to combine fine-grained motif-level priors with global folding awareness. This two-stage process first exposes the encoder to recurrent structural motifs before fine-tuning on full-length RNAs, followed by optimization and computational refinements to ensure robust convergence.
3.9.1. Motif-Level Pretraining
In this first step, structural motifs derived from the RNA 3D Hub were used as input for training. Each motif was characterized according to its structural category. These are hairpin, internal loop, junction, or multiloop configurations. The encoder must learn the folding patterns with a dual objective that effectively complements one another: (1) “classification loss ” requiring the encoder to identify motif categories, and (2) a graph reconstruction loss to steer the learning process towards the restoration of the link patterns from the embeddings.
The total loss function is formulated in Equation (14):
where balances classification and reconstruction. This stage strengthened the encoder’s ability to capture local motifs and topological priors, improving downstream performance on full-length RNAs.
3.9.2. Fine-Tuning on Full-Length RNAs
In the second stage, the RNA graphs obtained from the RNA-Puzzles dataset were employed to fine-tune the model. The encoder embeddings obtained from were transmitted to the geometric diffusion process, which yielded full-atom 3D structures. Supervised training comprised denoising score matching and RMSD-based reconstruction, as defined in Equation (13). This hierarchical approach enabled RNAFoldDiff to apply knowledge of local motifs plus global fold dependencies.
3.9.3. Optimization and Regularization
Optimization was performed using Adam with , , an initial learning rate of , and cosine annealing decay. Weight decay () and gradient clipping (max-norm = 1.0) improved stability. To accommodate variable-length RNAs, a positional bucketing strategy was used. Early stopping was applied based on validation RMSD, with the best-performing checkpoint retained for inference.
3.9.4. Computational Details
All experiments were performed on a single NVIDIA A100 GPU with 80 GB memory and 512 GB host RAM. The requirement for pretraining with respect to RNA motifs was 18 h (100 epochs), but it took a total of 14 h (60 epochs).
The complete end-to-end model was trained in less than 32 h. The scaling of inference with RNA size was linear, requiring 1–3 s for RNAs of 80–100 nucleotides.
The full training setup, including dataset sources, objectives, optimizer parameters, and hardware configuration, is summarized in Table 7.
Table 7.
Training configuration and hyperparameters for RNAFoldDiff.
This staged training process enabled RNAFoldDiff to learn transferable motif-level patterns before adapting to global tertiary folds. The result was improved generalization and stability, forming a strong foundation for accurate RNA 3D prediction. In the next section, we provide pseudocode that consolidates the end-to-end inference pipeline.
3.10. Pseudocode of RNAFoldDiff
In order to consolidate the methodology and increase the level of reproducibility in the case at hand, the subsection under review offers pseudo-code for the inference pipeline of RNAFoldDiff.The process combines sequence-to-graph transformation, graph encoding, and geometric diffusion into a unified algorithm. The inference process is outlined in Algorithm 1, which demonstrates how RNAFoldDiff transitions from nucleotides to protein sequences, as well as from secondary structures to complete 3D atomic coordinates.
| Algorithm 1 RNAFoldDiff: Graph-Guided Generative Diffusion for 3D RNA Structure Prediction | |
| |
| 1: BuildGraph | ▹ construct sequence-aware RNA graph |
| 2: | ▹ encode graph with transformer encoder |
| 3: SampleNoise | ▹ initialize coordinates with Gaussian noise |
| 4: for down to 1 do | |
| 5: score | ▹ predict denoising gradient |
| 6: score | |
| 7: end for | |
| 8: return | ▹ final refined 3D RNA coordinates |
In the given pseudocode, the integration of graph-based representation learning using score-based generative diffusion models is presented, encompassing all the processes in the methodology. It also shows that the RNAFoldDiff features a modular design, as given under Section 4.
3.11. Implementation Details
The graph transformer encoder consists of stacked layers with multi-head attention ( heads). Each node embedding has dimensionality , and the key/query dimension is set to . A position-wise feed-forward network with hidden size 1024 is used within each transformer block.
The geometric diffusion module operates with steps under a linear noise schedule. The model is trained using a hybrid loss:
where and are empirically chosen balancing coefficients.
4. Results
This section presents a comprehensive comparison of RNAFoldDiff with multiple benchmarking datasets and criteria. The results are designed so that they stress both global accuracy and local structure fidelity, followed by error calibration, reliability, and the role of the components via ablation analysis. Together, these findings demonstrate that RNAFoldDiff achieves state-of-the-art performance in RNA 3D structure prediction while providing biologically meaningful and well-calibrated outputs.
4.1. Performance Evaluation Metrics
The performance of RNAFoldDiff was explored by applying four widely accepted methods of structural comparison in the field of RNA structure prediction, namely, the root mean square deviation (RMSD) test, the Global Distance Test (GDT) score, the error in torsion angles, and the accuracy of the base pairs.
The Root Mean Square Deviation (RMSD) quantifies the average distance between predicted and experimentally resolved atomic coordinates after optimal alignment. It is defined by Equation (15):
where and denote predicted and reference coordinates of atom i, and N is the total number of atoms.
The Global Distance Test (GDT) calculates the percentage of residues in the predicted structure that fall within predefined distance thresholds of the reference structure. It is calculated through Equation (16):
where is the indicator function and c specifies the tolerance cutoff in Ångströms.
Torsion angle error captures the angular deviation of backbone dihedral angles between predicted and reference structures. For each torsion angle (e.g., , , ), the error is given by Equation (17):
where M is the number of torsion angles considered. This is a measure of local conformational accuracy.
Base pair accuracy measures how well-predicted canonical base pairs are in agreement with experimentally validated secondary structure. It is described by Equation (18):
where , , , and denote true positives, true negatives, false positives, and false negatives, respectively.
These metrics provide a comprehensive assessment of RNAFoldDiff, balancing global fold fidelity (RMSD, GDT), local geometric consistency (torsion error), and biological plausibility (base pair accuracy). In the following subsections, results are reported in terms of these metrics.
4.2. Benchmarking Against State of the Art
RNAFoldDiff was benchmarked against a diverse set of RNA 3D structure prediction methods, including FARFAR2, SimRNA, RNAformer, and RoseTTAFoldNA, representing physics-driven fragment assembly, coarse-grained simulation, graph-based machine learning, and transformer-based approaches, respectively. Performance was assessed using RMSD (Equation (16)), GDT (Equation (17)), torsion angle error (Equation (18)), and base pair accuracy (Equation (19)).
As shown in Table 8, RNAFoldDiff consistently outperforms all baselines across every evaluation metric. It achieves the lowest RMSD (2.64 Å) and torsion angle error (), while also delivering the highest GDT () and base pair accuracy (). These improvements demonstrate the benefit of combining motif-level pretraining, topology-aware graph encoding, and geometric diffusion into a unified generative framework.
Table 8.
Benchmarking results of RNAFoldDiff compared to state-of-the-art RNA 3D structure prediction methods. Best scores are highlighted in bold.
RNAFoldDiff gives a relative improvement of >20% in GDT and >10% in base pair accuracy compared to the best-performing baseline, RoseTTAFoldNA, validating its ability to achieve both high global fold accuracy and reliable local geometry.
We recognize that the results in Table 8 come from single-run evaluations and lack standard deviations. Because the evaluation set is relatively small, this may limit our ability to capture the variability of the proposed method and the strength of the observed performance differences. We consider this a limitation of the current study. Future research will address this by conducting multiple independent runs with different random seeds and employing statistical significance testing for a more thorough and reliable comparison.
4.3. Local Per-Residue Accuracy
Although global metrics such as RMSD and GDT capture overall fold similarity, they do not reveal localized deviations in flexible regions such as loops or junctions. A finer-grained evaluation was therefore conducted by computing per-residue RMSD profiles across the evaluation molecules, illustrating structural fidelity along the full backbone rather than relying solely on global alignment.
As shown in Figure 5, RNAFoldDiff outperforms the baselines in per-residue RMSD for three representative RNA targets. The gains are particularly pronounced in helical and junction regions, where precise base stacking and hydrogen-bond geometry are critical, and where conventional approaches tend to show greater variability.
Figure 5.
Per-residue RMSD profiles for three representative RNA structures. RNAFoldDiff (red) achieves lower deviations across helices and junctions compared to RoseTTAFoldNA (blue) and RNAformer (green), indicating better local structural fidelity.
Table 9 summarizes the average per-residue RMSD across the evaluation dataset. RNAFoldDiff yields the lowest overall error ( Å), significantly better than all baselines, which show larger deviations particularly in loop and junction residues. This confirms that RNAFoldDiff not only achieves high global accuracy but also offers fine-grained geometric consistency, a key requirement for modeling catalytic and regulatory RNAs where local motifs drive biological function.
Table 9.
Average per-residue RMSD (Å) across evaluation dataset. Best scores are highlighted in bold.
4.4. Contact Map and Error Heatmap Analysis
Global and local metrics provide a numerical overview of structural accuracy, but visual inspection of contact distributions and coordinate deviations offers additional insight. Long-range base pairing and loop–helix interactions play a primary role in RNA tertiary structure but are frequently misrepresented by baseline methods.
Figure 6a presents a comparison of predicted versus reference contact maps for a representative RNA molecule. RNAFoldDiff reproduces both short-range and long-range base pair contacts with high fidelity, while baselines frequently omit long-distance interactions. This indicates that the sequence-aware graph transformer successfully encodes secondary structure priors and that the diffusion process maintains consistency during coordinate generation.
Figure 6.
(a) Predicted vs. reference contact map showing that RNAFoldDiff preserves long-range base pair interactions. (b) Coordinate error heatmap highlighting reduced deviations in flexible regions compared to baseline models.
Figure 6b shows the coordinate error heatmap. RNAFoldDiff exhibits lower error variance, especially in junction and loop regions where other methods show greater deviations. These improvements stem from the combination of motif-level pretraining and graph-conditioned diffusion, which refines conformations iteratively rather than relying on one-shot predictions.
Collectively, these visualization analyses demonstrate that RNAFoldDiff not only achieves lower RMSD and torsion error (Equations (16) and (18)), but also preserves correct contact adjacency and reduced error spread, which is critical for modeling functional RNAs such as riboswitches and junction loops.
4.5. Case Studies: Structural Reconstructions
To further demonstrate the efficacy of RNAFoldDiff, qualitative case studies were conducted on a representative set of RNA molecules. While quantitative metrics such as RMSD and GDT (Equations (16) and (17)) confirm numerical superiority, visual inspection of the reconstructed structures highlights the biological plausibility of the predictions.
Figure 7 presents a full-length RNA reconstruction in which phosphate atoms (P) and the backbone are rendered in blue. RNAFoldDiff captures the general fold, including helices and multi-loop regions, with high geometric consistency relative to the experimental reference. Structural distortions commonly observed in fragment-based or sampling methods are largely absent.
Figure 7.
Example full-length RNA reconstruction: phosphate atoms (P) and the backbone are rendered in blue.
Figure 8 highlights a helical RNA backbone reconstructed by RNAFoldDiff. The predicted helix exhibits correct base stacking and hydrogen-bond alignment, illustrating that the diffusion process preserves local geometric constraints while maintaining the global fold. This is particularly important in RNA helices, where minor deviations can propagate into large conformational errors.
Figure 8.
Example RNA helical backbone reconstruction by RNAFoldDiff. The model accurately preserves base stacking and hydrogen-bond geometry, avoiding distortions typically observed in fragment-based methods.
These case studies validate that RNAFoldDiff produces biologically realistic folds and support the quantitative evidence presented above. The results also confirm model generalization across different secondary and tertiary RNA structural classes.
4.6. Calibration and Reliability Analysis
Beyond structural accuracy, a practical prediction framework must provide reliable confidence estimates. Calibration analysis assesses how well the predicted probabilities align with actual accuracy, an aspect that is often overlooked in RNA structure prediction. Poorly calibrated models may produce overconfident but incorrect predictions, which limits their utility in downstream biological applications.
Figure 9 shows calibration curves for RNAFoldDiff and the baseline methods. RNAFoldDiff achieves the closest alignment with the diagonal perfect-calibration line, indicating that its confidence scores reliably reflect actual prediction correctness. Some residual overconfidence is observed at high-probability thresholds, though it remains lower than in all baselines.
Figure 9.
Calibration curves for RNAFoldDiff compared to baseline methods. RNAFoldDiff achieves the best alignment with the diagonal (perfect calibration) line, reflecting well-calibrated confidence estimates.
Quantitative results are summarized in Table 10. RNAFoldDiff achieves the lowest Expected Calibration Error (ECE, 3.2%) and Maximum Calibration Error (MCE, 6.5%), significantly outperforming RNAformer and RoseTTAFoldNA. This demonstrates that RNAFoldDiff not only produces accurate folds but also provides trustworthy confidence estimates, a key requirement for clinical and experimental adoption.
Table 10.
Calibration analysis of RNAFoldDiff and baselines in terms of Expected Calibration Error (ECE, %) and Maximum Calibration Error (MCE, %). Best results are highlighted in bold.
These results show that RNAFoldDiff produces well-calibrated and reliable predictions, reducing the risk of misleading overconfidence and improving its applicability for high-stakes tasks such as therapeutic RNA design and structure-guided drug discovery.
4.7. Ablation Studies
To assess the contribution of each component, an ablation study was conducted on RNAFoldDiff. Four factors were evaluated individually: (i) motif-level pretraining, (ii) the gated feature fusion module in the graph transformer, (iii) the cosine noise schedule in the diffusion component, and (iv) the geometric diffusion module itself. All other experimental settings remained identical to those described in Section 3.
As shown in Table 11, removing motif pretraining results in a marked increase in RMSD and torsion error, emphasizing the importance of local motif knowledge for guiding global fold formation. Eliminating gated feature fusion reduces GDT by over , illustrating the role of adaptively balancing sequence and structural features. Replacing the cosine schedule with a linear schedule slightly degrades RMSD and calibration, confirming the stability gain associated with smoother variance progression. Finally, removing the diffusion module altogether causes the sharpest performance drop across all metrics, underscoring its central role in generating physically consistent 3D structures.
Table 11.
Ablation study results. Each row reports the performance of RNAFoldDiff with a specific component removed or modified. Best scores are highlighted in bold.
These ablation results confirm that all components contribute to the performance of RNAFoldDiff, with the diffusion module and motif pretraining being the most critical. The analysis highlights the synergy of graph-based representation learning and diffusion-driven generative modeling in achieving state-of-the-art RNA tertiary structure prediction.
Taken together, the benchmarking results, per-residue analysis, contact map evaluation, qualitative reconstructions, calibration studies, and ablation experiments confirm that RNAFoldDiff substantially advances the state of the art in RNA 3D structure prediction. By combining motif-level pretraining, topology-aware graph encoding, and a diffusion-based generative process, the framework achieves high global accuracy and fine-grained geometric consistency while maintaining reliable confidence estimates. These results establish RNAFoldDiff as a robust and trustworthy framework, laying the groundwork for the biological relevance analysis and discussion of limitations in the following section.
5. Discussion
The results presented in Section 4 demonstrate that RNAFoldDiff substantially advances RNA tertiary structure prediction by integrating sequence-aware graph encoding with geometric diffusion. On various global indices (Table 8), local per-residue accuracy (Figure 5, Table 9), and structural adjacency analysis (Figure 6), as well as calibration reliability (Figure 9, Table 10), the RNAFoldDiff method consistently outperformed the state-of-the-art classical methods and learning approaches. Our results clearly demonstrate the benefit of the RNAFoldDiff method not only in the accuracy but also in the calibration of confidence.
5.1. Biological Relevance of RNAFoldDiff Predictions
This would allow the local patterns to be captured accurately. The global folding patterns are mandatory for functional RNA modeling. RNAFoldDiff exhibited strong residue-level accuracy (Figure 5), which is crucial for the reconstruction of helical, loop, and multi-junction regions with low dispersions. These are very important in the modeling of riboswitch regulation mechanisms, ribozyme catalysis reactions, and interactions with long non-coding RNA.
Qualitative examples further highlight the biological realism of RNAFoldDiff predictions. Figure 7 shows that the method accurately reconstructs full-length RNA structures, including secondary structure elements and long-range contacts. Similarly, Figure 8 demonstrates correct helical backbone stacking and hydrogen-bond geometry, which are fundamental to maintaining RNA stability. These results indicate that RNAFoldDiff can faithfully recover the tertiary scaffolds required for molecular recognition and catalytic activity.
By accurately reconstructing biological folds, RNAFoldDiff has implications in the use of RNA in biomedicine. Examples include the rational design of biological systems such as synthetic riboswitches; functional annotation of non-coding RNAs; and discovery of druggable RNA motifs in viral genomes. The framework therefore fills the gap that exists between computational modeling and experimental RNA discovery.
5.2. Comparison with Existing Approaches
Classical methods such as FARFAR2 and SimRNA rely heavily on fragment assembly, handcrafted energy functions, and extensive sampling. While they can reproduce simple helices and canonical base pairs, their performance degrades substantially on RNAs with long-range interactions and multi-junction topologies. As shown in Table 8, both FARFAR2 and SimRNA exhibit RMSD values exceeding 5 Å, confirming their limited scalability and inability to generalize beyond predefined motifs.
However, improvements have been made, especially through the utilization of transformers made possible by RoseTTAFoldNA.These protocols lower the average RMSD to – Å and raise GDT to almost , surpassing traditional pipelines. However, they are deterministic predictors, often producing overconfident results that lack reliability when applied to new RNA families. The calibration analysis in Figure 9 and Table 10 confirms that their confidence scores do not align well with actual correctness, posing risks in practical applications such as drug discovery.
We will also use sequence-aware graph encodings with a diffusion-based generative process.Such a combination provides the framework with the capability with the lowest RMSD of ( Å) and the highest GDT (), and better base pair accuracy (), as reported in Table 8.
More importantly, RNAFoldDiff provides reliable calibration and results in an ECE of only, whereas for RNAformer, it is almost twice as high (Table 10). These results thus underpin that RNAFoldDiff is not just an incremental extension of existing frameworks but a fundamental shift toward generative RNA structure modeling that is both accurate and trustworthy.
5.3. Practical Implications
The application value of RNA folding prediction models relies not only on accuracy but also on reliability and scalability. RNAFoldDiff solves this problem through well-calibrated confidence estimates, efficient inference, and direct applicability to biomedical workflows.
Calibration reliability: Well-calibrated models are crucial to experimental adoption when overconfident yet wrong predictions would result in wasted resources. Figure 9 and Table 10 show that RNAFoldDiff has achieved the lowest ECE of and MCE of for all tested methods. This means that probabilities reported from RNAFoldDiff will be trusted by the experimentalist for prioritizing RNA designs or selecting candidate structures for validation.
Inference scalability: Diffusion models are generally more computationally expensive compared to deterministic regressors. RNAFoldDiff achieves practical scalability. Inference requires only 1–3 s for RNAs of 80–120 nucleotides, which is suitable for high-throughput applications due to the low consumption of reagents (Section 3), such as large-scale functional screening of non-coding RNAs. This performance showcases the fact that generative diffusion can be done at scale without prohibitively expensive computation costs.
Biomedical use-cases: RNAFoldDiff’s accuracy and reliability will directly allow for integration into biomedical pipelines. The accurate reconstruction of helices and junctions (Figure 7 and Figure 8) supports the design of synthetic riboswitches and catalytic RNAs. With reliable calibration, the confidence in the identification of druggable RNA motifs improves, especially in viral genomes where structural targets are a priority.Additionally, the framework stands to expedite RNA vaccine development by predicting stable RNA scaffolds that preserve functional motifs.
These implications, taken in total, show that RNAFoldDiff is not only an improvement over the method but also a practical tool for accelerating RNA research and therapeutic applications design.
5.4. Limitations
Despite its strong performance, RNAFoldDiff has several limitations that should be acknowledged. These factors highlight opportunities for refinement and will guide future work.
Dataset size and diversity: Compared to protein structure prediction, the RNA datasets remain small. The RNA-Puzzles collection includes less than 200 full-length molecules and RNA 3D Hub provides motif-level fragments only. This limited diversity restricts the ability of RNAFoldDiff to generalize to rare or highly complicated RNA families. The expansion of the training corpus with further experimentally validated RNAs is crucial for scaling up performance.
Computational cost of diffusion: Although inference is efficient (1–3 s per medium-length RNA), the diffusion process requires multiple denoising steps, making training more computationally expensive than deterministic alternatives. This may limit accessibility for groups without high-performance computing resources, despite the gains in accuracy and calibration.
The size of the target sequence: The ongoing tests are centered on RNAs ranging in size from 80–120 nucleotides in length, as depicted in RNA-Puzzles. Long non-coding RNAs and viral DNA, as well as ribosomal subunits, fall outside the experimental domain of RNAFoldDiff but could be covered by future extensions of the framework using concepts like multiscaling.
Exclusion of RNA–protein and RNA–ligand complexes: RNAFoldDiff currently models RNA molecules in isolation. Many functional RNAs interact with proteins, ligands, or ions that strongly influence their conformations. This absenteeism of the explicit modeling of the RNA–protein or RNA–ligand interactions is a crucial limitation regarding direct biological applications.
In acknowledging such limitations, we offer a clear understanding of the capabilities and limitations of RNAFoldDiff. These capabilities, in turn, influence the improvements that will be explored in the next subsection.
5.5. Future Directions
The limitations identified above suggest several promising directions for extending RNAFoldDiff and broadening its impact.
Adding training data: Future studies should harness increasing and diverse RNA sequence datasets, incorporating structural knowledge that has been obtained through Cryo-EM, NMR, and high-throughput methods such as SHAPE-Seq. Integrating varying approaches will result in more effective supervision signals and will not lead to overfitting on benchmark datasets.
Scaling to longer RNAs: Adapting RNAFoldDiff for large non-coding RNAs and viral genomes requires new strategies for managing sequence length and structural complexity. Potential directions include hierarchical graph representations, segment-based modeling, or multiscale diffusion processes that capture both local motifs and long-range interactions.
RNA–protein and RNA–ligand complexes: RNAFoldDiff needs to be extended in the RNA domain to incorporate binding molecules. This is because of the biological importance of accounting for the processes as implied above. Adding the protein interaction graph or ligand docking molecules into the constraints of the RNAFoldDiff algorithm could help to an extent in this respect because, in principle, it might allow for end-to-end modeling of RNA–protein and RNA–small molecule assemblies.
Applications in design and therapeutics: Beyond structure prediction, RNAFoldDiff can be adapted for generative design of novel RNA molecules with specified structural or functional properties. Such capabilities would accelerate synthetic biology applications, including the design of riboswitches, catalytic RNAs, and RNA scaffolds for therapeutics and vaccines.
All of these points offer a guideline on how to tap into the potential benefits of RNAFoldDiff beyond its predictive capabilities, but rather as a technological platform qualified to generate beyond prediction.
In summary, the discussion highlights that RNAFoldDiff advances RNA tertiary structure prediction by combining accurate global folding, reliable local motif reconstruction, and well-calibrated confidence estimates. In comparison to classical fragment methods or deep learning paradigms, it has been made evident that RNAFoldDiff exerts a high level of sincerity and trustworthiness concerning biomedicine-related demands. Additionally, it is also quite visible that limitations associated with the scale of the data used, complexity calculations, coverage level in respect to the size of the sequence, or even the lack of interaction concerning RNA with proteins, create notable chances for further research. Taken together, these insights establish RNAFoldDiff as a robust step toward reliable RNA generative modeling, providing a foundation for the broader innovations outlined in the following conclusion.
6. Conclusions
In this study, the authors proposed RNAFoldDiff, which is a generative model that utilizes graph transformers that are sensitive to the nucleotide sequence with an incorporated geometric diffusion step to predict the 3D structures of RNAs from their sequences and secondary structures. RNAFoldDiff is an advancement of the state of the art regarding its three key contributions: (i) an atopology-preserving graph transformer encoder that is sensitive to nucleotides and their context, a geometric diffusion module for stepwise reconstruction of atomic coordinates via iterative denoising, and (ii) a two-stage training strategy integrating motif pretraining and subsequent RNA finetuning. Experiments on the test sets of the related works clearly indicate that RNAFoldDiff is the best model in terms of RMSD accuracy, GDT values, torsional angle accuracy, and base pair accuracy. Moreover, calibration analysis confirmed that RNAFoldDiff provides trustworthy confidence estimates, reducing overconfidence and enhancing its practical utility.
Author Contributions
Conceptualization, A.A.-R. and B.V.; methodology, A.A.-R., M.F.A.-H., B.V. and A.A.B.; software, B.V.; validation, A.A.-R., M.F.A.-H. and B.V.; formal analysis, A.A.-R., M.F.A.-H., B.V. and A.A.B.; investigation, A.A.-R. and B.V.; data curation, B.V.; writing—original draft, A.A.-R., M.F.A.-H., B.V. and A.A.B.; writing—review & editing, A.A.-R., M.F.A.-H., B.V. and A.A.B.; supervision, A.A.-R. and A.A.B. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The datasets used in this work are publicly available and ethically approved for academic research purposes. The RNA-Puzzles dataset is available online at http://www.rnapuzzles.org (accessed on 23 April 2026), while the RNA 3D Hub dataset can be accessed at https://rna.bgsu.edu/rna3dhub/ (accessed on 23 April 2026).
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Yang, S.; Pham, N.T.; Li, Z.; Baik, J.Y.; Lee, J.; Zhai, T.; Yu, W.; Hou, B.; Shang, T.; He, W.; et al. Advances in RNA secondary structure prediction and RNA modifications: Methods, data, and applications. arXiv 2025, arXiv:2501.04056. [Google Scholar] [CrossRef] [Scilit]
- Qiu, X. Robust RNA secondary structure prediction with a mixture of deep learning and physics-based experts. Biol. Methods Protoc. 2025, 10, bpae097. [Google Scholar] [CrossRef] [Scilit]
- Chaturvedi, M.; Rashid, M.A.; Paliwal, K.K. RNA structure prediction using deep learning—A comprehensive review. Comput. Biol. Med. 2025, 188, 109845. [Google Scholar] [CrossRef] [Scilit]
- Park, S.; Myung, S.; Baek, M. Advancing protein structure prediction beyond AlphaFold2. Curr. Opin. Struct. Biol. 2025, 90, 102985. [Google Scholar] [CrossRef] [Scilit]
- Zhang, J.; Zhao, F. Circular RNA discovery with emerging sequencing and deep learning technologies. Nat. Genet. 2025, 57, 1089–1102. [Google Scholar] [CrossRef] [Scilit]
- Gong, Z.; Jiang, Z.; Gao, W.; Zhuo, D.; Ma, L. A New Deep-learning-Based Approach For mRNA Optimization: High Fidelity, Computation Efficiency, and Multiple Optimization Factors. arXiv 2025, arXiv:2505.23862. [Google Scholar]
- Prabahar, A.; Zamora, R.; Barclay, D.; Yin, J.; Ramamoorthy, M.; Bagheri, A.; Johnson, S.A.; Badylak, S.; Vodovotz, Y.; Jiang, P. Unraveling the complex relationship between mRNA and protein abundances: A machine learning-based approach for imputing protein levels from RNA-seq data. NAR Genom. Bioinform. 2024, 6, lqae019. [Google Scholar] [CrossRef] [Scilit]
- Zhang, S.; Li, J.; Chen, S.J. Machine learning in RNA structure prediction: Advances and challenges. Biophys. J. 2024, 123, 2647–2657. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Guzman-Pando, A.; Ramirez-Alonso, G.; Arzate-Quintana, C.; Camarillo-Cisneros, J. Deep learning algorithms applied to computational chemistry. Mol. Divers. 2024, 28, 2375–2410. [Google Scholar] [CrossRef] [Scilit]
- Zhou, L.; Wang, X.; Yu, S.; Tan, Y.L.; Tan, Z.J. FebRNA: An automated fragment-ensemble-based model for building RNA 3D structures. Biophys. J. 2022, 121, 3381–3392. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Watkins, A.M.; Rangan, R.; Das, R. FARFAR2: Improved de novo rosetta prediction of complex global RNA folds. Structure 2020, 28, 963–976. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yuan, L.; Guo, Z.H.; Cao, W.J.; Luo, Y.; Shi, Y.Z. An integrated tool for RNA 3D structure prediction and analysis. In Proceedings of the 2021 33rd Chinese Control and Decision Conference (CCDC); IEEE: New York, NY, USA, 2021; pp. 4293–4297. [Google Scholar]
- Berman, H.; Henrick, K.; Nakamura, H.; Markley, J.L. The worldwide Protein Data Bank (wwPDB): Ensuring a single, uniform archive of PDB data. Nucleic Acids Res. 2007, 35, D301–D303. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wang, J.; Fan, Y.; Hong, L.; Hu, Z.; Li, Y. Deep learning for RNA structure prediction. Curr. Opin. Struct. Biol. 2025, 91, 102991. [Google Scholar] [CrossRef] [Scilit]
- Tan, Y.L.; Wang, X.; Shi, Y.Z.; Zhang, W.; Tan, Z.J. rsRNASP: A residue-separation-based statistical potential for RNA 3D structure evaluation. Biophys. J. 2022, 121, 142–156. [Google Scholar] [CrossRef] [Scilit]
- Szikszai, M.; Magnus, M.; Sanghi, S.; Kadyan, S.; Bouatta, N.; Rivas, E. RNA3DB: A structurally-dissimilar dataset split for training and benchmarking deep learning models for RNA structure prediction. J. Mol. Biol. 2024, 436, 168552. [Google Scholar] [CrossRef] [Scilit]
- Sibli, S.A.; Panagiotou, V.P.; Makris, C. Enhancing protein structure predictions: DeepSHAP as a tool for understanding AlphaFold2. Expert Syst. Appl. 2025, 286, 127853. [Google Scholar] [CrossRef] [Scilit]
- Yang, J.; Sato, K.; Loza, M.; Park, S.J.; Nakai, K. RNA secondary structure prediction by conducting multi-class classifications. Comput. Struct. Biotechnol. J. 2025, 27, 1449–1459. [Google Scholar] [CrossRef] [Scilit]
- Wei, J.; Lotfy, P.; Faizi, K.; Baungaard, S.; Gibson, E.; Wang, E.; Slabodkin, H.; Kinnaman, E.; Chandrasekaran, S.; Kitano, H.; et al. Deep learning and CRISPR-Cas13d ortholog discovery for optimized RNA targeting. Cell Syst. 2023, 14, 1087–1102. [Google Scholar] [CrossRef] [Scilit]
- Shen, C.; Luo, J.; Xia, K. Molecular geometric deep learning. Cell Rep. Methods 2023, 3, 100621. [Google Scholar] [CrossRef] [Scilit]
- Wang, W.; Feng, C.; Han, R.; Wang, Z.; Ye, L.; Du, Z.; Wei, H.; Zhang, F.; Peng, Z.; Yang, J. trRosettaRNA: Automated prediction of RNA 3D structure with transformer network. Nat. Commun. 2023, 14, 7266. [Google Scholar] [CrossRef] [Scilit]
- Abramson, J.; Adler, J.; Dunger, J.; Evans, R.; Green, T.; Pritzel, A.; Ronneberger, O.; Willmore, L.; Ballard, A.J.; Bambrick, J.; et al. Accurate structure prediction of biomolecular interactions with AlphaFold 3. Nature 2024, 630, 493–500. [Google Scholar] [CrossRef] [Scilit]
- De Vries, M.; Dent, L.G.; Curry, N.; Rowe-Brown, L.; Bousgouni, V.; Fourkioti, O.; Naidoo, R.; Sparks, H.; Tyson, A.; Dunsby, C.; et al. Geometric deep learning and multiple-instance learning for 3D cell-shape profiling. Cell Syst. 2025, 16, 101229. [Google Scholar] [CrossRef] [Scilit]
- Shah, S.; Jabeen, S.; ElAffendi, M.; Khan, I.; Anjum, M.A.; Bahloul, M.A. A Deep Learning based Multiple RNA Methylation Sites Prediction Across Species. Results Eng. 2025, 26, 104940. [Google Scholar] [CrossRef] [Scilit]
- Shen, X.; Hou, Y.; Wang, X.; Zhang, C.; Liu, J.; Shen, H.; Wang, W.; Yang, Y.; Yang, M.; Li, Y.; et al. A deep learning model for characterizing protein-RNA interactions from sequences at single-base resolution. Patterns 2025, 6, 101150. [Google Scholar] [CrossRef] [Scilit]
- Zhou, Y.; Chen, S.J. Advances in machine-learning approaches to RNA-targeted drug design. Artif. Intell. Chem. 2024, 2, 100053. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Haga, C.L.; Yang, X.D.; Gheit, I.S.; Phinney, D.G. Graph neural networks for the identification of novel inhibitors of a small RNA. SLAS Discov. 2023, 28, 402–409. [Google Scholar] [CrossRef] [Scilit]
- Thill, S. DeepFoldRNA: A Graph Neural Network for RNA 3D Structure Prediction. Bioinform. Code 2025, 1, 1–14. [Google Scholar]
- Isert, C.; Atz, K.; Schneider, G. Structure-based drug design with geometric deep learning. Curr. Opin. Struct. Biol. 2023, 79, 102548. [Google Scholar] [CrossRef] [Scilit]
- Baillif, B.; Cole, J.; McCabe, P.; Bender, A. Deep generative models for 3D molecular structure. Curr. Opin. Struct. Biol. 2023, 80, 102566. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Choi, S.; Seo, S.; Kim, B.J.; Park, C.; Park, S. PIDiff: Physics informed diffusion model for protein pocket-specific 3D molecular generation. Comput. Biol. Med. 2024, 180, 108865. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hu, Y.; Tao, F.; Xu, J.; Lan, W.; Zhang, J.; Lan, W. Combining transformer and 3DCNN models to achieve co-design of structures and sequences of antibodies in a diffusional manner. J. Pharm. Anal. 2025, 15, 101267. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.; Zhang, Z.; Zhang, G.; Wen, M.; Lu, H. Equivariant graph neural network-based accurate and ultra-fast virtual screening of small molecules targeting miRNA-protein complex. J. Pharm. Anal. 2025, 16, 101339. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Xu, C.; Liu, R.; Yao, Y.; Huang, W.; Li, Z.; Luo, H.B. 3D-EDiffMG: 3D equivariant diffusion-driven molecular generation to accelerate drug discovery. J. Pharm. Anal. 2025, 15, 101257. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yang, Z.; Xu, Y.; Pan, L.; Huang, T.; Wang, Y.; Ding, J.; Wang, L.; Xiao, J. Conf-GEM: A geometric information-assisted direct conformation generation model. Artif. Intell. Chem. 2024, 2, 100074. [Google Scholar] [CrossRef] [Scilit]
- RNA-Puzzles Community. RNA-Puzzles: A CASP-like Evaluation of RNA 3D Structure Prediction. Available online: http://www.rnapuzzles.org (accessed on 16 June 2025).
- Leontis, N.B.; Zirbel, E.N.; the RNA 3D Hub Team. RNA 3D Hub: A Database of RNA 3D Motifs and Structures. Bowling Green State University. Available online: https://rna.bgsu.edu/rna3dhub (accessed on 16 June 2025).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.








