Explainable AI for TB drug resistance: 27 new candidates
Explainable AI for TB drug resistance does two things at once. It predicts whether a sequenced isolate is resistant to a given drug, and it shows which mutations drove that prediction. A framework published in 2025 trained on 39,145 sequenced isolates reached an area under the curve of 0.981 for rifampicin and 0.957 for isoniazid, then used SHAP values to nominate 27 candidate resistance markers that existing catalogs have never formally classified.
Why mutation catalogs cannot keep up
Most laboratories still read resistance out of genome data by checking it against a published catalog of resistance mutations. That works well when the mutation is well established. It fails quietly when the mutation is not.
Rare mutations are the problem, particularly ones in promoter regions or in genes that tolerate many different amino acid changes. The analyst ends up with a table entry that says the significance is uncertain. Whole genome sequencing is now routine and isolate collections keep growing, so generating data is no longer the bottleneck. Turning a genome into a defensible resistance call is the bottleneck, and for a long tail of mutations the catalog has no answer to give.
This is the gap explainable AI for TB drug resistance is meant to close. The design choices that close it are worth examining on their own terms.
What explainable AI for TB drug resistance actually does
The tool in question, xAI-MTBDR, was built for two jobs that normally sit in separate rooms. The first job is prediction: given a genome, estimate whether the isolate resists a given anti-tuberculosis drug. The second job is interpretation: given a prediction, say which mutations drove it.
That second job is what sets this framework apart from an ordinary classifier. It is why explainability was designed in rather than added later. The framework adds SHAP, or SHapley Additive exPlanations, which splits any single prediction into the contribution of each input feature. A positive SHAP value pushes a prediction toward resistance, a negative one pulls it away, and the sum across features reconstructs the model output. At the population level the values show which mutations the model relies on overall. On one isolate they show which mutations carry that particular call.
The boundary matters just as much. A model learns only from the pairing of genomes and observed susceptibility results, so its evidence is statistical. A mutation with a large SHAP value across many isolates has earned attention, not a verdict.
The dataset behind the model
The training set is what makes the exercise credible. Its size is the first fact worth stating plainly.
| Component | Value |
| Isolate collection | 39,145 high quality Mycobacterium tuberculosis isolates |
| Source datasets | 3 combined datasets |
| Data per isolate | Whole genome sequence plus drug susceptibility test result |
| Drugs modeled | 11 anti-tuberculosis drugs, one model per drug |
| Pre-screened resistance regions | 49 regions, covering genes and promoter regions |
| Variant types captured | Single nucleotide polymorphisms, insertions, deletions |
| Final feature set | 788 features, made up of 717 common mutations and 71 derived features built for rare variants |
| Model type | Soft voting ensemble of XGBoost, logistic regression, and random forest, weighted 2.0, 1.5, and 1.0 |
| Validation | Leave-one-out validation |
Two choices in that table deserve comment. The first is the split between common and rare variation. Seventy-one derived features were built specifically to keep rare variants visible to the model. The pipeline did not throw away the mutations that appear in a handful of isolates, which is exactly the population a catalog helps least.
The second is the ensemble with unequal weights. The machine learning combination runs through soft voting, and giving the gradient boosted model twice the weight of logistic regression reduces the variance that any single learner would bring to a dataset where rare mutation patterns can otherwise dominate a fit.
How the features were built
Feature engineering ran through 49 pre-determined resistance-related regions, covering both genes and promoter regions. It captured single nucleotide polymorphisms, insertions, and deletions rather than any single variant class. Restricting the search to pre-screened regions is what keeps the problem tractable at this sample size. It also means the analysis is not a blind genome-wide scan, and whatever resistance mechanism acts outside those 49 regions is outside what the model could ever have learned.
The 788 features that resulted split into two populations with very different roles. The 717 common mutations cover the well known resistance routes, the ones the catalog already describes. The 71 derived features were built for rare variants, giving the model a way to register a mutation seen only a few times without letting that single observation dominate the fit.
That split quietly shapes the output. A framework built this way will always look best on first-line drugs, where most of the resistance signal runs through those 717 common mutations. It will struggle where resistance is mediated by rare or unusual events falling in the smaller feature population.
How accurate was the framework
Performance was compared against random forest, logistic regression, a wide and deep neural network, and an existing resistance profiler. The comparison covered both first-line and second-line drugs.
| Drug | xAI-MTBDR AUC | Comparator AUC |
| Rifampicin | 0.981 | 0.963 |
| Isoniazid | 0.957 | 0.908 |
| Ethambutol | 0.955 | 0.914 |
| Pyrazinamide | 0.916 | 0.684 |
| Levofloxacin | 0.941 | Not reported |
| Moxifloxacin | 0.935 | Not reported |
| Streptomycin | 0.934 | Not reported |
| Amikacin | 0.913 | Not reported |
| Capreomycin | 0.902 | Not reported |
| Ethionamide | 0.822 | Not reported |
For the four first-line drugs, the framework improved over the best performing comparison method by 0.271 percent to 1.439 percent, averaging 0.564 percent. The source does not specify whether that improvement is a relative gain or an absolute difference in area under the curve. The two readings do not map cleanly onto the table above, so treat the margin as an order of magnitude rather than a precise figure.
Why accuracy differs so much between drugs
The spread from 0.981 down to 0.822 is not random, and it is not about the drugs in general. Rifampicin resistance, isoniazid resistance, ethambutol resistance, and pyrazinamide resistance all score high, while ethionamide resistance scores low. The cause is visible in the underlying data volumes.
| Drug | Isolates with susceptibility data | Resistance prevalence |
| Rifampicin | 36,552 | Not reported |
| Isoniazid | 36,240 | 34 percent |
| Capreomycin | 11,246 | Not reported |
The same collection of susceptibility data shows resistance prevalence ranging from 8 percent for amikacin to 34 percent for isoniazid. Volume and prevalence together determine how hard a given drug is to model, and the drugs with the least susceptibility data sit at the bottom of the accuracy range.
This is a straightforward lesson from any predictive model on uneven clinical data, and it has a practical consequence. The framework is strongest exactly where laboratories need it least, because first-line drug resistance is the part of the problem catalogs already cover well. The value concentrates in the sparse corners.
What SHAP adds on top of prediction
Prediction accuracy alone would leave the field where it started. The explainability layer was used at two levels, and the second level holds the genuinely new observations.
At the population level, the researchers compared SHAP values across the mutation categories used by the World Health Organization catalog for drug resistant tuberculosis.
| Catalog category | Meaning | Model behavior |
| Category 1 | Associated with resistance | Higher SHAP values overall |
| Category 2 | Associated with resistance, interim classification | Higher SHAP values overall |
| Category 3 | Significance uncertain | Mixed |
| Category 4 | Not associated with resistance, interim classification | Lower |
| Category 5 | Not associated with resistance | Lower |
The result was a consistency check, and a favorable one. Mutations with established resistance evidence also carried the larger SHAP values. The model rediscovered known biology rather than fitting noise.
At the level of a single isolate, the analysis turns more informative. Two isolates can both be predicted resistant while carrying entirely different mutation combinations. Comparing the per-isolate SHAP decomposition across resistant isolates makes it possible to see that different resistant isolates may sit on different genetic mechanisms. That is information the aggregate view of a catalog cannot give you.
From 788 candidates to 27 markers worth testing
Combining the model with the SHAP analysis produced 788 candidate resistance-associated mutations. Individual-level analysis of the four first-line drugs then narrowed the field to 99 important mutations, of which 27 do not fall under catalog Category 1 or Category 2 and were carried forward as potential resistance markers.
Four of those 27 already had published links to resistance, which is a useful reliability signal rather than a disappointment. The remaining 23 are where the study is asking for work.
| Mutation | Status in the source | Note |
| InhA I194T | Already reported in the literature as resistance related | Catalog categories 3, 4, or 5 |
| InhA I21V | Already reported in the literature as resistance related | Catalog categories 3, 4, or 5 |
| KatG S315G | Already reported in the literature as resistance related | Catalog categories 3, 4, or 5 |
| EmbB D1024N | Already reported in the literature as resistance related | Catalog categories 3, 4, or 5 |
| AhpC -52C>T | Newly proposed as a candidate | Promoter region variant |
| InhA I21T | Newly proposed as a candidate | Same codon region as two flagged variants |
| AhpC -48G>A | Newly proposed as a candidate | Promoter region variant |
Structural distance as supporting evidence
For three of the new candidates, the researchers went past statistics and looked at protein structure. They measured how close the altered residue sits to the drug that the protein normally targets.
| Protein | Candidate residue | Distance to drug | Known resistance residue | Distance to drug |
| InhA | I194 | About 3.7 angstrom | S94 | About 4 angstrom |
| EmbB | D1024 | About 6.1 angstrom | M306 | About 8.6 angstrom |
The candidate residues sit closer to the drug than the established resistance positions do. That makes a direct interference with drug binding plausible. The authors were careful to frame this as a hypothesis that still needs experimental work, and the framing is correct. A short distance is a reason to run the assay, not a substitute for it.
The counterintuitive part
The most interesting result inverts the intuitive reading of the accuracy table and of what tuberculosis drug resistance prediction is actually for.
The framework performs best on first-line drugs, where the catalog already covers most resistance mechanisms. It performs worst on ethionamide, amikacin, and capreomycin, where genuine uncertainty about resistance mechanisms still exists. A headline comparison of accuracy values suggests the model is most useful where the problem is most solved.
That reading is wrong, and the framework’s own outputs show why. Pyrazinamide accuracy of 0.916 against a comparator’s 0.684 is a large margin on a drug where first-line predictors are already strong. The value of the model is not the margin. It is the 27 named mutations that no catalog classified, and those concentrate in the drugs where the catalog is thinnest.
There is a second inversion worth holding onto. A high SHAP value for a mutation means the model relies on that mutation, and nothing more. The same arithmetic that produces 0.981 for rifampicin also produces confident predictions for mutations whose causal role has never been tested. Explainable AI for TB drug resistance is not more cautious than a conventional pipeline at the point where it matters most. It is faster at generating hypotheses, and it says nothing on its own about whether a hypothesis is true.
How the framework fits into a laboratory workflow
The practical sequence matters more than any single accuracy number. The ordering below reflects what the evidence supports.
- Keep catalog interpretation as the reporting standard. A prediction that contradicts a Category 1 mutation deserves investigation, not a changed report.
- Run the model where the catalog is thin. Rare mutations in promoter regions and in multi-mutation backgrounds are where the ranking adds information a lookup table cannot supply.
- Request the per isolate SHAP decomposition whenever a call looks unusual. Seeing which mutations carry a prediction is more informative than seeing the prediction alone.
- Check the training volume behind each drug before trusting its score. Low volume drugs produce confident looking numbers with less behind them.
- Treat every candidate marker as a prioritization entry for wet lab work, not as a resistance call. A flagged mutation is a request for minimum inhibitory concentration testing and isolate validation.
- Feed the results back into the catalog, but only after the confirmation work. Without minimum inhibitory concentration data, independent isolate validation, and a check on genetic background, a candidate should not enter a clinical or public health database.
What the model does not measure
Area under the curve is a ranking statistic, and three practical limits follow from that.
It says nothing about calibration. A model that assigns a resistance probability of 0.9 to every positive call can post an excellent area under the curve while being systematically overconfident. That is the failure mode that matters if a score is ever compared against a clinical threshold.
It says nothing about the cost of an error in each direction. A missed resistance in a first-line drug and a falsely flagged candidate in a rarely used second-line drug are not equivalent errors, and a single summary statistic cannot weigh them.
It says nothing about how the model handles a genome unlike its training data. A collection pooled from three datasets may contain lineages, geographic groupings, or laboratory practices that do not appear in all of them. Leave-one-out validation does not surface a distribution shift that only exists outside the collection.
Limitations and open questions
The study has real constraints, and a reader should carry them forward.
First, the candidates are statistical, not validated. The framework identifies mutations that contribute to predictions. Establishing that any of them causes resistance requires independent isolate validation, phenotypic susceptibility testing, minimum inhibitory concentration work, genetic background analysis, and experimental confirmation.
Second, the source reports the number 788 twice for two different quantities, the size of the engineered feature set and the number of candidate resistance associated mutations identified from it. Whether these are one collection of 788 items or two coincidentally equal counts cannot be resolved from the material. It is worth checking against the original tables.
Third, the authors describe amikacin and capreomycin results as relatively weak at 0.913 and 0.902, yet ethionamide sits lower at 0.822 in the same results. The narrative and the numbers are not fully aligned.
Fourth, validation was leave-one-out. That is a reasonable choice for a dataset of this size, and it is not the same as validation on an independent cohort from a different setting. Read the reported accuracy as an upper estimate.
Fifth, the source does not make clear whether the first-line margin over the best comparator is a relative or an absolute measure. It also does not report comparator scores for the six second-line drugs, which limits how much of the table can be read as a head to head comparison.
Bottom line
The contribution is not a better resistance prediction, since the margins over existing methods are small. The contribution is a ranked, inspectable list of 27 mutations that existing catalogs have not formally classified, drawn from 39,145 isolates and eleven drugs. Explainable AI for TB drug resistance, used as a hypothesis generator with wet lab follow up, moves the analysis from finding mutations toward explaining them. Used as a diagnostic, it would move the field in the wrong direction.
FAQ
What is explainable AI for TB drug resistance?
It is a prediction model that shows which input features drove any single output it produces. For a genome based resistance call the inputs are mutations and the output is a resistance probability for one specific drug. An ordinary classifier returns only that probability, which leaves the analyst with no way to audit the reasoning.
How does SHAP explain a resistance prediction?
SHAP, or SHapley Additive exPlanations, treats the prediction as the sum of individual contributions from every input feature. Each mutation receives a value, positive when it pushes the isolate toward resistance and negative when it pushes away. Summed across a collection the values show which mutations the model relies on, and for one isolate they show which mutations carry that call.
How accurate was the xAI-MTBDR framework?
Accuracy was strongest for the drugs with the most data and weakest for the sparse ones. Area under the curve reached 0.981 for rifampicin, 0.957 for isoniazid, 0.955 for ethambutol, and 0.916 for pyrazinamide. Second-line drugs ranged from 0.941 for levofloxacin down to 0.822 for ethionamide, and the average gain over the best comparison method on first-line drugs was 0.564 percent.
Why does prediction accuracy differ between drugs?
Susceptibility data volume ranges widely, from 36,552 rifampicin results down to 11,246 for capreomycin. Resistance prevalence also varies, from 34 percent for isoniazid to 8 percent for amikacin, and a rare class is harder to learn. A drug with a single dominant route to resistance is easier to model than one with many different routes.
What is the difference between the 788 features and the 788 candidate mutations?
The source uses the same number for two separate things, which is one of the study’s reporting ambiguities. The 788 features are engineered inputs, split into 717 common mutations and 71 derived features built for rare variants. The 788 candidate mutations are the model outputs that survived analysis, and the material does not say whether one collection is described twice.
What do the WHO mutation catalog categories mean for model interpretation?
The categories run from associated with resistance, through significance uncertain, to not associated with resistance. When the framework’s SHAP values were compared against them, mutations already linked to resistance carried larger values. That agreement shows the model and the catalog agree where both have firm ground, which is what makes the low-category nominations credible.
Which 27 mutations were flagged as candidate resistance markers?
Twenty-seven mutations fell outside the two strongest catalog categories and were carried forward as potential resistance markers. Four of them, InhA I194T, InhA I21V, KatG S315G, and EmbB D1024N, already had published links to resistance. Three others were newly proposed: AhpC -52C>T, InhA I21T, and AhpC -48G>A, two of them promoter region variants.
Which candidate mutations already had published resistance evidence?
Four of the 27 candidate markers had prior literature support: InhA I194T, InhA I21V, KatG S315G, and EmbB D1024N. Their presence in the candidate list is a consistency check rather than a discovery. It shows the framework recovered known mechanisms the catalog has not yet graded firmly, which is the behavior you want before reading the other 23.
How does protein structure distance support a candidate mutation?
Structural analysis measured how far a candidate residue sits from the drug its protein normally binds. The InhA I194 candidate lies about 3.7 angstrom from isoniazid, closer than the known resistance position S94 at about 4 angstrom. The EmbB D1024 candidate lies about 6.1 angstrom from ethambutol, against about 8.6 angstrom for the known position M306.
Can an AI model replace phenotypic drug susceptibility testing?
No, and the framework itself does not claim it can, because the evidence it produces is statistical. Establishing that a mutation causes resistance needs phenotypic testing, minimum inhibitory concentration work, isolate validation, and genetic background analysis. The realistic role is as a prioritization tool for that follow up, with catalog interpretation staying the reporting standard.
How much data does explainable AI for TB drug resistance need for a single drug?
The published run ranged from 36,552 isolates with rifampicin results down to 11,246 with capreomycin results. The two lowest accuracy scores belonged to the drugs at the sparse end of that range. No minimum threshold was published, so read drug level data volumes alongside the accuracy values rather than treating the headline figures as drug independent.
What should a laboratory do with the 27 candidates before using them clinically?
Treat them as a work list rather than a report, and start with susceptibility testing on suitable strains. Each candidate also needs minimum inhibitory concentration determination and a check against the genetic background of the isolate where it was found. Only then can it enter a clinical or public health database, since a model score alone is a step beyond the evidence.


