Preprint · bioRxiv 2026  ·  HiTSeq Best Poster Award, ISMB 2026

RawMod: Modification‑Agnostic Detection of DNA Base Modifications from Nanopore Signal Pileups

Bhargav Srinivasan*, Sabeena Nazar, Vir Gandhi, Ernest Zhang, Tsvetan Bachvaroff, Mikhail Kolmogorov, Allen Place, Can Firtina*

University of Maryland, College Park · IMET, UMCES · National Cancer Institute · * corresponding authors

The problem

Existing callers require a model per modification, or an unmodified control per sample.

Supervised callers detect only the modification types they were trained for; none model 5hmU.
Comparative callers require an expensive unmodified control for every sample.
Labels co-vary with motif, organism, and library, which models can learn instead of the modification.
A modification-agnostic scan queries every position, so cost scales with model size.
0
modification types
0
benchmark datasets
0.23M
parameters, one model
How RawMod works

For every reference position, RawMod predicts whether any read carries a modified base.

RawMod architecture: reads, raw signal, and the reference genome form a per-site raw signal pileup of up to 15 reads; a convolutional encoder and cross-read attention produce a modification likelihood; training uses contrastive and anomaly losses with a curriculum of matched modified and unmodified sites
Raw-signal pileup

21 bases, up to 15 reads, 10 samples per base.

Encoder and cross-read attention

Embed each read, then weigh evidence across reads. 0.23 M parameters.

Training

Contrastive and anomaly losses; matched modified and unmodified sites first, so sequence cannot predict the label.

Benchmark  ·  15 datasets, five modification types, genomic regions held out from training

One lightweight model covers five modifications with a single threshold.

Pooled AUROC, one threshold
0.000
Against 0.818 for Dorado’s four models combined, with each modification type weighted equally.
Mean AUROC over five modifications
best released model 0.799
0.964
Worst modification, 5hmU
released models ≤ 0.503
0.930
Parameters
31× fewer than Dorado’s four models
0.23 M
Generalization  ·  leave-one-modification-out models, reads masked at inference

Withheld modifications transfer within a base, and few reads are required.

0 0.25 0.5 0.75 1 Zero-shot AUROC chance 0.5 all modifications in training 0.988 0.983 0.978 0.906 0.594 0.497 5hmCcytosine 5mCcytosine 4mCcytosine 6mAadenine 5hmUthymine
Mean zero-shot AUROC over the five withheld modifications0.792
Transfer follows the base: the three cytosine modifications cover one another, whereas 6mA and 5hmU, the only modifications of their bases, do not.
Retraining with about 3,000 labeled 5hmU sites raises 5hmU from chance0.82
Application 1  ·  Amphidinium carterae contig_3762, no unmodified control, no 5hmU model

A control-free 5hmU map of a 7.7 Mb dinoflagellate contig.

Mean thymine modification score in 10 kb windows along the 7.7 Mb Amphidinium carterae contig, with the top 5 percent of windows marked, and the interspersed-repeat, young-repeat and coding-sequence fractions below
2.17 Mthymines scored in 4.8 min on one GPU
1.06×intergenic over coding sequence: 5hmU is depleted in genes
0.93the two divergent strand switches rank first and third of 106 intergenic regions
0.77young repeat copies, against 0.68 outside repeats: younger repeats carry more 5hmU
Application 2  ·  HS578T breast carcinoma vs. HS578Bst normal breast line, chr1, 10 kb windows

Read origins separate by their modifications, without labels.

0.50median ARI with true origin in windows where at least 50 CpGs differ, against −0.01 where fewer than 5 differ
0.80AUROC separating native from PCR-amplified SPO1 reads by 5hmU, which Dorado has no model for (Dorado 0.69; Dorado with RawMod embeddings 0.84)