NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

KnitNet: Learning to Search at Inference Time for Exact RNA Inverse Design

Antonia Panescu, Xin Wang, Haoran Xu, Qingyu Chen, Carlos Oliver, Rex YingarXiv 2026

TL;DR

Designing an RNA sequence that folds into an exact target shape is like playing molecular whack-a-mole: fixing a base-pairing error in one spot often triggers a new misfold somewhere else. KnitNet solves this by combining a pretrained generative model with an adaptive, inference-time search that learns from its own folding mistakes to coordinate multi-site sequence repairs. It is the first method to achieve 100% exact computational matches on the notoriously complex OpenKnot57 benchmark and seamlessly generalizes from 2D shapes to 3D structures.

What Problem Does This Paper Address?

To engineer mRNA vaccines or programmable genetic switches, we need to control RNA structure. In RNA inverse design, you start with a desired geometry—usually a 2D map of which nucleotide bases pair up—and try to find a sequence of A, C, G, and U molecules that naturally folds into that exact shape.

Existing tools hit three frustrating walls:

  1. Generators get "close, not exact": Deep learning models trained to generate sequences from structures rarely nail 100% exact fold-back accuracy, especially on unfamiliar shapes.
  2. Global coupling stalls local search: Because distant nucleotides interact, mutating one base to fix a missing pair can accidentally create an unwanted pair across the molecule. Greedy, narrow search gets stuck.
  3. The Pseudoknot blind spot: Many thermodynamic search algorithms mathematically exclude pseudoknots—complex, crossing base-pair interactions essential to real biology (like CRISPR guide RNAs).
Overview of the RNA inverse design landscape and KnitNet's feedback-guided repair.

Methods

KnitNet treats RNA design as an inference-time scaling problem, pairing a frozen generative prior with an intelligent, on-the-fly repair loop:

  • Graph-Native Diffusion Initialization: Instead of generating sequences left-to-right (which blinds early choices to downstream pairing needs), the authors pretrain a GraphGPS masked diffusion language model. Conditioned on a pairing-graph representation that naturally supports crossing pairs (pseudoknots), it generates an initial pool of 96 diverse candidate sequences.
  • Counterexample-Guided Joint Repair (Novel Core): When a candidate misfolds, KnitNet builds an error graph linking missing and unwanted base pairs. Connected components in this graph reveal coupled nucleotides that must be edited together. As search progresses and new misfolds ("counterexamples") appear, KnitNet dynamically expands this editable scope.
  • Online Local Surrogate: Running physics-based or neural folding verifiers ("oracles") on every possible multi-base edit is way too slow. KnitNet trains a lightweight ExtraTrees ensemble on the fly during each repair episode to predict how many errors a joint edit will leave behind, reserving expensive oracle calls only for top-ranked proposals.
  • Modular Oracle Guidance: By separating base-pair error repair from candidate ranking, KnitNet adapts to new regimes (2D structural, 2D thermodynamic, or 3D geometry) simply by swapping the verifier's scoring function—no retraining required.
Figure 2: (A) General RNA inverse design proposes sequences, evaluates their predicted folds, and selects candidates against a target structure. (B) KnitNet combines (1) initialization with a frozen structure-conditioned generator, (2) coordinated nucleotide edits ranked by a local surrogate, and (3) folding feedback that updates the surrogate and revises editable positions and error priorities. This loop adapts subsequent repairs to observed folding errors. Search returns an exact predicted secondary-structure match when found, or the best evaluated sequence when the budget is exhausted.

Datasets

  • Pretraining Corpus (New): Over 20 million sequence-structure pairs constructed by running the RibonanzaNet-SS 2D predictor over the RNACentral database, carefully filtered to remove any sequence homology with test benchmarks.
  • Held-Out Ablation Panel (New): 500 challenging structures from the corpus, including pseudoknots and long RNAs (>500 nucleotides).
  • 2D Pseudoknot Benchmarks: OpenKnot57 and PseudoBase++-339.
  • 2D Planar Benchmarks: Eterna100-v2 (notoriously tricky human-designed puzzles), Rfam-Learn-Test, and Rfam-Taneda.
  • 3D Benchmark: 64 single-chain RNA monomers from the gRNAde Das test split.

Key Insights and Ideas

  • Smart repair beats brute-force sampling: In the era of test-time compute, just drawing thousands more samples from a generative model yields diminishing returns. Spending that compute budget on verifier-guided, coordinated repair solves way more targets in a fraction of the time.
  • Escaping local minima requires getting worse first: Mechanistic tracking of KnitNet's trajectories reveals that fixing a complex RNA often causes a temporary spike in total base-pair errors before collapsing into an exact match. Strictly greedy algorithms would reject these crucial stepping stones; KnitNet's expanding error scope navigates right through them.
  • 2D error graphs can drive 3D design: Even when designing 3D tertiary geometries, KnitNet uses 2D base-pairing discrepancies to figure out which nucleotides to mutate together, while letting a 3D folding model (RhoFold+) rank the winners. This clever division of labor sidesteps the severe data scarcity of 3D RNA modeling.

Key Results

  • Cracking OpenKnot57: KnitNet is the first method to achieve 57/57 exact computational matches in individual runs (averaging 56.3/57 across seeds vs. 49.7/57 for the state-of-the-art generator).
  • Compute Efficiency: Across all 20 generator-benchmark combinations in 2D design, KnitNet Search boosts exact solve rates by an average of 21 percentage points over continued generator sampling while cutting time-to-solve by 70%.
  • Planar Mastery: On Eterna100-v2, an extended KnitNet search campaign reaches best-in-class coverage of 97/100 exact solves—and maintains its lead even when scored by five independent folding predictors never seen during search.
  • 3D Generalization: Applied to 3D monomers, KnitNet improves structural self-consistency (scTM) over every tested 2D and 3D generator. Compared to RIDER's per-target reinforcement learning, KnitNet improves scTM by 7.8% (0.732 vs. 0.679) while running 39.3% faster.
Inference-time scaling on OpenKnot57: KnitNet Search rapidly outpaces continued native sampling across all generators.

Limitations and Future Work

  • Length Scaling & Oracle Bottlenecks: Long RNAs remain tough. On held-out targets, KnitNet's 1-hour solve rate drops from 197/200 (for sequences $\le$100 nucleotides) to just 2/56 (for 401–511 nucleotides). Why? Folding verifiers slow to a crawl on long sequences, dropping throughput from ~37 evaluations/second down to ~2 evaluations/second.
  • Computational vs. Wet-Lab Exactness: All "exact matches" are evaluated in silico via computational folding predictors (though cross-validated across independent models).
  • Future Directions: Because KnitNet decouples sequence repair from oracle scoring, the authors suggest extending the framework beyond pure geometry to optimize functional biological properties—such as mRNA stability, translation efficiency, and RNA–protein interactions.

Summary updated

BibTeX
@misc{panescu2026knitnet,
  author = {Antonia Panescu and Xin Wang and Haoran Xu and Qingyu Chen and Carlos Oliver and Rex Ying},
  title = {{KnitNet: Learning to Search at Inference Time for Exact RNA Inverse Design}},
  year = {2026},
  eprint = {2611.33812},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33812},
}
Figure