Modern drug safety assessment no longer happens only in petri dishes. Before a compound ever reaches an animal, computational pipelines predict its in vivo behavior from cheap in vitro measurements — bacterial mutagenicity assays, cell viability screens — using graph neural networks that transfer-learn from abundant in vitro data to scarce in vivo endpoints. These pipelines are assembled almost entirely from open-source third-party libraries: PyTorch, RDKit, PyTorch Geometric, descriptor toolkits, pre-trained checkpoints downloaded from public repositories. The software supply chain literature has shown that such dependencies are a live attack surface: in Python's dynamic runtime, upstream code can silently overwrite global or local variables and degrade downstream models without crashing anything (Supply-Chain Attacks in Machine Learning Frameworks). No one has asked what this means when the downstream model decides whether a chemical is deemed carcinogenic.
The two research directions this note connects share one structural fact: static presence does not predict functional consequence. In software security, a vulnerable library sitting in a dependency tree harms nothing unless a call path carries a payload to the vulnerable sink and host sanitizers fail to neutralize it (Exploiting Library Vulnerability via Migration Based Automating Test Generation). In toxicology, a compound binding a receptor in a dish does nothing in a living organism unless it survives absorption, metabolism, and distribution to reach the target tissue (Sesamin and 4-hydroxy-sesamin from Cinnamomum camphora: extraction, purification and anti-inflammatory effects on the BV2 microglia by LPS-induced); even the same concentration of the same compound kills proliferating cells while leaving quiescent ones untouched (Amyloid beta toxicity dependent upon endothelial cell state). This proposal takes the software-security side of that dichotomy as the mechanism and the toxicology side as the application regime: it asks whether the translation gap itself — the 30% of compounds where in vitro assays disagree with in vivo outcomes — can be manufactured by an attacker through the dependency graph, and whether wet-lab thinking can defend against it.
Core Claim
The claim is threefold. First, computational in vitro-to-in vivo extrapolation (IVIVE) pipelines inherit a deep, unaudited dependency attack surface, and nobody has measured it: the ecosystem-scale auditing methodology applied to JavaScript by Original Sin of npm: A Study on Vulnerability Propagation in JavaScript Dependency Networks — dependency graph construction, vulnerability mapping, remediation-latency measurement — has never been run on the Python, PyPI, and Conda ecosystems where toxicology tooling lives. Second, an attacker who controls any transitive dependency can corrupt in vivo predictions selectively in the translation gap: small perturbations to molecular graph construction, descriptor values, or normalization constants will barely move aggregate accuracy statistics while flipping borderline compounds across regulatory decision thresholds, making the corruption invisible to the reproducibility checks practitioners actually use — Supply-Chain Attacks in Machine Learning Frameworks demonstrated the overwrite mechanism, and Gao et al.'s finding that ML projects pin versions for numerical reproducibility rather than security shows exactly why a "reproducible" pinned pipeline is still exposed. Third, the right defense borrows the oldest idea in the wet lab: control compounds. An in vivo bioassay is only trusted because known positive and negative controls run alongside every experiment; we propose the same for software — a calibrated panel of in silico control molecules whose predictions must stay within a noise band on every build, combined with data-flow reachability analysis that determines which flagged dependencies can actually influence prediction outputs.
Research Program
The program has three workstreams. The first is an ecosystem audit: build the dependency graph for the scientific Python stack used by IVIVE and QSAR pipelines (cheminformatics toolkits, deep learning frameworks, descriptor libraries, their full transitive closures) using registry metadata and vulnerability databases, following the measurement design of Robinson et al., who mapped 1.07 million NPM packages and found that 21.60% rely on at least one vulnerable dependency with a median time-to-fix of 4 years and 11 months. The output is the first prevalence, depth, and remediation-lag characterization for toxicology software specifically, plus a list of the dependencies that sit on the prediction path of real published pipelines.
The second workstream builds the attack benchmark, which we call translation-gap attacks. We reconstruct a CONCERTO-class carcinogenicity pipeline — the Graph Transformer plus fingerprint hybrid of A Graph Neural Network Approach to Molecule Carcinogenicity Prediction, pre-trained on the ~6,000-compound Hansen Ames mutagenicity set and fine-tuned on rodent carcinogenicity potency — and implement a suite of dependency-level injections at four sites: molecular graph assembly (bond ordering, adjacency construction), descriptor and fingerprint computation, normalization scalers and mathematical constants, and the pre-training objective itself. Each attack is constrained to be stealthy: no crash, no file or network access, aggregate metrics within a few points of clean. The evaluation measures not only the headline statistics against the clean baseline — CONCERTO reports a Pearson correlation of 0.50 on the CPDB test set and an ROC AUC of 0.73 on the ~4,500-compound CCRIS external set (A graph neural network approach for molecule carcinogenicity prediction) — but also decision-level damage: how many compounds cross a potency threshold that would change a regulatory call. Our central hypothesis is that attacks on the pre-training stage are the most damaging, because the mutagenicity-to-carcinogenicity transfer already carries only 70% concordance, so an attacker who shifts the transferred representation operates precisely in the region where the model has no in vivo data to correct it. This is where the two research directions meet structurally: the attacker exploits the translation gap as camouflage.
The third workstream builds the defense. Layer one is the control-compound panel: a fixed, partially secret set of molecules with well-established in vivo potencies, drawn from CPDB and the standardized benchmarks of QSAR ligand dataset for modelling mutagenicity, genotoxicity, and rodent carcinogenicity (whose Ames set of 6,512 entries and ISSCAN set of 854 in vivo rat carcinogenicity entries give room to sample controls disjoint from training data). Every pipeline run executes the panel; drift beyond a tolerance band — calibrated from the observed output variation of benign dependency updates and seed changes — flags corruption. Layer two is taint reachability: adapting the entry-point-to-sink call-path analysis that lets VESTA prove whether a Java exploit payload can actually reach a vulnerable method, we trace whether values written by a flagged dependency can flow into prediction-affecting sinks. This turns the audit's presence-based alerts into exploitability judgments, addressing the alert-fatigue problem that Chen et al. showed plagues presence matching — VESTA reproduced 43 of 60 real vulnerabilities (71.7%) with zero false positives, while presence-based tools could not distinguish exploitable from dormant cases.
Baselines
The naive reference point is doing nothing beyond standard software composition analysis: scan the pipeline's lockfile against vulnerability databases and report presence. This is what most practitioners have, and the audit workstream quantifies its failure mode directly — Robinson et al. found that presence of a vulnerable dependency is widespread (21.60% of packages) while fixes take a median of nearly five years, so presence-only scanning on our ecosystem will surface hundreds of alerts with no indication of which ones can move a toxicity prediction. We run it on the identical pipeline and dependency snapshot as our method, and count alert volume against verified prediction-affecting dependencies.
The strongest existing defense method is in-process zero-trust monitoring in the style of $ZTD_{\text{JAVA}}$: Mitigating Software Supply Chain Vulnerabilities via Zero-Trust Dependencies, which rewrites bytecode to confine each dependency to a least-privilege policy and blocked 100% of recreated supply-chain exploits in its evaluation at an average runtime overhead of 21.06%. We port its policy-enforcement idea to Python via import-time instrumentation and run it under the same compute and tuning budget as our defense, with policies auto-generated per dependency. The decisive comparison is on the attack benchmark: zero-trust enforcement is designed for the 46% of supply-chain exploits that abuse OS resources, but our numerical-corruption attacks perform no file, socket, or process access whatsoever — they only alter numbers inside legitimate computation. Beating this baseline means detecting attacks that require zero OS-permission violations, at overhead at or below the 21.06% reference point.
The ablation that isolates our key ingredient runs the control-compound panel alone (no reachability analysis) and the taint-reachability triage alone (no panel), on the same attack suite and the same clean baseline pipeline. The full system beats both halves only if the two mechanisms are complementary: the panel catches corruption that reachability analysis misses because the tainted path looks legitimate, and reachability suppresses the panel's false alarms on benign updates by explaining observed drift as non-prediction-affecting. We also report a clean-pipeline reproduction of CONCERTO (Pearson 0.50 on CPDB, ROC AUC 0.73 on CCRIS per Fradkin et al.) as the untainted performance anchor; for the QSAR benchmark datasets themselves, no reported predictive-accuracy result was found on Lacuna beyond their curation statistics, so we use CONCERTO's reported numbers as the reference.
Why not just…?
Why not just pin versions in a lockfile? This is the practice practitioners already have, and Gao et al.'s GitHub analysis of 549,635 issues and pull requests found that ML projects pin versions overwhelmingly for numerical reproducibility, not defense. Pinning does block the build-time range-resolution attack where a fresh fetch pulls a malicious patch release, and we concede that. But pinning freezes whatever is pinned: Robinson et al.'s median time-to-fix of 4 years and 11 months means a pinned scientific stack sits on known-vulnerable components for years, and it does nothing against a backdoor already inside the pinned release — the reproducibility rationale actually guarantees the corrupted outputs are faithfully reproduced. Our threat model includes the pinned-and-poisoned case, which lockfiles cannot address.
Why not just run a standard vulnerability scanner and update flagged packages? Scanners are a necessary first layer and our audit uses their databases, but they answer a presence question, not an exploitability question. Chen et al. showed the cost of this conflation: on their 60 project-vulnerability benchmark, presence-based tooling could not separate exploitable from dormant vulnerabilities, while call-path analysis reproduced real exploits (71.7%) with zero false positives. In our setting the gap is worse, because a dependency can be not flagged at all — no CVE, no malicious commit signature — and still shift predictions. The scanner baseline in our experiments is expected to detect none of the translation-gap attacks; that null result is itself a finding the proposal will report honestly.
Why not just save reference outputs and check every run against them? This is the most serious alternative, and we treat it as a real threat rather than arguing it away. A deterministic pipeline with fixed seeds makes exact-match checking trivial, and it would catch naive perturbations. It fails in two ways that our design addresses. First, benign drift: legitimate dependency updates, hardware changes, and floating-point differences across library versions legitimately move outputs, so an exact-match check false-alarms constantly and gets disabled — the same operational fate as the deprecated Java Security Manager that Amusuo et al. cite as too costly to live with. Our tolerance bands are calibrated on measured benign-drift distributions rather than assumed determinism. Second, adaptive attackers: a public, fixed reference set can be read by the attacker, who perturbs just below tolerance. Our panel is large, sampled per-run from a pool, and partially hidden, so the attacker cannot know which molecules will be checked. Experiment 4 below directly tests both failure modes — we will run benign updates against the exact-match checker and adaptive attacks against the randomized panel, and if the simple checker survives both, we will report that our contribution reduces to the audit and attack benchmark.
Proposed Experiments and Decisive Checks
Experiment one delivers the ecosystem audit: dependency graph and vulnerability mapping for the toxicology Python stack, reporting prevalence, transitive depth, and remediation lag against Robinson et al.'s NPM figures (21.60% vulnerable reliance, 4-year-11-month median fix) as the comparison point, and a ranked list of prediction-path dependencies. Experiment two delivers the attack benchmark on the reconstructed CONCERTO pipeline, reporting the drop in CCRIS ROC AUC from the clean 0.73 and CPDB Pearson from the clean 0.50, plus the decision-level metric — fraction of borderline compounds flipped across a potency threshold — with the pre-training-stage attacks predicted to cause the largest threshold flips at the smallest aggregate-statistic change. Experiment three evaluates the defense: detection rate and false-alarm rate of the control-compound panel plus taint reachability across the full attack suite, at runtime overhead compared against the 21.06% zero-trust reference, with the panel-only and reachability-only ablations isolating each ingredient. Experiment four is the decisive check against the simple alternative: run the exact-match output checker under (a) a battery of benign dependency updates and (b) tolerance-aware adaptive attacks, versus the randomized control panel under the same conditions. The proposal succeeds if the audit reveals a measurable, previously uncharacterized attack surface; if translation-gap attacks demonstrably corrupt in vivo calls while evading reproducibility checks; and if the control-compound defense detects them at acceptable cost. It fails informatively if aggregate-metric changes are always large enough to notice naively — which would itself establish that the feared stealth regime does not exist for this model class, and would narrow the threat model to the audit findings.
References
- Supply-Chain Attacks in Machine Learning Frameworks
- Exploiting Library Vulnerability via Migration Based Automating Test Generation
- Sesamin and 4-hydroxy-sesamin from Cinnamomum camphora: extraction, purification and anti-inflammatory effects on the BV2 microglia by LPS-induced
- Amyloid beta toxicity dependent upon endothelial cell state
- Original Sin of npm: A Study on Vulnerability Propagation in JavaScript Dependency Networks
- A Graph Neural Network Approach to Molecule Carcinogenicity Prediction
- A graph neural network approach for molecule carcinogenicity prediction
- QSAR ligand dataset for modelling mutagenicity, genotoxicity, and rodent carcinogenicity
- $ZTD_{\text{JAVA}}$: Mitigating Software Supply Chain Vulnerabilities via Zero-Trust Dependencies