Machine Learning-Assisted Phylogenetic Analysis

Research
Introduced by
Multiple contributors; early applications by Kolaczkowski & Thornton (2004) for model selection; deep learning formulations by Suvorov et al. (2020) and Zou et al. (2020)
Year
2000s–2020s (active development phase 2018–present)
Type
Computational inference pipeline
Family
Bioinformatics / omics

What does it do?

Machine learning-assisted phylogenetic analysis adds trained statistical models to the evolutionary tree inference workflow, with the aim of reducing computation or improving scalability relative to standard maximum-likelihood and Bayesian searches.

Typical uses include substitution model selection, predicting tree topologies from alignments, placing new sequences onto existing reference trees, and detecting recombination. In many workflows the learned component supplements rather than replaces classical likelihood or Bayesian steps. Reported gains in speed and accuracy depend on the training data and on how closely the target dataset resembles it.

The intuition behind the method

Classical phylogenetic inference searches a very large space of possible trees, and the cost of that search rises steeply as the number of taxa grows. A machine learning model is trained on alignments whose true trees or parameters are known, so that when a new alignment is presented it can produce a candidate tree or model without repeating the full search each time. The analogy is a navigator who has learned from many road maps and can suggest a route quickly, which should then be checked against the map. The same idea applies to narrower tasks, such as a classifier that labels alignment windows as recombinant or not, where the decision rule is learned from training data rather than fixed in advance as a test statistic.

History

Automated likelihood-based model selection predates machine learning and is now available in several established phylogenetic programs. Deep learning for tree topology inference from multiple sequence alignments was reported by Suvorov, Hochuli and Schrider (2020). A review of machine learning methods in phylogenetics, covering applications and perspectives, was published by Nesterenko et al. (2024).

When to use it

Choose ML-assisted methods when a standard likelihood or Bayesian search is too slow for the number of taxa or loci, when many partitions require model selection, or when new sequences must be placed quickly onto a reference tree, as in pathogen surveillance. They also suit narrow classification tasks, such as recombination detection, where a trained classifier can take the place of a fixed test statistic. Avoid using an ML tree predictor as the sole basis for inference when the training simulations may not reflect the evolutionary processes in your organisms; calibration against biologically realistic data is needed. No fixed number of taxa or loci separates small from large datasets. The decision depends on whether an exhaustive likelihood or Bayesian search remains feasible for your data; where it does, classical methods are simpler and their statistical behaviour is better characterised.

Limitations and considerations

  • Model generalisation depends heavily on the realism of training simulations; a classifier trained under one evolutionary model may perform poorly on organisms with different rate heterogeneity or compositional biases.
  • Uncertainty quantification is less mature than in Bayesian phylogenetics — many deep learning tree predictors do not natively produce posterior distributions over trees.
  • Requires substantial labelled training data (simulated trees with known parameters) and computational resources for training, which can be prohibitive for novel research groups.
  • Interpretability is limited: it is difficult to inspect why a neural network assigned a particular topology, making biological validation more challenging than with likelihood ratio tests.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Applying a trained model avoids repeating an exhaustive tree search for each new alignment, which can reduce computation time for large inference problems.
  • Learned classifiers for substitution model selection may be applied quickly across many partitions, offering a possible alternative to exhaustive likelihood-based model comparison; performance depends on the training data and should be checked against likelihood-based selection.
  • Placement of query sequences onto a fixed reference tree is fast enough for routine genomic surveillance, a setting where speed matters more than full re-estimation of the tree.
  • The ML component can replace a single step of a pipeline while the rest of a classical statistical framework remains in place.

Applications

  • Surveillance of viral genomes, in which new sequences are placed onto reference trees using placement software such as EPA-ng.
  • Substitution model selection for partitioned datasets, where learned classifiers can be compared with likelihood-based tests such as ModelTest-NG or IQ-TREE's built-in model selection.
  • Recombination detection using supervised classifiers trained on alignment window statistics.
  • Exploratory work on host association, in which classifiers are trained on reference virus phylogenies paired with host metadata.
  • Species delimitation in large datasets, where classical species tree methods may be computationally demanding.
  • Taxonomic placement of metagenome-assembled genomes onto curated reference phylogenies.

How it works

How it works

1

Sequences (DNA, RNA or protein) are aligned with a multiple sequence alignment program such as MAFFT or MUSCLE, and poorly aligned or uninformative columns may be trimmed. For phylogenomic analyses, gene alignments can be concatenated into a supermatrix or kept as a collection of gene trees. Alignment quality is a major determinant of downstream accuracy, because a learning model cannot recover signal that the alignment has obscured.

2

Numerical inputs are computed from the alignment. Typical features are site-pattern frequencies, pairwise distance matrices, and per-column summaries such as alignment entropy. Deep learning approaches may instead take one-hot encoded sequence arrays directly. The chosen representation determines which model architectures are practical.

3

A model is trained on simulated or empirical alignments whose true trees or evolutionary parameters are known. Deep learning architectures have been applied to topology inference from alignments, and supervised classifiers can be trained for substitution model selection. The training target is the known label of each training alignment, such as its generating topology, its best-fit model, or the class of an alignment window (for example recombinant or not). The simulation settings, including rate heterogeneity, compositional bias, indel model, taxon number and branch lengths, define the range over which the trained model can be expected to perform. A model fitted to a narrow range of these settings can fail on data outside it.

4

The trained model is applied to a target alignment to output a candidate topology, branch lengths, or a model choice. In hybrid workflows the output serves as a starting tree or constraint for maximum-likelihood or Bayesian refinement, so the classical statistical framework still determines the final estimate. Placement of query sequences onto a fixed reference tree is usually carried out with dedicated software such as EPA-ng.

5

Predicted trees are compared with reference trees using topology distances such as the Robinson-Foulds distance or quartet-based scores, and with bootstrap or posterior support where available. When ground-truth trees come from simulation, classification accuracy and topology error can be computed directly. Validation should use held-out simulations and, for claims about empirical data, benchmarks that are independent of the training simulations. For empirical data, concordance factors such as site concordance factors help identify weakly supported splits regardless of how the tree was inferred. Support values have no universal cut-off that establishes a split; their meaning depends on the dataset and should be judged alongside the other measures listed here.

Common pitfalls

  • Training-distribution mismatch: if simulated alignments do not reflect the rate variation, among-site heterogeneity, or indel patterns in real data, the model can be systematically biased. Validate on empirical benchmarks that are independent of the training simulations.
  • Alignment noise: ML models respond to poorly aligned regions much as classical methods do, so alignment errors propagate into their predictions.
  • Unsupported topology: treating an ML-predicted tree as final, without bootstrap or concordance values, can lead to over-interpreted evolutionary relationships.
  • Mixing task maturity: learned model selection assistance is in use within established tools, whereas full topology inference by deep learning is less mature and carries weaker statistical guarantees.

Frequently asked questions

Does ML-assisted analysis replace maximum likelihood or Bayesian phylogenetics?

Not in most research settings. ML approaches are most useful for specific sub-problems such as model selection, sequence placement, and screening large topology spaces. For publishable inference of evolutionary relationships, maximum-likelihood or Bayesian methods with branch support and model adequacy checks remain the standard, and the two approaches are most useful in combination.

Which tools implement machine learning in phylogenetic workflows?

ModelTest-NG and IQ-TREE provide model selection, and EPA-ng performs placement of query sequences onto reference trees. Deep learning topology predictors are generally research software, so check their availability, maintenance status and documentation before relying on them.

How much training data is needed to build a reliable phylogenetic ML model?

Topology predictors are typically trained on large sets of simulated alignments spanning a range of taxon numbers, branch lengths, and substitution model parameters. Classifiers for model selection are trained on reference alignments whose best-fit models are known. Always benchmark on real data from organisms related to your target before deploying a model.

Is ML-assisted phylogenetics appropriate for non-bioinformaticians?

For model selection, for example when running ModelTest-NG or IQ-TREE with automatic model testing, yes: these tools can be run with default settings. Building custom deep learning tree inference pipelines requires familiarity with Python, TensorFlow or PyTorch, and phylogenetic simulation software such as AliSim within IQ-TREE.

How do I assess whether the ML model's tree is trustworthy?

Compute branch support, such as ultrafast bootstrap (UFBoot) in IQ-TREE, and site concordance factors (sCF), which summarise how many informative sites support each branch. Compare the topology with independent gene trees. If the ML prediction is used as a starting tree for likelihood optimisation, compare the final log-likelihood with that of a tree built without the ML seed. Support values have no universal cut-off, so interpret them in light of the dataset and the other checks.

Related methods

Sources

  1. Nesterenko, L., et al. (2024). Machine learning methods in phylogenetics: A review of applications and perspectives. Briefings in Bioinformatics, 25(1), bbad441.

    Open publication reference
  2. Suvorov, A., Hochuli, J., & Schrider, D. R. (2020). Accurate inference of tree topologies from multiple sequence alignments using deep learning. Systematic Biology, 69(2), 221–233.

    Open publication reference