A genomic language model called resLens can help researchers discover antibiotic resistance genes that traditional database matching tools might miss, potentially providing a faster means to track emerging resistance while highlighting the need for careful validation.
Research: resLens: A genomic language model to enhance the detection of antibiotic resistance genes. Image credit: nepool / Shutterstock
Recent research published in npj antibacterial agents and resistance developed a new genomic language model (gLM) family, namely resLens, to improve the detection of antibiotic resistance genes (ARGs).
The increase in antibiotic resistance in pathogenic microorganisms necessitates the development of more sophisticated tools to study ARGs and their evolution. Most of the available alignment-based tools, such as k-mer approaches, best-hit algorithms, and hidden Markov model (HMM) methods, have some limitations, such as poor performance when the variant and reference ARGs do not match exactly.
Additionally, databases represent only a portion of resistance and may not keep up with the scale and pace of resistance evolution. Deep learning methods are more dynamic than alignment-based tools and have sought to address these limitations, but whereas many of the earlier approaches require learning functional representations of ARGs and proteins from scratch, resLens uses transfer learning from pre-trained DNA language models.
Designing the ARG dataset and resLens model
In this study, researchers presented resLens to enhance ARG detection and analysis. In this study, ARGs were obtained from the National Center for Biotechnology Information (NCBI) pathogen detection RefGene and ResFinder databases. These datasets were combined and genes that were complete duplicates or complete subsequences of other genes conferring resistance to the same type of antibiotic were excluded.
Antibiotic resistance classes with 20 or more instances in the dataset were then retained and passed through the Prodigal tool to ensure that only open reading frames (ORFs) were present. This pretreatment yielded over 7,600 ARGs across 12 antibiotics. Additionally, we queried GenBank for bacterial nonresistance genes of comparable length to ARG, excluding those with >90% sequence identity to ARG sequences.
The ARG dataset was merged with an equal number of randomly selected non-resistance genes. This dataset was used to fine-tune the long read (LR) model. For short read (SR) datasets, the entire gene sequence was divided into 150 base pair (bp) reads. The dataset was split into 80% training set and 20% testing set. Overall, four models were fine-tuned, two for SR data and two for LR data. One model performed binary classification of non-ARG and ARG for each dataset.
The second model then classified the predicted ARGs into specific ARG classes. The research team evaluated the resLens model against five alignment-based tools (AMR++, k-mer-based antibiotic gene resistance analyzer (KARGA), ResFinder, Meta-MARC, and Resistance Gene Identifier (RGI)) and two deep learning models (DeepARG and ARGNet). The researchers noted that resLens performed better than other models on the LR dataset.
resLens benchmark and performance results
However, there were slight differences between resLens and KARGA or RGI. In particular, RGI and KARGA outperform resLens on the SR dataset. Additionally, the resLens model closely reproduced the class distribution in the LR test set compared to other models. resLens also showed competitive real-time inference times on the test set, but was slower than ARGNet on the LR test set and DeepARG and KARGA on the SR test set.
Additionally, the team aimed to evaluate the model’s performance on the new ARG. To this end, two gene families were identified that confer resistance to aminoglycosides (aminoglycoside nucleotidyltransferase, ANT) and beta-lactams (blaADC), respectively. These had low sequence similarity to other gene families that confer resistance to the same antibiotic. The team then created an LR test set containing only ANT and blaADC family genes, and another LR training set containing other genes.
The model was fine-tuned and evaluated on new training and test sets. Although the model accurately classified genes excluded from the training set, performance varied by gene family and was stronger for blaADC than for ANT. For comparison with alignment-based methods, we recreated the ResFinder database without the ANT and blaADC genes and evaluated ResFinder on this new test set of retained sequences. ResFinder performed poorly, identifying 86% of ANT genes but not blaADC.
The researchers also performed a more rigorous clustered split analysis to test more different sequences. Performance was particularly poor for binary ARG detection. This indicates that resLens may be able to generalize beyond exact database matching, but still loses accuracy under stronger distribution shifts.
Limitations of whole genome testing and screening
Finally, the team used the LR model to analyze whole genome sequence (WGS) data of organisms with validated resistance phenotypes. RGI and ResFinder were also tested comparatively. Filtering and mapping antibiotic classes to resLens-predicted classes yields 79 genomes with validated resistance phenotypes, containing 1 to 3 classes of antibiotics per organism. RGI and resLens identified at least one gene corresponding to a specific genomic marker phenotype more frequently than ResFinder.
However, the authors emphasized that this WGS analysis was exploratory rather than a definitive benchmark, as the dataset had a limited sample size, clinical testing was not exhaustive, and gene-level annotation of the mechanisms underlying each resistance phenotype was lacking. Manual validation of resLens predictions identified many true positives, as well as false positives and ambiguous or inaccurate classifications, highlighting the need to use such tools for screening and hypothesis generation rather than final conclusions.
Genomic language models improve ARG screening
Our findings demonstrate that gLM can classify ARGs with high fidelity and speed, and is less database-dependent compared to other deep learning and alignment-based tools. The resLens model outperformed deep learning tools and showed performance competitive with top alignment-based tools. Overall, the results highlight the potential of gLM to improve ARG detection, including ARGs with limited representation in reference databases, while reducing dependencies without eliminating curated reference datasets.
Click here to download your PDF copy.
Reference magazines:
- Morels M, Dittmar K, Crandall KA, Rahnawald A (2026). resLens: A genomic language model to enhance the detection of antibiotic resistance genes. npj Antimicrobial agents and resistance. Doi: 10.1038/s44259-026-00219-2, https://www.nature.com/articles/s44259-026-00219-2

