Approximating SPR Distance Between Phylogenetic Trees with Graph Neural Networks


Abstract

Comparing phylogenetic tree topologies is essential for understanding epidemic dynamics, yet biologically meaningful distances such as the Subtree Prune and Regraft (SPR) distance are NP-hard to compute and intractable on large datasets. We investigate whether a Graph Neural Network (GNN) can approximate SPR distances in near-constant time per comparison after training. Our contributions are fourfold. First, we build and publicly release a dataset of 864 phylogenetic trees inferred with UPGMA and Neighbor-Joining over four bacterial species, spanning up to 9,500 isolates, together with 388 labelled tree pairs. Second, we establish a reproducible pre-processing pipeline including midpoint re-rooting, which reduces tree depth and supplies the rooting required for exact distance computation and for the model’s root-based features. Third, we validate the supervision target: on small trees, where exact SPR is tractable, the unrooted phangorn::SPR.dist heuristic correlates almost perfectly with the exact rooted distance computed by rspr (Pearson \(0.98\)\(0.99\)), making it an excellent monotonic surrogate. Lastly, we train a Siamese Graph Isomorphism Network (GIN) regressor. In-distribution, em i.e., held-out trees from the same species and size range as training, it explains roughly 87–90% of the variance (\(R^2 \approx 0.87\) on a held-out split; \(0.90 \pm 0.19\) under stratified cross-validation), with about four times lower error than a mean-predictor baseline, and shows partial transfer to unseen species (\(R^2 \approx 0.37\)). Its main limitation is extrapolation to trees larger than those seen in training, where accuracy collapses. The released dataset and the validated heuristic versus exact relationship provide a reproducible basis for scaling learned SPR approximation.

1 Introduction↩︎

Determining the origin, evolutionary dynamics and transmission patterns of bacterial and viral epidemics is among the central challenges of computational biology. Phylogenetic inference reconstructs these evolutionary relationships. Its outcome, the phylogenetic tree [1], is an indispensable data structure for tasks such as tracking pathogen strains through an outbreak.

Different inference methods, such as Maximum Likelihood [2], Maximum Parsimony [3], Neighbor-Joining (NJ) [4], UPGMA [5], or goeBURST [6], frequently produce distinct topologies for the same isolates [7], so evaluating and reconciling them requires comparing trees at scale. The available distance measures trade speed against biological meaning (Section 2): cheap partition-based measures such as Robinson–Foulds [8] saturate quickly and overreact to a single displaced taxon, whereas the Subtree Prune and Regraft (SPR) distance [9] directly counts the prune-and-regraft operations between two topologies and so models reticulate events such as recombination and horizontal gene transfer. That biological fidelity is costly since computing the rooted SPR distance is NP-hard [10], which rules out exact computation for trees with thousands of leaves.

This motivates an approximation that is both accurate and fast. Since the exact rooted distance is intractable at scale, it cannot serve as a training signal for large trees; we therefore adopt a polynomial-time heuristic, the unrooted phangorn::SPR.dist, as the supervision target, after first verifying on small trees—where exact computation is feasible—that it tracks the exact rooted SPR distance almost perfectly (Pearson 0.98–0.99). We then ask whether a GNN [11] can learn to reproduce this surrogate directly from tree structure, so that each comparison reduces to a single forward pass at inference time. Our contributions are:

  1. A reproducible pre-processing pipeline that slices genomic profiles into size-stratified sub-datasets, diversifies them through controlled shuffling, infers UPGMA and NJ trees, applies midpoint re-rooting [12], and extracts SPR supervision labels.

  2. A publicly released dataset [13] of 864 trees and 388 labelled tree pairs across four bacterial species, with isolates up to 9,500 sequences.

  3. A validation of the supervision target against the exact rooted SPR distance computed with rspr [14], clarifying the relationship between the exact metric and the phangorn [15] heuristic.

  4. A Siamese GIN [16] regressor with training and inference pipelines1, together with an assessment of where it works (in-distribution), where transfer is partial (across species), and where it fails (size extrapolation).

2 Related Work↩︎

Molecular epidemiology and comparative genomics increasingly reconstruct phylogenies from typing and whole-genome data for collections reaching thousands of isolates, where the resulting trees drive outbreak investigation and the study of recombination and horizontal gene transfer [1]. Because standard inference methods, such as NJ [4], UPGMA [5], goeBURST [6], Maximum Likelihood [2] and Maximum Parsimony [3], routinely return different topologies for the same isolates [7], comparing trees is a recurring and increasingly large-scale step in any such analysis. The metric chosen for that comparison is in practice a tooling decision with biological consequences. The Robinson–Foulds distance [8] is the field’s workhorse because it is linear-time and widely implemented, but it saturates on divergent isolates and overreacts to a single misplaced taxon, limiting its use for fine-grained outbreak resolution; information-theoretic variants soften this [17]. Quartet [18] and path-difference [19] measures recover more topological detail but report a value that does not translate cleanly into evolutionary events. Rearrangement distances are the biologically literate alternative: the Subtree Prune and Regraft (SPR) distance [9], like the related Tree Bisection and Reconnection [20], counts the edit operations between two trees and so directly models reticulate processes such as recombination and horizontal gene transfer. The cost is computational, since rooted SPR is NP-hard [10], and this shapes the available software: rspr [14] delivers exact rooted distances through maximum agreement forests but only for modest trees, whereas phangorn [15] scales by estimating the unrooted distance heuristically, with no approximation guarantee, based on the algorithm of de Oliveira Martins et al. [21]. We address this lack of a guarantee by validating the heuristic directly against the exact rooted distance (Section 5) before adopting it as our supervision target. A related quantity, the lower bound on the unrooted distance, is similarly tractable via agreement forests [22]. What no existing tool offers is amortized, near-constant-time comparison: exact methods do not scale, and although the heuristic scales, it must be recomputed for every pair.

This is the gap a learned estimator can fill, and graph neural networks [11] are a natural instrument because a phylogeny is a graph. Their behaviour on this data hinges on the aggregation function: the degree-normalised mean of Graph Convolutional Networks [23] and the learned attention of Graph Attention Networks [24] tend to smooth away structure on the near-3-regular topologies of binary trees, whereas the injective sum of Graph Isomorphism Networks [16] preserves exactly the differences the SPR distance depends on, matching the discriminative power of the Weisfeiler–Lehman test.

For pairwise comparison, two paradigms dominate. Cross-graph matching networks such as Graph Matching Networks [25] inject node-to-node attention for fine-grained accuracy but scale poorly with graph size. Graph embedding approaches, exemplified by SimGNN [26], encode each graph independently and predict from the pair of embeddings; these Siamese designs [27] are cheaper and scale better. Given our target of trees with thousands of leaves, we adopt the embedding paradigm with a Siamese GIN encoder. To our knowledge, approximating the NP-hard SPR distance on rooted phylogenies with this approach has not previously been addressed.

3 Dataset and Ground-Truth Construction↩︎

As depicted in Figure 1, the dataset is organised as a five-stage pipeline.

Figure 1: Pre-processing pipeline: dataset slicing, controlled shuffling, UPGMA/NJ inference, midpoint re-rooting, and SPR labelling.

3.0.1 Profiles and stratification.↩︎

We sample core-genome MLST (cgMLST) [28] profiles for four bacterial species: Clostridium, Salmonella and Vibrio from EnteroBase [29], and Streptococcus pneumoniae from PubMLST [30]. A custom R script slices the original profiles sequentially, always from the first row onward, into three size tiers: small (90–1,000 isolates, 25%), medium (2,000–6,000, 25%) and large (7,000–9,500, 50%); see Fig. 2 (a). Slicing contiguously preserves the implicit temporal and geographic structure of the profiles and ensures smaller sub-datasets are nested within larger ones.

3.0.2 Controlled shuffling.↩︎

Distance-based methods such as NJ and UPGMA are sensitive to input order when breaking ties in the distance matrix. We exploit this with a seeded permutation script that reorders profile rows, forcing the algorithms to resolve ties differently and produce topologies with minor, controlled structural variations.

3.0.3 Inference and re-rooting.↩︎

From each (original and shuffled) sub-dataset we compute a Hamming distance matrix and infer UPGMA and NJ trees in Newick format with PhyloLib [31]. NJ trees are unrooted, with a basal trifurcation, so we apply midpoint rooting [12] using Biopython’s Bio.Phylo [32]. This yields the rooted binary trees required by the exact rooted-SPR algorithm and defines the model’s root-based node features. Rooting also balances the topology: on a 469-isolate Salmonella tree it reduced maximum topological depth from 52 to 33 and average depth from \(\approx 31.2\) to \(\approx 16.0\), which lowers the cost of the traversal-based heuristic label computation.

3.0.4 Pairing and labelling.↩︎

We form 388 tree pairs following a fixed niche distribution: UPGMA vs. NJ (40%), NJ vs.NJsh (25%), UPGMA vs. UPGMAsh (15%), and two zero-distance control blocks NJ vs.NJ and UPGMA vs.UPGMA (10% each); see Fig. 2 (b). For each pair we extract the SPR label with phangorn::SPR.dist; the structural trace (the leaves that move between the two topologies) is obtained from the maximum agreement forest (MAF) computed exactly with rspr [14], for which the rooted SPR distance equals the number of MAF components minus one. The master table is split into disjoint train, validation and test subsets.

a
b

Figure 2: Dataset statistics.. a — Dataset size distribution., b — Tree pair distribution for pairing and labelling.

Notice that the supervision target is a heuristic estimate of the unrooted SPR distance, the phangorn::SPR.dist [21], and although it was originally described as a conservative upper-bound estimate, no error bound was ever formally established, and in practice it tends to underestimate the true SPR distance when that distance is small relative to tree size, which is precisely our regime. Second, inspection of the phangorn source shows that SPR.dist internally unroots both inputs (it calls clean_phylo(…, unroot=TRUE) and canonicalises bipartitions with SHORTwise) and exposes no rooted option. Passing rooted trees therefore does not yield a rooted SPR distance. In contrast, rspr [14] computes the exact rooted SPR distance. The two tools thus measure related but distinct quantities. In Section 5 we evaluate how the exact rooted SPR distance compares against the unrooted heuristic estimate from the phangorn package.

4 Method↩︎

Figure 3 gives a high-level overview of the model: a tree representation module produces node features, a shared GIN module encodes each tree, and an output module pools and regresses the pair to an SPR distance.

Figure 3: High-level architecture. Both trees are encoded by the same (Siamese) GIN module (node/edge features, GIN convolution with batch normalisation and ReLU), and the output module pools each tree and regresses the pair to the predicted SPR distance.

4.1 Graph Representation and Node Features↩︎

Each Newick tree is parsed with Biopython [32] and converted to a directed graph whose root is the unique in-degree-zero vertex. Then, it is encoded as a bidirectional graph in PyTorch Geometric [33] so that messages propagate in both directions. In this context, each node carries a four-dimensional feature vector: node degree, a binary leaf indicator, the topological distance to the root in number of branches, and a categorical taxonomic identifier. The first three are used directly, while the identifier is mapped through a trainable Embedding layer of dimension 16, with vocabulary size set dynamically to \(\texttt{max\_id}+1\) to handle large isolate counts. Concatenation yields a 19-dimensional input per node. Figure 4 illustrates the full encoding, from the Newick string to the per-node feature vector.

Figure 4: Input representation and node encoding. The Newick tree is parsed into a bidirectional graph; each node yields a feature row (degree, is-leaf, distance to root, species id). The three structural features (dim 3) are concatenated with a learned species embedding (dim 16) to form the 19-dimensional node feature.

4.2 Siamese GIN Regressor↩︎

The model, detailed in Fig. 5, is a Siamese embedding network: both trees of a pair pass through the same GIN encoder. Each GIN layer [16] updates node features as \[h_i^{(k)} = \mathrm{MLP}^{(k)}\!\left( (1+\epsilon^{(k)})\, h_i^{(k-1)} + \sum_{j \in \mathcal{N}(i)} h_j^{(k-1)} \right),\] where \(\mathcal{N}(i)\) is the neighbourhood of node \(i\). We stack two GIN layers of hidden dimension 128; each wraps a two-layer MLP, Linear-ReLU-Linear, followed by batch normalisation [34] and ReLU. A global sum-pooling layer then aggregates node features into a fixed-size graph embedding \[v_g = \sum_{i \in V_g} h_i .\] The two embeddings \(v_a\) and \(v_b\) are concatenated into a 256-dimensional vector and regressed by an MLP head \(256\!\to\!128\!\to\!64\!\to\!1\) with ReLU activations and dropout \(0.3\), producing the predicted SPR distance.

Figure 5: Detailed Siamese GIN. Each tree passes through the same encoder (two GIN layers, each a GINConv MLP Linear–ReLU–Linear followed by batch normalisation and ReLU); global pooling (add) yields a 128-d embedding per tree. The two embeddings are concatenated (256-d) and regressed by the MLP head 256{\to}128{\to}64{\to}1 to the predicted SPR distance.

4.3 Training↩︎

To keep training efficient, each tree is parsed and converted to a PyTorch Geometric object once and cached in memory, which reduces the per-epoch cost from \(O(\text{epochs}\times N)\) to \(O(N)\). The network is trained with the Adam optimiser [35] at a learning rate of \(10^{-4}\) and weight decay of \(10^{-4}\), minimising the Huber loss [36], which is robust to the right-skewed distribution of SPR values. The learning rate is halved on plateau after 10 epochs without improvement, and training stops early after 25 such epochs. We split the labelled pairs 70/15/15 into training, validation and test sets under a fixed seed. Predicted distances are clamped at zero, since negative distances are biologically meaningless. Performance is reported as Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE) and the coefficient of determination \(R^2\). Figure 6 summarises the full training, validation, testing and inference workflow.

Figure 6: Workflow. The labelled pairs are split (70/15/15, seed 42) into training, validation and test sets. Training back-propagates the Huber loss with Adam; validation drives learning-rate scheduling and early stopping and selects the best model; the held-out test set is used once for the final metrics. At inference, the trained model estimates SPR of a new tree pair in a single forward pass.

5 Experimental Evaluation↩︎

This section evaluates the approach along three axes. We first assess the scalability of the labelling pipeline; we then quantify how well the phangorn heuristic used for supervision approximates the exact rooted SPR distance; and we finally measure the accuracy and generalization of the trained Siamese GIN across in-distribution, cross-species, and size-extrapolation regimes.

5.1 Scalability of the Pipeline↩︎

In stress testing on a virtual machine with 240 GiB of RAM and Intel Xeon Silver CPUs, the labelling pipeline scaled to trees of up to 9,500 profiles. Exact rspr computation, by contrast, was not feasible for all those trees. A trained GNN then predicts a distance in a single forward pass, in a fraction of the heuristic’s time.

5.2 Validating the Supervision Target↩︎

On small validation trees (20–90 leaves), where exact computation is tractable, we compared the unrooted phangorn heuristic against the exact rooted SPR distance. Table 1 reports the Clostridium pairs. The heuristic is strongly rank-correlated with the exact distance (Pearson \(0.983\) on Clostridium, \(0.9935\) on a Vibrio subset, and \(0.99\) pooled over \(n=26\) pairs), but it systematically underestimates the magnitude, returning on average about \(65\%\) for Clostridium and \(71\%\) for Vibrio of the exact value.

Table 1: Heuristic (unrooted phangorn estimate) vs.exactrooted SPR (rspr) on the small Clostridium validationpairs (20–90 leaves). Trace is the number of relocated leaves,read from the maximum agreement forest (MAF). Subscript \(s\) denotesshuffled input.
Size Pair Heuristic Exact Trace
20 NJ\(_s\) vs UPGMA\(_s\) 6 9 15
30 UPGMA\(_s\) vs UPGMA 12 20 22
40 UPGMA\(_s\) vs UPGMA 17 28 35
45 UPGMA vs NJ\(_s\) 20 33 37
50 UPGMA vs UPGMA\(_s\) 22 38 43
55 UPGMA vs NJ 5 8 21
60 UPGMA vs NJ 5 9 22
65 UPGMA vs NJ 6 9 26
70 UPGMA vs NJ 7 10 28
75 UPGMA vs NJ 7 11 31
80 UPGMA vs NJ 10 14 33
85 UPGMA vs NJ 14 19 53
90 UPGMA vs NJ 15 20 60

This underestimation is expected rather than a heuristic failure, and has two sources. First, phangorn estimates the unrooted SPR distance, which is generally no larger than the rooted distance preserved by midpoint rooting. Second, the heuristic itself carries no proven approximation bound and empirically underestimates the true SPR distance when that distance is small relative to tree size, consistent with the systematic gap we observe. Both effects push the heuristic below the exact rooted value. The very high correlation nonetheless shows it is an excellent monotonic surrogate, which is what matters for training a regressor, even if it is a biased estimator of the rooted magnitude. The trace (relocated leaves) is far larger than the SPR distance itself, for example 8 operations but 21 leaves moved at size 55, since a single prune-and-regraft move can displace an entire subtree.

5.3 Model Performance↩︎

Under stratified cross-validation the Siamese GIN reaches \(R^2 = 0.905 \pm 0.191\), MAE \(= 92.24 \pm 7.02\), RMSE \(= 128.14 \pm 11.07\) and MAPE \(= 2.16\% \pm 0.37\%\). The standard deviation is driven by occasional right-skewed outliers in small validation splits rather than by instability of the fit. Table 2 reports three single-split configurations that delimit the model’s operating envelope.

Table 2: GIN performance across data regimes. “Baseline” is themean-predictor MAE. In-distribution results are strong; cross-speciestransfer is limited and size extrapolation fails.
Configuration MAE RMSE \(R^2\) Baseline MAE
In-distribution (4 species, mixed sizes) 127.13 202.24 0.873 485.78
Cross-species (train 2 sp./ test 2 sp.) 208.70 325.72 0.368 406.05
Size extrapolation (small+med.\(\to\) large) 375.90 643.02 \(-0.14\) 553.65

Three findings stand out. (i) In-distribution, the model explains \(\approx 87\%\) of the variance and beats the mean baseline by roughly \(4\times\) in MAE, so the GNN genuinely learns to compare topologies. (ii) Trained on two species and tested on two unseen ones (Clostridium and Vibrio \(\to\) Salmonella and S. pneumoniae), it attains \(R^2 = 0.37\). This indicates that the learned representation captures some species-agnostic structure, but that cross-species generalization remains challenging. The drop is hard to attribute to domain shift alone, since this split also reduces the training set substantially, so data scarcity is a likely contributing factor. (iii) When trained only on small and medium trees and asked to predict on large ones, performance falls below the mean baseline (\(R^2 = -0.137\)): the model does not extrapolate to tree sizes outside its training range. The calibration analysis on the in-distribution test set, shown in Figure 7, is consistent with this: predictions cluster around the ideal \(y=x\) line but compress towards the mean, overestimating short distances and underestimating long ones. Figure 8 refines this picture through the deviation histograms. The absolute-deviation histogram concentrates sharply around zero, so the model predicts most pairs accurately, with a slight right-skew and a tail that indicate an occasional tendency to overestimate on complex topologies. The normalized-deviation histogram is likewise concentrated near zero, showing that the largest absolute errors fall on pairs with inherently large SPR distances, so the relative error stays low across most of the domain.

Figure 7: Calibration on the in-distribution test set: model-predicted vs.true SPR distance, with the ideal y=x line. Points track the diagonal but compress towards the mean, with short distances overestimated and long distances underestimated.
Figure 8: Distribution of prediction deviations from the ground-truth SPR distance. Left: absolute deviation concentrates around zero (ideal prediction), with a slight right-skew. Right: normalized deviation is near zero for most instances, indicating that larger absolute deviations occur mostly at higher baseline distances.

5.4 Discussion↩︎

Taken together, the experiments show that the binding limitation is neither the architecture nor, primarily, the absolute size of the labelled set (388 pairs), but its coverage across tree scales. The model interpolates well and transfers only partially across species, but it cannot yet extrapolate in size, and it inherits a calibration bias from the heuristic labels and from sum pooling. These limitations are addressable: enriching the training distribution with larger trees, exploring size-aware normalisation, and correcting the label offset are concrete next steps. Among the pooling strategies we tested, sum pooling gave the best overall results, but it remains a source of the size-related bias, so alternative aggregation schemes are worth exploring.

6 Final Remarks↩︎

We presented a reproducible ecosystem for approximating the NP-hard SPR distance between phylogenetic trees: a pre-processing pipeline, an openly released dataset of 864 trees and 388 labelled pairs, and a Siamese GIN regressor with training and inference tools. We validated the supervision target against exact rooted SPR (Pearson \(0.98\)\(0.99\)) and clarified the distinction between phangorn and rspr. The model predicts SPR distances accurately in-distribution (\(R^2 \approx 0.87\)\(0.90\)) and shows partial transfer across species (\(R^2 \approx 0.37\)), while its current weakness is size extrapolation. Future work will expand the dataset towards larger topologies, add size-aware pooling and calibration, and benchmark the learned predictor against exact and approximate SPR tools.

A further direction is to predict the SPR trace rather than only its magnitude: to identify the specific leaves that must be relocated to transform one tree into the other, recovering the sequence of prune-and-regraft operations relating the two topologies. This would let the model report not only how far apart two trees are but where they differ. The trace currently depends on exact MAF extraction via rspr, whose cost grows prohibitive on large trees, so trace supervision at scale would itself require a heuristic or learned approximation of the MAF. Together, these steps target a fast, scalable approximation suitable for large-scale epidemiological and comparative-genomic analyses.

6.0.1 ↩︎

The authors acknowledge the support by national funds through the Fundação para a Ciência e a Tecnologia, I.P.(FCT) under projects UID/50021/2025, UID/PRR/50021/2025, UID/PRR/00006/2025, and grant 2023.17447.ICDT.

6.0.2 ↩︎

The authors have no competing interests to declare that are relevant to the content of this article.

References↩︎

[1]
P. Kapli, Z. Yang, and M. J. Telford, “Phylogenetic tree building in the genomic age,” Nature Reviews Genetics, vol. 21, no. 7, pp. 428–444, 2020, doi: 10.1038/s41576-020-0233-0.
[2]
J. Felsenstein, “Evolutionary trees from DNA sequences: A maximum likelihood approach,” Journal of Molecular Evolution, vol. 17, no. 6, pp. 368–376, 1981, doi: 10.1007/BF01734359.
[3]
W. M. Fitch, “Toward defining the course of evolution: Minimum change for a specific tree topology,” Systematic Zoology, vol. 20, no. 4, pp. 406–416, 1971, doi: 10.2307/2412116.
[4]
N. Saitou and M. Nei, “The neighbor-joining method: A new method for reconstructing phylogenetic trees,” Molecular Biology and Evolution, vol. 4, no. 4, pp. 406–425, 1987, doi: 10.1093/oxfordjournals.molbev.a040454.
[5]
R. R. Sokal and C. D. Michener, “A statistical method for evaluating systematic relationships,” University of Kansas Science Bulletin, vol. 38, pp. 1409–1438, 1958, [Online]. Available: https://www.sid.ir/paper/549615/en.
[6]
A. P. Francisco, M. Bugalho, M. Ramirez, and J. A. Carriço, “Global optimal eBURST analysis of multilocus typing data using a graphic matroid approach,” BMC Bioinformatics, vol. 10, p. 152, 2009, doi: 10.1186/1471-2105-10-152.
[7]
C. Vaz, M. Nascimento, J. A. Carriço, T. Rocher, and A. P. Francisco, “Distance-based phylogenetic inference from typing data: A unifying view,” Briefings in Bioinformatics, vol. 22, no. 3, p. bbaa147, 2021, doi: 10.1093/bib/bbaa147.
[8]
D. F. Robinson and L. R. Foulds, “Comparison of phylogenetic trees,” Mathematical Biosciences, vol. 53, no. 1–2, pp. 131–147, 1981, doi: 10.1016/0025-5564(81)90043-2.
[9]
G. Hickey, F. Dehne, A. Rau-Chaplin, and C. Blouin, SPR distance computation for unrooted trees,” Evolutionary Bioinformatics, vol. 4, pp. 17–27, 2008, doi: 10.4137/EBO.S419.
[10]
M. Bordewich and C. Semple, “On the computational complexity of the rooted subtree prune and regraft distance,” Annals of Combinatorics, vol. 8, no. 4, pp. 409–423, 2005, doi: 10.1007/s00026-004-0229-z.
[11]
Z. Wu, S. Pan, F. Chen, G. Long, C. Zhang, and P. S. Yu, “A comprehensive survey on graph neural networks,” IEEE Transactions on Neural Networks and Learning Systems, vol. 32, no. 1, pp. 4–24, 2021, doi: 10.1109/TNNLS.2020.2978386.
[12]
U. Mai, E. Sayyari, and S. Mirarab, “Minimum variance rooting of phylogenetic trees and implications for species tree reconstruction,” PLoS ONE, vol. 12, no. 8, p. e0182238, 2017, doi: 10.1371/journal.pone.0182238.
[13]
R. Castanheira, M. Bugalho, and C. Vaz, “Phylogenetic trees inferred with different algorithms dataset and their SPR comparison.” Zenodo; Zenodo, 2026, doi: 10.5281/zenodo.20476872.
[14]
C. Whidden, N. Zeh, and R. G. Beiko, “Supertrees based on the subtree prune-and-regraft distance,” Systematic Biology, vol. 63, no. 4, pp. 566–581, 2014, doi: 10.1093/sysbio/syu023.
[15]
K. P. Schliep, “Phangorn: Phylogenetic analysis in R,” Bioinformatics, vol. 27, no. 4, pp. 592–593, 2011, doi: 10.1093/bioinformatics/btq706.
[16]
K. Xu, W. Hu, J. Leskovec, and S. Jegelka, “How powerful are graph neural networks?” in International conference on learning representations (ICLR), 2019, [Online]. Available: https://arxiv.org/abs/1810.00826.
[17]
M. R. Smith, “Information theoretic generalized Robinson–Foulds metrics for comparing phylogenetic trees,” Bioinformatics, vol. 36, no. 20, pp. 5007–5013, 2020, doi: 10.1093/bioinformatics/btaa614.
[18]
G. F. Estabrook, F. R. McMorris, and C. A. Meacham, “Comparison of undirected phylogenetic trees based on subtrees of four evolutionary units,” Systematic Zoology, vol. 34, no. 2, pp. 193–200, 1985, doi: 10.2307/2413326.
[19]
M. A. Steel and D. Penny, “Distributions of tree comparison metrics—some new results,” Systematic Biology, vol. 42, no. 2, pp. 126–141, 1993, doi: 10.1093/sysbio/42.2.126.
[20]
B. L. Allen and M. Steel, “Subtree transfer operations and their induced metrics on evolutionary trees,” Annals of Combinatorics, vol. 5, no. 1, pp. 1–15, 2001, doi: 10.1007/s00026-001-8006-8.
[21]
L. de Oliveira Martins, É. Leal, and H. Kishino, “Phylogenetic detection of recombination with a Bayesian prior on the distance between trees,” PLoS ONE, vol. 3, no. 7, p. e2651, 2008, doi: 10.1371/journal.pone.0002651.
[22]
C. Whidden and F. A. Matsen IV, “Calculating the unrooted subtree prune-and-regraft distance,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 16, no. 3, pp. 898–911, 2019, doi: 10.1109/TCBB.2018.2802911.
[23]
T. N. Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks,” in International conference on learning representations (ICLR), 2017, [Online]. Available: https://arxiv.org/abs/1609.02907.
[24]
P. Veličković, G. Cucurull, A. Casanova, A. Romero, P. Liò, and Y. Bengio, “Graph attention networks,” in International conference on learning representations (ICLR), 2018, [Online]. Available: https://www.chapterpal.com/s/vq6tnqa4/graph-attention-networks.
[25]
Y. Li, C. Gu, T. Dullien, O. Vinyals, and P. Kohli, “Graph matching networks for learning the similarity of graph structured objects,” in Proceedings of the 36th international conference on machine learning (ICML), 2019, pp. 3835–3845, [Online]. Available: https://proceedings.mlr.press/v97/li19d.html.
[26]
Y. Bai, H. Ding, S. Bian, T. Chen, Y. Sun, and W. Wang, SimGNN: A neural network approach to fast graph similarity computation,” in Proceedings of the 12th ACM international conference on web search and data mining (WSDM), 2019, pp. 384–392, doi: 10.1145/3289600.3290967.
[27]
J. Bromley, I. Guyon, Y. LeCun, E. Säckinger, and R. Shah, “Signature verification using a" siamese" time delay neural network,” Advances in neural information processing systems, vol. 6, 1993, [Online]. Available: https://papers.nips.cc/paper_files/paper/1993/hash/288cc0ff022877bd3df94bc9360b9c5d-Abstract.html.
[28]
M. C. J. Maiden et al., MLST revisited: The gene-by-gene approach to bacterial genomics,” Nature Reviews Microbiology, vol. 11, no. 10, pp. 728–736, 2013, doi: 10.1038/nrmicro3093.
[29]
N. P. Dyer et al., EnteroBase in 2025: exploring the genomic epidemiology of bacterial pathogens,” Nucleic Acids Research, vol. 53, no. D1, pp. D757–D763, Oct. 2024, doi: 10.1093/nar/gkae939.
[30]
K. A. Jolley, J. E. Bray, and M. C. J. Maiden, “Open-access bacterial population genomics: BIGSdb software, the PubMLST.org website and their applications,” Wellcome Open Research, vol. 3, p. 124, 2018, doi: 10.12688/wellcomeopenres.14826.1.
[31]
L. Bernardino da Silva, G. Frutuoso, A. P. Francisco, and C. Vaz, Command-line application, INESC-ID / Instituto Superior Técnico.PhyloLib: A library of efficient algorithms for phylogenetic analysis.” 2026, [Online]. Available: https://github.com/phyloviz/phylolib.
[32]
P. J. A. Cock et al., “Biopython: Freely available python tools for computational molecular biology and bioinformatics,” Bioinformatics, vol. 25, no. 11, pp. 1422–1423, 2009, doi: 10.1093/bioinformatics/btp163.
[33]
M. Fey and J. E. Lenssen, “Fast graph representation learning with PyTorch Geometric,” in ICLR workshop on representation learning on graphs and manifolds, 2019, [Online]. Available: https://arxiv.org/abs/1903.02428.
[34]
S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in International conference on machine learning, 2015, pp. 448–456, doi: 10.5555/3045118.3045167.
[35]
D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” in International conference on learning representations (ICLR), 2015, [Online]. Available: https://arxiv.org/abs/1412.6980.
[36]
P. J. Huber, “Robust estimation of a location parameter,” The Annals of Mathematical Statistics, vol. 35, no. 1, pp. 73–101, 1964, doi: 10.1214/aoms/1177703732.

  1. publicly available at https://github.com/RenataCastanheira/LearningPhylogeneticTreeSimilarityWithGraphNeuralNetworks↩︎