Research Article

Structure Aware Large Language Models for Accurate Prediction of RNA Secondary Structures

Qianwen Lu*
The University of Hong Kong, Hong Kong

* Corresponding author: [email protected]

Abstract

This study presents a structure-aware large language model for accurate prediction of RNA secondary structures directly from primary sequence. The model extends a transformer backbone with a dual-stream architecture that jointly encodes nucleotides and dot-bracket tokens, a grammar-constrained decoder that enforces context-free validity, and a graph-informed attention module that injects candidate base-pair priors during inference. Training is performed on 1.36×10⁶ sequence-structure pairs spanning 203±11 RNA families with lengths from 40 to 1,024 nucleotides. Evaluation on non-overlapping family-level splits shows that the proposed model achieves base-pair F1 scores of 0.884±0.012 on medium-length and 0.837±0.017 on long RNAs, outperforming thermodynamic and neural baselines by 0.041-0.079 absolute F1 while keeping bracket validity above 0.998±0.001. Ablation experiments indicate that grammar constraints account for 63.2±7.4% of the gain in structural validity, whereas graph fusion explains 58.9±6.1% of the improvement on long-range motifs. Despite richer structural bias, decoding throughput reaches 1.27×10³±84 sequences per second on commodity GPUs.

Keywords: RNA secondary structure; large language models; structure-aware decoding; graph representations; computational biology
Published: January 12, 2026
DOI: 10.54254/2755-2721/2026.31155
Volume: ACE Vol.219
pp. 58-64
Download PDF

References

  1. Lipka-Bartosik, P., Donatella, K., Aifer, M., Melanson, D., Perarnau-Llobet, M., Brunner, N., & Coles, P. J. (2024, December). Thermodynamic algorithms for quadratic programming. In 2024 IEEE International Conference on Rebooting Computing (ICRC) (pp. 1-13). IEEE.
  2. Li, S., Li, S., & Wang, Z. (2024). Accelerating chiller sequencing using dynamic programming. Energy and Buildings, 325, 115037.
  3. Moveh, S., Merchán-Cruz, E. A., Ibrahim, A. O., Elhassan, Z. A. M., Ramadan Abdelhai, N. M., & Abdelrazig, M. D. (2025). Thermodynamic Optimization of Building HVAC Systems Through Dynamic Modeling and Advanced Machine Learning. Sustainability, 17(5), 1955.
  4. Franceschi, L., Donini, M., Perrone, V., Klein, A., Archambeau, C., Seeger, M., ... & Frasconi, P. (2024). Hyperparameter optimization in machine learning.  arXiv preprint arXiv: 2410.22854.
  5. Bach, P., Schacht, O., Chernozhukov, V., Klaassen, S., & Spindler, M. (2024, March). Hyperparameter tuning for causal inference with double machine learning: A simulation study. In Causal learning and reasoning (pp. 1065-1117). PMLR.
  6. Gomes Mantovani, R., Horváth, T., Rossi, A. L., Cerri, R., Barbon Junior, S., Vanschoren, J., & Carvalho, A. C. D. (2024). Better trees: an empirical study on hyperparameter tuning of classification decision tree induction algorithms. Data Mining and Knowledge Discovery, 38(3), 1364-1416.
  7. Lazuka, M., Anghel, A., & Parnell, T. (2024, November). Llm-pilot: Characterize and optimize performance of your llm inference services. In SC24: International Conference for High Performance Computing, Networking, Storage and Analysis (pp. 1-18). IEEE.
  8. Rainio, O., Teuho, J., & Klén, R. (2024). Evaluation metrics and statistical tests for machine learning. Scientific Reports, 14(1), 6086.
  9. Salmanpour, M. R., Alizadeh, M., Mousavi, G., Sadeghi, S., Amiri, S., Oveisi, M., ... & Hacihaliloglu, I. (2025). Machine Learning Evaluation Metric Discrepancies Across Programming Languages and Their Components in Medical Imaging Domains: Need for Standardization. IEEE Access.
  10. Tam, T. Y. C., Sivarajkumar, S., Kapoor, S., Stolyar, A. V., Polanska, K., McCarthy, K. R., ... & Wang, Y. (2024). A framework for human evaluation of large language models in healthcare derived from literature review. NPJ digital medicine, 7(1), 258.