bioRxivBioinformaticsPreprint
SwiftNJ: Fast Exact Neighbour Joining via Correctness-Gated Coding Agents
Abstract
The capability profile of frontier coding agents in 2026 varies sharply across technical domains, motivating domain-specific empirical study of where, and under what oversight conditions, such systems can contribute to specialised technical work. This paper presents one such study in computational phylogenetics. Neighbour joining (NJ) is a widely used distance-based method for inferring evolutionary trees in microbial epidemiology, comparative genomics, and large-scale sequence clustering. Its constant-factor runtime is set by hand-tuned native implementations; RapidNJ is a widely-cited representative of that class and serves here as the comparison baseline. We ask whether a current-generation coding agent, operating under a correctness-gated optimisation harness with deterministic correctness gates calibrated against a QuickTree reference, can advance that constant factor on a fixed benchmark. The resulting implementation, SwiftNJ, achieves a geometric-mean runtime ratio of 0.565 against a locally-rebuilt RapidNJ-native binary across a 59-matrix corpus, sub-parity on 58 of 59 matrices. On 400 shuffled inputs drawn from 16 small matrices (n [≤] 2000), SwiftNJ matched the QuickTree reference at Robinson-Foulds distance zero. In this domain, a correctness-gated coding agent meaningfully improved on a strong native baseline, suggesting that harness-guided optimisation holds promise for performance-critical bioinformatics tools; further work is needed to establish how broadly the approach generalises.
- Citations
- 0
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- DecentTree: Scalable Neighbour-Joining for the Genomic Era
W. Wang, J. Barbetti, … B. Q. Minh·bioRxiv·Apr 10, 2022
- Fast NeighborNet: Improving the Speed of the Neighbor-Net Phylogenetic Network Algorithm with Multithreading and a Relaxed Search Strategy
Jacob Porter·bioRxiv·Mar 16, 2018
- NJGPT: A Large Language Model-Driven, User-Friendly Solution for Phylogenetic Tree Construction
Zhixuan Wang, Haoyuan Huang, … Allen G. Rodrigo·bioRxiv·Dec 2, 2024
- Scalable distance-based phylogeny inference using divide-and-conquer
Lars Arvestad·bioRxiv·Oct 11, 2023
- Statistically consistent divide-and-conquer pipelines for phylogeny estimation using NJMerge
E. K. Molloy, T. Warnow·bioRxiv·Apr 21, 2019
- Accurate and efficient phylogenetic inference through end-to-end deep learning
Xinru Zhang, Shizhe Ding, … Dongbo Bu·Molecular Biology and EvolutionPeer-reviewed·Oct 23, 2025