§ Bioinformatics Active

Stanford RNA 3D Folding 2

Predict the 3D structure of RNA from sequence. A classical sequence-NN baseline beats anything that ignores the closest train neighbors; RibonanzaNet3D refines the candidates; a learned reranker picks the final five.

baseline 33.98
best (lower) 33.89
metric top-1 RMSD Δ -0.09 · -0.3%
dataset 5,716 train targets · MSAs up to 14k seqs · up to 125k nt RNA sequences + MSAs + 3D coords
metric top-1 RMSD lower is better
infra sbl1 · local gcp batch · cpu sbl cluster · distributed
last touched 2026-03-08 kaggle competition ↗
technique stack
sequence-NN retrievalcoordinate warpingRibonanzaNet3D refineneural rerankerGCP Batch shardingsbl-cluster distributed search

The challenge

Predict five 3D coordinate sets per residue, evaluated as best-of-five structural RMSD against the held-out experimental crystallography. Five guesses per target hedge against ambiguity, but the leaderboard still rewards the top-1 aim. The competition is research-track with a 75,000 USD prize and a 2026-03-25 deadline.

The dataset shape

5,716 train targets. Sequences span four orders of magnitude in length. MSAs are gigabytes deep. And — the detail that shapes any serious solution — more than half of the train coordinates are incomplete.

A three-tier hybrid

A pure deep-learning model would ignore the strongest signal in the data — that training targets with similar sequence often have similar backbones. A pure classical retriever leaves the leaderboard tail on the table. So the repo runs all three: retrieve, refine, rerank.

Tier 1 — Classical sequence-NN

The strongest baseline in the repo is not a neural network. It’s a classical retrieve-and-warp pipeline — using k-mer features and Needleman–Wunsch alignment to find similar training RNAs and copy their coordinates — that runs on CPU and finishes a full validation pass in minutes.

sequence-NN baseline
feature space
k-mer order
k = 3
alphabet
{A, C, G, U}
histogram dim
4³ = 64
normalization
L2
candidate retrieval
primary
SequenceMatcher (Python stdlib)
alternative
Biopython PairwiseAligner (Needleman-Wunsch)
top-k
configurable
metadata weights
ligand Jaccard · stoichiometry · diversity penalty
coordinate adaptation
length match
block-warping (overlay aligned positions)
length mismatch
linear interpolation along 3 axes
backbone constraint
5.5 – 6.5 Å between consecutive residues
base-pair geometry
Watson–Crick on i+3..i+24 for short molecules

Source: baseline_sequence_nn.py, 758 lines. The constraint enforcement at output time is the difference between predictions that hold up under structural review and ones that don't.

Tier 2 — RibonanzaNet3D refinement

Fine-tune NVIDIA’s RibonanzaNet2 — a pretrained sequence model from the Ribonanza Kaggle — with a 3D coordinate head. The base provides context-aware per-residue embeddings; a single linear layer maps each to its (x, y, z).

RibonanzaNet3D
model
base
NVIDIA RibonanzaNet2 (pretrained)
head
Linear(256, 3)
max sequence length
512 nt
above max
fall through to classical baseline
training
optimizer
AdamW, lr=2e-4, wd=1e-4
dropout
0.1
batch size
2
grad accumulation
4 (effective 8)
epochs
24
inference (candidate diversity)
stochastic passes
4 (dropout-on)
deterministic pass
1 (eval-mode)
output
5 candidates per target

Sources: train_ribonanzanet3d_v2.py + ribonanzanet3d_hybrid_infer.py + start_ribonanzanet3d_v2.sh.

Tier 3 — Neural reranker

The reranker is small. The job is to pick well, not to predict. It takes 128 prefiltered candidates from the classical pipeline, scores each, and surfaces the final 5. Trained on a 3-way temporal split so no candidate from after the query’s collection date is ever considered.

hybrid reranker
training split (temporal)
core training set
88% — oldest cutoffs
training queries
2% — middle cutoffs
validation queries
10% — newest cutoffs
leakage guard
exclude templates >= query cutoff
feature stack
sequence
query + template kmer (k=3, 64-dim each)
seq stats
length · GC% · AU%
structure stats
radius of gyration · mean/std step distance · end-to-end
length-ratio gate
20% minimum
training
optimizer
AdamW, lr=3e-4, wd=1e-4
batch size
64
epochs
24
embedding batch
16 · max_len 1536 · overlap 256
candidate funnel
128 → 24 → 5

Source: train_hybrid_reranker.py + start_hybrid_reranker_overnight.sh.

Distributed search infrastructure

The classical search across 5,716 train targets is embarrassingly parallel and pure CPU. The repo runs it on three surfaces:

run_sequence_nn_shard.sh L1–L30 bash · 30 lines
#!/usr/bin/env bash
set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OUT_DIR="$ROOT/outputs/analysis/shards"

if [[ $# -lt 2 ]]; then
  echo "usage: $0 <shard-index> <num-shards> [workers] [extra search args...]" >&2
  exit 1
fi

SHARD_INDEX="$1"
NUM_SHARDS="$2"
WORKERS="${3:-$(nproc)}"
if [[ $# -ge 3 ]]; then
  shift 3
else
  shift 2
fi

mkdir -p "$OUT_DIR"
PYTHON_BIN="${PYTHON_BIN:-python}"
if [[ -f "$ROOT/.venv/bin/activate" ]]; then
  # Prefer the challenge-local environment when present.
  # shellcheck disable=SC1091
  source "$ROOT/.venv/bin/activate"
  PYTHON_BIN="python"
fi

search_cmd=(

What’s in flight

RibonanzaNet3D training is the active workstream; the hybrid reranker runs overnight. Their honest current contribution is small (33.98 → 33.89 is a 0.27% relative gain on top-1 RMSD), but the structural pieces — the 3-tier hybrid, the temporal-split reranker training, the candidate diversity protocol — are the levers that compound across future runs.