RNA Design via Conditioned Flow Matching and Finite-Policy Reinforcement Learning
Organizations: School of Computer Science and Technology, University of Science and Technology of China, Hefei, Anhui, China · School of Computer Science and Technology, Anhui University, Hefei, Anhui, China · State Key Laboratory for Novel Software Technology at Nanjing University, School of Computer Science, Nanjing University, Nanjing, Jiangsu, China
Abstract
RNA design aims to identify sequences that fold into specified secondary structures. Existing methods formulate the task as target-specific search or conditional generation. However, natural RNA evolution proceeds through sequence variation and selection, with compensatory substitutions, whereas these methods do not explicitly model this process. To address this limitation, we propose a two-stage framework comprising RNA Inverse-Folding Flow (RNA-IFlow) and RNA-IFlow-RL. RNA-IFlow uses structure-conditioned Dirichlet Flow Matching to model coordinated variation across the sequence, while RNA-IFlow-RL maps the learned flow to a pairing-preserving finite policy and refines it with thermodynamic feedback. Our framework achieves leading performance on multiple benchmarks, reaching 85.19% Pass@1 on Rfam-27. Further analyses reveal thermodynamic gains, policy dynamics, and robustness across settings. Our work couples coordinated variation with thermodynamic selection, offering a novel paradigm for RNA design.
Figures & tables
Appendix figures & tables37 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Total parameters | Millions | Trained parameters |
| RNA-Design-LM SL | 357921408 | - | |
| RNA-Design-LM SL+RL | 357921408 | - | |
| GoForth | 59392004 | 59.39 | - |
| DRAG | 37285 | 0.04 | - |
| RNAinverse-pf | - | - | - |
| RNA-IFlow | 87548613 | 86958021 |
| Method | P@1 | P@8 | MFE@1 | MFE@8 | Prob. | F1 | NED | Div. |
| RNA-Design-LM SL | 0.9996 | |||||||
| RNA-Design-LM SL+RL | 0.5133 | 0.6367 | 0.5233 | 0.6567 | 0.5256 | 0.9324 | 0.0652 | |
| GoForth | ||||||||
| DRAG | ||||||||
| RNAinverse-pf | ||||||||
| RNA-IFlow (Ours) | 0.9979 |
| Method | P@1 | P@8 | MFE@1 | MFE@8 | Prob. | F1 | NED | Div. |
| RNA-Design-LM SL | 0.9996 | |||||||
| RNA-Design-LM SL+RL | 0.5033 | 0.6133 | 0.5167 | 0.6333 | 0.5165 | 0.9196 | 0.0691 | |
| GoForth | ||||||||
| DRAG | ||||||||
| RNAinverse-pf | ||||||||
| RNA-IFlow (Ours) | 0.9975 |
| Method | P@1 | P@8 | MFE@1 | MFE@8 | Prob. | F1 | NED | Div. |
| RNA-Design-LM SL | 1.0000 | |||||||
| RNA-Design-LM SL+RL | 0.8148 | 0.8642 | 0.8148 | 0.8642 | 0.7765 | 0.9970 | 0.0058 | 1.0000 |
| GoForth | 1.0000 | |||||||
| DRAG | ||||||||
| RNAinverse-pf | ||||||||
| RNA-IFlow (Ours) | 1.0000 |
| Method | P@1 | P@8 | MFE@1 | MFE@8 | Prob. | F1 | NED | Div. |
| RNA-Design-LM SL | 0.9999 | |||||||
| RNA-Design-LM SL+RL | 0.7199 | 0.7531 | 0.7356 | 0.7657 | 0.7156 | 0.9808 | 0.0154 | |
| GoForth | ||||||||
| RNA-IFlow (Ours) | 0.7395 | 0.9992 | ||||||
| RNA-IFlow-RL (Ours) | 0.7120 | 0.7299 | 0.7544 | 0.7109 | 0.9783 | 0.0157 |
| Method | Full P@8 | 755 P@8 | Full NED | 755 NED |
| RNA-Design-LM SL | ||||
| RNA-Design-LM SL+RL | 0.7531 | 0.7501 | 0.0154 | 0.0156 |
| GoForth | ||||
| RNA-IFlow | 0.7395 | 0.7364 | ||
| RNA-IFlow-RL | 0.0157 | 0.0159 |
| Generator | P@1 | P@8 | Prob. | NED |
|---|---|---|---|---|
| Native RNA-IFlow | 0.3033 | 0.5200 | 0.4089 | 0.1017 |
| RNA-IFlow-no-RL | ||||
| RNA-IFlow-RL | 0.5400 | 0.6500 | 0.5398 | 0.0534 |
| Axis | Value | P@1 | P@8 | Prob. | NED |
|---|---|---|---|---|---|
| H | 1 | ||||
| H | 2 | 0.5000 | 0.6567 | 0.0590 | |
| H | 4 | ||||
| H | 8 | 0.5167 | 0.6500 | 0.5424 | 0.0558 |
| H | 16 | 0.5000 | 0.6500 | 0.5317 | |
| G | 2 | 0.5167 |
| Configuration | P@1 | P@8 | Prob. | NED |
|---|---|---|---|---|
| G | Median (s) | Minimum (s) | Maximum (s) |
|---|---|---|---|
| 2 | 25.7918 | 10.5854 | 34.0818 |
| 4 | 27.4301 | 10.4608 | 35.9115 |
| 8 | |||
| 16 |
| Steps | P@1 | P@8 | MFE@8 | Prob. |
|---|---|---|---|---|
| 4 | ||||
| 8 | 0.5133 | 0.5367 | ||
| 16 | 0.5133 | 0.5367 | ||
| 32 | 0.3000 | 0.5133 | 0.5333 | 0.4095 |
| 50 | 0.3033 | 0.5200 | 0.5367 | 0.4089 |
| Updates | P@1 | P@8 | MFE@8 | Prob. |
| 1744 | 0.6567 | 0.6867 | 0.5446 | |
| 2093 | 0.5333 | 0.6533 | ||
| 2442 | 0.5400 | |||
| 2790 | 0.6800 | 0.5437 |
| Setting | P@1 | P@8 | Prob. | NED | Div. |
|---|---|---|---|---|---|
| Original mixture | 0.5133 | 0.6533 | 0.5363 | 0.0555 | 0.9513 |
| Core-only | 0.6333 | ||||
| Hard-enriched | 0.4900 | 0.6333 | 0.5248 | 0.0610 | 0.9379 |
| Setting | P@1 | P@8 | Prob. | NED | Div. |
|---|---|---|---|---|---|
| 1395 unique tasks | 0.6500 | 0.5361 | 0.0590 | ||
| 2790 unique tasks | 0.5133 | 0.9175 | |||
| 4143 unique tasks | 0.5033 | 0.6467 | 0.5367 | 0.0565 | 0.9292 |
| Setting | P@1 | P@8 | Prob. | NED | Div. |
|---|---|---|---|---|---|
| Lower CE weight | 0.9487 | ||||
| Higher CE weight | 0.5167 | 0.6467 | 0.5361 | 0.9517 | |
| Lower KL weight | 0.5167 | 0.6533 | 0.5408 | 0.0546 | |
| Higher KL weight | 0.5233 | 0.0561 |
| Setting | P@1 | P@8 | Prob. | NED |
|---|---|---|---|---|
| One fresh round | ||||
| Two fresh rounds | 0.5167 | 0.6500 | 0.5424 | 0.0558 |
| Fixed behavior snapshot, two rounds | 0.5233 | 0.6533 | 0.5396 | 0.0557 |
| Three fresh rounds | 0.5100 | 0.6467 | 0.5396 | 0.0558 |
| Fixed behavior snapshot, three rounds | 0.5233 | 0.6600 | 0.5435 | 0.0554 |
| Method | Return time (s) | With scoring (s) | Timed groups |
| RNA-Design-LM SL | 600 | ||
| RNA-Design-LM SL+RL | 600 | ||
| GoForth | 600 | ||
| DRAG | 300 | ||
| RNAinverse-pf | 300 | ||
| RNA-IFlow | 0.8845 | 1.1684 | 600 |
| K | Pass@K | MFE@K | Prob. | NED | Pair-F1 | Diversity |
| 1 | 1.0000 | |||||
| 2 | 1.0000 | |||||
| 4 | 1.0000 | |||||
| 8 | 0.9996 | |||||
| 16 | ||||||
| 32 |
| K | Pass@K | MFE@K | Prob. | NED | Pair-F1 | Diversity |
| 1 | 1.0000 | |||||
| 2 | 0.9950 | |||||
| 4 | ||||||
| 8 | ||||||
| 16 | ||||||
| 32 |
| K | Pass@K | MFE@K | Prob. | NED | Pair-F1 | Diversity |
| 1 | 1.0000 | |||||
| 2 | 0.9933 | |||||
| 4 | ||||||
| 8 | ||||||
| 16 | ||||||
| 32 |
| K | Pass@K | MFE@K | Prob. | NED | Pair-F1 | Diversity |
| 1 | 1.0000 | |||||
| 2 | 1.0000 | |||||
| 4 | ||||||
| 8 | 0.9979 | |||||
| 16 | ||||||
| 32 |
| K | Pass@K | MFE@K | Prob. | NED | Pair-F1 | Diversity |
| 1 | 1.0000 | |||||
| 2 | 0.9850 | |||||
| 4 | ||||||
| 8 | ||||||
| 16 | ||||||
| 32 |
| Method | uMFE | MFE | Prob. | NED | Pair-F1 | Run time (s) |
| FastDesign | 0.4900 | 0.5267 | 0.3827 | 0.6623 | 33.5269 | |
| SAMFEO | 0.6667 | 0.6933 | 0.5283 | 0.0579 | 0.9474 | |
| NEMO | 0.2928 | 15.9501 |
| Method | Groups | Timeouts | Empty returns | Mean returned |
|---|---|---|---|---|
| FastDesign | 300 | 93 | 93 | |
| SAMFEO | 300 | 172 | 0 | |
| NEMO | 300 | 68 | 48 |
| Method | MFE | uMFE | Budget / source |
|---|---|---|---|
| RNA-IFlow-RL | 73 | 68 | At most 10,000 candidates; global stop |
| RNA-Design-LM SL+RL | 74 | 72 | Published 10,000-sample evaluation ( Gautam et al., 2026 ) |
| FastDesign | 80 | 78 | Published motif/cube search ( Zhou et al., 2026 ) |
| SAMFEO | 77 | 74 | Five-run union, probability objective ( Zhou et al., 2023 ) |
| NEMO | 79 | 77 | Five-run union reported by Zhou et al. (2023) |
| Benchmark | Method | MFE | uMFE | Protocol |
|---|---|---|---|---|
| Eterna100-v2 | RNA-IFlow-RL | 81 | 76 | Maximum 10,000 candidates |
| Eterna100-v2 | RNA-Design-LM SL+RL | 81 | 79 | Published 10,000 samples ( Gautam et al., 2026 ) |
| Rfam-27 | RNA-IFlow-RL | 24 | 24 | Maximum 10,000 candidates |
| Rfam-27 | RNA-Design-LM SL+RL | 24 | 24 | Published 10,000 samples ( Gautam et al., 2026 ) |
| RNAsolo-764 | RNA-IFlow-RL | 591 | 585 | Maximum 10,000 candidates |
| Method | MFE solved | uMFE solved | Source |
|---|---|---|---|
| FastDesign | 611 | 606 | Zhou et al. (2026) , Table 2 |
| SAMFEO | 608 | 602 | Zhou et al. (2026) , Table 2 |
| NEMO | 609 | 605 | Zhou et al. (2026) , Table 2 |
| Sequence | Prob. | NED | MFE | uMFE | Group MFE | Group uMFE |
|---|---|---|---|---|---|---|
| Reference sequence | yes | yes | – | – | ||
| RNA-IFlow-RL | 0.5178 | 0.0128 | yes | yes | 2/8 | 2/8 |
| RNA-IFlow | 0.1257 | no | no | 0/8 | 0/8 | |
| RNA-Design-LM SL+RL | 0.0297 | no | no | 0/8 | 0/8 | |
| GoForth | no | no | 0/8 | 0/8 | ||
| DRAG | no | no | 0/8 | 0/8 |
| Target | nt | Model | Prob. | NED | uMFE |
|---|---|---|---|---|---|
| Ete_19 | 104 | RNA-IFlow | 0.0023 | 0.0647 | no |
| Ete_19 | 104 | RNA-IFlow-RL | 0.9467 | 0.0022 | yes |
| Ete_50 | 108 | RNA-IFlow | 0.3343 | no | |
| Ete_50 | 108 | RNA-IFlow-RL | 0.2935 | no |
| Sequence | Matching positions | Recovery (%) |
|---|---|---|
| Author/player reference | 214/214 | 100.00 |
| RNA-Design-LM SL+RL | 87/214 | 40.65 |
| GoForth | 88/214 | 41.12 |
| DRAG | 101/214 | 47.20 |
| RNA-IFlow | 97/214 | 45.33 |
| RNA-IFlow-RL | 114/214 | 53.27 |