Abstract
Effective and timely antibiotic treatment depends on accurate and rapid in silico antimicrobial-resistant (AMR) predictions. Existing statistical rule-based Mycobacterium tuberculosis (MTB) drug resistance prediction methods using bacterial genomic sequencing data often achieve varying results: high accuracy on some antibiotics but relatively low accuracy on others. Traditional machine learning (ML) approaches have been applied to classify drug resistance for MTB and have shown more stable performance. However, there is no study that uses deep learning architecture like Convolutional Neural Network (CNN) on a large and diverse cohort of MTB samples for AMR prediction. We developed 24 binary classifiers of MTB drug resistance status across eight anti-MTB drugs and three different ML algorithms: logistic regression, random forest and 1D CNN using a training dataset of 10,575 MTB isolates collected from 16 countries across six continents, where an extended pan-genome reference was used for detecting genetic features. Our 1D CNN architecture was designed to integrate both sequential and non-sequential features. In terms of F1-scores, 1D CNN models are our best classifiers that are also more accurate and stable than the state-of-the-art rule-based tool Mykrobe predictor.
Introduction
Tuberculosis (TB) remains a leading cause of death from infectious diseases globally. Rapid and accurate drug susceptibility testing (DST) is critical for effective treatment and preventing the spread of resistant strains. Traditional culture-based methods are slow, taking weeks to provide results. While whole-genome sequencing (WGS) offers a faster alternative, current rule-based prediction tools often lack consistency across different drugs and rely on a single reference genome, which may not capture the full genetic diversity of global MTB lineages. This study addresses these limitations by applying machine learning, specifically a custom 1D Convolutional Neural Network (CNN), to a large, diverse dataset using a pan-genome approach.
Methods
The researchers developed 24 binary classifiers for eight anti-TB drugs (Rifampicin, Ethambutol, Isoniazid, Pyrazinamide, and four second-line drugs) using Logistic Regression (LR), Random Forest (RF), and a 1D CNN.
A key innovation was the use of a pan-genome reference derived from the Comprehensive Antibiotic Resistance Database (CARD) to improve variant detection. The 1D CNN architecture was specifically designed to handle hybrid data:
- Sequential features: 21-base windows around focal SNPs processed via convolutional layers.
- Non-sequential features: Gene presence/absence and lineage information concatenated before the final fully connected layers.
Datasets
The study utilized a massive dataset of 10,575 MTB isolates from 16 countries. This global diversity ensures the models are robust across different lineages.
Results and Discussion
The 1D CNN consistently outperformed both traditional ML models and the rule-based Mykrobe predictor. For Ethambutol (EMB), a drug notoriously difficult to predict, the CNN improved sensitivity from 72.4% to 94.5%. F1-scores for first-line drugs ranged from 93.8% (EMB) to 97.2% (INH).
The study also employed filter-based feature selection to identify the most relevant genetic markers. The stability of the F1-score across different feature importance cutoffs demonstrates the robustness of the selected features.
Biological validation showed that 78.8% of the features identified by the model are recognized in the WHO catalogue of resistance mutations, confirming that the model captures meaningful biological signals rather than just statistical noise.
Conclusion
This research demonstrates that deep learning, particularly 1D CNNs combined with a pan-genome approach, provides a superior framework for predicting MTB drug resistance. The automated pipeline and high accuracy, especially for challenging drugs like Ethambutol, represent a significant step toward rapid, sequence-based clinical diagnostics for tuberculosis.
Summary updated