Pathway-Trajectory ROC: Reading the Slope of Enrichment to Predict Chronic Liver Toxicity Early

When a rat is dosed with a chemical for 28 days, its liver transcriptome does not jump to a final state — it drifts, accelerates, or recovers. Yet almost every computational method in toxicology compresses that drift into a single snapshot: a list of differentially expressed genes at one time point, mapped onto pathways, compared between treated and control. Two well-documented failures follow from this compression. Standard serum enzymes and histopathology detect organ damage only after tissue architecture is destroyed, which is why low-dose Rheum palmatum looked hepatoprotective on ALT and AST while quietly driving interstitial fibrosis over 12 weeks in rats Hepatotoxicity or Hepatoprotection? Pattern Recognition for the Paradoxical Effect of the Chinese Herb Rheum palmatum L. in Treating Rat Liver Injury. And structure-based machine-learning predictors of liver injury collapse when they meet novel chemical space — models trained on TG-GATEs fingerprints lost roughly 14% AUROC on external proprietary compound sets Chemistry-Based Modeling on Phenotype-Based Drug-Induced Liver Injury Annotation: From Public to Proprietary Data — because they model the molecule, not the biological response it provokes.

The proposal here is to make the trajectory of pathway enrichment the predictive object, and to evaluate it with time-dependent ROC analysis — that is, ROC curves (the plot of true-positive rate against false-positive rate as the decision threshold sweeps over all values, summarized by the area under the curve, AUC) computed at each early sampling day against the late histopathology outcome. The core bet, borrowed from clinical longitudinal studies: rates of change and directionality carry prognostic information that frozen snapshots throw away. Serial albumin trajectories in older heart-attack patients predicted mortality with a non-linear S-shape that baseline admission albumin could not see at all Association between albumin changes and prognosis in older patients with acute myocardial infarction, and a single neutrophil-to-lymphocyte ratio lost all discrimination in septic ICU patients precisely where tracking its trend over time was called for The association between the neutrophil-to-lymphocyte ratio and mortality in critical illness: an observational cohort study. Nobody has applied this logic to pathway-level molecular time series in chronic toxicology.

Core Claim

I claim that, on repeated-dose rat liver data in Open TG-GATEs, features describing how a pathway's enrichment score moves over dosing days — its early slope, curvature, and divergence between low and mid dose — predict day-29 histopathological findings earlier and more robustly across held-out chemicals than the same enrichment scores taken at any single time point, than the raw gene-level time series, and than chemical-structure predictors. The evaluation instrument is a time-dependent AUC: for each early observation day $t$, we ask how well a score computed from data available up to and including $t$ separates compounds that will show a given histopathology at day 29 from those that will not. Formally, the AUC at day $t$ is the probability that a randomly chosen future-toxic compound has a higher day-$t$ score than a randomly chosen future-clean compound,

$$\text{AUC}(t) = P\big(s_i(t) > s_j(t)\,\big|\, i \text{ toxic at day 29},\, j \text{ clean at day 29}\big),$$

which is exactly the Wilcoxon–Mann–Whitney statistic that static AUC already computes, applied at each time slice. Plotting $\text{AUC}(t)$ from the first sampling day forward gives the one quantity chronic toxicology actually needs and never measures: how much lead time a marker buys before the lesion appears, and whether that lead time survives exposure to chemicals the model has never seen.

Research Program

The work has three parts. First, construct longitudinal enrichment trajectories. Open TG-GATEs provides, for 170 compounds, 20,118 Affymetrix arrays from rat liver under single and repeated doses up to 28 days, paired with clinical chemistry and INHAND-standardized histopathology findings Open TG-GATEs: a large-scale toxicogenomics database. For each compound, dose, and sampling day, I will compute enrichment scores for a fixed panel of pathway terms — Gene Ontology and KEGG, plus the 36 mechanism-specific biomarker gene sets already shipped with the database — but without the hard differential-expression cut-offs that ordinary overrepresentation analysis requires. Instead of a binary gene list, each pathway gets a continuous activity score per time point (a rank-statistic aggregation of its member genes' moderated expression changes), so that coordinated but moderate shifts — precisely what arbitrary fold-change thresholds discard — survive into the trajectory. This directly attacks a known open problem in enrichment analysis: its static, threshold-locked, cross-sectional character, which cannot see pathway activation velocities or repair exhaustion.

Second, turn each pathway's activity sequence into a small set of trajectory features: the fitted slope over the early days, the quadratic term (does the response accelerate or dampen?), the dose-scaling coefficient (does the response grow super-linearly with dose, the signature Wang et al. observed when low-dose antioxidant protection flipped into high-dose fibrosis?), and the signed area between the trajectory and the vehicle-control trajectory. These are deliberately simple, low-dimensional descriptors — the same vocabulary of velocity, directionality, and inflection that made restricted cubic splines and latent class trajectories informative in clinical cohorts Association between albumin changes and prognosis in older patients with acute myocardial infarction and Association Between High-Sensitivity C-Reactive Protein Trajectories and the Incidence of Metabolic Syndrome: A Retrospective Cohort Study. A regularized logistic model on these features, trained only on data available before day 29, maps them to a compound-level risk score; a lighter analysis asks whether latent trajectory classes (adapting, recovering, exhausting) exist across compounds, in the spirit of the hsCRP trajectory classes that revealed a "legacy effect" invisible at baseline.

Third, evaluate with the time-dependent ROC machinery above, under compound-level splits so that every test chemical is entirely unseen. Because the database was generated over ten years across facilities and carries systematic batch effects Open TG-GATEs: a large-scale toxicogenomics database, batch correction and a facility-stratified split are part of the design, not an afterthought.

The methodological contrast with the closest prior work matters and is worth stating plainly. The Predictive Toxicogenomics Space of Kohonen et al. fuses CMap and NCI-60 data into 14 static gene-space components validated against TG-GATEs rat pathology and 68 annotated DILI drugs A transcriptomics data-driven gene space accurately predicts liver cytopathology and drug-induced liver injury — its components are time-invariant loadings from cross-sectional screens; it never models how activation evolves over dosing days and never evaluates prediction at an early day against a later outcome. I reuse its core insight (aggregate genes into biologically meaningful groups, because gene-level noise is unreliable) but change both the object (trajectories, not levels) and the evaluation (lead-time ROC, not a single static AUC). Hepa-RAFT predicts virtual expression profiles from SMILES and retrieves nearest neighbors to score DILI liability, reaching an AUROC of 0.713 on DILImap Hepa-RAFT: Retrieval-Augmented Virtual Hepatocyte Responses for Hepatotoxicity Prediction — but it operates on static single-condition profiles with no dosing duration axis and no pathway-level aggregation. Neither line of work, nor the convex factorization approach that treats toxicogenomics as static matrix completion Convex Factorization Machine for Toxicogenomics Prediction, evaluates how predictive thresholds shift across exposure duration.

Proposed Experiments

The primary experiment uses the Open TG-GATEs rat liver repeated-dose arm: all 170 compounds with serial sampling days, INHAND histopathology findings at the terminal day as the ground-truth label (a compound-dose pair is "positive" for a finding if the lesion is present at day 29 and absent at the earliest day). The headline result is the $\text{AUC}(t)$ curve under leave-compound-out cross-validation: the claim is supported if, at every early day $t$, trajectory features beat the strongest static baseline by a margin whose bootstrap confidence interval excludes zero, and if $\text{AUC}(t)$ rises above the static baseline's final-day AUC at least one full sampling epoch before day 29. A secondary lead-time analysis reports the earliest day at which the trajectory model reaches, say, 90% of its final AUC — the practically meaningful number for a screening pipeline.

The second experiment tests generalization to novel chemical space, the failure mode documented for structure-only models. I will hold out a structurally distinct compound cluster (defined by scaffold dissimilarity), train on the remainder, and measure the AUROC drop relative to the random split; the claim gains force if trajectory features — being functions of biological response, not fingerprint bits — degrade materially less than the roughly 14% AUROC drop reported for ECFP-based Random Forest, SVM, and L1-logistic models on external JNJ sets Chemistry-Based Modeling on Phenotype-Based Drug-Induced Liver Injury Annotation: From Public to Proprietary Data. A third, smaller transfer test scores TG-GATEs-trained models on human DILI liability via DILImap and DILIst, where the strongest published number to beat is Hepa-RAFT's AUROC of 0.713 on DILImap and 0.637 on DILIst Hepa-RAFT. For the PTGS baseline on TG-GATEs pathology, the source material describes "a hereto-unseen level of DILI prediction accuracy" but gives no number; no reported result found on Lacuna for a PTGS AUC on TG-GATEs histopathology, so that comparison will be established by running PTGS ourselves on the identical split.

Baselines

The naive reference point is a single-time-point pathway snapshot: enrichment scores computed at one early sampling day, fed to the same regularized logistic model, evaluated statically. This is what a toxicology lab doing ordinary enrichment analysis would produce, and it isolates the value of the time axis. The strongest existing competitor is Hepa-RAFT Hepa-RAFT — wait, the correct citation is Hepa-RAFT: Retrieval-Augmented Virtual Hepatocyte Responses for Hepatotoxicity Prediction — which reported an AUROC of 0.713 on DILImap and 0.637 on DILIst and represents the best biological-response-based predictor in the retrieved material; on the human DILI transfer task it is the number to beat, and on TG-GATEs itself we will reimplement its virtual-profile scoring under our splits, since no TG-GATEs-internal Hepa-RAFT number exists in the file. Two further competitors bound the design space: the PTGS gene-space score A transcriptomics data-driven gene space accurately predicts liver cytopathology and drug-induced liver injury, run by us on the same splits as the best static gene-set-aggregation method, and ECFP-fingerprint classifiers trained on our training folds, representing the structure-only route whose external-set fragility is already documented. All baselines get the same input compounds, the same compound-level splits, the same batch-corrected expression matrix, and the same tuning budget (a fixed grid over regularization strength, selected on training folds only); beating a baseline means a higher AUC at the same early day with a bootstrap confidence interval excluding zero, or the same AUC reached at an earlier day. The key ablation swaps pathway-level aggregation for gene-level features: run the identical trajectory-fitting machinery on individual gene time series (top-variable genes, matched dimensionality) instead of pathway scores. This separates the two ingredients of the proposal — the trajectory and the functional grouping — and if the gene-level trajectories do as well, the pathway story is decoration and should be dropped.

Why not just…?

Why not just measure biomarkers once, at baseline or at the terminal day? Because the retrieved evidence shows single snapshots failing in exactly the way this proposal targets: admission albumin carried no prognostic signal in older AMI patients while the in-hospital trajectory did Association between albumin changes and prognosis in older patients with acute myocardial infarction; single-point NLR lost all discrimination in septic patients The association between the neutrophil-to-lymphocyte ratio and mortality in critical illness; and even a "decreasing" hsCRP trajectory left patients at HR 1.408 relative to low-stable, a legacy risk invisible at any single measurement Association Between High-Sensitivity C-Reactive Protein Trajectories and the Incidence of Metabolic Syndrome. Still, the honest version of this objection is that toxicology endpoints differ from clinical ones, and terminal-day expression is a strong predictor of terminal-day pathology by construction. That is why the primary metric is early-day prediction of the day-29 lesion — the static terminal baseline cannot buy lead time by definition, and the single-timepoint baseline in the experiment set tests the cheap version directly.

Why not just predict chronic toxicity from chemical structure (QSAR)? The file contains a direct negative result: structure-based models on TG-GATEs dropped around 14% AUROC on external proprietary chemical spaces because the models keyed on fingerprint artifacts rather than mechanisms Chemistry-Based Modeling on Phenotype-Based Drug-Induced Liver Injury Annotation, and Kohonen et al. showed biological gene-space grouping outperforming structure-based grouping A transcriptomics data-driven gene space.... The fair concession is that structure-only models are far cheaper and need no animal data; the scaffold-disjoint split experiment is designed to quantify exactly this trade-off, and if structure models degrade less than expected under that split, the proposal's case weakens and I would report that.

Why not just use standard ALT/AST and terminal histopathology? Wang et al.'s 12-week Rheum palmatum study is the decisive counterexample within the file: ALT and AST indicated protection at doses that were simultaneously producing severe interstitial fibrosis detectable only through Hyaluronic Acid, Laminin, and TGF-β1 Hepatotoxicity or Hepatoprotection?. Regulatory endpoints are also terminal by design, so they cannot provide early warning; the whole point of $\text{AUC}(t)$ is to measure how far ahead of the lesion a molecular signal becomes usable. The concrete check is whether trajectory features flag the fibrosis-type TG-GATEs findings in compounds whose early serum-chemistry panel looks benign.

Why not just cluster genes unsupervised, skipping curated pathways? The gene-level ablation runs precisely this comparison. The file's own argument is that pathway aggregation is what makes the signal robust to single-gene noise and platform variability across the ten-year, multi-facility generation of TG-GATEs Open TG-GATEs, and that unsupervised clusters, unlike GO/KEGG terms, do not name the cellular process being disrupted — which matters here because the deliverable is an interpretable early-warning marker, not just a score. If the ablation shows gene-level trajectories matching pathway trajectories, I will take that result seriously and reframe the contribution around trajectories alone.

Decisive Checks

The proposal stands or falls on three numbers. The first is the gap between the trajectory model's early-day AUC and the single-timepoint baseline's AUC at the same day, under leave-compound-out splits on Open TG-GATEs — a positive, confidence-separated gap at every early day is the core result. The second is the degradation under scaffold-disjoint splits, compared against the documented ~14% AUROC collapse of structure-only models; trajectory features must degrade materially less to support the generalization claim. The third is the transfer AUROC on DILImap against Hepa-RAFT's reported 0.713 Hepa-RAFT — matching it with an interpretable pathway-trajectory score, built without retrieval augmentation, would be a strong outcome; falling well short would confine the method to the in-life rodent screening regime where the first two numbers live, which is still where chronic toxicity is actually decided, as the glyphosate life-cycle bioassay at regulatory "safe" doses makes uncomfortably clear Carcinogenic effects of long-term exposure from prenatal life to glyphosate and glyphosate-based herbicides in Sprague–Dawley rats.