Submitted:
27 November 2026
Posted:
30 November 2026
You are already at the latest version
Abstract
Computational chemistry papers increasingly ship an environment file, on the assumption that pinning library versions pins the reported numbers. Re-running a complete QSAR pipeline for Mycobacterium tuberculosis InhA across three software environments shows that this assumption is incomplete. With input data, feature matrix and train/test splits held bitwise identical, random forest and logistic regression reproduce every metric exactly, while gradient-boosted trees do not: the largest pairwise drift across environments is 0.010 in ROC-AUC, 0.014 in PR-AUC and 0.047 in Matthews correlation coefficient (MCC). Two observations make this more than a rounding note. First, the drift is not monotonic in version distance—moving CPython 3.11 to 3.13 alone moves MCC by 0.047, while moving CPython and upgrading xgboost and numpy moves it by only 0.028, because the two effects partially cancel. A single re-run therefore does not bound the drift a third party would see. Second, the drift is not generic sensitivity to small perturbations: deliberately perturbing 1,678 cells of the same feature matrix by up to 4.6 x 10-13 and retraining reproduces every metric to six decimal places (worst drift 0.000000). The mechanism is a last-bit change in one molecular descriptor (QED, 173 of 1,452 rows, maximum absolute difference 1.7 x 10-16) produced by an unchanged RDKit running on a different interpreter. The practical consequence is that an environment specification for a boosted-tree model must pin the interpreter, not only the libraries, and that a reproducibility check should gate the claim rather than assert a tolerance on the number. In this pipeline the claim - scaffold-split performance below random-split performance - holds in all 18 environment x model x dataset combinations tested, with the inflation range 0.069-0.119 in every environment.
Keywords:
reproducibility
; QSAR
; gradient boosting
; software versioning
; cheminformatics
; numerical stability
1. Introduction
Reporting a machine-learning result in chemistry now routinely includes an environment.yml or requirements.txt. The implicit contract is that a reader who installs those versions and runs the code will obtain the published numbers. The contract is usually honoured for the headline figure and is rarely tested below it, even though automating the re-execution of an analysis is now routine (Beaulieu-Jones and Greene, 2017).
There are good reasons to expect small discrepancies. Floating-point summation is not associative, so a change in BLAS, in thread count, or in the order of a reduction can move the last bits of a descriptor or a model score. The standard response is to treat such differences as negligible, and for most reported quantities they are. Other fields have found otherwise. In neuroimaging, changing the FreeSurfer release or the host operating system alters reported cortical volumes and thicknesses (Gronenschild et al., 2012; Glatard et al., 2015), and handing one dataset to seventy teams produces materially different conclusions (Botvinik-Nezer et al., 2020). Machine-learning-based science has its own version of the problem, in which pipeline choices rather than data drive the reported effect (Kapoor and Narayanan, 2023). What is less often examined is whether which component changed matters, and whether a single re-run is sufficient to bound how far the numbers can move.
This note reports a measurement rather than an argument. A complete, committed QSAR pipeline — curation, featurisation, splitting, training, evaluation — was re-executed in three software environments differing in CPython version and in the versions of xgboost and numpy. Everything upstream of model fitting was verified identical or near-identical before any comparison was made, so the observed differences can be attributed rather than merely noted.
Three findings follow. Only the boosted-tree estimator drifts. The drift is not monotonic in version distance, so the obvious experiment — compare the oldest environment to the newest — understates the worst case. And the drift is not explained by generic amplification of small input noise, because a deliberate perturbation three orders of magnitude larger changes nothing at all.
2. Methods
2.1. Pipeline and Data
Bioactivity data were curated from ChEMBL (Zdrazil et al., 2024) for two endpoints: the InhA enzyme assay (n = 355 molecules, 162 active) and a M. tuberculosis whole-cell assay (n = 1,097, 283 active), drawn from 2,107 curated activity records over 1,417 unique molecules. Molecules were represented by a 2,048-bit Morgan fingerprint (radius 2) concatenated with 17 physicochemical descriptors computed with RDKit.
Three estimators were trained on each endpoint under two splitting schemes: a Bemis–Murcko scaffold split (Bemis and Murcko, 1996) and a random split. Splitting by scaffold rather than at random is the conservative choice because random partitions of a congeneric series leave near-analogues on both sides, which rewards memorisation over generalisation (Sheridan, 2013; Wallach and Heifets, 2018). The estimators were XGBoost, a random forest, and a logistic-regression baseline, giving six model × dataset combinations per split and per environment.
The scaffold split is deterministic by construction rather than by random seed: scaffold groups are sorted by group size and then by name, so the split membership is a function of the data alone.
2.2. Environments
Three environments were built and the full pipeline run in each:
| label | CPython | numpy | scipy | scikit-learn | xgboost | RDKit |
| A | 3.11.16 | 2.4.6 | 1.17.1 | 1.9.0 | 3.2.0 | 2026.03.5 |
| B | 3.13.15 | 2.4.6 | 1.17.1 | 1.9.0 | 3.2.0 | 2026.03.5 |
| C | 3.13.14 | 2.5.1 | 1.18.0 | 1.9.0 | 3.4.1 | 2026.03.5 |
Environment A is the reference that produced the committed tables. A → B isolates the interpreter: every library version is identical. B → C changes numpy, scipy and xgboost.
A caveat on the second contrast. B and C differ by one CPython patch release (3.13.15 versus 3.13.14) in addition to the library upgrades, so B → C is not a strictly library-only contrast. The A → B contrast, which carries the main claim of §3.2, is clean: the only difference is the interpreter.
2.3. What was Held Fixed
Before comparing metrics, every upstream artefact was compared across environments:
- Splits. splits.json is byte-identical in all three environments — membership, not merely size, is invariant.
- Fingerprints. The fingerprint matrix is bitwise identical in all three.
- Descriptors. The descriptor table agrees to approximately 2 × 10⁻¹⁶ but is not exactly identical: QED (Bickerton et al., 2012) differs in 173 of 1,452 rows, with a maximum absolute difference of 1.7 × 10⁻¹⁶, under an unchanged RDKit 2026.03.5 on a different interpreter.
Holding the committed descriptor table fixed and re-running only the training step reproduces the metrics table byte-for-byte in all three environments. The descriptor table is therefore the single entry point through which the environment reaches the reported numbers.
2.4. Software
Fingerprints and descriptors were computed with RDKit (open-source cheminformatics; https://www.rdkit.org), gradient boosting with XGBoost (https://xgboost.ai), and the random forest, logistic regression and evaluation metrics with scikit-learn (https://scikit-learn.org). Exact versions for each environment are given in §2.2 and recorded in environment.lock.json in the archived repository.
2.5. Drift Statistic
For each estimator and metric, drift is reported as the largest absolute difference between any two of the three environments, taken over both datasets and both splits — not as the difference between the two endpoint environments. §3.2 shows why this distinction is necessary.
2.6. Input-Perturbation Control
pandas.read_csv defaults to a fast float parser that does not round-trip the full-precision values written by to_csv. Re-reading the committed descriptor table with float_precision="round_trip" changes 1,678 cells across six of the seventeen descriptor columns (BertzCT, MW, TPSA, cLogP, FracCsp3, QED), by up to 4.6 × 10⁻¹³ in absolute terms — roughly three orders of magnitude larger than the interpreter-induced QED difference above. Models were retrained on the round-tripped matrix within a single environment and the resulting metrics compared to the committed table.
3. Results
3.1. Only the Boosted Trees Move
Across the three environments, the random forest and the logistic-regression baseline reproduce every metric on every dataset and split exactly: maximum pairwise drift is 0.000000 for ROC-AUC, PR-AUC, MCC, balanced accuracy and enrichment factor.
XGBoost does not (Figure 1a):
| metric | largest pairwise drift, XGBoost |
| ROC-AUC | 0.010 |
| PR-AUC | 0.014 |
| MCC | 0.047 |
| balanced accuracy | 0.023 |
| EF5 | 0.753 |
The ordering is informative. Threshold-free ranking metrics move least. MCC and balanced accuracy move more because they threshold the predicted probability at 0.5. Both are recommended over accuracy and F1 for imbalanced binary problems (Chicco and Jurman, 2020; Chicco et al., 2021), so they are not metrics a reader can simply drop: a shift of order 10⁻³ in a single prediction relabels one molecule and moves the metric by approximately 1/ntest. EF5 moves most because, at ntest = 88, the top 5 % is four molecules, so one rank change moves the statistic by about 0.35.
In this pipeline two headline values round differently across environments: InhA XGBoost scaffold-split ROC-AUC 0.837 → 0.834 and random-split 0.921 → 0.931. The two random-forest headline values do not move at all.
3.2. The Drift is not Monotonic in Version Distance
Changing the interpreter alone (A → B) moves XGBoost MCC by 0.047. Changing numpy, scipy and xgboost (B → C) moves it by 0.047 as well. Changing everything (A → C) moves it by only 0.028 (Figure 1b).
The endpoint comparison — the one a reader or reviewer would naturally run — is therefore smaller than either single-factor comparison, because the two effects partially cancel. A reproducibility bound derived from a single re-run against the newest environment would understate the drift a third party could encounter on an intermediate configuration.
This is why §2.5 defines drift as the worst pairwise difference across all environments rather than the endpoint difference.
3.3. The Interpreter, not the Library, is the Larger Single Contributor
The A → B contrast holds every library version constant and changes only CPython 3.11.16 to 3.13.15. It moves MCC by 0.047 — the full observed drift. Pinning RDKit at the version level does not prevent this: all three environments ran RDKit 2026.03.5, and the QED descriptor still differs between them.
The chain is: a different interpreter produces a last-bit difference in one descriptor (1.7 × 10⁻¹⁶); the boosted tree places a split boundary differently as a result; a small number of test molecules cross the 0.5 probability threshold; threshold-dependent metrics move by of order 1/ntest.
3.4. A Perturbation Three Orders of Magnitude Larger Changes Nothing
If the mechanism were generic amplification of floating-point noise, a larger perturbation of the same inputs should produce at least as large an effect. It does not (Figure 1c).
Re-reading the descriptor table with full round-trip precision changes 1,678 cells by up to 4.6 × 10⁻¹³ — about 10³ times the interpreter-induced difference. Retraining on that perturbed matrix reproduces the committed metrics table exactly: worst drift 0.000000 across every metric, against up to 0.047 in MCC for a change of interpreter.
The boosted tree is therefore stable under a 4.6 × 10⁻¹³ perturbation of its inputs and unstable across interpreters. “Small numbers get amplified” does not account for the observation; the split boundaries land differently for a reason the input perturbation alone does not reproduce. Identifying that reason is beyond the scope of this note, but the control rules out the simplest explanation.
3.5. The Scientific Claim Survives the Drift
The pipeline exists to support one claim: scaffold-split performance is lower than random-split performance, i.e. a random split inflates apparent generalisation.
That claim holds in 18 of 18 environment × model × dataset combinations (3 environments × 3 models × 2 datasets). The inflation in ROC-AUC spans 0.069–0.119 in every one of the three environments, with median 0.080 in the reference environment and 0.087 in the other two.
The conclusion is robust where the third decimal place is not.
4. Discussion
4.1. Pin the Interpreter
An environment specification that pins libraries but leaves the interpreter free does not pin the numbers for a boosted-tree model. The interpreter was the larger single contributor here. This is cheap to fix: add the CPython version to the environment file and record the exact build alongside the results.
4.2. Bound Drift Across Configurations, not Between Endpoints
Because the drift is non-monotonic, the common practice of re-running once on a current environment and reporting the difference is not a bound. Reporting the worst pairwise difference over at least three configurations costs little and is honest about what a reader may see.
4.3. Gate the Claim, not the Number
Pinning to exact builds would freeze the numbers but would make the environment unsolvable within a year or two as packages are removed from channels. The approach taken here pins to minor versions, records the exact reference build separately, and makes the automated check assert the claim — that scaffold-split performance stays below random-split performance — rather than a numeric tolerance. The check exits non-zero if that ordering ever breaks, which is the failure that would change a conclusion. A tolerance on MCC would either be loose enough to be uninformative or tight enough to fail on a legitimate environment.
4.4. Choose the Estimator with Reproduction in Mind
Random forest and logistic regression were bitwise reproducible across all three environments on this data. Where two estimators perform comparably and the result is meant to be re-run by others, that property has value which is not usually weighed.
4.5. Report Threshold-Free Metrics Alongside Thresholded Ones
ROC-AUC moved by 0.010 where MCC moved by 0.047 on the same predictions. A paper reporting only thresholded metrics presents the least reproducible view of its own result. This cuts against the sound advice to prefer MCC over accuracy in imbalanced settings (Chicco and Jurman, 2020): the recommendation stands, but the metric should be reported with a drift bound rather than to three decimal places.
5. Limitations
This is a single pipeline, two datasets, three estimators and three environments. The magnitudes reported here should not be transferred to other pipelines; the qualitative observations — that the interpreter matters, that drift is non-monotonic, and that an input perturbation three orders of magnitude larger produces no drift — are what generalise as hypotheses to test elsewhere.
All environments ran on one machine and one operating system; hardware, BLAS backend and thread count were not varied, and each is a plausible additional source of drift.
The B → C contrast is confounded by a CPython patch-version difference (§2.2); only the A → B contrast cleanly isolates the interpreter.
The mechanism linking a 10⁻¹⁶ descriptor difference to a different split boundary, while a 10⁻¹³ perturbation produces none, is characterised but not explained here.
No experimental validation of any predicted compound was performed; every number in the underlying pipeline is computational.
6. Data and Code Availability
All code, curated data, committed metric tables, environment lock file and the per-environment attribution table are archived and citable:
Sharma, T. (2026). inha-tb: Ligand- and structure-based screening for Mycobacterium tuberculosis InhA, with scaffold-split evaluation and a validated docking protocol (Version 1.0.4) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.24561219
The version-attribution table underlying Figure 1 is data/version_attribution.csv in that archive; the reference environment is recorded in environment.lock.json; the automated reproducibility gate is src/18_check_reproducibility.py and the attribution run is src/20_version_attribution.py.
Funding
This work received no funding.
Conflicts of interest
None declared.
References
- Beaulieu-Jones, B.K.; Greene, C.S. Reproducibility of computational workflows is automated using continuous analysis. Nat. Biotechnol. 2017, 35(4), 342–346. [Google Scholar] [CrossRef] [PubMed]
- Bemis, G.W.; Murcko, M.A. The properties of known drugs. 1. Molecular frameworks. J. Med. Chem. 1996, 39(15), 2887–93. [Google Scholar] [CrossRef] [PubMed]
- Bickerton, G.R.; Paolini, G.V.; Besnard, J.; Muresan, S.; Hopkins, A.L. Quantifying the chemical beauty of drugs. Nat. Chem. 2012, 4(2), 90–98. [Google Scholar] [CrossRef] [PubMed]
- Botvinik-Nezer, R.; Holzmeister, F.; Camerer, C.F.; Dreber, A.; Huber, J.; Johannesson, M.; et al. Variability in the analysis of a single neuroimaging dataset by many teams. Nature 2020, 582(7810), 84–88. [Google Scholar] [CrossRef] [PubMed]
- Chicco, D.; Jurman, G. The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genom. 2020, 21(1), 6. [Google Scholar] [CrossRef] [PubMed]
- Chicco, D.; Totsch, N.; Jurman, G. The Matthews correlation coefficient (MCC) is more reliable than balanced accuracy, bookmaker informedness, and markedness in two-class confusion matrix evaluation. BioData Min. 2021, 14(1), 13. [Google Scholar] [CrossRef] [PubMed]
- Glatard, T.; Lewis, L.B.; Ferreira da Silva, R.; Adalat, R.; Beck, N.; Lepage, C.; et al. Reproducibility of neuroimaging analyses across operating systems. Front Neuroinform 2015, 9, 12. [Google Scholar] [CrossRef] [PubMed]
- Gronenschild, E.H.; Habets, P.; Jacobs, H.I.; Mengelers, R.; Rozendaal, N.; van Os, J.; et al. The effects of FreeSurfer version, workstation type, and Macintosh operating system version on anatomical volume and cortical thickness measurements. PLoS ONE 2012, 7(6), e38234. [Google Scholar] [CrossRef] [PubMed]
- Kapoor, S.; Narayanan, A. Leakage and the reproducibility crisis in machine-learning-based science. Patterns (N Y) 2023, 4(9), 100804. [Google Scholar] [CrossRef] [PubMed]
- Sheridan, R.P. Time-split cross-validation as a method for estimating the goodness of prospective prediction. J. Chem. Inf. Model. 2013, 53(4), 783–790. [Google Scholar] [CrossRef] [PubMed]
- Wallach, I.; Heifets, A. Most ligand-based classification benchmarks reward memorization rather than generalization. J. Chem. Inf. Model. 2018, 58(5), 916–932. [Google Scholar] [CrossRef] [PubMed]
- Zdrazil, B.; Felix, E.; Hunter, F.; Manners, E.J.; Blackshaw, J.; Corbett, S.; et al. The ChEMBL Database in 2023: a drug discovery platform spanning multiple bioactivity data types and time periods. Nucleic Acids Res. 2024, 52(D1), D1180–D1192. [Google Scholar] [CrossRef] [PubMed]
Figure 1.
Version drift in a QSAR pipeline with inputs, features and splits held fixed. (a) Largest absolute difference in each metric between any two of the three environments, by estimator. Random forest and logistic regression are exactly zero on every metric (flat stubs at the baseline); only XGBoost moves. (b) XGBoost MCC drift attributed to each factor. Changing the interpreter alone and changing the libraries alone each move MCC by 0.047, while changing both moves it by 0.028 — the effects partially cancel, so the endpoint comparison is not the worst case. (c) Control. Perturbing 1,678 cells of the same feature matrix by up to 4.6e-13 — about a thousand times the interpreter-induced descriptor difference — and retraining reproduces every metric exactly. Held-out sets are n = 88 (InhA enzyme) and n = 274 (whole-cell); drift is pooled over both datasets and both splits.
Figure 1.
Version drift in a QSAR pipeline with inputs, features and splits held fixed. (a) Largest absolute difference in each metric between any two of the three environments, by estimator. Random forest and logistic regression are exactly zero on every metric (flat stubs at the baseline); only XGBoost moves. (b) XGBoost MCC drift attributed to each factor. Changing the interpreter alone and changing the libraries alone each move MCC by 0.047, while changing both moves it by 0.028 — the effects partially cancel, so the endpoint comparison is not the worst case. (c) Control. Perturbing 1,678 cells of the same feature matrix by up to 4.6e-13 — about a thousand times the interpreter-induced descriptor difference — and retraining reproduces every metric exactly. Held-out sets are n = 88 (InhA enzyme) and n = 274 (whole-cell); drift is pooled over both datasets and both splits.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.