Differentiable RNA Secondary Structure Extraction for Deep Learning
Organizations: School of Physics, Maths and Computing The University of Western Australia · School of Engineering and Applied Sciences Harvard University
Abstract
Many deep learning approaches to RNA secondary structure prediction have recently been proposed. They typically output a weight matrix where is an arbitrary weight for base pairing with base . Converting this matrix to a predicted secondary structure or base-pairing probability matrix typically involves ad hoc and problematic downstream algorithms. Despite the importance of this conversion step, which we refer to as structure extraction, it has received relatively little attention in the literature. In this work, we analyze how the congruence between training and extraction methods affects prediction performance. To do this, we compare four extraction algorithms: a Nussinov-like dynamic programming method, maximum-weight graph matching and the greedy extraction algorithms used by SPOT-RNA and RiNALMo. These are evaluated on outputs from the pretrained RiNALMo model and three toy models trained in this paper: a differentiable Nussinov-like model, a binary cross-entropy (BCE) baseline, and a model that incorporates a novel symmetric doubly stochastic matrix (SDSM) normalization algorithm during training which allows it to output base-pairing probability matrices directly, without a separate extraction step. This SDSM normalization algorithm is differentiable and can be added inline to any deep learning model during training and evaluation. We find that the performance of each extraction method depends strongly on how the corresponding model was trained. Considering the toy models themselves, the SDSM model showed the strongest overall performance: it outperformed the BCE baseline under all four extraction algorithms and produced pre-extraction outputs closest to the ground truth. These results suggest that SDSM normalization is a tractable alternative to traditional structure extraction.
Figures & tables
| Family | # Sequences |
|---|---|
| 5S rRNA | 1,283 |
| SRP RNA | 928 |
| tRNA | 557 |
| tmRNA | 462 |
| RNase P RNA | 454 |
| 16S rRNA | 110 |
| RNA Type | Train Set | Test Set |
|---|---|---|
| 5S rRNA | 1,018 | 265 |
| SRP RNA | 411 | 114 |
| tRNA | 461 | 96 |
| Total | 1,890 | 475 |
| Family | RiNALMo F1 | Graph Matching F1 | Nussinov F1 | SPOT-RNA F1 |
|---|---|---|---|---|
| 16S rRNA | 0.5690 | 0.5855 | 0.5990 | 0.5787 |
| 23S rRNA | 0.6337 | 0.6587 | 0.6636 | 0.6515 |
| 5S rRNA | 0.9275 | 0.8942 | 0.9308 | 0.9224 |
| RNase P RNA | 0.8820 | 0.8851 | 0.8686 | 0.8874 |
| Group I Intron | 0.8028 | 0.8055 | 0.7844 | 0.8083 |
| SRP RNA | 0.7973 | 0.8015 | 0.8100 | 0.7921 |
| Family | RiNALMo F1 | Graph Matching F1 | Nussinov F1 | SPOT-RNA F1 |
|---|---|---|---|---|
| 5S rRNA | 0.6944 | 0.9648 | 0.8787 | 0.7151 |
| SRP RNA | 0.5587 | 0.7747 | 0.7561 | 0.5551 |
| tRNA | 0.6681 | 0.9500 | 0.8586 | 0.7189 |
| Mean | 0.6524 | 0.9163 | 0.8451 | 0.6774 |
| Family | RiNALMo F1 | Graph Matching F1 | Nussinov F1 | SPOT-RNA F1 |
|---|---|---|---|---|
| 5S rRNA | 0.7615 | 0.6765 | 0.8809 | 0.9302 |
| SRP RNA | 0.6152 | 0.2755 | 0.7571 | 0.7099 |
| tRNA | 0.7038 | 0.7783 | 0.8641 | 0.8972 |
| Mean | 0.7147 | 0.6008 | 0.8478 | 0.8707 |
| Family | RiNALMo F1 | Graph Matching F1 | Nussinov F1 | SPOT-RNA F1 |
|---|---|---|---|---|
| 5S rRNA | 0.7631 | 0.9501 | 0.8899 | 0.9577 |
| SRP RNA | 0.6151 | 0.7383 | 0.7467 | 0.7489 |
| tRNA | 0.7111 | 0.9215 | 0.8595 | 0.9219 |
| Mean | 0.7171 | 0.8935 | 0.8494 | 0.9004 |
| Model | RiNALMo F1 | Graph Matching F1 | Nussinov F1 | SPOT-RNA F1 | MSE |
|---|---|---|---|---|---|
| Nussinov-like | 0.6524 | 0.9163 | 0.8451 | 0.6774 | 0.1459 |
| BCE (baseline) | 0.7147 | 0.6008 | 0.8478 | 0.8707 | 0.00196 |
| SDSM | 0.7171 | 0.8935 | 0.8494 | 0.9004 | 0.000496 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Layer | Type | Neurons | Activation |
|---|---|---|---|
| 1 | Input | 800 ( ) | – |
| 2 | Dense | 1024 | ReLU |
| 3 | Dense | 512 | ReLU |
| 4 | Dense | 256 | ReLU |
| 5 | Dense | 40,000 ( ) | ∗ |
| Row Column | Graph Matching | Nussinov | RiNALMo | SPOT-RNA |
|---|---|---|---|---|
| Graph Matching | – | |||
| Nussinov | – | |||
| RiNALMo | – | |||
| SPOT-RNA | – |
| Row Column | Graph Matching | Nussinov | RiNALMo | SPOT-RNA |
|---|---|---|---|---|
| Graph Matching | – | |||
| Nussinov | – | |||
| RiNALMo | – | |||
| SPOT-RNA | – |
| Row Column | Graph Matching | Nussinov | RiNALMo | SPOT-RNA |
|---|---|---|---|---|
| Graph Matching | – | |||
| Nussinov | – | |||
| RiNALMo | – | |||
| SPOT-RNA | – |
| Row Column | Graph Matching | Nussinov | RiNALMo | SPOT-RNA |
|---|---|---|---|---|
| Graph Matching | – | |||
| Nussinov | – | |||
| RiNALMo | – | |||
| SPOT-RNA | – |
| Extraction Method | Mean Nussinov F1 | Mean CB BCE F1 | Nussinov CB BCE | CB BCE Nussinov |
|---|---|---|---|---|
| Graph Matching | 0.9163 | 0.6008 | ||
| Nussinov | 0.8451 | 0.8478 | ||
| RiNALMo | 0.6524 | 0.7147 | ||
| SPOT-RNA | 0.6774 | 0.8707 |
| Extraction Method | Mean SDSM F1 | Mean CB BCE F1 | SDSM CB BCE | CB BCE SDSM |
|---|---|---|---|---|
| Graph Matching | 0.8935 | 0.6008 | ||
| Nussinov | 0.8494 | 0.8478 | ||
| RiNALMo | 0.7171 | 0.7147 | ||
| SPOT-RNA | 0.9004 | 0.8707 |