RNAflash splits RNA homology search into retrieval and structure-aware alignment, running over 100 times faster than Infernal on RNAcentral
Synopsis
RNA homology search has long traded sensitivity against speed: sequence methods are fast but miss low-identity homologs, while covariance models are sensitive but costly. RNAflash splits the task in two, first retrieving candidates from a pre-encoded database with a contrastively trained RNA language-model encoder, then reranking and aligning them with a cross-encoder guided by predicted secondary structure. On held-out Rfam families its retrieval recall exceeds sequence-based methods; on RNAcentral the resulting alignments show stronger coupling and covariation signals than sequence-based methods and Infernal, while search and alignment run 3.7-fold faster than non-iterative Riboseek and over 100-fold faster than Infernal and RNAcmap.
Interpretation
RNA homology search can now screen candidates quickly in embedding space and apply structure-aware reranking and alignment only to the top-ranked few, instead of aligning every database sequence. Earlier sequence methods score similarity with dynamic programming or hidden Markov models, which is fast but misses homologs of low identity to the query; covariance models such as Infernal capture sequence and structural conservation but are too costly for large-scale search. On 155 Rfam families held out from training, with one sequence per family as query, RNAflash-R had the highest recall at most cutoffs, trailing Riboseek only at k = 5, 10 and 20; with the cutoff set to family size it had the highest recall, and it recovered on average 75.5% of a query's homologs before the first false positive, above the four sequence baselines.
The reranking and alignment module turns retrieved candidates into a multiple sequence alignment and uses predicted secondary structure to refine nucleotide correspondence. Retrieval compares only averaged whole-sequence embeddings without local alignment, so candidates include false positives, and aligning low-identity homologs needs additional information. On the same Rfam test set, RNAflash-A reached an average alignment F1 of 0.807 versus 0.740 for nhmmer and 0.793 for Infernal; on the top-1000 candidates retrieved for 174 RNAsolo queries from 30 million RNAcentral sequences it averaged 9.67 seconds per query, while Infernal took 26.7 times as long.
The full pipeline yields deeper alignments and stronger evolutionary signals in real large-database searches, and a lightweight route uses retrieval to accelerate nhmmer. nhmmer's runtime grows with the target database, and its alignments have lower effective sequence counts and weaker evolutionary signals than structure-aware methods; RNAcmap gives the strongest signals but at high computational cost. Search and alignment for the 174 queries took 1,682 seconds in total, 3.7-fold faster than non-iterative Riboseek, about 100-fold faster than Infernal and 142-fold faster than RNAcmap; the lightweight RNAflash-L averaged under one second per query and returned at least one homolog for 21 of the 33 queries where nhmmer found no hit.
Perspective
The evaluation covers 155 structurally characterized Rfam families and 174 RNAsolo queries, with large-database searches against a 30-million-sequence RNAcentral database; because reference alignments are unavailable for those searches, alignment quality is measured by effective sequence counts and coupling and covariation signals. The current implementation is restricted by the ERNIE-RNA backbone to sequences of up to 1,022 nt.
Large-database searches lack reference alignments, so alignment quality is assessed indirectly through effective sequence counts and coupling and covariation AUPRC; retrieval depth must be adjusted to balance alignment quality against computational cost, and RNAflash-L is positioned as the lighter alternative. On the Rfam-unassigned query subset Infernal declined most, a pattern that may partly reflect how those queries were selected by covariance-model matching.
