NMDetective-AI
NMDetective-AI predicts how efficiently a premature termination codon (PTC) triggers nonsense-mediated mRNA decay (NMD). It reads the full mutant mRNA, so it accounts for sequence context as well as the PTC's position in the exon structure.
- Code: https://github.com/Vejni/NMDetectiveAI
- Rule-based companion model: NMDetective-B+
- Paper: Veiner et al., Quantitative prediction of nonsense-mediated mRNA decay across human genes by genomic language model and large-scale mutational scanning, bioRxiv 2026 (preprint)
Model
| Encoder | Orthrus (6-track, Mamba), fine-tuned end to end |
| Head | mean-pooled 512-d embedding β MLP [256, 64], LayerNorm, GELU β 1 |
| Parameters | 10.3 M |
| Input | mutant mRNA (5β² UTR + CDS + 3β² UTR), six tracks: A, C, G, T, codon start, exon end |
| Output | normalized NMD efficiency (one scalar per variant) |
| Reference | GRCh38, GENCODE v26 transcripts |
Output scale
Scores are allele-specific NMD efficiency, rescaled so that the training set's canonical NMD-triggering PTCs average +0.5 and last-exon (NMD-evading) PTCs average β0.5. Higher means stronger NMD. Scores outside [β0.5, 0.5] are expected.
Files
| File | Contents |
|---|---|
NMDetectiveAI.safetensors |
model state dict (encoder + head) |
config.json |
architecture and input/output description |
Usage
Install the package from GitHub (see its README for the CUDA / mamba-ssm setup), then:
from NMD.modeling.predict_variant import VariantPredictor
predictor = VariantPredictor(
ai_model_path="hf://Vejni/NMDetective-AI",
b_plus_path="hf://Vejni/NMDetective-BPlus",
)
predictor.predict("chr17:7674945:G:A") # TP53 p.R196*, genomic GRCh38
predictor.predict("TP53:c.586C>T") # same variant, HGVS
predictor.predict_many(["BRCA1:c.68_69del", "TP53:c.1024C>T"]) # returns a DataFrame
or from the command line:
python main.py predict variant TP53:c.586C>T BRCA1:c.68_69del \
--ai-model-path hf://Vejni/NMDetective-AI \
--b-plus-path hf://Vejni/NMDetective-BPlus
To load only the network:
from NMD.modeling.predict_variant import load_ai_model
model, device = load_ai_model("hf://Vejni/NMDetective-AI")
# model(x, lengths): x is (batch, length, 6) float, lengths is (batch,) long
Training data
The model was fine-tuned on allele-specific expression estimates of NMD efficiency for ~14,000 somatic PTCs (nonsense SNVs and frameshift indels) in TCGA, with chromosomes 1 and 17 held out for validation. It was tested on ~1,800 germline PTCs and on deep mutational scanning data; see the paper.
Scope and limitations
- Scores PTCs in protein-coding transcripts: nonsense SNVs/MNVs and frameshift or in-frame indels that create a premature stop. Splice-site, start-loss and stop-loss variants are out of scope.
- The prediction depends on the transcript. By default the tooling uses the MANE Select transcript (or the longest coding transcript when MANE is unavailable).
- Coordinates are GRCh38. Transcripts are resolved with GenomeKit's
gencode.v26annotation. - Research use only. Not validated for clinical decision-making.
Citation
@article{veiner2026nmdetectiveai,
title = {Quantitative prediction of nonsense-mediated mRNA decay across human genes by genomic language model and large-scale mutational scanning},
author = {Veiner, Marcell and Toledano, I. and Palou-Marquez, G. and Lehner, B. and Supek, Fran},
journal = {bioRxiv},
year = {2026},
doi = {10.64898/2026.03.24.714003},
url = {https://www.biorxiv.org/content/10.64898/2026.03.24.714003v1}
}
- Downloads last month
- 19
Model tree for Vejni/NMDetective-AI
Base model
quietflamingo/orthrus-large-6-track