Abstract
RNA molecules play critical roles in biology and therapeutics, with their function intimately tied to their secondary structure. Designing RNA sequences that reliably fold into desired secondary structures, especially those with complex pseudoknots, remains a fundamental challenge. Here, we present Struct2SeQ, a reinforcement learning framework that leverages deep Q-learning to generate RNA sequences conditioned on target secondary structures and SHAPE reactivity constraints. By formulating RNA design as a sequential decision-making process, our model learns to construct sequences that not only fold into the intended structures but also exhibit experimentally consistent SHAPE profiles. Evaluated with experimental data from the OpenKnot 240mer pseudoknot design challenges, Struct2SeQ significantly outperformed humans and other automated design methods while generating diverse solutions that explore a broader sequence space compared to human players. The incorporation of SHAPE-informed rewards further enhances the chemical validity of generated sequences, as evidenced by improved OpenKnot scores. Our results demonstrate the potential of reinforcement learning for RNA design tasks, opening avenues for engineering RNAs with complex structures and functions.