Deep learning coupled with scalable domain-specific structural validation expands RNA virus discovery from metatranscriptomes Authors: Gaoyang Luo, Zelin Zang, Ling Yuan, Jingbo Zhou, Ao Dong, Yufei Huang, Stan Z Li, Feng Ju Published: 2026 ABSTRACT AbstractThe discovery of RNA viruses from metatranscriptomic data remains challenging due to extreme sequence divergence and length heterogeneity, ranging from massive polyproteins to short assembly artifacts. We present Rider, a two-stage framework that synergizes deep representation learning with scalable domain-specific structural validation. In the first stage, Rider leverages a compact pretrained protein language model to broadly detect highly divergent viral signals. To overcome the inherent input length limitations of language models and accurately capture catalytic core domains, the second stage employs an overlapping sliding-window structure prediction strategy. These structures are then aligned against our curated database of non-redundant RdRp (RNA-dependent RNA polymerase) domains. This domain-centric design detects RdRp domains embedded within long polyproteins and truncated fragments. Across >10,000 metatranscriptomes spanning diverse ecosystems, Rider achieves sensitivity comparable to LucaProt, recalling >99% of previously cataloged RNA viruses. Rider identifies thousands of deeply divergent sequences and clades that elude existing methods. In a human inflammatory bowel disease (IBD) cohort, Rider agrees with other methods in detecting RNA viruses while extending detection to divergent lineages, providing a scalable pipeline for global RNA virome exploration.Subject terms: Machine learning, Metagenomics, Software Introduction The rapid expansion of metatranscriptomic sequencing has greatly enhanced our ability to detect RNA viruses across a wide range of environments and host-associated microbiomes. RNA viruses are key players in microbial ecosystems and have growing relevance to human health, yet their discovery remains challenging due to their extreme sequence divergence, polyprotein organization, and frequent absence from curated reference databases. Most detection pipelines rely on sequence homology to known RNA-dependent RNA polymerase (RdRp), a hallmark gene of RNA viruses1–3. However, this approach struggles with highly divergent viral families that lack canonical motifs or display fused and atypical genome structures, particularly in fragmented assemblies and highly unbalanced real-world data landscapes4. Existing tools, such as geNomad5, DeepVirFinder6, and VirSorter27, improve sensitivity but remain limited when applied to short contigs or highly divergent proteins8, while popular alignment-based methods like BLAST and HMMER are further constrained due to poor sensitivity or generating false negatives9,10. Structural conservation offers a promising alternative to sequence similarity. Across diverse viral taxa, the tertiary architecture of RdRp, which is well characterized by a conserved right-hand fold, is conserved despite low primary sequence similarity. Structure-based alignment methods, such as Foldseek11 and DALI12, have thus emerged as powerful tools for detecting remote homologs that evade conventional sequence-based approaches. However, full 3D structure prediction and alignment across millions of open reading frames (ORFs) is computationally prohibitive, particularly in large-scale metatranscriptomic studies where most ORFs are incomplete, non-viral, or lack clear domain boundaries. A recent deep learning model, LucaProt13, improves RNA viral detection by targeting the hallmark gene RdRp and incorporating both sequence features and structural proxies (e.g., contact maps) into neural network architectures. LucaProt integrates Transformer-derived sequence embeddings with predicted inter-residue contact maps, which are concatenated and passed through a multilayer perceptron (MLP) for classification. While this design captures some aspects of tertiary structure, the generalization of whole-sample-wide protein structure from metatranscriptomic sequencing data, which typically includes millions of predicted ORFs, usually requires significant computational resources. In addition, motif-strict identification of RdRp brings high precision but may reduce sensitivity on both fragmented viral sequences (e.g., 100–250 amino acid contigs from short-read assemblies) and long polyproteins (exceeding 4000 amino acids). These constraints hinder the fast and sensitive identification and comprehensive discovery of the RNA virome in real-world complex metatranscriptomic datasets. Protein language models (PLMs), such as ESM (evolutionary scale modeling)13–15, offer a promising alternative by learning latent structural and functional features directly from unannotated sequences. These models are pretrained on massive protein sequence corpora and can implicitly capture higher-order representations that correlate with secondary and tertiary structures—without requiring explicit 3D modeling or supervision. However, their application to RNA virus discovery remains constrained by several practical limitations. First, these models struggle with the sequence length extremes prevalent in metatranscriptomes; fixed-length input windows (e.g., 1024 residues for ESM-2) inevitably truncate long polyproteins and exclude key functional domains, while fragmented contigs disrupt domain continuity and reduce the sensitivity of motif-strict tools. Second, existing deep learning pipelines largely function as predictive “black boxes” that rely on latent features or 2D proxies but lack explicit 3D structural verification. These challenges underscore the need for developing frameworks that are robust to truncation and fragmentation, while simultaneously providing explicit structural validation to support candidate classification. To address these challenges, we developed Rider, a two-stage framework for RNA virus discovery that integrates deep representation learning with domain-specific structure-aware validation. In the first stage, Rider leverages a compact ESM2 encoder and a Transformer classifier to broadly detect highly divergent viral signals. By refining ESM2-derived sequence-level representations, this module effectively recovers a wide range of viral candidates, including long polyproteins that evade detection by existing tools like LucaProt, which is constrained by a maximum window limit of 4000 amino acids. However, while Stage 1 successfully flags these massive viral precursors, precisely localizing the RdRp core domain remains challenging due to the inherent input length constraints of PLMs (e.g., 1024 residues). To overcome this and explicitly pinpoint the catalytic sites, Rider’s second stage employs an overlapping sliding-window strategy for structure prediction. The generated structural windows are then aligned against the Rider RdRp-domain-specific database (RDSDB), our custom, highly curated database of precisely excised RdRp core domains. This domain-centric structural validation accurately isolates the true catalytic motifs from extensive polyproteins, discards non-catalytic sequences that lack the core motif, and robustly rescues short fragmented contigs. Ultimately, by coupling robust deep learning screening capable of bypassing length barriers with precise structural resolution, Rider achieves strong performance. Extensive benchmarking demonstrates its ability to recover both known viral fragments and highly divergent lineages, maintaining high sensitivity and a low false positive rate across complex metatranscriptomic datasets. We applied Rider to over 10,000 environmental and host-associated metatranscriptomic datasets. By prioritizing high-confidence structural validation over mere sequence homology, Rider achieves high accuracy in RNA virus recovery. This robust foundation enables the identification of deeply divergent remote homologs and previously uncharacterized clades within the viral “dark matter.” For instance, Rider uncovered a highly divergent, deep-branching cluster associated with the phylum Pisuviricota, alongside extreme soil outliers (flanked by Duplornaviricota) that share <30% sequence similarity with known references yet maintain high structural conservation (TM-score = 0.94). Furthermore, in a large-scale inflammatory bowel disease (IBD) cohort, Rider matched the performance of existing methods on known gut pathogens while revealing a distinct set of short, divergent viral elements completely missed by existing tools. Ultimately, by combining PLM-derived embeddings with structure-guided validation, Rider enables scalable and comprehensive detection of deeply divergent, truncated, or embedded viral signatures across complex microbial communities. Results Rider: a deep representation model for diverse RNA virus discovery Rider is a two-stage deep learning framework designed for RNA virus identification in metatranscriptomic data (Fig. 1). In the first stage, Rider leverages ESM-2, a pretrained large protein language model with 35 million parameters, to extract protein embeddings that encode both local motifs and global structural features. These embeddings are then processed by a Transformer-based classifier for sequence-level nonlinear representation refinement. To precisely isolate true catalytic regions and overcome input length limitations, Rider’s second stage employs an overlapping sliding-window strategy for structure prediction, followed by alignment against a custom RdRp-domain-specific database (RDSDB). To assess Rider’s classification performance, we benchmarked it against a range of baseline models and published algorithms. Overview of the Rider workflow for fast and sensitive RNA virus discovery. This figure illustrates the Rider’s multi-step workflow for identifying and validating candidate RNA-dependent RNA polymerase (RdRp) proteins from metatranscriptomic data. a Training and validation data settings. b Construction of the Rider RdRp structure database, sourced from public datasets (NCBI30, Neri et al.3, Zayed et al.31, Wolf et al.4, and Edgar et al.2). Protein language models (ESMFold v1) are used to generate the comprehensive Rider RdRp Structure Database, which is further refined to extract the RDSDB, and subsequently clustered at 30% minimum sequence identity to create a non-redundant subset (RDSDB30). c Step one: ORFs are tokenized and embedded using a protein language model. A Transformer layer refines the feature representation, and a dense network outputs probability scores to classify sequences as viral and non-viral. d Step two: high-confidence candidates are filtered via sequence similarity against the known RdRp reference. Sequences with <90% similarity to known RdRps are retained as divergent candidates. e Step three: all candidates are used to generate 3D structure, then structural filtering is performed using Foldseek to compare predicted structures against the Rider RdRp structure database. TopK-ranking (top k possible targets according to the alignment probability score, or TM-Score) candidates are selected based on structural similarity for further validation. Created in BioRender. Luo, G. (2026) https://BioRender.com/m24ye35. To rigorously evaluate Rider against published baselines, we constructed independent test sets comprising sequences with 0% sequence identity to the training data. On the Serratus RdRp test set2 (1:40 ratio), Rider achieved an area under the receiver operating characteristic curve (AUC) of 0.976 (Fig. 2a). We further assessed performance under a highly unbalanced scenario (1:100 ratio) using ten independent datasets sampled from Neri et al.3, where Rider maintained high sensitivity and achieved an AUC of 0.983 (Fig. 2b). Crucially, Rider exhibited a low false positive rate in these stringent settings. As detailed in the aggregated confusion matrices (Fig. S3g), Rider misclassified only 96 out of 100,000 non-viral sequences across the Neri 1:100 datasets. Furthermore, on an even more challenging 1:400 test set containing other viral proteins, Rider misclassified merely 10 out of 40,000 non-RdRp sequences (Fig. S3g). Performance evaluation and benchmarking of Rider against comparator methods. a–d Receiver operating characteristic (ROC) curves comparing Rider with baseline models (LucaProt, TF, XGB, CNN, RF, ESM2-untrained) on four pretraining-aware low-similarity test scenarios. Curves show mean ROC performance, and shaded regions indicate SD. a Performance on the Serratus RdRp 1:40 ratio, comprising three independent computational dataset replicates, each with 500 positive and 20,000 negative sequences. b Performance on the unbalanced test set (1:100 ratio) comprising ten independent datasets (RdRp sampled from Neri’s datasets). c Performance on the short RdRp test set (1:40 ratio; length ≤ 300 aa) comprising three independent datasets (RdRp sampled from Serratus RdRp datasets). d Performance on the short RdRp motif test set (1:40 ratio; length from 50 to 250 aa) comprising three independent datasets (RdRp sampled from PalmDB datasets). e t-SNE visualization of feature embeddings. Plots compare raw input tokens (using the ESM2 tokenizer) with the last hidden-layer representations from ESM2, Transformer, and Rider. Benchmarking true positive rates (TPR) across different datasets: f RNA virus sequences from the RefSeq database; g the IMG/VR v4 database; and h simulated viral contigs (reads generated by ART-illumina and assembled using MegaHIT). Detailed performance breakdown of TPR across various categories: i test on RdRps reported by Neri et al., novelty was defined according to taxonomic ranks (Phylum to Family); j sequence length ranges (in base pairs), related to (f); and k environmental sources from the IMG/VR database, related to (g). *Notes: for f–h, each dot represents a predefined stratum rather than an experimental replicate (n = 6, 9, and 5 for (f–h), respectively). Bars show mean TPR, and error bars show the range. geNomad5, DeepVirFinder6, and VirSorter27 utilize nucleotide sequences as input, while other methods use amino acid sequences. TF Transformer, XGB XGBoost, RF random forest, Rider-nr normal mode, Rider-se sensitive mode, Rider-st strict mode. TPR was calculated if contigs or proteins belonging to these contigs were hit, divided by the total number of contigs. Rider shows robust performance, particularly on challenging datasets, such as short RdRp fragments and isolated RdRp motifs, where other comparator methods often struggle. On the short RdRp fragment test set (length ≤ 300 aa), Rider achieved the highest AUC (0.988), compared with an AUC of 0.966 for the sequence-and-structure dual-modal LucaProt (Fig. 2c). This advantage was even more pronounced on the PalmDB RdRp motif test set, where Rider achieved an AUC of 0.987 compared to LucaProt’s 0.920 (Fig. 2d). More importantly, at the default classification threshold, Rider yielded higher true-positive recovery and fewer false positives than LucaProt. For instance, on the PalmDB motif dataset, Rider successfully recovered 1240 true-positive sequences with only 78 false positives, whereas LucaProt only identified 891 true positives while producing nearly double the false positives (148) (Fig. S3g). Similarly, for short fragments (<300 aa), Rider identified more true positives (277 vs. 267) with fewer false positives (4 vs. 10) than LucaProt (Fig. S3g). Furthermore, large-scale evaluation on 300,000 non-RdRp proteins (0% sequence identity) confirmed Rider’s low false positive rate at scale, maintaining ~0.1% and ~0.7% FPR under strict and normal modes, respectively (Supplementary Data 7). These results confirm that our purely sequence-based Rider Stage 1 architecture generalizes robustly to highly divergent viral sequences. It maintains high specificity in complex, unbalanced data landscapes and shows higher recovery than existing methods for short and motif-level RdRp sequences. Notably, when evaluated on the standardized test set from the LucaProt study, our purely sequence-based Rider-st1 achieved comparable accuracy (99.67%, Supplementary Data 16) to LucaProt’s reported 99.99%, despite LucaProt relying on a more computationally intensive sequence-and-structure dual-modal architecture. Furthermore, we benchmarked Rider’s ability to recover RNA viral fragments from publicly reported datasets. For the NCBI RNA virus benchmark, we split original nucleotide sequences into length groups (Fig. 2j) to satisfy different input requirements. Unlike alignment-based or motif-driven tools, Rider is optimized to detect short or fragmented sequences (Fig. 2f, j, h, Supplementary Data 3 and 4), which are common in real-world metatranscriptomic assemblies and often missed by traditional methods. Note that shorter fragments may lack several motifs (for example, Virsorter2 is feature-number-dependent and LucaProt is RdRp-motif-specific). With increased length, each method performed comparably (>5000 bp). We further validated Rider’s ability to recover RNA viral sequences from nine ecological biomes curated from the IMG/VR database, including marine, freshwater, terrestrial, and host-associated environments (Fig. 2g, h, k). Across all biome categories, Rider (Rider-se: sensitive mode, Rider-nr: normal mode) achieved the highest true positive rates (average TPR = 94.57% and 90.41%, respectively; Fig. 2g and Supplementary Data 5) while maintaining low FPR on the 300,000 non-RdRp test sets (FPR = 0.1%, Supplementary Data 7), confirming its adaptability to diverse viral sequence compositions occurred in environmental microbiomes. Finally, to evaluate generalization to taxonomically divergent RdRp sequences across increasing levels of taxonomic divergence, we followed the protocol defined by Neri et al. Rider-nr achieved an average recall of 91.71%, outperforming both LucaProt (90.66%) and PalmScan (82.19%) across phylum-, class-, order-, and family-level novelty groups (Fig. 2i and Supplementary Data 6). Furthermore, we assessed Rider’s performance on large-scale public databases (Supplementary Data 8). When tested on 250,799 palmprint sequences from PalmDB, Rider achieved high true positive rates across all modes (99.24% for Rider-se, 98.20% for Rider-nr, and 96.23% for Rider-st), whereas LucaProt recovered 41.79% of these sequences. Scaling up to the massive Serratus RdRp dataset comprising over 1.4 million sequences, Rider-nr successfully retrieved 1,389,494 RdRps, achieving a TPR of 98.61%. Collectively, these findings highlight Rider’s robust capacity and scalability for highly divergent RdRp sequence recovery. Ablation studies and feature visualization To assess the contribution of Rider’s hybrid architecture, we performed ablation studies isolating the contributions of the ESM-2 foundation model and the downstream Transformer module. We compared the full Rider model against a Transformer-only baseline (trained on raw token inputs) and an untrained ESM2 linear-head control (ESM2-untrained). On the balanced test set, the ESM2-untrained control yielded a notably lower AUC (0.543) compared to Rider (0.986), whereas ESM2-linear performed comparably to Rider (Fig. S4). Similarly, the Transformer-only model achieved lower AUCs than Rider in the balanced (0.939 vs. 0.986) and unbalanced (0.929 vs. 0.983) settings (Figs. S4 and 2b, respectively). To examine the learned representations, we visualized the embeddings from raw tokenized inputs, ESM-2, the Transformer-only model, and Rider using t-SNE (Fig. 2e). In the two-dimensional projection, ESM-2 embeddings showed initial grouping, whereas Rider’s downstream Transformer reshaped the distribution into more compact, separated clusters of viral and non-viral sequences. These visualizations indicate that Rider modifies the ESM2 representation geometry, but do not establish a uniform classification advantage over ESM2-linear. Rider overcomes the challenges in viral identification in metatranscriptomes Identifying remote RdRp homologs through structure validation The primary challenge in RNA virus identification is the extreme sequence hypervariability of viral genomes, which causes traditional alignment-based methods to fail. While nucleotide sequences often share negligible similarity even among close homologs, we observed that these remote homologs retain high structural conservation. For example, an RdRp-like protein (287816_2) identified in our previous activated sludge metatranscriptomic dataset shared only 40.57% sequence similarity with the reference but exhibited a highly similar structure (TM-score = 0.98, Fig. 3a). Rider overcomes challenges of remote homology and sequence fragmentation in metatranscriptomic sequencing data. a Performance on remote homologs. Left/right: structural alignment between a Rider-predicted candidate from activated sludge (AD_AS_287816, grey) and a reference RdRp (UVM79539, purple). Despite low sequence identity (40.6%), they share a high structural similarity (TM-score = 0.98), with catalytic motifs A–C (green/red) accurately spatially aligned. b TPRs on the maximum-30% and operational-0% similarity benchmarks (n = 34,031 and 23,289 sequences, respectively); Rider-s2 recovered 99.71% and 90.91% of sequences, respectively. c, d Structural discrimination capability of the Rider Stage 2 module. c Distribution of Foldseek-derived structural target TM-scores (against RdRp) for positive (true RdRp) and negative (non-RdRp) datasets. For each query protein, the structural similarity is quantified as the mean TM-scores of the top 10 hits retrieved from the RdRp-domain-specific Database (RDSDB30). d Distribution of Foldseek-derived structural probability scores for RDSDB30. e Length distribution of training data showing Rider’s inclusion of partial sequences (blue peak <500 aa) compared to LucaProt (orange). f–h Robustness to sequence fragmentation. g Analysis of false negatives in the ICTV benchmark. Sequences missed by LucaProt (red dashed line) cluster in the 100–250 aa range, while Rider successfully detects them (blue line). f, h Real-world fragmentation case study (Mitovirus). Standard gene fragments the full-length reference gene (grey) from NCBI, while smaller partial ORFs (green/blue) were predicted from nucleotide sequences (Prodigal-gv). Rider successfully identifies the full gene and short fragments (91 aa and 96 aa) as viral RdRps, whereas LucaProt fails to detect fragments. i Differentiating functional viral polyproteins. Left are structural modeling (ESMFold) of Sesbania mosaic virus polyproteins. The read-through product P2ab (bottom) adopts a valid fold, whereas the truncated P2a (top) lacks the core structure. Right are schematics of domain architectures and detection results. Rider correctly identifies the RdRp domain within the full P2ab polyprotein and the fragmented ORF4 (real-world prediction). Crucially, Rider’s strict mode (Rider-st) and stage two (Rider-s2) successfully filter out the P2a product without the RdRp core domain. *Note: Rider-nr/st denotes normal/strict modes; suffixes 1/2 indicate Stage 1 (sequence) or Stage 2 (structure) validation. Motivated by this observation, we benchmarked the use of structural alignment for identifying divergent RNA viruses. We constructed the Rider Standard Structure Database (containing 4570 RdRp sequences from ICTV 2021) and compared Rider against traditional sequence search methods (HMM, BLASTp, and MMseqs2). Two benchmark datasets were constructed with maximum sequence similarities of 30% and 0% relative to our database. The results demonstrated that Rider stage two (Rider-s2, utilizing Foldseek for structural alignment) successfully identified 99.71% and 90.91% of remote homologous RdRps in these datasets, respectively. In contrast, traditional methods showed lower recovery than Rider (the original full-length-ORF HMM recovered at most 0.3%, whereas a core-domain profile-HMM sensitivity analysis recovered 66.97% and 54.79% on the 30% and 0% datasets, respectively), underscoring the robustness of structure-based search for RNA virus identification (Fig. 3b and Supplementary Data 9). Notably, Rider-nr1 performed even better on the 0% similarity sequences, providing a comprehensive set of candidates for the Stage 2 filter and demonstrating robust generalizability. To profile the probability distribution of RdRp versus non-RdRp structures, RdRps in the RDSDB30 (Fig. 3c, d) and the full RSDB (Fig. S1) were searched against themselves and 194,572 non-RdRp protein structures from UniRef90. TM-scores normalized by targets (RdRp) and probability score (Prob-score) were calculated using the average Top-10 values for each query. It was shown that RdRp and non-RdRp structures exhibit distinct Prob-score and TM-score distributions. Specifically, true RdRps typically yield a Prob-score above 50 and a TM-score above 0.6, demonstrating a clear structural separation from non-RdRp proteins, indicating that structural alignment against our RDSDB provides a highly reliable and robust criterion for validating remote viral RdRps, effectively eliminating false positives from complex metatranscriptomic backgrounds. Overcoming the challenges of sequence fragmentation in real-world metatranscriptomes Real-world metatranscriptomic data is characterized by fragmentation resulting from shotgun sequencing (150-bp reads), assembly into contigs, and subsequent gene calling (Fig. S2). While deep learning models like Rider and LucaProt demonstrate improved sensitivity toward remote homologs, identifying viral genes from fragmented contigs remains a distinct challenge. Standard gene callers often predict partial ORFs from short assemblies, which are frequently missed by models trained exclusively on full-length proteins. To address this, Rider employs a training strategy designed to simulate real-world workflows. Rather than relying solely on annotated full-length CDSs from NCBI, we generated fragmented training samples by processing RefSeq viral nucleotide sequences through standard gene prediction tools to extract isolated RdRp core domains. This ensured the model learned to recognize conserved core motifs even lacking full-length context. Consequently, Rider’s training set exhibits a higher density of short sequences (100–250 aa) compared to LucaProt (Fig. 3e), yielding a measurable performance advantage. Detailed analysis of false negatives revealed that the performance gap is driven specifically by short sequences (Fig. 3g). Rider correctly recalled 4554 out of 4570 annotated RdRp proteins from ICTV (99.64% recall), exceeding LucaProt’s 98.1% recall (Supplementary Data 1). We isolated 38 RdRp sequences detected by Rider but missed by LucaProt. Even among high-quality NCBI CDS sequences, LucaProt failed to detect 17 targets (Supplementary Data 2). The length distribution of these “missed” sequences peaks between 100 and 250 aa (red dashed line), whereas sequences detected by LucaProt cluster around standard protein lengths (~750 aa). Rider successfully covers both populations. The practical implication of this sensitivity is illustrated by the Mitovirus case study (AJ004930.1). While the reference database contains the full-length CDS (CAA06228.1), processing the nucleotide sequence through a standard gene caller (Prodigal-gv) fragmented the gene into four smaller proteins. Two of these fragments (91 aa and 96 aa) contained the RdRp core domain (Fig. 3h). Rider successfully identified these short fragments as viral RdRps, whereas LucaProt failed to detect them. These results confirm that Rider is robust not only to sequence divergence but also to the fragmentation inherent in metatranscriptomic assembly. Balancing RdRp motif specificity and sensitivity in complex polyproteins A critical challenge in viral mining is distinguishing functional RdRp domains embedded within complex polyproteins from non-catalytic precursors, while simultaneously processing long sequences. We first utilized the Sesbania mosaic virus (SeMV) to demonstrate Rider’s specificity. SeMV produces a truncated precursor (P2a) lacking the polymerase and a read-through product (P2ab) containing the C-terminal RdRp. While sequence-based methods might generate ambiguous signals for P2a due to shared viral motifs, Rider’s Stage 2 structural validation rejects it (TM-score <0.5) because it lacks the core RdRp fold when compared against RDSDB. Conversely, Rider correctly localizes the embedded RdRp within the full-length P2ab and identifies it even when it is predicted as a fragmented ORF (Fig. 3i). To further validate Rider’s sensitivity on long polyproteins, we benchmarked Rider-nr against LucaProt using 109 Coronaviridae polyproteins (87 ORF1ab and 22 ORF1a) (Supplementary Data 13). During Stage 1, Rider successfully flagged 108 candidate sequences. In Stage 2, it demonstrated high specificity by accurately filtering out 21 of the 22 ORF1a-only proteins lacking canonical RdRp domains (with only one misclassification), while successfully retrieving 94.25% (82/87) of the ORF1ab polyproteins. Conversely, LucaProt struggled with both sensitivity and specificity: it missed 25 true ORF1ab polyproteins and erroneously classified 12 ORF1a proteins as RdRps. This underperformance is primarily due to input length limitations; for instance, the RdRp domain of YP_009113022.1 is located at positions 4420–5344, which exceeds LucaProt’s maximum input length of 4000 amino acids. Together, these results confirm that Rider’s multi-mode architecture and structural validation effectively balance high sensitivity for extended or embedded RdRps with strict specificity against non-catalytic precursors. DNA read coverage supports Rider predictions To evaluate whether Rider-predicted RNA virus candidates correspond to genuine genomic entities, we performed orthogonal validation using DNA read coverage from 167 paired metagenomic and metatranscriptomic datasets of environmental samples. Following the rationale proposed by Xin et al.13, true RNA viruses should exhibit negligible underlying DNA signals. For this analysis, we included predicted candidates with a Prob-score >50 after structure validation. Across all paired datasets, a consistent negative correlation emerged between Rider scores and DNA mapping rates (Figs. 4i and S5). The overall distribution of DNA mapping rates was right-skewed with a mean of 3.5%. Together, these multi-omics results robustly confirm the RNA origin of Rider’s predictions and effectively rule out DNA virus contamination in real-world metatranscriptomic contexts. Rider profiles RNA viruses across diverse ecological systems. a Overlap of RdRp candidate clusters identified by Rider, LucaProt, and PalmScan; 519 Rider-only candidates lacked sequence homology but showed structural similarity to known RNA viral proteins. b Environmental distribution of sequences identified by Rider (blue), LucaProt (orange), and PalmScan (green), shown as log₁₀(count + 1). c Rider recovered 161,158 of 161,979 RdRps reported by LucaProt (99.49%). d Structure-guided phylogeny of 11,113 structurally verified candidates. The inner strip denotes the predicted phylum. Outer tracks, from inside to outside, denote ICTV reference taxonomy, <30% amino acid similarity to LucaProt supergroups (purple), Rider-only detection (red), Rider–LucaProt co-detection (green), and leaf-cluster size (blue bars); dashed boxes denote a cluster size of 10. Strip labels were assigned when >50% of sequences in a leaf cluster shared the feature. e Structural alignment of a Rider-only soil candidate (blue; soil_srr5215306_253133_2) and reference rv4_111682 (grey; TM-score = 0.94). f Amino acid length distributions of candidates identified by the three tools. g Relationship between Rider probability score (ProbScore) and structural similarity (TM-score), with marginal densities. h Average pLDDT distributions for structurally verified and unverified candidates. “Known” and “Novel” denote >30% and <30% similarity to LucaProt supergroups, respectively. i Relationship between Rider score and DNA mapping rate for wastewater influent (WWTP INF; n = 779), activated sludge (WWTP AS; n = 948), human gut (n = 161) and soil (n = 613). Each point represents one retained prediction-mapping record. Red lines show ordinary least-squares fits and shaded bands indicate 95% confidence intervals. Pearson correlations were: WWTP INF, r(777) = − 0.065, 95% CI [−0.135, 0.005], P = 0.0696; WWTP AS, r(946) = − 0.090, 95% CI [−0.153, −0.027], P = 0.00552; human gut, r(159) = − 0.061, 95% CI [−0.213, 0.095], P = 0.446; and soil, r(611) = − 0.014, 95% CI [−0.093, 0.065], P = 0.730. All P values are two-sided. Computational efficiency and scalability across synthetic and real-world datasets To evaluate the computational efficiency of Rider, we first conducted a direct comparison of the deep learning inference speed against LucaProt using controlled benchmark datasets (Supplementary Data 10). Rider demonstrated a substantial advantage, achieving an average ~44-fold speedup in core inference time, a performance gain largely attributed to its optimized transformer-based encoder architecture. Building on this, we assessed the computational cost of the structural validation module (typically the most resource-intensive step) through a stress test designed to represent a worst-case scenario (Supplementary Data 11). In this test, where all input sequences were forced to undergo structure prediction, the pipeline remained computationally feasible, with runtime scaling linearly relative to sequence length up to 1200 amino acids. We further validated Rider’s performance in practical, large-scale metatranscriptomic applications by profiling end-to-end execution times across diverse environmental samples, including human gut, activated sludge, wastewater influents, and soil (Supplementary Data 12). The two-stage design of Rider proved highly effective in these real-world scenarios. The deep learning module (Stage 1) rapidly filtered out the vast majority of non-viral sequences, ensuring that the computationally expensive structural validation (Stage 2) was reserved only for high-confidence candidates. For instance, in a large-scale wastewater influent dataset containing 63,688 sequences, the entire end-to-end pipeline completed in approximately 2.3 h, with the initial model inference requiring only ~15 min. Similarly, processing times for soil and human gut samples typically ranged from minutes to a few hours depending on the abundance of viral candidates. These results confirm that integrating structural validation provides rigorous verification without creating a prohibitive bottleneck, making Rider suitable for high-throughput viral discovery in complex environmental data. Expansion of the RNA virosphere and identification of deeply divergent lineages To systematically assess Rider’s ability to discover RNA viruses from diverse ecological niches, we applied it to a large-scale environmental dataset comprising over 10,000 metatranscriptomic samples13. Predicted ORFs were clustered at 90% amino acid similarity, and representative centroid sequences were analyzed. Against the Rider RdRp-domain-specific database (RDSDB), 11,113 candidates were successfully verified at the structural level. Notably, to maximize the recovery of highly divergent viruses co-identified by other tools but missed by standard sequence homology (Prob-Score <50), we applied a relaxed structural threshold (TM-score >0.45). As shown in Fig. 4g, this strategy successfully rescued numerous candidates that maintained high structural conservation despite low sequence similarity, leaving 2294 unverified (Fig. S6). Among the total clusters, Rider identified 12,888 RdRp candidates that were co-identified by at least one additional tool (LucaProt or PalmScan), providing orthogonal support for their viral origin. A total of 9421 RdRp-like ORFs were co-identified by all three methods, along with 519 candidates only detected by Rider (Fig. 4a). The Rider-only candidates were cross-verified by geNomad, in which 93 RNA viral signals were detected, of which 59 were annotated as Riboviria. Ecosystem-level analysis revealed soil as the most abundant reservoir for RNA viruses; notably, Rider outperformed PalmScan and LucaProt in viral retrieval from soil samples by 5.33% and 1.04%, respectively (Fig. 4b). Furthermore, the protein length distribution of the predicted RdRp-like sequences showed strong concordance across all three tools (Figs. 4f and S7). To further validate sensitivity, we evaluated Rider’s Stage 1 module on LucaProt’s established supergroups, successfully recalling 99.49% (161,158 out of 161,979) of reported RdRps (Fig. 4c). Together, these results underscore Rider’s sensitivity for detecting diverse RNA viruses from complex environmental data. To systematically evaluate the novelty of the 13,407 recovered RdRp sequences, we performed a stratified clustering analysis against LucaProt’s supergroups using MMseqs2 with stringent coverage criteria (80% coverage, --cov-mode 1) to ensure biological significance. We first assessed novelty at a species-like level (90% amino acid identity). At this stringent threshold, 10,292 sequences (76.7%) clustered with known viral RdRps in LucaProt. This high recovery rate of known viruses validates the accuracy of our mining pipeline, while simultaneously indicating that approximately 23% of the dataset represents potentially uncharacterized species or genera. To identify deeper evolutionary novelty, we relaxed the clustering threshold to 50% amino acid identity, a cutoff typically used to demarcate viral families or orders. Under these broader conditions, the number of sequences clustering with known lineages increased slightly to 10,654 (79.5%). This increment suggests that a subset of sequences (n = 362) that did not cluster at the 90% identity threshold actually represent divergent genera within established viral families. Most notably, however, a substantial core of the dataset exhibited profound divergence: 2755 sequences (20.5%) failed to cluster with any known viral proteins even at this relaxed threshold. These sequences, lacking significant homology to currently cataloged diversity, likely represent putative uncharacterized viral families or higher-order taxa. Collectively, these results demonstrate that our dataset not only captures a vast array of known viral diversity but also unveils a significant “dark matter” of the RNA virosphere warranting further phylogenetic characterization. Phylogenetic analysis unveils deeply divergent viral clades To further characterize the evolutionary relationships of the highly divergent “dark matter” identified above, we constructed a comprehensive phylogenetic tree using the 11,113 structurally verified candidate sequences. To ensure robust phylogenetic inference across such deeply divergent lineages, the RdRp domains used for tree construction were precisely extracted based on their structural alignment regions rather than relying solely on primary sequence homology. This structure-guided phylogenetic analysis demonstrates Rider’s capability in identifying highly divergent viral lineages at both the individual sequence and clade levels. For instance, consistent with our observation that soil is a major reservoir for divergent RNA viruses, Rider exclusively identified a highly divergent sequence located on a long branch within a soil sample (Fig. 4d, e, soil_srr5215306_k141_253133 2_domain_2001_2630). Although this specific candidate lacks a direct taxonomic label, its phylogenetic placement reveals that it is flanked on both sides by reference sequences belonging to the phylum Duplornaviricota, suggesting it represents a deeply divergent, previously uncharacterized lineage associated with this phylum. Furthermore, despite being deeply rooted and highly divergent at the primary sequence level, this candidate, co-identified by both Rider and LucaProt, exhibited high 3D structural conservation (Fig. 4e), sharing a high TM-score of 0.94 with rv4_111682, a divergent RNA virus previously reported by Neri et al. This structural concordance and biologically meaningful phylogenetic placement strongly validate the biological authenticity of these deep-branching candidates and the reliability of our structure-based domain extraction approach. Beyond such individual extreme outliers, Rider also identified previously uncharacterized lineages. We identified a highly supported, distinct clade (Bootstrap = 95) comprising 157 leaf nodes (Fig. 4d, highlighted region). Notably, the vast majority of sequences within this cluster share less than 30% sequence similarity with the publicly available sequences from the LucaProt study (indicated by the purple outer ring), defining it as a highly divergent RdRp cluster. In our cross-validation, although LucaProt was able to predict a subset of sequences within this clade (green ring), a substantial proportion was exclusively identified by Rider (red ring, “Rider only”). Taxonomically, this clade is flanked only by sporadic reference sequences belonging to the phylum Pisuviricota, suggesting that this divergent cluster may represent an undercharacterized deep-branching lineage or a distant sister group associated with this phylum. Together, these findings demonstrate that Rider is sensitive to highly divergent viral sequences. Deeply divergent RNA viruses challenge current structural verification models While our sequence-based analysis substantially expanded the known RNA virosphere, the structural validation of highly divergent “dark matter” sequences highlighted a key technological bottleneck. Among the consensus set of 13,407 candidate RdRps—defined as sequences identified by at least two of three independent tools (Rider, LucaProt, and PalmScan)—11,113 were successfully verified at the structural level, leaving 2294 unverified. To determine whether these 2294 unverified sequences represent false positives or simply artifacts of poor structural prediction, we analyzed the correlation between their predicted local distance difference test (pLDDT) scores and extreme sequence novelty (defined as <30% identity to LucaProt’s supergroups, placing them in the structural “twilight zone”). This analysis revealed a striking dichotomy (Fig. 4g). The 11,113 verified sequences exhibited high-quality structural predictions (average pLDDT = 0.70). Notably, the 1027 highly divergent sequences within this verified cohort (9.2%) were folded successfully (average pLDDT = 0.75), demonstrating that our pipeline can robustly validate deeply divergent RdRps provided their initial structures are accurately modeled. In stark contrast, the 2294 unverified sequences suffered from severe folding failures, with their average pLDDT plummeting to 0.41. Crucially, the majority of these unverified candidates (61.5%, n = 1410) fell into the highly divergent “twilight zone,” where their structural predictions essentially collapsed (average pLDDT = 0.37). Collectively, these results strongly suggest that the failure to structurally verify these remaining candidates does not inherently imply they are non-viral artifacts. Rather, it highlights a fundamental limitation of current single-sequence AI structure predictors, such as ESMFold, which struggle to accurately fold deeply divergent RNA viral sequences lacking sufficient evolutionary context. Extending to human gut virome: insights from an IBD cohort Profiling the human gut RNA virome remains a major technical challenge, especially in the context of complex diseases, such as IBD16. Although recent studies suggest that the gut RNA virome may influence host health, findings across cohorts have often been inconsistent. These discrepancies reflect broader limitations in virome research, including extreme sequence diversity, fragmented assemblies, and sparse representation in reference databases. A fundamental limitation in current metagenomic pipelines is the systematic exclusion of short sequences. By analyzing ORF length distributions across diverse ecosystems, including soil, marine, freshwater, and the human gut, we observed a striking and consistent trend: approximately 40% of all predicted ORFs fall below the standard 200 amino acid (aa) threshold (Fig. 5h, i). This ubiquity suggests that fragmentation is not merely an artifact of specific low-quality samples, but a pervasive characteristic of metatranscriptomic data that standard motif-based methods fail to capture. Rider enables robust profiling of the human gut RNA virome across inflammatory bowel disease (IBD) cohorts. a Schematic overview of the IBD cohort, comprising individuals with ulcerative colitis (UC, n = 21), Crohn’s disease (CD, n = 45), and non-IBD healthy controls (n = 11). b–d Relative abundance of predicted RNA viral contigs (log₁₀(RPKM + 1)) across diagnostic groups. b Rider predictions with a standard minimum protein length threshold of >200 aa. c LucaProt predictions with a threshold of >200 aa. d Rider predictions with an extended sensitivity threshold of >100 aa. For b–d, dots denote detected viral contigs (b: n = 68, 20, and 37; c: n = 69, 20, and 39; d: n = 171, 30, and 67 for CD, non-IBD, and UC, respectively). Boxes show interquartile ranges, center lines medians, and whiskers 1.5 × IQR. Exploratory contig-level comparisons were performed using Kruskal–Wallis tests followed by pairwise two-sided Wilcoxon rank-sum tests. Pairwise P values were Holm-adjusted in b and c and unadjusted in d. Because detected viral contigs are not independent participants, these P values should not be interpreted as participant-level inference. e Venn diagram showing contig-level overlap between Rider (≥150 aa; n = 126) and LucaProt (>150 aa; n = 131). DNA mapping-rate densities for unique Rider-predicted contigs at ≥150 aa (f; n = 126) and ≥100 aa (g; n = 180). The high density at 0% mapping rate is consistent with limited DNA support for these candidates. h Distribution of ORF lengths across four distinct environmental biomes: soil, marine, freshwater, and human gut (IBD). The dashed line indicates the 200 aa threshold. i Proportion of short ORFs (<200 aa) across the four biomes, showing a consistent fragmentation rate of ~38–44% across all environments. j Structural validation of Rider-predicted proteins using Foldseek (n = 175 proteins). The histogram shows the distribution of probabilistic scores, with a mean score of 77.75 (blue dashed line) and a fitted density curve (red line), indicating high structural confidence for the predicted viral proteins. a Was created in BioRender. Luo, G. (2026) https://BioRender.com/5ae3aut. To address this critical gap, we applied Rider to a well-characterized IBD metatranscriptomic cohort comprising Crohn’s disease (CD), ulcerative colitis (UC), and non-IBD samples (Fig. 5a). Rider’s capacity to recover shorter, fragmented viral sequences (>100 aa) allowed us to interrogate this previously overlooked fraction. We rigorously validated these candidates using two orthogonal approaches. First, mapping DNA sequencing reads to the identified contigs yielded consistently negligible mapping rates (Fig. 5f, g), confirming that these sequences represent genuine exogenous RNA viral elements rather than DNA contamination. Second, structural validation via Foldseek produced a high mean probability score (77.75, Fig. 5j), providing robust evidence that these short fragments adopt biologically relevant viral folds. Crucially, this enhanced sensitivity provided a recalibrated view of disease-associated virome dynamics. When restricting our analysis to standard length thresholds (>200 aa), the results recapitulated previously reported trends, where UC samples appeared to exhibit higher viral loads than non-IBD controls (Fig. 5b, c). However, expanding the analysis to include the validated shorter fragments (>100 aa) revealed that viral abundance in non-IBD controls was actually comparable to that in UC patients (Fig. 5d). This suggests that the apparent “viral bloom” in UC observed in prior studies may largely stem from an underestimation of fragmented viral populations in the healthy gut. Most strikingly, regardless of the length threshold applied, CD-derived contigs showed the lowest median RNA viral abundance. Together, these findings demonstrate that while differences between UC and healthy controls are highly sensitive to assembly completeness, the depletion of the gut RNA virome remains a consistent descriptive pattern of Crohn’s disease. Discussion This work demonstrates that Rider, a framework combining a frozen protein language model with a trained downstream classifier and protein structure alignment, supports the identification of both known and divergent RNA viruses. The promising ability to filter initial viral candidates at the first step (sequence-level prediction), followed by fast structure alignment validation, makes it possible for global-sample-level application in real-world metatranscriptomic sequencing data at a lower computational cost than existing tools. We attribute Rider’s performance to its two-stage paradigm, which effectively synergizes deep representation learning with structural validation to maximize both sensitivity and specificity. In the first stage, Rider functions as a highly sensitive primary filter. By combining frozen ESM2 sequence-level representations with a downstream Transformer classifier, Rider provides sensitive primary screening for deeply divergent viruses and short fragments that are frequently missed by traditional motif-centric tools. Importantly, feature visualization and benchmark evaluations confirm that this sequence-level model already achieves an inherently low false-positive rate by tightly clustering viral versus non-viral representations. Building upon this high-confidence signal recovery, the second stage provides rigorous structural verification. By performing fast structural alignment against our curated RdRP-domain-specific database (RDSDB), Rider definitively validates remote homologs and rigorously filters out any residual structural mimics or non-catalytic polyprotein precursors. This sequential strategy empowers Rider to navigate complex metatranscriptomic landscapes with high accuracy and reliability. The identification of RNA viruses from environmental and human metatranscriptomic assemblies remains fundamentally challenging due to extreme length variations in real-world data. From short fragmented contigs (<300 aa) to massive polyproteins (>4000 aa), viral sequences often lack complete functional domains or conserved motifs. These limitations hinder traditional alignment-based methods (e.g., BLAST) that rely on high sequence similarity. In our global analysis, Rider illuminated the “dark matter” of the RNA virosphere, identifying over 20% of sequences as deeply divergent, putative uncharacterized taxa. Crucially, Rider’s structure-guided domain extraction enabled robust phylogenetic placement of sequences lacking primary homology, allowing us to anchor extreme outliers, such as deep-rooting soil viruses linked to Duplornaviricota, and identify previously uncharacterized clades associated with Pisuviricota. Beyond deep evolutionary divergence, Rider excels at recovering short, fragmented viral signals (>100 aa) that are ubiquitous in metatranscriptomes but routinely discarded by standard pipelines. In our human IBD cohort, capturing these overlooked exogenous RNA elements fundamentally recalibrated our understanding of gut virome dynamics17. By validating these short fragments, we revealed that healthy microbiomes also harbor substantial fragmented viral populations, demonstrating that the depletion of the RNA virome is the true, robust signature of Crohn’s disease. Whether mapping deeply divergent lineages in nature or capturing elusive viral fragments and RNA elements in medical cohorts, Rider provides a more comprehensive and unbiased resolution of the global RNA virosphere18. While Rider shows strong sensitivity for both canonical and divergent RNA virus proteins, several limitations merit note. First, because Rider is trained to detect a broad spectrum of replication‑associated signals (including regions upstream or adjacent to RdRp), its positives can include contigs that lack an explicit RdRp domain (Fig. 3c, d). This creates a challenge when validating against public databases (e.g., NCBI or Wolf et al.), where many references annotated as “RdRp” are actually long polyproteins containing non-catalytic upstream regions. To explicitly address the difficulty of distinguishing true functional domains from non-catalytic viral precursors, we constructed a curated RdRp-domain-specific database. By strictly delineating and retaining only the RdRp catalytic domains from polyprotein-rich repositories, high structural scores in Rider’s final pipeline specifically reflect true RdRp identity. For users who require strict RdRp retrieval, we recommend post‑filtering Rider outputs with motif‑based tools, such as LucaProt, PalmScan (as shown in Fig. 4b), or a curated structural RdRp domain-specific reference set to improve specificity; conversely, retaining raw Rider outputs is appropriate when the goal is maximal recovery of fragmented or non‑canonical replication proteins. Second, structure validation relies heavily on both the capabilities of current AI folding models and the breadth of the structure database, as shown by the decrease in the hitting rate of Rider on previously reported RdRp sequences. Crucially, our results highlight a structural validation bottleneck for deeply divergent RNA viruses. Single-sequence predictors like ESMFold inherently rely on learned evolutionary patterns19,20; thus, when confronted with extreme viral “dark matter” lacking homologous counterparts, their predictive accuracy collapses. This poses a risk of systemic bias, where overly stringent structural verification might inadvertently filter out the most divergent viral lineages as false positives. Besides, systematic functional annotation and taxonomic assignment via structure alignment remain challenging. Structural prediction and alignment are useful supporting evidence but are not yet sufficient for definitive classification: current structure databases are incomplete, and fold similarity without genomic, syntenic, or ecological context can be ambiguous. Therefore, structure‑based matches should be treated as indicative rather than conclusive. Looking forward, building upon the foundation of our curated RDSDB, we suggest that future efforts in structure-aware viral discovery should prioritize expanding structural reference libraries for highly divergent viral domains. Furthermore, it is critical to develop next-generation AI folding models that are less dependent on known evolutionary contexts. In practice, we advocate a hybrid workflow: use Rider for high-sensitivity scanning of metatranscriptomic assemblies, then apply targeted motif filters and domain-specific structural analyses to refine domain annotations and taxonomic assignments. Methods Dataset construction for RNA-dependent RNA polymerase (RdRp) RNA-dependent RNA polymerase (RdRp) is a universal hallmark gene of RNA viruses and serves as a primary target for viral discovery. However, publicly available RdRp sequences exhibit substantial variability in both sequence composition and annotation quality. Although many entries are labeled as “RdRp,” their genomic contexts vary across viral families—ranging from standalone proteins to polyproteins and truncated fragments—resulting in a heterogeneous dataset. To construct a high-confidence positive dataset, we implemented a systematic curation and filtering workflow. RdRp protein sequences were initially retrieved from the NCBI nucleotide database using the keyword “RNA-dependent RNA polymerase.” Approximately 70,000 sequences were extracted from GenBank-format files using a custom parsing script. Additionally, we also included 4803 RdRp-motif-contained sequences from the RefSeq database, where ORFs were predicted with Prodigal-gv (v2.11.0-gv) and the clear RdRp core domains were filtered using a hidden Markov model (HMMER v3.4)-based annotation3, with cutoff parameters: domain score >50 and E < 1e−3. After merging and rigorous filtering, a total of 24,439 positive RdRp sequences were retained for model training and validation. Notably, in major viral groups, such as positive-sense single-stranded RNA (+ssRNA) viruses (e.g., Nidovirales and Picornavirales), RdRps do not exist as standalone proteins but are translated as part of massive polyproteins, often embedded alongside a series of replication-related proteins, such as capsids, helicases, and proteases. To enhance the generalizability of our models to real-world metatranscriptomic data and to address input length limitations (1024 aa) when processing these giant polyproteins, we did not strictly rely on perfect, full-length CDSs. Instead, we deliberately included RdRp-labeled replication-related proteins derived from polyproteins, as well as short, partial RdRp motif fragments generated by gene callers. These RdRp-labeled sequences were categorized into two functional groups according to their domain architecture and genomic context: Replication-related proteins, such as capsid, helicase, and protease of the RdRp region in polyproteins (some RdRps appear in forms of polyproteins in RNA virus); Replication-related proteins, such as capsid, helicase, and protease of the RdRp region in polyproteins (some RdRps appear in forms of polyproteins in RNA virus); Partial and complete RdRp sequences, including independent or segmented coding sequences (CDSs). Partial and complete RdRp sequences, including independent or segmented coding sequences (CDSs). Negative dataset construction and data partitioning To construct a robust negative dataset, we curated protein sequences from the UniRef90 database while ensuring the complete exclusion of RdRp-related proteins. Initially, all sequences containing the terms “RdRp” or “Orthornavirae” in their annotations were removed. To further refine taxonomic filtering, we employed TaxonKit21 to retrieve taxonomy identifiers from the (NCBI taxdump) files and excluded all sequences classified under the viral realm Orthornavirae (Taxonomy ID: 2732396). To eliminate any residual polymerase-related sequences, we used Palm-Scan, a domain-level classification to palm-domain-containing proteins. Any sequence flagged as polymerase-like was removed, minimizing the risk of false negatives. Crucially, to address the challenge of distinguishing RdRp from other viral proteins and to force the model to learn a tighter decision boundary, we deliberately introduced a set of non-RdRp RNA viral proteins as “hard negatives.” Specifically, this hard negative set included 122 proteases, 399 capsids, and 45 helicases derived from RNA viruses. For the data partitioning, we established a 1:5 ratio of positive to negative sequences to expose the model to a broader negative sequence space. Based on the 24,439 positive RdRp sequences, we randomly sampled 122,195 non-viral, non-RdRp amino acid sequences from the filtered UniRef90 database to serve as the base negative set. To ensure a balanced distribution of all sequence types across the training and validation phases, we employed a stratified splitting strategy. Each data category—the positive RdRps, the UniRef90 base negatives, and the three groups of viral hard negatives (protease, capsid, helicase)—was independently partitioned into an 80% training set and a 20% validation set. Ultimately, this stratified approach yielded a final training dataset comprising 117,759 sequences (19,551 positives and 98,208 negatives) and a validation dataset comprising 29,441 sequences (4888 positives and 24,553 negatives). This strategy successfully maintained the approximately 1:5 positive-to-negative ratio during both the training and validation processes, ensuring robust model evaluation (Supplementary Data 15). Model design, training, and benchmarking Model architecture The architecture of our model, Rider, comprises three main components: (i) a pre-trained protein language model (ESM2-35M) for contextual feature extraction, (ii) a lightweight Transformer encoder for sequence-level representation refinement, and (iii) a linear output layer for binary classification. This modular design enables sensitive detection of RdRp-like signals in protein sequences while maintaining computational efficiency. Input sequences are first padded or truncated to a maximum length of 1024 tokens (up to 1022 amino acids plus special tokens) and then processed by the ESM2-35M model using the tokenizer-derived attention mask, which generates 480-dimensional contextual embeddings for each amino acid residue. To preserve the structural and evolutionary information encoded during pretraining, we freeze the weights of ESM2-35M during training. Next, we select the first-token embedding from the ESM2 output, analogous to the [CLS] token in natural language models, yielding a fixed-length per-sequence representation with shape [B, 480]. No mean or max pooling is applied. This representation is reshaped to [B, 1, 480] and passed to a two-layer Transformer encoder. Each layer includes multi-head self-attention (with eight heads), a feed-forward network with a hidden dimension of 960, and dropout (rate = 0.3) applied after each sub-layer. This component performs sequence-level nonlinear representation refinement; because the Transformer receives a single sequence-level token, it does not model residue-level long-range contextual relationships. We then use the output corresponding to this single token as the fixed-length representation. This representation is passed to a linear classification layer, which projects the 480-dimensional vector into two logits representing the positive and negative classes. A softmax function converts these logits into class probabilities. Only the Transformer encoder and linear classification layer are updated during training; the ESM2-35M backbone remains fixed. This design reduces the risk of overfitting on limited viral training data and leverages the rich priors encoded in large-scale protein pretraining. Construction of pre-training aware benchmarking test sets To rigorously evaluate the generalization capability of Rider and ensure zero data leakage22–24, a critical concern in protein language modeling, we constructed “Pre-training aware test sets” adhering to stringent exclusion criteria. First, to eliminate memorization bias from the protein language model backbone, we cross-referenced all candidate sequences against the UniRef50 (2021_04 release) dataset used for ESM2 pre-training. Any sequence appearing in the pre-training corpus was strictly excised. Subsequently, to prevent homology-based information leakage, we employed MMseqs2 to enforce a rigorous sequence identity threshold. Positive test candidates: sequences were sourced from recently characterized RNA viral lineages (e.g., Neri et al.3 and Edgar et al.2). Specifically, the Edgar et al. data comprises two distinct subsets: the Serratus RdRp dataset (1,409,058 RdRp sequences sourced via the LucaProt study) and the PalmDB dataset, which contains 250,799 sequences representing the RdRp motif core regions (lengths ranging from 50 to 250 aa, with an average of 107 aa). We excluded any test sequence sharing >30% sequence identity with either our training data or the ESM2 pre-training corpus, resulting in 23,628 sequences with a maximum 30% similarity and 12,510 sequences in the operational-0% pool from Neri’s dataset; 250,799 motif sequences from PalmDB; and 458,859 sequences in the operational-0% pool from the Serratus RdRp datasets. Positive test candidates: sequences were sourced from recently characterized RNA viral lineages (e.g., Neri et al.3 and Edgar et al.2). Specifically, the Edgar et al. data comprises two distinct subsets: the Serratus RdRp dataset (1,409,058 RdRp sequences sourced via the LucaProt study) and the PalmDB dataset, which contains 250,799 sequences representing the RdRp motif core regions (lengths ranging from 50 to 250 aa, with an average of 107 aa). We excluded any test sequence sharing >30% sequence identity with either our training data or the ESM2 pre-training corpus, resulting in 23,628 sequences with a maximum 30% similarity and 12,510 sequences in the operational-0% pool from Neri’s dataset; 250,799 motif sequences from PalmDB; and 458,859 sequences in the operational-0% pool from the Serratus RdRp datasets. Negative test candidates: sequences were drawn from UniRef90 (2023_12 release), excluding sequences with >30% identity to the training set to ensure the model relies on learned structural features rather than memorized motifs, resulting in 2,675,192 sequences with a maximum 30% similarity and 2,143,800 sequences in the operational-0% pool. Negative test candidates: sequences were drawn from UniRef90 (2023_12 release), excluding sequences with >30% identity to the training set to ensure the model relies on learned structural features rather than memorized motifs, resulting in 2,675,192 sequences with a maximum 30% similarity and 2,143,800 sequences in the operational-0% pool. The 30% and operational-0% pools were defined by the absence of MMseqs2 (v18.8cc5c) hits to either the Rider fine-tuning positive set or the UniRef50 2021_04 pretraining corpus at minimum sequence-identity thresholds of 30% and 1%, respectively (-c 0.333, -e 0.1, --cov-mode 1). Thus, “operational-0%” denotes no detected hit at the 1% threshold rather than literal zero residue identity. Hereafter, “0%” refers to this operational definition. From this high-stringency pool (0–30% overlap with training/pre-training), we generated six types of benchmarking datasets: Balanced test sets (statistical robustness, maximum 30% similarity): we constructed three independent, mutually exclusive subsets (Set 1, Set 2, and Set 3). Each set comprises 7876 positive and 7876 negative sequences (N = 15,752 per set). This tripartite design ensures no overlap between test iterations, allowing performance metrics to be reported as mean ± standard deviation. Balanced test sets (statistical robustness, maximum 30% similarity): we constructed three independent, mutually exclusive subsets (Set 1, Set 2, and Set 3). Each set comprises 7876 positive and 7876 negative sequences (N = 15,752 per set). This tripartite design ensures no overlap between test iterations, allowing performance metrics to be reported as mean ± standard deviation. Imbalanced 1:100 test sets (0% similarity): to verify Rider’s robustness against the class imbalance inherent in real-world metatranscriptomic mining, we constructed ten independent imbalanced datasets. Each dataset comprises 100 low-similarity viral RdRps sampled from the Neri dataset and 10,000 non-viral negatives (1:100 ratio). These sets were used to evaluate the model’s ability to maintain sensitivity without generating excessive false positives. Imbalanced 1:100 test sets (0% similarity): to verify Rider’s robustness against the class imbalance inherent in real-world metatranscriptomic mining, we constructed ten independent imbalanced datasets. Each dataset comprises 100 low-similarity viral RdRps sampled from the Neri dataset and 10,000 non-viral negatives (1:100 ratio). These sets were used to evaluate the model’s ability to maintain sensitivity without generating excessive false positives. Imbalanced 1:400 test sets (0% similarity): to add difficulties, we constructed four independent imbalanced hard datasets, including other viral proteins (e.g., capsid, protease, and helicase) into the negative sets. These hard datasets comprise 25 low-similarity viral RdRps from the Neri dataset, 25 other viral proteins, and 9975 non-viral negatives (1:400 ratio). These sets were used to evaluate the model’s ability to maintain specificity in distinguishing RdRP from other viral proteins. Imbalanced 1:400 test sets (0% similarity): to add difficulties, we constructed four independent imbalanced hard datasets, including other viral proteins (e.g., capsid, protease, and helicase) into the negative sets. These hard datasets comprise 25 low-similarity viral RdRps from the Neri dataset, 25 other viral proteins, and 9975 non-viral negatives (1:400 ratio). These sets were used to evaluate the model’s ability to maintain specificity in distinguishing RdRP from other viral proteins. Imbalanced Edgar test sets (0% similarity): to provide a direct and rigorous comparison with existing models (e.g., LucaProt) on highly divergent viruses, we constructed three independent sets sampled from Edgar’s datasets2. Each set contains 500 low-similarity viral RdRps and 20,000 non-viral negatives (1:40 ratio). Imbalanced Edgar test sets (0% similarity): to provide a direct and rigorous comparison with existing models (e.g., LucaProt) on highly divergent viruses, we constructed three independent sets sampled from Edgar’s datasets2. Each set contains 500 low-similarity viral RdRps and 20,000 non-viral negatives (1:40 ratio). Imbalanced short-fragment and motif-core test sets (0% similarity): to specifically evaluate the models’ performance on truncated sequences commonly found in real-world sequencing data and their ability to recognize core functional regions, we constructed two categories of short-sequence datasets. First, to test motif recognition, we sampled three independent sets from the PalmDB dataset (representing the RdRp motif core, 50–250 aa). Second, to test robustness on random truncations, we constructed three additional independent sets restricted to sequences shorter than 300 amino acids from the Serratus RdRp candidate pool. Each of these six sets comprises 100 short, low-similarity viral RdRps and 4000 short non-viral negatives (1:40 ratio). Imbalanced short-fragment and motif-core test sets (0% similarity): to specifically evaluate the models’ performance on truncated sequences commonly found in real-world sequencing data and their ability to recognize core functional regions, we constructed two categories of short-sequence datasets. First, to test motif recognition, we sampled three independent sets from the PalmDB dataset (representing the RdRp motif core, 50–250 aa). Second, to test robustness on random truncations, we constructed three additional independent sets restricted to sequences shorter than 300 amino acids from the Serratus RdRp candidate pool. Each of these six sets comprises 100 short, low-similarity viral RdRps and 4000 short non-viral negatives (1:40 ratio). Model training, benchmarking, and ablation experiment To train Rider, we fine-tuned a lightweight downstream classifier on 480‑dimensional per‑sequence embeddings extracted from a frozen ESM2-35M protein language model. The classifier comprises a small Transformer encoder and a linear two‑way output layer for binary classification (viral vs. non-viral). To address class imbalance in the training set, we applied weighted cross-entropy loss, where class weights were computed from the training data distribution. Training was conducted using the Hugging Face Trainer framework with the AdamW optimizer (learning rate = 1e−4) and a batch size of 256 per device. We implemented an early stopping strategy (patience = 3) to prevent overfitting. The model selection process utilized the “load_best_model_at_end=True” configuration, ensuring the final model corresponded to the checkpoint yielding the highest F1 score after threshold optimization. Evaluation, logging, and checkpoint saving were performed every 400 steps, with a maximum training duration of 1000 epochs. To rigorously assess Rider’s performance, we benchmarked it against five baseline methods, categorized by their input data representations: Raw token-based models (Transformer, CNN, Random Forest, and XGBoost): these models were trained using raw amino acid tokens generated by the ESM-2 tokenizer as input. This setup evaluates the ability of traditional deep learning (Transformer, CNN) and ensemble learning (Random Forest, XGBoost) architectures to learn features directly from sequence tokens without the aid of pre-trained language model embeddings. Raw token-based models (Transformer, CNN, Random Forest, and XGBoost): these models were trained using raw amino acid tokens generated by the ESM-2 tokenizer as input. This setup evaluates the ability of traditional deep learning (Transformer, CNN) and ensemble learning (Random Forest, XGBoost) architectures to learn features directly from sequence tokens without the aid of pre-trained language model embeddings. Embedding-based controls (ESM2-untrained and ESM2-linear): the historical comparator used frozen ESM2 first-token embeddings followed by a fixed-seed, randomly initialized linear head (ESM2-untrained), which was not trained. Separately, a trained linear head applied to the same frozen embeddings (ESM2-linear) was evaluated in the balanced ablation experiment (Fig. S4). Embedding-based controls (ESM2-untrained and ESM2-linear): the historical comparator used frozen ESM2 first-token embeddings followed by a fixed-seed, randomly initialized linear head (ESM2-untrained), which was not trained. Separately, a trained linear head applied to the same frozen embeddings (ESM2-linear) was evaluated in the balanced ablation experiment (Fig. S4). Performance evaluation was conducted across the constructed benchmarking datasets using two primary analytical approaches: On balanced sets: we assessed performance stability by calculating the mean metrics (ROC AUC, accuracy, F1-score, precision, and recall) across the three balanced sets. ROC curves were interpolated to a common false-positive rate grid and averaged, with standard deviation bands displayed to visualize robustness. On balanced sets: we assessed performance stability by calculating the mean metrics (ROC AUC, accuracy, F1-score, precision, and recall) across the three balanced sets. ROC curves were interpolated to a common false-positive rate grid and averaged, with standard deviation bands displayed to visualize robustness. On imbalanced sets: we evaluated the models across all imbalanced scenarios (including 1:100 & 1:400 sets, Edgar sets, and short-fragment/motif-core sets) to specifically analyze the trade-off between recall and false positive rate (FPR) under real-world data distributions. Confusion matrices were generated to compare the absolute number of false positives, which is a critical metric for minimizing wasted resources in downstream experimental validation. On imbalanced sets: we evaluated the models across all imbalanced scenarios (including 1:100 & 1:400 sets, Edgar sets, and short-fragment/motif-core sets) to specifically analyze the trade-off between recall and false positive rate (FPR) under real-world data distributions. Confusion matrices were generated to compare the absolute number of false positives, which is a critical metric for minimizing wasted resources in downstream experimental validation. To accommodate diverse computational resources and specific research objectives, Rider was configured with three distinct operating modes based on the predicted probability thresholds. These modes allow users to balance sensitivity and specificity according to their downstream validation capacity: Rider-st (strict mode, threshold ≥ 0.99): designed to minimize false positive rates (FPR = 0.1% in our 300k negative test) while maintaining over 80% recall for divergent RNA viruses. This highly specific mode is recommended to significantly reduce the computational cost and time required for downstream structure validation (Stage 2). Rider-st (strict mode, threshold ≥ 0.99): designed to minimize false positive rates (FPR = 0.1% in our 300k negative test) while maintaining over 80% recall for divergent RNA viruses. This highly specific mode is recommended to significantly reduce the computational cost and time required for downstream structure validation (Stage 2). Rider-nr (normal mode, threshold ≥ 0.90): serves as the default setting, providing a well-balanced trade-off. It achieves high recall for divergent viruses while maintaining an acceptable FPR (0.7% in the 300k negative test). Rider-nr (normal mode, threshold ≥ 0.90): serves as the default setting, providing a well-balanced trade-off. It achieves high recall for divergent viruses while maintaining an acceptable FPR (0.7% in the 300k negative test). Rider-se (sensitive mode, threshold ≥ 0.50): engineered to maximize recall for both RNA viral fragments and full-length RdRps. While it yields the highest sensitivity, it maintains a relatively low FPR (typically <3%). This mode is ideal for exhaustive RNA virus identification studies where computational resources for downstream validation are abundant. Rider-se (sensitive mode, threshold ≥ 0.50): engineered to maximize recall for both RNA viral fragments and full-length RdRps. While it yields the highest sensitivity, it maintains a relatively low FPR (typically <3%). This mode is ideal for exhaustive RNA virus identification studies where computational resources for downstream validation are abundant. Comparison of performance in identifying RNA virus We designed a comprehensive set of benchmarking tests to evaluate the performance of Rider in comparison with baseline algorithms and existing tools. Our evaluation focused on two key aspects of RNA virus detection: (i) the ability to recover RNA viral sequences, and (ii) the accurate identification of RdRp sequences. To ensure a fair comparison, we treated Rider’s structure validation module as an optional gold-standard refinement step, which can be applied to the outputs of any sequence-based method. Therefore, all benchmarking was conducted using only Rider’s sequence-based inference module. Specifically, each input sequence was embedded using ESM2-35M and passed through a lightweight Transformer-based classifier. Performance was measured in terms of true positive rate (TPR) and false positive rate (FPR). Evaluation of false positive rate (FPR) on non-RdRp proteins To rigorously estimate the FPR, we constructed a massive negative dataset comprising 300,000 non-RdRp proteins from the UniProt90 database. To prevent data leakage, these sequences were strictly filtered to share 0% sequence similarity with both the pretraining and finetuning datasets of Rider. The negative dataset was divided into three independent subsets of 100,000 sequences each (Supplementary Data 7). We evaluated two operational modes of Rider: the normal mode (Rider-nr, utilizing a threshold of ≥0.9) and the strict mode (Rider-st, utilizing a threshold of ≥0.99). Evaluation on the standardized LucaProt test dataset To facilitate a direct and fair comparison with the dual-modal model, LucaProt, we evaluated Rider on the independent test dataset originally constructed and reported in the LucaProt study. This standardized dataset consists of 22,284 sequences in total, comprising 540 actual positive sequences (RdRps) and 21,744 actual negative sequences (non-viral proteins). For LucaProt’s performance on this dataset, we directly referenced the confusion matrix reported in their original publication (539 true positives, 0 false positives, 1 false negative, and 21,744 true negatives). Rider’s sequence-based inference module (both Rider-nr and Rider-st modes) was subsequently benchmarked on this exact same dataset to compare accuracy, recall, and specificity without the use of structural information. Performance on RNA virus genomes of varying lengths (NCBI RefSeq) Metatranscriptomic assemblies are often fragmented due to the inherent complexity of transcriptomic data and limitations of current assemblers. For example, contigs assembled by MEGAHIT (v1.2.9) typically have an N50 length of approximately 500–700 bp, based on our empirical observations25. Accordingly, the identification of short-fragment RNA viruses presents a significant challenge, and shorter fragments containing fewer features, such as genes. To evaluate the performance of our method on the identification of RNA virus with different length, particularly on the short length (>500 bp), we tested it and compared it with other approaches (see above) using a custom-design benchmark derived from NCBI RefSeq. The benchmark includes viral genomes segmented into different length categories: 500–1000 bp, 1000–2000 bp, 2000–3000 bp, 3000–4000 bp, 4000–5000 bp, >5000 bp. Test on retrieving RNA viruses from different environments in the IMG/VR database To assess ecological generalizability, we benchmarked Rider on RNA viruses derived from nine distinct habitats in the IMG/VR (v4) database26. The environmental categories included: engineered, freshwater, mammals (human), mammals (non-human), marine, non-marine saline/alkaline, plants, terrestrial, and thermal hot springs. For each habitat, performance was evaluated in terms of the proportion of contigs correctly identified as viral. Simulated fragmented RNA virus with and without RdRp motifs To simulate real-world conditions of fragmented RNA virus contigs, we generated Illumina-like short reads from full-length RdRp nucleotide sequences in RefSeq using ART-illumina27. These reads were assembled using MEGAHIT25, and the resulting contigs were split into the same length categories as in test (1). Genes were predicted using Prodigal-gv. We then used BLASTn to filter contigs containing RdRp motifs at a 95% identity threshold. This benchmark enables a controlled comparison of methods that rely on hallmark gene content, such as PalmScan and geNomad (included the marker branch of hybrid branches)5. Identification of known RdRp sequences (ICTV 2021) To evaluate sensitivity toward known RdRp sequences, we curated a dataset from the International Committee on Taxonomy of Viruses (ICTV, 2021)28,29. A total of 7346 representative viral genomes were downloaded via NCBI accession numbers (not all include RdRp core domains). Prodigal was used to predict 16,932 ORFs, from which 4570 sequences with RdRp core domains were selected using a hidden Markov model (HMM)-based annotation3. Filtering was performed with cutoff parameters: domain score >50, domain E < 1e−3, and full-sequence E < 1e−3. Benchmark on long polyprotein A critical challenge in viral mining is distinguishing functional RdRp domains embedded within complex polyproteins from non-catalytic precursors, while simultaneously processing long sequences. To evaluate Rider’s capability in handling such cases, we designed two specific tests utilizing both its sequence-based inference and Stage 2 structural validation modules. First, to assess specificity, we utilized the Sesbania mosaic virus (SeMV), which produces a truncated precursor (P2a) lacking the polymerase and a read-through product (P2ab) containing the C-terminal RdRp. We tested whether Rider could correctly reject P2a while localizing the RdRp within P2ab. Second, to validate sensitivity and specificity on long polyproteins, we curated a dataset of 109 Coronaviridae polyproteins, comprising 87 ORF1ab (containing RdRp) and 22 ORF1a (lacking canonical RdRp domains) sequences (Supplementary Data 13). We benchmarked Rider-nr against LucaProt on this dataset to assess their ability to overcome input length limitations (e.g., sequences exceeding 4000 amino acids) and accurately filter out non-catalytic precursors. Detection of taxonomically divergent sequences To evaluate generalization to taxonomically divergent RdRp sequences, we constructed a benchmark following the novelty definitions proposed by: Taxonomic novelty dataset (Neri et al.3): following the novelty definitions proposed by Neri et al., we categorized RdRp sequences across different levels of taxonomic divergence: phylum (n = 117), class (n = 38,685), order (n = 44,595), and family (n = 75,604). This evaluation assesses each method’s ability to recover RdRp sequences that diverge significantly from known references at various evolutionary depths. Taxonomic novelty dataset (Neri et al.3): following the novelty definitions proposed by Neri et al., we categorized RdRp sequences across different levels of taxonomic divergence: phylum (n = 117), class (n = 38,685), order (n = 44,595), and family (n = 75,604). This evaluation assesses each method’s ability to recover RdRp sequences that diverge significantly from known references at various evolutionary depths. PalmDB motif-core dataset (Edgar et al.2): we utilized the PalmDB dataset reported by Edgar et al., which comprises 250,799 RdRp sequences representing the core motif regions. These sequences are notably short, ranging from 50 to 250 amino acids (with an average length of 107 aa), providing a rigorous test for the models’ motif recognition capabilities on truncated fragments. PalmDB motif-core dataset (Edgar et al.2): we utilized the PalmDB dataset reported by Edgar et al., which comprises 250,799 RdRp sequences representing the core motif regions. These sequences are notably short, ranging from 50 to 250 amino acids (with an average length of 107 aa), providing a rigorous test for the models’ motif recognition capabilities on truncated fragments. Serratus RdRp dataset (LucaProt study): we evaluated performance on the comprehensive Serratus RdRp dataset utilized in the LucaProt study, which contains approximately 1,409,058 sequences. While the original LucaProt study reported benchmarking results on a specific subset of 1,048,575 sequences, we conducted a comprehensive comparison of our method against the full dataset to ensure a robust and unbiased evaluation. Serratus RdRp dataset (LucaProt study): we evaluated performance on the comprehensive Serratus RdRp dataset utilized in the LucaProt study, which contains approximately 1,409,058 sequences. While the original LucaProt study reported benchmarking results on a specific subset of 1,048,575 sequences, we conducted a comprehensive comparison of our method against the full dataset to ensure a robust and unbiased evaluation. Runtime benchmarking and computational efficiency profiling Comparative benchmarking of deep learning models (Stage 1) To systematically compare the inference speed of Rider’s core module against existing methods (e.g., LucaProt), we constructed controlled benchmark datasets from UniRef90. We curated nine subsets of increasing size (100–900 sequences, length normalized to 1024 aa) and evaluated inference time on a single NVIDIA A100 GPU (80 GB). To ensure a direct comparison of the deep learning architectures, downstream structure validation modules were excluded in this specific test (Supplementary Data 10). Stress testing of structural validation modules (controlled end-to-end) To evaluate the computational cost of the structural validation steps (ESMFold and Foldseek) under maximum load, we designed a controlled “stress test” (Supplementary Data 11). We constructed datasets containing 48–50 sequences each, with lengths stratified from 300 to 1200 amino acids (covering the typical input range for ESMFold). Crucially, all sequences in this test were selected from known RdRps (ICTV) to ensure they would be predicted as positive during Stage 1. This design forces every sequence to undergo the computationally intensive structure prediction and alignment steps, allowing us to measure the upper bound of execution time relative to sequence length. End-to-end runtime profiling on real-world data To assess performance in practical scenarios, we monitored the full execution time of Rider on diverse metatranscriptomic datasets (Supplementary Data 12). We utilized samples from four environmental sources: activated sludge (n = 11), wastewater influents (n = 10), soil (n = 18), and human gut microbiomes (n = 78). For each run, we recorded the time consumption of all key stages: (1) data loading and tokenization, (2) model inference, (3) structure prediction (for candidate sequences), (4) structure alignment, and (5) total wall-clock time. Construction of the Rider RdRp structure database Rider RdRp structure library (RSDB) To support structural validation of putative RNA virus proteins, we constructed a large-scale structure library comprising diverse RNA virus-encoded proteins, namely the Rider RdRp Structure Database (RSDB). Protein sequences were sourced from four data sources: NCBI30, Neri et al.3, Zayed et al.31, and Edgar et al.2. However, upon inspection, this dataset was found to include a broad range of viral proteins beyond canonical RdRps30, including helicases, proteases, and capsid proteins. Rather than filtering these out immediately, we retained the full diversity of viral replication-associated proteins in this broad library. This inclusion enables a more comprehensive structural comparison, allowing for the detection of viral fragments or mobile genetic elements that may lack a canonical RdRp domain but still represent viral signals. The final broad database contains 217,762 predicted structures representing a wide array of RNA virus proteins. Rider RdRp-domain-specific database (RDSDB) and RDSDB30 Building upon the Rider Broad Library, we constructed a specialized Rider RDSDB to address the specificity challenges posed by multi-domain proteins and to enable the detection of fragmented sequences. While the broad library captures diverse viral signals, sequences from public repositories—particularly the NCBI sequences included in the broad library, as well as an additionally incorporated dataset from Wolf et al.4—frequently consist of long polyproteins where the RdRp domain is fused with non-catalytic proteins. To mitigate structural false positives, we applied a rigorous cleaning step to these specific datasets. Specifically, we utilized the RdRp HMM profiles provided by Neri et al.3 to scan the NCBI and Wolf et al. sequences. To precisely delineate and extract only the RdRp catalytic domains, we applied strict filtering criteria to the HMMER outputs: a maximum independent E-value (i-Evalue) of 1×10−5 and a minimum domain length of 150 amino acids. In cases where multiple HMM hits overlapped by more than 20%, we resolved the conflict by retaining only the hit with the lowest E-value. This process successfully removed extraneous non-RdRp regions, resulting in a refined, domain-specific dataset of 189,694 RdRp sequences (integrating these newly extracted domains with the inherently domain-centric sequences from our broad library), which were subsequently modeled into 3D structures using ESMFold v1. To optimize computational efficiency during large-scale structural alignments and to eliminate structural redundancy, we further streamlined this database using Foldseek (“easy-cluster” mode, version commit 214886b). The 189,694 structures were clustered based on a minimum sequence identity threshold of 30% (--min-seq-id 0.3), a minimum alignment coverage of 50% (-c 0.5), and an E-value cutoff of 0.1 (-e 0.1, with --alignment-type 1 and --cluster-mode 1). This rigorous redundancy reduction yielded a highly curated set of 9735 representative RdRp domain structures, designated as RDSDB30. Crucially, this domain-centric and non-redundant design creates a high-density, computationally efficient target for structural alignment, allowing Rider to rapidly identify short, fragmented contigs (common in metatranscriptomic assemblies) that retain the core catalytic fold but lack full-length sequence context. Structure prediction and handling of sequence length heterogeneity For the structural validation of Rider-predicted candidates (Stage 2), we employed ESMFold_v1 to convert amino acid sequences into 3D structures. A critical challenge in metatranscriptomic viral discovery is the extreme heterogeneity of sequence lengths, ranging from fragmented assembly artifacts to massive polyproteins. In our workflow, ESMFold inference was limited to sequences of no more than 1024 residues. Rider addresses this “dual-end” challenge through a distinct two-pronged strategy. For sequences exceeding 1024 residues, typical of RNA virus polyproteins where the RdRp domain is often located at the C-terminus, simple truncation would result in false negatives. We implemented an overlapping sliding window strategy, segmenting sequences into windows of 1000 amino acids with a 500-amino acid overlap (step size = 500 aa). The overlap provides complete residue coverage and reduces boundary effects, although it does not guarantee that an entire RdRp domain is contained within a single window or preserve dependencies across windows. Each window was modeled and searched independently against RDSDB. A parent candidate was considered structurally supported if at least one window met the specified structural-alignment threshold; scores were not averaged across overlapping windows, and the coordinates of passing windows were retained. Conversely, short fragments (<200 aa) frequently arise from assembly errors or artifacts during ORF prediction. For instance, applying a default or uniform genetic code (translation table) in gene callers like Prodigal-gv5 across all contigs can prematurely truncate viral sequences that utilize alternative genetic codes, artificially generating fragmented RdRps. Although such gene-calling artifacts constitute a minority of cases, these short fragments, alongside assembly errors, are frequently missed by motif-based methods due to insufficient sequence context. Rider models these fragments directly and aligns them against the RDSDB. Because the RDSDB consists of excised core domains, even short fragments representing partial motifs can achieve high structural similarity scores, enabling the robust rescue of viral signals from both low-quality assemblies and gene-calling artifacts. Structure-based validation and scoring metric To address the interpretability challenges of neural network-based predictions (“black box” problem), we implemented a structure-based validation strategy using Foldseek11, a rapid structural alignment tool (Rider Stage 2). Prob-score calculation Specifically, we adopted the probability score (Prob-score), a probabilistic metric introduced by Foldseek (TM-Score)11, to assess the likelihood that a structural match represents a true homologous relationship. For each Rider-predicted candidate, the amino acid sequence was first converted into a 3D structure using ESMFold v1. The predicted structure was then aligned against our curated RNA virus protein structure library (see above) using Foldseek. Prob-score was calculated as the posterior probability of a structure match being a true positive (TP) given the observed bit score, defined as: where TP and FP represent true and false positives, respectively, and the probabilities were estimated from empirical score distributions. Top-K aggregation and decision threshold Structural evidence was summarized as the mean of the Top-K Prob-scores per query (default K = 10): Using K = 10 ensures concordant support from multiple high-ranking neighbors, mitigating outliers from single spurious hits. To comprehensively evaluate this scoring metric, we benchmarked the distributions of the mean Prob-scores against two distinct reference databases: the comprehensive RSDB and the non-redundant core domain database (RDSDB30, constructed using a minimum sequence identity threshold of 30%). Based on our benchmarking, the score distributions exhibited a distinct bimodal pattern, effectively separating true RdRps from negatives. Negative non-RdRp proteins (194,572 sequences sampled from UniRef90) consistently concentrated at lower scores, peaking near 20–30. For positive RdRp structures, the distribution characteristics depended on the database redundancy: when queried against the highly redundant RSDB, scores peaked sharply >80 due to the presence of closely related homologs; conversely, when queried against the RDSDB30, the peak shifted slightly lower (predominantly >55). This shift reflects the 30%-identity clustering used to construct RDSDB30, which necessitates the detection of more remote, deep structural homology. Despite this expected shift, a clear margin between RdRps and non-RdRps was maintained in both scenarios. Consequently, we established a rigorous and unified cutoff of Prob-score = 50 for confident identification (Fig. 3c, d). Benchmarking structure-based versus sequence-based viral identification To evaluate the sensitivity of Rider’s structure-based module (Rider-s2, Stage 2) in detecting remote viral homologs, we performed a comparative benchmark against three standard sequence-alignment tools: BLASTp, MMseqs2 (sensitive mode), and HMMER. We constructed a Rider Standard Structure Database consisting of 4570 representative RdRP sequences sourced from the ICTV (2021 release) to serve as the ground truth reference. To simulate the challenge of identifying divergent viruses, we curated test datasets using RdRPs identified in a previous study (Neri et al.) and categorized them into two difficulty groups based on their sequence identity to the reference using MMseqs2: a “twilight zone” set (maximum 30% sequence identity) and a “remote homology” set (no detectable sequence identity, ~0%). To evaluate performance, successful hits were defined using two distinct criteria corresponding to Rider’s evaluation modes. The first criterion required a bit-score >50 for sequence tools, or a probability score >50 for Rider-s2 (--threshold-type 1). The second structural criterion required a target TM-score >0.5 for Rider-s2 (--threshold-type 2). For both analyses, sensitivity was calculated as the percentage of correctly retrieved RdRPs in each test set. For the additional HMM sensitivity analysis, 4510 ICTV RdRp core domains identified using the profiles from Neri et al. (independent E ≤ 1 × 10−5; aligned length ≥150 aa) were clustered at 30% sequence identity with ≥50% bidirectional coverage and converted into 189 profile HMMs; the original benchmark datasets (n = 34,031 and 23,289) and full-sequence bit-score cutoff of 50 were retained (Supplementary Data 9). DNA read-based validation of metatranscriptomic contigs To evaluate the genomic validity of Rider-predicted RNA virus contigs, especially low-similarity candidates3,13, metagenomic DNA reads were mapped to contigs assembled from metatranscriptomic data. Paired metagenomic and metatranscriptomic datasets were obtained from four sources: Activated sludge samples (n = 11): collected from eleven municipal wastewater treatment plants32. Activated sludge samples (n = 11): collected from eleven municipal wastewater treatment plants32. Influents of wastewater treatment plant (n = 10): collected from ten municipal wastewater treatment plants32 Influents of wastewater treatment plant (n = 10): collected from ten municipal wastewater treatment plants32 Soil and rhizosphere samples (n = 18): first-hand data collected from Fuyang, Zhejiang Province, and generated in-house using Illumina sequencing. This dataset is made publicly available with this study. Soil and rhizosphere samples (n = 18): first-hand data collected from Fuyang, Zhejiang Province, and generated in-house using Illumina sequencing. This dataset is made publicly available with this study. Human gut microbiome samples (n = 78): retrieved from the IBD cohort of the Human Microbiome Project33 Human gut microbiome samples (n = 78): retrieved from the IBD cohort of the Human Microbiome Project33 China environmental metatranscriptomic dataset (n = 50): derived from the LucaProt validation dataset13. China environmental metatranscriptomic dataset (n = 50): derived from the LucaProt validation dataset13. For each sample, metatranscriptomic reads were quality-filtered using fastp (v0.23.1)34 and assembled into contigs using MEGAHIT25. To quantify the genomic support for each contig, we calculated the DNA mapping rate, defined as the proportion of nucleotide positions covered by at least one DNA read. Metagenomic DNA reads were aligned to metatranscriptomic contigs using Bowtie2 (v2.3.5.1)35 with default parameters. Coverage statistics, including the DNA mapping rate, were computed using the “pileup.sh” utility from BBMap (v39.01)36, which reports the percentage of positions with non-zero read depth (i.e., coverage ≥1) relative to the total contig length. The DNA mapping rate serves as an orthogonal indicator of transcript validity—higher coverage implies that the RNA contig is likely derived from a DNA-encoded viral genome, rather than from assembly artifacts or transient RNA molecules. Mapping coverage was defined as the percentage of contig bases covered by at least one DNA read. Coverage statistics and RPKM (reads per kilobase per million mapped reads) values were computed using bbmap, following the standard formulation: Where C is the number of reads mapped to a contig containing Rider-hit ORFs, N is the total number of mapped reads in the experiment, and L is the contig length in base pairs. This represents how many sequencing reads align to the gene of interest. : total number of mapped reads in the experiment. This includes all reads mapped to all genes or transcripts and is used to normalize for sequencing depth. Length of the gene or transcript in base pairs (bp). This accounts for gene length bias, as longer genes are more likely to accumulate more reads. For human gut samples, additional quality control was applied to remove interspersed repeats and low-complexity sequences using RepeatMasker (v4.1.8)37 with the Dfam 3.9 database (dfam39_full.7)38. To investigate the relationship between Rider’s prediction confidence and DNA support, contigs were stratified into five confidence bins based on Rider-assigned scores: 50–60, 60–70, 70–80, 80–90, and 90–100. For each bin, DNA mapping rates (mapping sites/whole length) were analyzed using kernel density estimation (KDE) implemented in Seaborn (v0.11.2, Python). This enabled visualization of the correlation between prediction confidence and the likelihood of corresponding DNA reads, serving as an orthogonal validation of the predicted viral sequences. All calculated mapping rates were retained for statistical analysis to preserve the integrity of the data distribution. It should be noted that mapping rates below 20% likely represent background sequencing noise or non-specific alignment rather than significant DNA presence, yet these values were included to avoid arbitrary thresholding bias. Implementation of environmental and human metatranscriptomes To evaluate the real-world performance of Rider in RNA virus discovery, we applied it to large-scale environmental and human virome datasets and compared its predictions to two existing motif-based methods: LucaProt13 and PalmScan1,2. This analysis was conducted across two application domains: (1) environmental metatranscriptomic data and (2) human gut virome data from an IBD cohort. Environmental metatranscriptomic data Environmental RNA virome detection was conducted on a comprehensive dataset comprising over 10,000 metatranscriptomic samples collected across 45 ecosystems worldwide, including soil, marine, freshwater, and wastewater environments13. These samples were obtained from the LucaProt benchmarking release and represent one of the most extensive environmental metatranscriptomic resources to date13. For each sample, raw metatranscriptomic reads were subjected to quality control using fastp (v0.23.1), followed by de novo assembly with MEGAHIT. ORFs were predicted using Prodigal-gv (in metagenomic mode), and sequences were filtered to retain only those between 100 and 2000 amino acids13. To reduce redundancy, predicted viral-like ORFs were clustered at 90% amino acid similarity using MMseqs2, and representative centroid sequences with a cluster with more than 4 items (≥4) were used for prediction and comparison. Each ORF was then scored by Rider (Prob), LucaProt (--threshold >0.5), and PalmScan independently. Rider prediction scores were used to stratify viral candidates into five confidence intervals (50–60, 60–70, 70–80, 80–90, and 90–100). To validate Rider’s capacity to detect canonical RdRp sequences, we benchmarked its performance against a previously published environmental RdRp dataset comprising 161,979 known or putative RdRp-containing sequences from the LucaProt study. Rider’s recall rate was calculated as the proportion of known RdRps successfully identified within this dataset. Human gut virome analysis in IBD cohort To investigate the applicability of Rider in a disease-relevant context, we applied it to a well-characterized IBD cohort, including samples from Crohn’s disease (CD, n = 45), ulcerative colitis (UC, n = 21), and non-IBD (healthy controls, n = 11)33. Paired metagenomic and metatranscriptomic datasets were obtained for each subject. Metatranscriptomic reads were processed using the same pipeline as for the environmental data, including quality filtering with fastp, assembly with MEGAHIT, and ORF prediction via Prodigal-gv. For human gut samples, additional filtering was performed using RepeatMasker (v4.1.8) with the Dfam 3.9 database to remove interspersed repeats and low-complexity sequences. Rider was used to score all predicted ORFs, and candidate viral sequences were filtered by length to isolate short proteins (100–200 amino acids), which are often missed by conventional methods. These short candidates were subjected to structure-based validation using ESMFold and Foldseek, with Prob-score used to assess structural similarity to known viral proteins. To assess the genomic plausibility of predicted contigs, paired metagenomic DNA reads were mapped to assembled metatranscriptomic contigs using Bowtie2. DNA mapping coverage and RPKM values were calculated using bbmap. Contigs with high DNA mapping rates (>90%) were flagged as potential endogenous or DNA virus-like elements, while those with low or no DNA support were considered likely to originate from RNA viruses. Phylogenetic analysis of RdRp sequences The RdRp phylogeny was constructed using both RdRp sequences identified by Rider with structure validation and reference RdRp sequences obtained from ICTV 2021. To accurately extract the RdRp domains, structural alignments were performed against the RDSDB (RdRp domain structure database) using Foldseek. The target sequences were then cropped based on the alignment coordinates (qstart and qend) and extended by 200 amino acids at both the N- and C-termini. This padding strategy was employed to retain sufficient contextual information for optimal alignment and subsequent tree construction. The input Rider sequences had previously been dereplicated at 90% sequence identity. After combination with the LucaProt supergroup sequences, the pooled sequences were clustered with MMseqs2 using “--min-seq-id 0.3 -c 0.8 -e 0.1 --cov-mode 1 --cluster-mode 2.” Representative sequences (cluster centroids) were then aligned with MUSCLE (v5.1)39. Poorly aligned and gap-rich positions were removed using trimAl (v1.4.rev15)40 with the parameter “-gt 0.2.” Phylogenetic analysis was performed with IQ-TREE (v2.1.4)41 using the parameters “-m LG+G4 -bb 1000.” The resulting tree was visualized and annotated in iTOL42. Protein sequence similarity and structure visualization Global pairwise sequence similarity was computed with the Needleman–Wunsch algorithm (Biopython, Bio.pairwise2; default gap penalties unless noted)43. Protein structures were saved in PDB format and visualized in PyMOL44. Statistics and reproducibility No statistical method was used to predetermine sample size. Benchmark sample sizes were prespecified based on the available sequence pools and intended class ratios, whereas application-study sample sizes were determined by the availability of datasets meeting the prespecified inclusion and quality-control criteria described above. No data were excluded from the analyses after application of these prespecified criteria. The analyses were not randomized, and investigators were not blinded during data analysis, because the study was computational and observational and involved no intervention or group allocation; benchmark sampling used the indicated random seeds. All tests were two-sided where applicable. For Fig. 4i, Pearson correlations and ordinary least-squares regressions were calculated between Rider scores and DNA mapping rates. Pearson 95% confidence intervals were calculated using Fisher’s z transformation, and regression bands show 95% confidence intervals. For Figure 5b–d, exploratory contig-level comparisons were performed using Kruskal–Wallis tests followed by pairwise two-sided Wilcoxon rank-sum tests. Pairwise P values were Holm-adjusted in panels b and c and unadjusted in panel d. Because contigs, rather than participants, were the units of analysis, these results were not interpreted as participant-level inferences. For Supplementary Fig. S4, curves and summary metrics show means across three mutually exclusive computational dataset replicates, and error bars or bands show SD. Exact statistics and P values are reported in the figure legends and Source Data. Analyses were performed using Python 3.10.18 and R 4.2.1. Reporting summary Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Supplementary information Supplementary Information Description of Additional Supplementary Files Supplementary Dataset 1 Supplementary Dataset 2 Supplementary Dataset 3 Supplementary Dataset 4 Supplementary Dataset 5 Supplementary Dataset 6 Supplementary Dataset 7 Supplementary Dataset 8 Supplementary Dataset 9 Supplementary Dataset 10 Supplementary Dataset 11 Supplementary Dataset 12 Supplementary Dataset 13 Supplementary Dataset 14 Supplementary Dataset 15 Supplementary Dataset 16 Reporting Summary Transparent Peer Review File Source data Source Data Acknowledgements We thank the High-Performance Computing Center of Westlake University for providing computational resources and technical support. We thank Dr. Fa-Jie Yuan and Prof. Ren Sun, both from Westlake University, for their valuable suggestions and insightful discussions that helped improve this work. Author contributions F.J. obtained funding and supervised the project. F.J. and G.L. conceived the study. G.L. developed the software and computational workflow, performed all data analyses, prepared the figures, and wrote the original manuscript. Z.Z., J.Z., and S.Z.L. provided algorithmic and coding support. L.Y. provided advice on RNA virus biology. Y.H. contributed ideas and discussions related to protein structure. A.D. tested the reproducibility of the analyses and contributed to manuscript proofreading. F.J. reviewed and edited the manuscript. All authors reviewed and approved the final manuscript. Peer review Peer review information Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available. Funding This work was supported by the Zhejiang Provincial Natural Science Foundation of China (LR22D010001), the Research Center for Industries of the Future (WU2023C019 and WU2022C030), the Westlake University–Muyuan Joint Research Institute (206000006022404), and the HRHI program of the Westlake Laboratory of Life Sciences and Biomedicine (202309010). Data availability The raw sequence reads from the LucaProt study used in this work are available in the NCBI Sequence Read Archive under BioProject accessions PRJNA956286 and PRJNA956287. The paired metagenomic and metatranscriptomic reads from the inflammatory bowel disease cohort are available under BioProject accession PRJNA389280; the sample-level accessions used in this study are provided in Supplementary Data 14. The wastewater influent and activated-sludge datasets used for DNA-mapping analyses are available in the European Nucleotide Archive under study accessions ERP111072 and ERP110973, respectively; the sample-level identifiers used in the analysis are provided with the Zenodo record. The soil metagenomic sequencing data are available in the China National GeneBank DataBase (CNGBdb) under accession CNP0009314 and in the NCBI Sequence Read Archive under BioProject accession PRJNA1506073. RSDB and RDSDB are available from Zenodo at https://doi.org/10.5281/zenodo.19247869. The other processed datasets and reproducibility materials are available from Zenodo at https://doi.org/10.5281/zenodo.2169910545. Source data are provided with this paper. Code availability Rider is available under the MIT License at https://github.com/emblab-westlake/Rider. The archived Rider v1.0.1 release is available from Zenodo at https://doi.org/10.5281/zenodo.2180994246. Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Supplementary information The online version contains supplementary material available at https://doi.org/10.1038/s41467-026-77183-y. References Associated Data Supplementary Materials Supplementary Information Description of Additional Supplementary Files Supplementary Dataset 1 Supplementary Dataset 2 Supplementary Dataset 3 Supplementary Dataset 4 Supplementary Dataset 5 Supplementary Dataset 6 Supplementary Dataset 7 Supplementary Dataset 8 Supplementary Dataset 9 Supplementary Dataset 10 Supplementary Dataset 11 Supplementary Dataset 12 Supplementary Dataset 13 Supplementary Dataset 14 Supplementary Dataset 15 Supplementary Dataset 16 Reporting Summary Transparent Peer Review File Source Data Data Availability Statement The raw sequence reads from the LucaProt study used in this work are available in the NCBI Sequence Read Archive under BioProject accessions PRJNA956286 and PRJNA956287. The paired metagenomic and metatranscriptomic reads from the inflammatory bowel disease cohort are available under BioProject accession PRJNA389280; the sample-level accessions used in this study are provided in Supplementary Data 14. The wastewater influent and activated-sludge datasets used for DNA-mapping analyses are available in the European Nucleotide Archive under study accessions ERP111072 and ERP110973, respectively; the sample-level identifiers used in the analysis are provided with the Zenodo record. The soil metagenomic sequencing data are available in the China National GeneBank DataBase (CNGBdb) under accession CNP0009314 and in the NCBI Sequence Read Archive under BioProject accession PRJNA1506073. RSDB and RDSDB are available from Zenodo at https://doi.org/10.5281/zenodo.19247869. The other processed datasets and reproducibility materials are available from Zenodo at https://doi.org/10.5281/zenodo.2169910545. Source data are provided with this paper. Rider is available under the MIT License at https://github.com/emblab-westlake/Rider. The archived Rider v1.0.1 release is available from Zenodo at https://doi.org/10.5281/zenodo.2180994246.