arXiv:2107.01246MedicineJul 2021

Manuscript Offprint

arXiv:2107.01246

Principled, practical, flexible, fast: a new approach to phylogenetic factor analysis

G. Hassler, Brigida Gallone, Leandro Aristide, William L. Allen, Max R. Tolkoff, A. Holbrook, G. Baele, P. Lemey, M. Suchard

Version dated: August 24, 2026

Principled, practical, flexible, fast:

a new approach to phylogenetic factor analysis

Gabriel W. Hassler1, Brigida Gallone2, Leandro Aristide3, William L. Allen4, Max R. Tolkoff5, Andrew J. Holbrook5, Guy Baele6, Philippe Lemey6 and Marc A. Suchard1,5,7

1Department of Computational Medicine, David Geffen School of Medicine at UCLA, University of California, Los Angeles, United States 2VIB–KU Leuven Center for Microbiology, Leuven, Belgium 3Ecole Normale Superieure Paris Sciences et Lettres Research University, Institut de Biologie de l’Ecole Normale Superieure, Paris, France 4Department of Biosciences, Swansea University, Swansea, United Kingdom 5Department of Biostatistics, Jonathan and Karin Fielding School of Public Health, University of California, Los Angeles, United States 6Department of Microbiology and Immunology, Rega Institute, KU Leuven, Leuven, Belgium 7Department of Human Genetics, David Geffen School of Medicine at UCLA, Universtiy of California, Los Angeles, United States

Abstract

Biological phenotypes are products of complex evolutionary processes in which selective forces influence multiple biological trait measurements in unknown ways. Phylogenetic factor analysis disentangles these relationships across the evolutionary history of a group of organisms. Scientists seeking to employ this modeling framework confront numerous modeling and implementation decisions, the details of which pose computational and replicability challenges. General and impactful community employment requires a data scientific analysis plan that balances flexibility, speed and ease of use, while minimizing model and algorithm tuning. Even in the presence of non-trivial phylogenetic model constraints, we show that one may analytically address latent factor uncertainty in a way that (a) aids model flexibility, (b) accelerates computation (by as much as 500-fold) and (c) decreases required tuning. We further present practical guidance on inference and modeling decisions as well as diagnosing and solving common problems in these analyses. We codify this analysis plan in an automated pipeline that distills the potentially overwhelming array of modeling decisions into a small handful of (typically binary) choices. We demonstrate the utility of these methods and analysis plan in four real-world problems of varying scales.

Keywords: Bayesian, BEAST, latent factor model, Stiefel manifold, Geodesic Hamiltonian Monte Carlo

1 Introduction

Biological phenotypes are the result of numerous evolutionary forces acting in complex and often conflicting ways throughout an organism’s evolutionary history. Phylogenetic comparative methods seek to untangle this web of selective pressures and elucidate the forces that have shaped organisms over time. As implied by their name, these methods compare phenotypes across numerous biological taxa connected by a phylogenetic tree that captures their shared evolutionary history. Accounting for shared evolutionary history via the phylogeny is necessary to avoid biased inference, as this shared history implies phenotypes are non-independent across taxa. Statistical models that inappropriately ignore this dependence can identify spurious associations between phenotypes (Felsenstein, 1985). However, accounting for these relationships between taxa poses challenges to statistical inference.

Starting with Felsenstein (1985), there has been much work developing computationally efficient phylogenetic comparative methods (Rohlf, 2001; Revell and Harmon, 2008; Pybus et al., 2012; Ho and Ané, 2014, see). While methods development has typically focused on scaling inference to large trees, these methods struggle to accommodate data with a large number of traits or high-dimensional phenotypes. Most approaches scale quadratically or cubically with the number of traits, making inference intractable as the number of traits increases. Additionally, methods that estimate the evolutionary correlation structure between traits are difficult to interpret for data sets with high-dimensional phenotypes, as the number of pairwise correlations requiring interpretation scales quadratically with the number of traits.

Linear dimension reduction is a common strategy to ease the computational and interpretative burden of high-dimensional data. Phylogenetic principle components analysis (Revell, 2009, pPCA, ) is one solution that constructs a low-dimensional, phylogenetically-informed summary of the relationships between traits. This method, however, is not likelihood-based, making uncertainty difficult to assess and integration into larger, likelihood-based models challenging. More recently, several distance-based methods have been developed by Adams (2014a); Adams (2014b); Adams (2014c). While these methods efficiently scale to high-dimensional data sets, each is specific to a particular problem (i.e. phylogenetic signal, phylogenetic regression and evolutionary rates, respectively) and not easily generalizable. Additionally, neither the work of Revell (2009) nor Adams (2014a); Adams (2014b); Adams (2014c) readily accommodate missing data, a common scourge in many relevant data sets. Phylogenetic factor analysis (Tolkoff et al., 2017, PFA,) adapts the latent factor model of Aguilar and West (2000) to the phylogenetic context. Like pPCA, PFA is a linear dimension reduction approach that assumes the PP-dimensional data arise from KK latent factors that evolve independently along a phylogenetic tree. While PFA accommodates missing data and provides a more generalizable likelihood-based alternative to pPCA, the Bayesian inference regime proposed by Tolkoff et al. (2017) scales quadratically with the number of taxa and is intractable for large trees.

Finally, Clavel et al. (2019) propose a penalized-regression framework for studying high-dimensional phenotypes. However, this procedure is designed for data sets with few taxa and does not scale well to large trees.

Table 1: Example of how the ordering of three hypothetical traits (A, B and C) influences results in a simple two-factor model under the assumptions made by Tolkoff et al. (2017).

trait order 1: A, B, Ctrait order 2: B, A, C
first factorcaptures rank-one relationships of trait A with traits B and Ccaptures rank-one relationships of trait B with traits A and C
second factorcaptures relationships between traits B and C independent of Acaptures relationships between traits A and C independent of B

We propose two new PFA inference regimes that each scale linearly with both the number of traits PP and the number of taxa NN. While Tolkoff et al. (2017) rely on data augmentation, our new methods rely on a novel likelihood-calculation algorithm that analytically integrates out the latent factors. We also address two other shortcomings of PFA and latent factor models generally. First, Tolkoff et al. (2017) constrain the factor loadings matrix to be upper triangular, which induces an implicit ordering to the phenotypes. Specifically, the first trait is influenced only by the first factor, the second trait is influenced only by the first two factors, etc. until the KthK^{\text{th}} trait and beyond which are influenced by all KK factors (see Table 1 for an example). As justifying a specific ordering of the phenotypes a priori can be difficult, we extend an alternative constraint proposed by Holbrook et al. (2016) that eliminates such ordering. Second, a common challenge in exploratory factor analysis generally is determining an appropriate number of factors. As such, we implement a cross-validation model selection procedure that identifies the number of factors that confers the best predictive performance.

To facilitate use among researchers seeking to employ these methods, we develop an analysis plan with practical guidance on the most significant modeling and inference decisions. We codify this plan in the Julia package PhylogeneticFactorAnalysis.jl, which uses relatively simple instructions to automatically perform model selection and run more complex analyses in the Bayesian phylogenetic inference software BEAST (Suchard et al., 2018).

References (58)