NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Spectral neighbor joining for reconstruction of latent tree models

Ariel Jaffe, Noah Amsel, Boaz Nadler, Joseph T. Chang, Yuval Kluger · DOI

Abstract

A common assumption in multiple scientific applications is that the distribution of observed data can be modeled by a latent tree graphical model. An important example is phylogenetics, where the tree models the evolutionary lineages of a set of observed organisms. Given a set of independent realizations of the random variables at the leaves of the tree, a key challenge is to infer the underlying tree topology. In this work we develop Spectral Neighbor Joining (SNJ), a novel method to recover the structure of latent tree graphical models. Given a matrix that contains a measure of similarity between all pairs of observed variables, SNJ computes a spectral measure of cohesion between groups of observed variables. We prove that SNJ is consistent, and derive a sufficient condition for correct tree recovery from an estimated similarity matrix. Combining this condition with a concentration of measure result on the similarity matrix, we bound the number of samples required to recover the tree with high probability. We illustrate via extensive simulations that in comparison to several other reconstruction methods, SNJ requires fewer samples to accurately recover trees with a large number of leaves or long edges.

Introduction

Spectral Neighbor Joining (SNJ) is a novel algorithm designed to reconstruct the structure of latent tree models from observed data at the leaves. In fields ranging from phylogenetics to document classification, researchers often need to infer a hierarchical structure where only the terminal nodes (the "leaves") are observable. For example, in biology, we observe DNA sequences from living species and aim to reconstruct the tree of their common ancestors.

Latent tree model with observed DNA sequences at the leaves.

For decades, the Neighbor Joining (NJ) algorithm has been the standard for this task. While fast and scalable, NJ's accuracy degrades as trees grow larger or evolutionary distances (edges) lengthen, requiring exponentially more samples (e.g., DNA sequence length) to maintain accuracy. While other methods like quartet-based inference or Tree SVD are more statistically efficient, they often become computationally intractable for large datasets. SNJ provides a middle ground: it is as fast as NJ but achieves the accuracy of more complex spectral methods.

Methodology

The key innovation of SNJ lies in its "spectral criterion" for deciding which nodes to merge at each step of the reconstruction process.

The Similarity Matrix and Spectral Criterion

Instead of relying solely on pairwise distances, SNJ utilizes a "symmetric affinity" matrix based on the determinants of transition matrices between nodes. The algorithm leverages a mathematical property (Lemma 3.1) stating that if a group of nodes forms a "clan" (a distinct subtree), a specific submatrix of these affinities will have a rank of one.

In practice, due to noise in the data, the rank is rarely exactly one. SNJ evaluates the second largest singular value ($\sigma_2$) of these submatrices. A small $\sigma_2$ indicates that the nodes are highly likely to be neighbors in the true tree.

Iterative Merging

Like the classic NJ, SNJ works greedily. It identifies the pair with the smallest $\sigma_2$, merges them into a new internal node, updates the affinity matrix, and repeats until the full tree topology is recovered.

Key Insights: The Quartet Connection

A major theoretical contribution of this work is the connection between SNJ’s spectral criterion and "quartet-based" methods. The authors demonstrate that SNJ essentially performs a weighted sum of all possible four-node tests (quartets) in a single, efficient Singular Value Decomposition (SVD) calculation.

A quartet structure illustrating the relationship between internal and leaf nodes.

This global perspective makes SNJ much more robust to noise than distance-based methods. Furthermore, SNJ’s success is less dependent on the "diameter" of the tree (the longest path between any two leaves) compared to NJ. This explains its superior performance on "caterpillar" trees—highly unbalanced structures that are notoriously difficult for standard algorithms to reconstruct.

Results and Performance

The paper validates SNJ through extensive synthetic simulations, benchmarking it against NJ, Tree SVD, Recursive Grouping, and Binary Forest using standard models like Jukes-Cantor and Coalescent models.

  • Sample Efficiency: For large trees (e.g., 512 leaves), SNJ achieved near-perfect reconstruction with significantly shorter sequences than NJ.
  • Robustness to Mutation: In high-noise regimes where mutation rates are high (long edges), NJ often fails due to distance "saturation." SNJ maintains high accuracy under these conditions.
  • Computational Speed: SNJ's runtime is nearly identical to NJ, making it practical for large-scale genomic datasets where more complex methods might take days to run.

Conclusion and Future Directions

SNJ provides a robust and efficient alternative for latent tree reconstruction, particularly for large trees or those with long evolutionary branches. While the current theoretical proofs for sample complexity are tied to the Jukes-Cantor model, empirical results show that SNJ performs well on more complex models like the Gamma model. Future research may focus on generalizing these theoretical bounds and refining the algorithm for rooted tree applications.

Summary updated

BibTeX
@article{jaffe2020spectral,
  author = {Ariel Jaffe and Noah Amsel and Boaz Nadler and Joseph T. Chang and Yuval Kluger},
  title = {{Spectral neighbor joining for reconstruction of latent tree models}},
  journal = {SIAM J. Math. Data Sci.},
  year = {2020},
  doi = {10.1137/20m1365715},
}
Figure