Improved Phylogeny Comparisons: Non-Shared Edges Nearest Neighbor Interchanges, and Subtree Transfers

Wing-Kai Hon, Ming-Yang Kao, Tak Wah Lam, Wing-Kin Sung, Siu-Ming YiuarXiv 2002

Abstract

Phylogenetic trees are essential for representing evolutionary relationships, yet comparing them remains computationally challenging. This paper introduces the first subquadratic-time algorithm ($O(n \log n)$) for identifying non-shared edges between weighted trees, a key step in accelerating Nearest Neighbor Interchange (NNI) distance approximations. Additionally, the study generalizes Subtree Transfer (STT) distance to degree-$d$ trees, offering a $(2d-4)$ approximation factor and establishing NP-hardness for trees with non-unique leaf labels. These results bridge significant gaps in the efficiency and scope of phylogenetic distance metrics.

Introduction

In computational biology, phylogenies model the evolutionary history of species. Because different datasets or inference methods often yield different trees for the same set of species, researchers require robust metrics to quantify dissimilarity. Three primary metrics are commonly used: non-shared edge distance, Nearest Neighbor Interchange (NNI), and Subtree Transfer (STT). While these metrics are well-understood for binary (degree-3) trees, extending them to weighted or general degree-$d$ trees has historically faced efficiency bottlenecks and theoretical gaps. This paper addresses these challenges by providing faster algorithms and new approximation bounds.

Methods

The authors utilize several combinatorial techniques to improve algorithmic efficiency. To identify non-shared edges, they reformulate the task as a partition labeling problem. Instead of comparing partitions directly—which can be computationally expensive—they use an incremental relabeling process for leaf label multi-sets. By assigning temporary labels and updating them as they traverse the tree, they achieve an $O(n \log n)$ complexity, effectively avoiding the $O(n^2)$ overhead of direct set comparisons. This improvement is critical because non-shared edges serve as the fundamental building blocks for more complex metrics like NNI.

For STT distance in general trees, the authors propose a transformation where a degree-$d$ tree is converted into a degree-3 representation using zero-weight edges. This allows the application of binary tree STT results to more complex models. In the unweighted case, an edge contraction strategy is used to identify and group non-shared edges, facilitating a bounded approximation.

Illustrations of Subtree Transfer (STT) operations (a), (b), and (c) in phylogeny comparison.

Results

The primary contribution is the $O(n \log n)$ algorithm for finding non-shared edges in weighted trees, which directly improves the runtime for NNI distance approximation from quadratic to subquadratic. For STT distance, the paper proves that weighted distances in degree-$d$ trees can be approximated within a factor of 2 by simulating operations on a binary tree representation. Unweighted distances, however, require a different approach, yielding a $(2d-4)$ approximation ratio through edge contraction strategies.

Transformations between trees $T, T', R,$ and $R'$ used in establishing approximation bounds.

Furthermore, the authors demonstrate that computing STT distance becomes NP-hard when leaf labels are not unique (e.g., in the presence of paralogs). This is proven via a reduction from the Exact Cover by 3-Sets (X3C) problem. The study also highlights a divergence between weighted and unweighted metrics, showing that unweighted STT distance is not a simple special case of the weighted version.

Discussion and Conclusion

The shift from $O(n^2)$ to $O(n \log n)$ for non-shared edge detection represents a significant practical improvement for large-scale phylogenetic analysis. The generalization to degree-$d$ trees provides a more flexible framework for evolutionary modeling that better reflects non-binary events. Future research may explore the possibility of linear-time algorithms for these metrics or tighter approximation bounds for unweighted STT distance in high-degree trees.

Summary updated

BibTeX
@misc{hon2002improved,
  author = {Wing-Kai Hon and Ming-Yang Kao and Tak Wah Lam and Wing-Kin Sung and Siu-Ming Yiu},
  title = {{Improved Phylogeny Comparisons: Non-Shared Edges Nearest Neighbor Interchanges, and Subtree Transfers}},
  year = {2002},
  eprint = {cs/0211009},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/cs/0211009},
}
Figure