All models

RNA-km

An RNA language model whose embeddings and attention maps are used to predict secondary structure.

Molecules, proteins and genomics · 402 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (36 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
152.5M
Operations
402
Framework
PyTorch
Recurrent
No
Published
2024, bioRxiv
Cited by
7 (as of 12 November 2026)
Authors
Tiansu Gong, Dongbo Bu
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m19669
Graph hash
a2ce24c891bcf2b52550d15378c8e8af7b6fb9948d4fcaf1398a8a4693c92afe
Skeleton hash
faae39b8259bc216d8264b7c7cf934bcb73943ec21189875b93d6203f7e353c0
Architecture hash
88a4fe8c3f8edb13e600d99fcd7b018bf348932d4e4df224e9f4a4a12f41e9d0
Diagram SHA-256
77eb21dc8feda2a2d509e00fb4c0f63825df2d7b1efc259ab9e1a07961fe7853
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

RNA-km is a language model for RNA that the authors trained to enable zero-shot prediction of RNA secondary structure, including pseudoknots. It was trained in a self-supervised manner on 23 million non-coding RNA sequences.

The architecture is a BERT-style, encoder-only transformer with 12 encoder layers, 16 attention heads and an embedding dimension of 1024, which the paper counts as 152 million parameters. In place of the absolute sinusoidal positional encoding it uses a relative one. During pre-training, 80% of the masks are contiguous spans of several bases, called k-mers, instead of single bases.

To predict a structure, base-pair probabilities are computed from the attention maps and the structure is then built with a minimum-cost flow algorithm introduced in KnotFold. The paper reports an F1 score of 0.627 for RNA-km on its PDB benchmark. RNA-FM, evaluated with the same procedure, scores 0.433 there.

Key idea. RNA-km is an RNA language model trained with k-mer masking and relative positional encoding whose attention maps support zero-shot secondary structure prediction, including pseudoknots.

  • rna-km
  • rna language model
  • rna secondary structure
  • pseudoknot prediction
  • zero-shot structure prediction
  • rna foundation model
  • ncrna
  • k-mer masking

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Gong_2024, title={Language models enable zero-shot prediction of RNA secondary structures including pseudoknots}, url={http://dx.doi.org/10.1101/2024.01.27.577533}, DOI={10.1101/2024.01.27.577533}, publisher={openRxiv}, author={Gong, Tiansu and Bu, Dongbo}, year={2024}, month=Jan }