Case study ยท Virtual Pathways

Modeling drug-induced liver injury

We created an open-source suite of models of the different pathways involved in drug-induced liver injury (DILI). We ran a case study to exemplify the potential applications of such a suite, by comparing pairs of drugs that share a target and a scaffold, where one of the two is known to be toxic and the other is not.

01

Motivation

This case study is about training machine learning models for drug-induced liver injury (DILI) prediction. DILI is a significant concern in drug development, as it can lead to severe health issues and drug withdrawals and thus to financial losses.

By conducting this case study, we aim to explore the application of machine learning techniques in predicting DILI based on molecular structures, mostly represented as SMILES strings. We separate our work into the study of different molecular pathways that can lead to DILI, such as BSEP inhibition and mitochondrial membrane potential disruption (more on these pathways in the Background section).

We make the code for training these models opensource and clearly indicate the license of the data for each model. With this, we hope that scientists will be able to use our suite of models to derisk drug development. The different pathway models are individually packaged and versioned, we further report exhaustive and transparent evaluation metrics for each version.

Our motivation is fourfold. First, we aim to demonstrate our expertise at producing reproducible, packaged and versioned artifacts of research. Second, this research task allowed us to deep dive into concrete and important biological topics on which we have learned a lot. Third, our goal is to create a fully opensource alternative library to existing commercial ones. Finally, we enjoy solving problems, and we are committed to producing public and reproducible artifacts of the best quality.

02

Background

In cellular biology, one often refers to the concept of "pathways", which are sequences of actions among molecules in a cell that lead to a certain product or change in the cell (metabolic pathways, signaling pathways). DILI is associated with several key pathways, including those involved in drug metabolism (mostly via CYP enzymes), drug transport, DNA damage, mitochondrial membrane disruption, etc.

At the time of writing, we have packaged three of them: the BSEP inhibition pathway (which we will call BSEP), the mitochondrial membrane potential disruption pathway (OXPHOS), and the NRF2 oxidative stress pathway (NRF2).

Since the Swiss physician Paracelsus, it is known that "the dose makes the poison". In this case study however, we will not consider the dose of the drugs. Our virtual pathways are binary classifiers, and what a positive means depends on the pathway: each outputs a probability of being associated with DILI as the authors of its dataset defined it. In most cases the labels are binary in the datasets themselves. Where a dataset provides continuous values instead โ€” IC50 values for BSEP inhibition, for example โ€” we regress those values and provide them as a first output, then threshold them consistently with the literature to give the probability alongside.

03

Underlying biology

Mitochondrial membrane potential disruption

As a well-known sentence says, "mitochondria is the powerhouse of the cell". Mitochondria are organelles that produce energy for the cell in the form of ATP. In order to produce ATP, mitochondria need to manipulate oxygen and electrons, which can lead to the production of reactive oxygen species. Because of their reactivity, reactive oxygen species can damage the cell and lead to cell death if they happen to leak out of the mitochondria. Hence mitochondrial membrane disruption is a key pathway that can lead to cell death and DILI. It often happens specifically in the liver because it is the organ that metabolizes drugs and is therefore exposed to high concentrations of potentially reactive molecules.

intermembrane spacematrixIIIIIVATP synthaseADP + Pi โ†’ ATP++++++

The proton coming back through the inner membrane activates the ATP synthase through a mechanic motion and produces the ATP of the cell.

Figure 1. Uncoupling the inner mitochondrial membrane. The respiratory complexes pump protons out of the mitochondrial matrix, creating an electrical gradient, which activates the ATP synthase on their way back. An uncoupler is a molecule that can carry a proton back across the inner membrane by itself, short-circuiting the ATP synthase mechanism. The energy is then dissipated as heat instead of conducting to ATP production.

BSEP inhibition

Bile salt export pump (BSEP) is a protein that is responsible for transporting bile salts from the liver to the bile ducts. Bile salts are important for digestion and absorption of fats. If the pump is inhibited, bile salts can accumulate in the liver and cause cholestatic liver injury. BSEP inhibition is a well-known pathway that can lead to DILI, and it is often tested in drug development.

hepatocytebile saltsBSEPcanaliculus0246810injury thresholdpump freehalf blockednine tenths blocked012243648hoursintracellular bile salts
Figure 2. Inhibiting the bile salt export pump. BSEP sits in the apical membrane of an hepatocyte enclosing a bile canaliculus. It must spend energy under the form of ATP to move bile salts into the channel. These pumps can be blocked by certain compounds. The detergents that were supposed to be excreted then damage the hepatocytes themselves.

NRF2 oxidative stress

NRF2 (Nuclear factor erythroid 2-related factor 2) is a transcription factor that plays a crucial role in the cellular response to oxidative stress. When reactive oxygen species accumulate in the cell, NRF2 is activated and translocates to the nucleus of the cell, where it binds to antioxidant response elements in the DNA and promotes the expression of genes that encode for antioxidant proteins. These proteins help to neutralize the excess of reactive oxygen species and protect the cell from oxidative damage.

This pathway acts as a detection mechanism of reactive oxygen species in the cell. We find the mechanism of NRF2 activation to be particularly interesting. An enzyme called KEAP1 (Kelch-like ECH-associated protein 1) is responsible for regulating the activity of NRF2. Under normal conditions, KEAP1 binds to NRF2 and promotes its degradation, preventing it from activating antioxidant genes. However, when reactive oxygen species are present, they modify KEAP1 and prevent it from binding to NRF2. This allows NRF2 to accumulate and translocate to the nucleus, where it can activate the expression of antioxidant genes.

click the figure to add an electrophile

Figure 3. The KEAP1 switch and the NRF2 response. KEAP1 is a sensor. An electrophile can trigger a reaction with the cysteines of KEAP1. It then releases NRF2 that will accumulate in the cell and progressively go into the nucleus, in turn activating the transcription of the genes that encode proteins responsible for the oxidative stress response (neutralization of reactive oxygen species). In the absence of an electrophile, KEAP1 binds to NRF2 and brings it to the proteasome, where it is degraded.
04

Compound pairs

For this case study, we choose specific pairs of drugs of which one drug is known to be associated with DILI, while the other is not. Because the pathway responsible for DILI for each of these compounds is known, we can use our models to predict which drug is more likely to be associated with DILI through this specific pathway.

The virtual pathways (models for each pathway) rely on the structure of the molecules, which is represented as SMILES strings (but we also process these strings using various cheminformatics techniques to provide more specific features to our models). Therefore, models will be mostly blind to the pharmacological properties of the drugs, and will not be able to predict DILI for drugs that for example inhibit a very specific enzyme involved in a DILI pathway. Because of this, we made sure to select pairs of drugs that are chemically similar and have similar pharmacological properties, and of which the DILI mechanism depends on the chemical information.

Several of the compounds below are old, well-studied drugs that public screening libraries are full of. Hence, before analyzing our predictions themselves, we measured how distant each compound was from the training dataset of the models. More specifically, we looked at four indicators. First we looked whether the compound was effectively in the table or not. Then we count the number of training compounds sharing its Murcko scaffold (note that our split between train and val is based on the scaffold). We also define the nearest neighbour as the largest Tanimoto similarity to a training compound over Morgan fingerprints. Finally, the descriptor distance is the distance to the nearest training compound in the standardised descriptor space that is given as an input to the model. We call a compound held out when it is absent from the table and has no near duplicate in it.

Amodiaquine / chloroquine

Amodiaquine (LiverTox) and chloroquine (LiverTox) are both 4-aminoquinoline antimalarials that share a nearly identical core scaffold and mode of antiparasitic action. Yet, only amodiaquine is associated with DILI, which has restricted its clinical use largely to short prophylactic or combination-therapy regimens. Chloroquine, in contrast, is only a rare and idiosyncratic cause of clinically apparent liver injury despite decades of widespread use. The divergence is thought to trace to amodiaquine's extensive hepatic first-pass metabolism (by CYP2C8) into the reactive metabolite desethylamodiaquine, which can then form protein adducts and drive oxidative stress. On the other hand, chloroquine undergoes only minor hepatic metabolism and is mostly excreted unchanged. This pair is therefore well suited to probing the NRF2 pathway.

chloroquine
amodiaquine4-aminophenol
CYP2C8hepatic first pass
desethylamodiaquinethe reactive quinone imine forms here
Figure 4. Amodiaquine, its reactive metabolite, and chloroquine. The 4-aminophenol is highlighted on amodiaquine. This group oxidises under the metabolization of CYP2C8.

Distances to the training set

Amodiaquine can be considered held out of the training set of the NRF2 predictor: first, it is effectively absent from the training set. The nearest neighbour is at 0.50, against a median of 0.57 for the table's own compounds, and only 2 training compounds share its scaffold. Chloroquine however is in the table, and the assay labels it inactive.

Distance to the NRF2 training table ยท 4540 compounds
CompoundIn the tableSame scaffoldNearest neighbourDescriptor distanceStatus
amodiaquineno20.500.54held out
chloroquineyes191.000.00seen

Stanozolol / nandrolone

Stanozolol (LiverTox) and nandrolone (LiverTox) are both anabolic-androgenic steroids used therapeutically for performance enhancement, but they differ critically in chemical structure at the C17 position: stanozolol is 17-alpha-alkylated, while nandrolone is not. This structural difference explains a divergence in liver safety: 17-alpha-alkylated steroids are consistently linked to a distinctive "bland cholestasis". The alkyl substitution slows hepatic clearance and prolongs hepatic exposure, and 17-alpha-alkylated androgens have also been shown to disturb bile acid transport and antioxidant defenses in the liver. Hence, we studied this pair under the lens of the BSEP inhibition pathway.

stanozololC17, methylated
nandroloneC17, unmethylated
Figure 5. Stanozolol and nandrolone at carbon 17. Carbon 17 is highlighted on both compounds. Stanozolol carries a methyl group alongside the hydroxyl. Nandrolone carries a hydrogen.

Distances to the training set

Distance to the BSEP training table ยท 1151 compounds
CompoundIn the tableSame scaffoldNearest neighbourDescriptor distanceStatus
stanozololno00.530.46held out
nandroloneno40.570.09held out

Nitrofurantoin / trimethoprim

Nitrofurantoin (LiverTox) and trimethoprim (LiverTox) are both commonly prescribed for urinary tract infections and are frequently co-administrated or considered interchangeably in clinical practice. Nitrofurantoin undergoes nitro-reductive metabolism that generates reactive oxygen species through redox cycling, and it has been shown to directly inhibit complex I of the mitochondrial electron transport chain in hepatocytes, depleting glutathione and impairing mitochondrial respiration. Trimethoprim causes hepatotoxicity through a distinct, largely immune-mediated idiosyncratic mechanism (which we do not model for complexity limitations), and is rare enough that some large cohort comparisons found similar background hepatic event rates between trimethoprim alone and the combination. This pair therefore probes the mitochondrial membrane potential disruption (OXPHOS) pathway specifically.

nitrofurantoinnitro group
trimethoprim
Figure 6. Nitrofurantoin and trimethoprim. The nitro group is highlighted on nitrofurantoin. The group accepts an electron and hands it on to oxygen, this can be cycled (the meaning of redox cycling).

Distances to the training set

Both compounds are effectively present in the training set.

Distance to the OXPHOS training table ยท 4925 compounds
CompoundIn the tableSame scaffoldNearest neighbourDescriptor distanceStatus
nitrofurantoinyes11.000.00seen
trimethoprimyes21.000.00seen
05

Virtual pathways

Three pathways are studied. Each of which is an independently versioned Python package with its own license, dataset and model card. All three models take SMILES strings as an input and return the probabilities of a binary classification as an output.

Studied pathways
PathwayPackageCompoundsProtocolAUC
BSEPvp-bsep v21151scaffold-shuffle0.868 ยฑ 0.016
OXPHOSvp-oxphos v34925scaffold-shuffle0.888 ยฑ 0.015
NRF2vp-nrf2 v14540scaffold-balanced0.806 ยฑ 0.027

We compare the AUC of the classifiers obtained with a mean of five seeds of a scaffold split. We further report the protocol we used for the split, which is clearly explained in our code. Basically, scaffold-shuffle assigns scaffold groups at random between train and validation sets whereas scaffold-balanced packs each group into the fold that it overfills least (required when the folds are smaller than the size of the groups). We invite the reader to refer to the code for further understanding.

Packagesgithub.com/Sagace-Labs/virtual-pathways-hubOpensource repository of our published pathways.

06

Predictions

The pairs are scored on the corresponding pathways. We report the classification. We also report a counter-screen which is a cell-viability read taken from the same library as the primary assay. It indicates whether the compound was killing the cell. We report it when available (BSEP has none, hence the dashes). cLogP is a computed estimate of lipophilicity, which is a confound to DILI caused by BSEP inhibition.

amodiaquine / chloroquine ยท NRF2

NRF2 ยท amodiaquine against chloroquine
Compoundnrf2_areCounter-screenAssay call
amodiaquine0.8430.167not in the table
chloroquine0.3380.064inactive

stanozolol / nandrolone ยท BSEP

BSEP ยท stanozolol against nandrolone
Compoundbsep_inhibCounter-screencLogPAssay call
stanozolol0.622โ€”4.12not in the table
nandrolone0.229โ€”3.49not in the table

nitrofurantoin / trimethoprim ยท OXPHOS

OXPHOS ยท nitrofurantoin against trimethoprim
Compoundoxphos_disruptCounter-screenAssay call
nitrofurantoin0.9570.028active
trimethoprim0.0510.010inactive

The pairs are correctly classified by our virtual pathways models. The gaps are +0.505 on NRF2, +0.393 on BSEP, +0.906 on OXPHOS.

These numbers are not calibrated probabilities of liver injury in a patient. They represent the probability that a compound is active in a particular cell assay, as that assay's authors defined activity.

07

Failure modes

One issue with the virtual pathways is that the harm may come from a metabolite of a tested compound. Assays might capture this as a residual signal, when tested on a cell model that correctly expresses the CYP metabolisation pathway. It is not clear however that our models will be able to predict the DILI activity of compounds that do harm through their metabolites, directly via their SMILES string. We tested this directly on five pairs from the medicinal chemistry literature.

Bioactivation-dependent pairs ยท scored on NRF2
PairHepatotoxicSaferSeparationStatus
sudoxicam / meloxicam0.0300.035โˆ’0.005held out / seen
ibufenac / ibuprofen0.0410.048โˆ’0.007seen / seen
carbamazepine / oxcarbazepine0.3920.489โˆ’0.097seen / seen
lumiracoxib / celecoxib0.5280.805โˆ’0.277held out / seen
nimesulide / celecoxib0.1700.805โˆ’0.635held out / seen

A second boundary is immune-mediated injury. It is not directly predictable by a chemistry model and highly varies from individual to individual. Ximelagatran, withdrawn after transaminase elevations linked to HLA-DRB1*07:01, is a standard example. Our virtual pathways score it backwards (OXPHOS: 0.027 against 0.164 for dabigatran).

We intend to develop virtual pathways that predict the metabolites of a given drug and use these predictions as inputs to these more classical virtual pathways. That is a substantially harder problem and it will be the subject of its own case study.

08

Further predictions

The three pairs above are textbook cases, chosen for simplicity. A possibly harder test is to rank three compounds. We provide the example of the endothelin receptor antagonists. Sitaxentan, bosentan and ambrisentan represent in a sense a gradient of regulatory-flagged DILI. Sitaxentan was withdrawn worldwide in 2010 after fatal hepatotoxicity. Bosentan remains on the market with dose-dependent transaminase elevations and a monitoring requirement. Ambrisentan is in the same drug class, but its liver monitoring requirement was removed in 2011.

Endothelin receptor antagonists ยท in order of liver risk
Compoundoxphos_disruptbsep_inhibBSEP potency (ยตM)cLogPOXPHOS table
sitaxentan0.8860.82716.23.96held out
bosentan0.7520.79420.74.20held out
ambrisentan0.0600.54575.93.52seen
09

Limitations

Immune-mediated reactions depend on a patient's HLA type, that is not predictable from the chemistry of the drug. Same for an injury caused through an enzyme that we have not modelled. A low score on the panel is therefore not a safety claim in itself.

We model small molecules only. The screens used to train the models were run on small-molecule libraries and we did not find any comparable public resource for biologics. Though we are confident in the possibility of creating virtual pathways for biologics with sufficient datapoints.

Most outputs are binary. Most of the time, we did not design the threshold ourselves. Where the data presented continuous values, we regressed them and reported the estimate alongside (that is the case for BSEP potencies and the endothelin table).

We cherry-picked the pairs to showcase. We swept a much larger set and are first showing the most successful pairs. We present our predictions for other pairs below.

Every pair scored while preparing this study
PairPathwayHepatotoxicSaferSeparationRole
amodiaquine / chloroquineNRF20.8430.338+0.505shown above
stanozolol / nandroloneBSEP0.6220.229+0.393shown above
nitrofurantoin / trimethoprimOXPHOS0.9570.051+0.906shown above
methyltestosterone / testosteroneBSEP0.7360.415+0.321support
sudoxicam / meloxicamNRF20.0300.035โˆ’0.005failure
ibufenac / ibuprofenNRF20.0410.048โˆ’0.007failure
carbamazepine / oxcarbazepineNRF20.3920.489โˆ’0.097failure
lumiracoxib / celecoxibNRF20.5280.805โˆ’0.277failure
nimesulide / celecoxibNRF20.1700.805โˆ’0.635failure
ximelagatran / dabigatranOXPHOS0.0270.164โˆ’0.137control
10

Reproduction

Each virtual pathway is a published package with an immutable version directory holding a manifest, the weights, and a model card. A version also records data provenance. We also declare permissive licenses for the code and make the licenses about the data explicit.

Packagesgithub.com/Sagace-Labs/virtual-pathways-hubOpensource repository of our published pathways.

The predictions on this page were produced by installing the three packages and calling each pathway's predict on the standardised SMILES. Compound structures were resolved from PubChem and were then processed by the same standardiser as the training tables.

11

References

  1. Li X. Q., Bjรถrkman A., Andersson T. B., Ridderstrรถm M., Masimirembwa C. M. (2002). Amodiaquine Clearance and Its Metabolism to N-Desethylamodiaquine Is Mediated by CYP2C8: A New High Affinity and Turnover Enzyme-Specific Probe Substrate. The Journal of Pharmacology and Experimental Therapeutics 300 399-407.doi.org/10.1124/jpet.300.2.399Amodiaquine is bioactivated to a reactive quinone imine that forms protein adducts.
  2. Rendic S., Guengerich F. P. (2020). Metabolism and Interactions of Chloroquine and Hydroxychloroquine with Human Cytochrome P450 Enzymes and Drug Transporters. Current Drug Metabolism 21 1127-1135.doi.org/10.2174/1389200221999201208211537Chloroquine undergoes only limited hepatic metabolism.
  3. Ducharme J., Farinotti R. (1996). Clinical Pharmacokinetics and Metabolism of Chloroquine. Clinical Pharmacokinetics 31 257-274.doi.org/10.2165/00003088-199631040-00003Clinical pharmacokinetics of chloroquine.
  4. Nunes V., Schinoni M. I., Bessone F., Lucena M. I., Medina-Cรกliz I., Hernandez N. et al. (2025). Stanozolol-induced Liver Injury: A Distinctive Cholestatic Clinical and Biochemical Phenotype at Presentation. Journal of Clinical and Experimental Hepatology 15 102506.doi.org/10.1016/j.jceh.2025.10250617-alpha-alkylated androgens and the bland cholestasis they cause.
  5. Lim L. O., Bortell R., Neims A. H. (1986). Nitrofurantoin inhibition of mouse liver mitochondrial respiration involving NAD-linked substrates. Toxicology and Applied Pharmacology 84 493-499.doi.org/10.1016/0041-008x(86)90254-1Nitrofurantoin impairs mitochondrial respiration in isolated hepatocytes.
Sagace

We are an open research lab.

Work with us

For research use only.