On the importance of assessing topological convergence in Bayesian phylogenetic inference

Marius Brusselmans, Luiz Max Carvalho, Samuel L. Hong, Jiansi Gao, Frederick A. Matsen, Andrew Rambaut, Philippe Lemey, Marc A. Suchard, Gytis Dudas, Guy BaeleVirus 2024 · DOI

TL;DR

Bayesian phylogenetic inference relies on MCMC sampling, but standard convergence diagnostics fail for tree topologies. This paper demonstrates that specialized topological convergence metrics reveal hidden issues in MCMC runs that continuous parameter diagnostics miss, highlighting the critical need for these advanced tools and multiple independent analyses to ensure reliable phylogenetic results.

What Problem Does This Paper Address?

In phylogenetic research, especially in fields like phylodynamics, accurately inferring evolutionary relationships is paramount. Bayesian methods, often employing Markov Chain Monte Carlo (MCMC) algorithms, are widely used to explore the space of possible evolutionary trees and estimate their probabilities. A crucial aspect of MCMC is ensuring that the sampling process has converged to the true posterior distribution, meaning the algorithm has explored the parameter space adequately and is producing reliable samples.

Traditionally, convergence is assessed by examining trace plots and calculating effective sample sizes (ESS) for continuous model parameters (like substitution rates or divergence times). However, the primary output of phylogenetic inference is the tree topology itself – the branching structure of relationships. Tree topologies are not continuous parameters, making standard diagnostics insufficient. This leaves a critical gap: how do we know if our MCMC has converged on the correct tree structure, especially when the topology is the most important aspect of the inference? This paper addresses this by exploring and evaluating new methods designed specifically to assess the convergence and mixing of MCMC samples in the discrete space of tree topologies.

Methods

The authors investigate several recently developed methods for assessing topological convergence. These methods fall into two main categories:

  • Distance-based metrics: These quantify the dissimilarity between two phylogenetic trees. The paper examines several established metrics, including:
  • Robinson-Foulds (RF) distance: Counts the number of partitions (splits) present in one tree but not the other.
  • Weighted Robinson-Foulds distance: Similar to RF but accounts for branch lengths.
  • Branch score: Related to RF, it considers the sum of squared differences in branch lengths.
  • Path difference: Measures differences in the path lengths between all pairs of tips.
  • Kendall-Colijn distance: Another metric based on path lengths, with a specific weighting.
  • Subtree-prune-regraft (SPR) distance: Measures the minimum number of operations to transform one tree into another, reflecting how MCMC often explores tree space.
  • Topological ESS estimators: These adapt the concept of ESS to the topological space, often by applying distance metrics to trace plots or using specialized calculations. Key estimators explored include:
  • Topology trace plots: Visualizing the phylogenetic distance of sampled trees to a reference tree over MCMC iterations.
  • Pseudo-ESS: An ESS calculated from the vector of distances from a focal tree to all other trees.
  • Approximate ESS: An ESS estimate based on a topological autocorrelation time.
  • Fréchet correlation ESS: An ESS using Fréchet covariances to capture tree relationships.
  • Split frequency ESS: An ESS computed by treating each tree split as a binary parameter.
  • Multidimensional Scaling (MDS) ESS: An ESS derived from the first dimension of an MDS embedding of pairwise tree distances.

The paper also explores alternative visualizations like pairwise heatmaps and network graphs to better represent the relationships between sampled trees.

Datasets

The study uses two real-world phylogenetic datasets:

  1. Ebola Virus (EBOV) dataset: A large dataset (1610 sequences) from a genomic epidemiology study of the 2014-2015 West African outbreak. This dataset was chosen for its size and model complexity, making it a challenging case study.
  2. Human Immunodeficiency Virus (HIV) dataset: A dataset of 500 sequences from a phylogeographic study of HIV-1 subtype B spread in the USA. This dataset was selected due to the known "star-like" topology of HIV phylogenies, which can present different convergence challenges.

Both datasets consist of posterior sample trees obtained from Bayesian phylogenetic analyses.

Key Insights and Ideas

  • Topological convergence is not guaranteed by continuous parameter convergence: The most striking insight is that MCMC runs can appear well-converged based on standard diagnostics for continuous parameters (like root height) but exhibit significant topological issues. This means relying solely on traditional ESS and trace plots can be misleading.
  • Different distance metrics reveal different aspects of convergence: The choice of phylogenetic distance metric can dramatically impact the observed convergence patterns. Some metrics might clearly show discrepancies between independent MCMC runs, while others might obscure them, leading to different conclusions about mixing and convergence.
  • Multiple replicate analyses are essential: The paper strongly advocates for running multiple independent MCMC analyses with different starting points. This is crucial because a single run, even if it appears converged, might be stuck in a local mode of the posterior distribution, failing to explore the full topological space.
  • Visualizations beyond trace plots are powerful: While trace plots are useful, pairwise heatmaps and network graphs offer a more comprehensive view of the relationships between sampled trees, often revealing convergence issues that are subtle in trace plots.
  • The "star-like" nature of some phylogenies (like HIV) can complicate convergence assessment: The distinct topology of HIV phylogenies, with short internal and long external branches, seems to make some topological distance metrics less sensitive to differences between MCMC runs compared to more "ladder-like" phylogenies (like EBOV).

Key Results

  • EBOV data: Topology trace plots using metrics like Robinson-Foulds and branch score clearly showed distinct patterns for the three independent MCMC runs, indicating they explored different regions of the topological space. This was not apparent when using path difference or Kendall-Colijn distances. Topological ESS values were substantially lower for the combined runs compared to individual runs when discrepancies were present.
  • HIV data: Unlike the EBOV data, the trace plots for the HIV analysis did not immediately reveal discrepancies between the two independent runs when using the first tree as a reference. However, pairwise heatmaps and network graphs, as well as trace plots using different reference trees (like MCC trees), did show clear distinctions between the runs. Topological ESS values for the HIV data were generally lower across the board, often failing to meet common cutoffs.
  • Split ESS: For EBOV, the vast majority of individual tree splits showed satisfactory ESS values, suggesting good convergence at the split level. For HIV, however, a significant portion of splits had low ESS, indicating poor mixing.
  • Tree length ESS: While root height ESS was generally good, tree length ESS (a statistic closely related to topology) showed problematic mixing for the EBOV data, with an ESS as low as 20.

Limitations and Future Work

  • Computational cost: Generating pairwise distance matrices for large samples of trees is computationally intensive, limiting the practical application of some visualizations (like heatmaps and network graphs) for very large datasets. The authors suggest downsampling as a potential solution.
  • Choice of reference tree: The choice of reference tree for topological trace plots can significantly influence the interpretation of convergence, as demonstrated with the HIV data.
  • Impact on downstream inferences: The paper acknowledges that while topological discrepancies are detected, their impact on downstream parameter estimates is not yet clear and warrants further research.
  • Combining outputs of divergent runs: A key open question is how to best combine samples from independent MCMC runs that have explored different regions of the posterior distribution (potentially local modes). Simple averaging might not accurately reflect the true posterior. Techniques like importance sampling are suggested but require further investigation.
  • Lack of a unified approach: The authors highlight the need for a standardized and unified approach to assessing topological convergence, especially as more tools become available.

Summary updated

Abstract

Modern phylogenetics research is often performed within a Bayesian framework, using sampling algorithms such as Markov chain Monte Carlo (MCMC) to approximate the posterior distribution. These algorithms require careful evaluation of the quality of the generated samples. Within the field of phylogenetics, one frequently adopted diagnostic approach is to evaluate the <i>effective sample size</i> and to investigate trace graphs of the sampled parameters. A major limitation of these approaches is that they are developed for continuous parameters and therefore incompatible with a crucial parameter in these inferences: the <i>tree topology</i>. Several recent advancements have aimed at extending these diagnostics to topological space. In this reflection paper, we present two case studies-one on Ebola virus and one on HIV-illustrating how these topological diagnostics can contain information not found in standard diagnostics, and how decisions regarding which of these diagnostics to compute can impact inferences regarding MCMC convergence and mixing. Our results show the importance of running multiple replicate analyses and of carefully assessing topological convergence using the output of these replicate analyses. To this end, we illustrate different ways of assessing and visualizing the topological convergence of these replicates. Given the major importance of detecting convergence and mixing issues in Bayesian phylogenetic analyses, the lack of a unified approach to this problem warrants further action, especially now that additional tools are becoming available to researchers.
BibTeX
@inproceedings{brusselmans2024importance,
  author = {Marius Brusselmans and Luiz Max Carvalho and Samuel L. Hong and Jiansi Gao and Frederick A. Matsen and Andrew Rambaut and Philippe Lemey and Marc A. Suchard and Gytis Dudas and Guy Baele},
  title = {{On the importance of assessing topological convergence in Bayesian phylogenetic inference}},
  booktitle = {Virus},
  year = {2024},
  doi = {10.1093/ve/veae081},
}
Figure