potentialpaper

Deep Generative Models for Phylogenetic Inference with Complex Evolutionary Processes

Ethan Baron, Alan Nawzad Amin, Andrew Gordon Wilson

SPIGM @ ICML 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. We develop flexible generative models over phylogenetic trees to enable accurate simulation-based inference with complex evolutionary models

Abstract. Phylogenetic inference plays a central role in understanding evolutionary relationships, with applications ranging from tracking pathogen spread to reconstructing the history of life. Conventionally, practitioners obtain posteriors over the phylogenetic tree of species using MCMC methods. However, such likelihood-based methods are only tractable for simple evolutionary models with restrictive assumptions. For more complex and realistic evolutionary models, conventional methods are prohibitively expensive, inaccurate, or even impossible. We instead advocate for a simulation-based inference approach, by using simulated data from an evolutionary model to train a neural network that predicts tree topologies conditioned on sequences. To accurately represent the complex posterior distributions over tree topologies that can arise, we present flexible models that iteratively generate trees using three natural paradigms: top-down, middle-out, and bottom-up. We use a discrete diffusion framework to train these models efficiently on large-scale simulated datasets of phylogenetic trees. For all three generative paradigms, our models fit the data substantially better than the previous state-of-the-art simulation-based method, Phyloformer 2, and obtain more accurate posteriors on real datasets. Finally, our models outperform misspecified conventional methods on data following complex evolutionary processes.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

FromAToBDateVersionSubmitted toPDFEvidence
4 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (spotlight)reviews ↓[1]PDF[1]
7 May 2026GenBio @ ICML 2026submittedGenBio @ ICML 2026Accepted · Spotlight—[1]
7 May 2026GFM @ ICML 2026submittedGFM @ ICML 2026Accepted · Poster—[1]
7 May 2026SPIGM @ ICML 2026submittedSPIGM @ ICML 2026Accepted · Poster—[1]
Their titles, abstracts and, where both have a PDF, the text.Missing a version?

NeurIPS 2026

Accept (spotlight) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:46 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (spotlight)
Read decision
Meta-review

The submission proposes PhyloPFN, a simulation-based approach to posterior inference over phylogenetic tree topologies using iterative bottom-up, middle-out, and top-down generators with paradigm-specific discrete-diffusion processes. The application is important, simulation-based inference is well motivated for expensive or intractable evolutionary likelihoods, and the iterative tree construction is original and potentially impactful. Following the rebuttal, the reviewer scores are 5, 5, and 6: the initially negative reviewer raised the score to accept, and another reviewer raised an accept to strong accept.

The original decision turned on a serious discrepancy in the Phyloformer 2 baseline. The highest-confidence reviewer reproduced a submitted Jukes-Cantor setting and obtained a dramatically stronger baseline than the paper reported. The rebuttal provides a technically substantive explanation: the released Phyloformer 2 pipeline is not invariant to sequence-label permutations, while the simulator emits sequences in a traversal order correlated with the tree. The authors reproduce the released checkpoint's published performance without shuffling, then show that permuting sequence labels raises normalized RF from 0.046 to 0.238. Their submitted comparisons train and evaluate with shuffled labels and therefore do not exploit this leakage. In a matched LG-GC experiment, a corrected Phyloformer 2 obtains normalized RF 0.087, while the three PhyloPFN variants obtain 0.069-0.083. The reviewer who raised the discrepancy commended the authors for identifying its cause and changed the rating from reject to accept.

One residual comparison issue remains: the rebuttal experiment uses fewer distinct training examples than the original Phyloformer 2 study, so part of the remaining gap may reflect a low-data or fixed-compute regime. This should be reported transparently. It no longer, however, supports the conclusion that the submitted baseline was simply mis-trained; the label-order leakage and corrected matched comparison materially resolve the decisive concern.

The authors also provide the requested ablations. Starting from Phyloformer 2, the reported upper-bound metric improves from 35 to 33 with architectural changes, to 10 with the diffusion objective, and to 1 after conditioning logits on the current tree, indicating that both the objective and iterative state conditioning matter. New calibration experiments on eight real and eight matched synthetic datasets compare posterior split probabilities against MrBayes. Bottom-up PhyloPFN substantially improves over Phyloformer 2, while the real-versus-synthetic gap explicitly exposes simulator misspecification rather than hiding it. The authors further clarify the NELBO convention, normalize RF, explain variable-size outputs and the internal-node update, and commit to moving essential material into the main text.

The rebuttal changes the balance of evidence. The central baseline objection is resolved by a reproducible mechanism, the requested ablations and calibration diagnostics are supplied, and all reviewers now support acceptance. The method remains slower than one-pass Phyloformer 2 and is limited to topology, moderate tree sizes, and simulator coverage, but these limitations are compatible with acceptance. I recommend acceptance as a spotlight.

Final justification

The justification is in the metareview.

Area Chair rZdo · Meta-reviewOpenReview ↗
Final justification
The justification is in the metareview.
Read meta-review
Meta-review

The submission proposes PhyloPFN, a simulation-based approach to posterior inference over phylogenetic tree topologies using iterative bottom-up, middle-out, and top-down generators with paradigm-specific discrete-diffusion processes. The application is important, simulation-based inference is well motivated for expensive or intractable evolutionary likelihoods, and the iterative tree construction is original and potentially impactful. Following the rebuttal, the reviewer scores are 5, 5, and 6: the initially negative reviewer raised the score to accept, and another reviewer raised an accept to strong accept.

The original decision turned on a serious discrepancy in the Phyloformer 2 baseline. The highest-confidence reviewer reproduced a submitted Jukes-Cantor setting and obtained a dramatically stronger baseline than the paper reported. The rebuttal provides a technically substantive explanation: the released Phyloformer 2 pipeline is not invariant to sequence-label permutations, while the simulator emits sequences in a traversal order correlated with the tree. The authors reproduce the released checkpoint's published performance without shuffling, then show that permuting sequence labels raises normalized RF from 0.046 to 0.238. Their submitted comparisons train and evaluate with shuffled labels and therefore do not exploit this leakage. In a matched LG-GC experiment, a corrected Phyloformer 2 obtains normalized RF 0.087, while the three PhyloPFN variants obtain 0.069-0.083. The reviewer who raised the discrepancy commended the authors for identifying its cause and changed the rating from reject to accept.

One residual comparison issue remains: the rebuttal experiment uses fewer distinct training examples than the original Phyloformer 2 study, so part of the remaining gap may reflect a low-data or fixed-compute regime. This should be reported transparently. It no longer, however, supports the conclusion that the submitted baseline was simply mis-trained; the label-order leakage and corrected matched comparison materially resolve the decisive concern.

The authors also provide the requested ablations. Starting from Phyloformer 2, the reported upper-bound metric improves from 35 to 33 with architectural changes, to 10 with the diffusion objective, and to 1 after conditioning logits on the current tree, indicating that both the objective and iterative state conditioning matter. New calibration experiments on eight real and eight matched synthetic datasets compare posterior split probabilities against MrBayes. Bottom-up PhyloPFN substantially improves over Phyloformer 2, while the real-versus-synthetic gap explicitly exposes simulator misspecification rather than hiding it. The authors further clarify the NELBO convention, normalize RF, explain variable-size outputs and the internal-node update, and commit to moving essential material into the main text.

The rebuttal changes the balance of evidence. The central baseline objection is resolved by a reproducible mechanism, the requested ablations and calibration diagnostics are supplied, and all reviewers now support acceptance. The method remains slower than one-pass Phyloformer 2 and is limited to topology, moderate tree sizes, and simulator coverage, but these limitations are compatible with acceptance. I recommend acceptance as a spotlight.

1 comment
Authors · CommentOpenReview ↗

Thank you very much for your work on our paper! Our work introduces three flexible generative models for phylogenetic inference and shows these models can be trained efficiently with a novel discrete diffusion objective. We show state-of-the-art results, producing accurate and well-calibrated posteriors for tractable evolutionary models. After rebuttals, all three reviewers unanimously recommend acceptance, Reviewer bJGo raised their score to an Accept, and Reviewer eGVP has raised their score to a Strong Accept.

Resolved concerns about Phyloformer 2 evaluations

During the rebuttal, we uncovered that the reason for this discrepancy was a leakage bug in the training and evaluation pipeline of [1], artificially improving the Phyloformer 2 scores in [1] and in reviewer bJGo’s comment. Our evaluation of the Phyloformer 2 baseline in the submission does not suffer from this leakage and therefore is a fair comparison. We also compared our models on the original paper setting after correcting for leakage (LG+GC) and still saw an improvement over Phyloformer 2. Reviewer bJGo has commended us for resolving this discrepancy and now recommends acceptance.

New ablations on our diffusion objective and iterative embedding updates, justifying compute trade-off

In our response to Reviewer bJGo, we provide new results ablating the impact of our architecture modifications and diffusion objective, showing both contributions are crucial. This also shows the more compute-expensive architecture results in much higher quality trees.

New experiments on posterior calibration and simulator misspecification

In our response to Reviewer eGVP, we provide new results showing strong calibration scores for our posterior split probabilities on eight classical real-world phylogenetics datasets. Our result also shows the likely maximum effect of simulator misspecification: there is a noticeable drop in quality but our model still makes strong predictions, especially compared with PF2.

Further clarifications on details in appendix, ELBO, and normalized RF

We described how we will move details in the appendix to the main text. We also clarified the ELBO convention and presented results in normalized RF.

[1] Blassel et al. “Likelihood-free inference of phylogenetic tree posterior distributions”

Reviewer eGVPOpenReview ↗
Rating
6/6
Confidence
3/5
Quality
4/4
Clarity
4/4
Significance
3/4
Originality
4/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper proposes discrete diffusion models over phylogenetic trees for simulation-based Bayesian inference. Motivated by the ease of simulating sequence/tree pairs under complex evolutionary models, the method learns to sample posterior tree topologies conditioned on observed sequences.

Strengths and weaknesses

Strengths

  • The problem is well motivated, and simulation-based inference makes a lot of sense in this scenario.
  • The proposed denoising diffusion mechanism is novel, and it perfectly captures the inductive biases we would want in a model for phylogenetic trees.
  • Losses and weighting are carefully justified theoretically. The option to incorporate a prior over tree topologies is a nice addition.
  • Experiments are conducted for a variety of different problems and highlight the tradeoffs of each generative paradigm.

Weaknesses

  • Unlike many denoising diffusion models, intermediate noised states here are not always sampled from a simple closed-form marginal: the paper derives paradigm-specific procedures for sampling or constructing noised tree states. This is reasonable because the noising mechanisms are cheap relative to phylogenetic inference, but the implications of this difference should be discussed more explicitly.
  • The ELBO is not by itself a sufficient metric for posterior sample quality, especially when comparing methods with different types of latent variables. The MMD comparison to MrBayes posteriors is more informative for posterior quality, and the RF-distance experiments is also useful. Still, it would be interesting to see more direct posterior calibration diagnostics, e.g. metrics comparing distributions over clades / splits.
  • Figure 3 reports “ELBO” with a downward arrow, indicating that lower is better. This is confusing: an ELBO is normally maximized. Since Eq. 2 defines the ELBO as a negative sum of KL terms, and the appendix later discusses NELBO estimators, I suspect the plotted quantity is a negative ELBO / NELBO. The authors should clarify the sign convention and rename the metric accordingly
Questions

See weaknesses above.

Limitations

The paper discusses some limitations, especially the restriction to topology inference and scaling to larger (N,L). One limitation that is not discussed sufficiently is simulator coverage/misspecification: as with other simulation-based inference methods, the learned posterior is only reliable to the extent that the simulator prior covers the evolutionary processes and parameter regimes encountered at test time. It would be useful for the authors to discuss robustness to poorly covered data.

Final justification

I thank the authors for their response, and for the substantial work put into directly addressing my initial questions. Considering the substantial improvements and clarifications in the revised version, resulting also from the response to reviewer bJGo, I have increased my score from 5 to 6.

Formatting concerns

none

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Thank you for your thoughtful review! We respond to your questions below, including new clade-calibration results inspired by your comments.

Unlike many denoising diffusion models, intermediate noised states here are not always sampled from a simple closed-form marginal: the paper derives paradigm-specific procedures for sampling or constructing noised tree states. This is reasonable because the noising mechanisms are cheap relative to phylogenetic inference, but the implications of this difference should be discussed more explicitly.

We present our procedure to get to the mm-th noised tree TmT_m as mm sequential steps, each taking O(N)O(N) time, in principle taking O(N2)O(N^2) time to generate a noisy tree. It is overwhelmingly more expensive to make a prediction with a reasonable architecture than to generate data this way, so this was sufficient for our model. However, if one were interested in training a model with a fast predictor and massive NN, it is possible, for each paradigm, to write O(N)O(N) one-step sampling algorithms: for middle out for example, one only needs to pick mm species to remove from NN choices. We will add this discussion.

The ELBO is not by itself a sufficient metric for posterior sample quality, especially when comparing methods with different types of latent variables. The MMD comparison to MrBayes posteriors is more informative for posterior quality, and the RF-distance experiments is also useful. Still, it would be interesting to see more direct posterior calibration diagnostics, e.g. metrics comparing distributions over clades / splits.

Inspired by your feedback, we present new calibration results on posterior split probabilities. We took eight classical phylogenetics datasets from Lakner et al. (a superset of the datasets used for the MMD evaluation) and inferred a gold-standard posterior for each under the JC model using MrBayes and compared it with 1000 samples from each model.

For each clade sampled across all 8 datasets, we compare how often it appeared in our samples vs how often it appeared in the MrBayes posterior. We also report the same metrics for 8 synthetic datasets with matched N and L. We report our numbers pooled across the 8 datasets. We report (1) how well our posterior clade probabilities match that of MrBayes (Spearman correlation across clades), (2) how well our posteriors “cover” high probability clades, the average posterior probabilities of clades with >90% posterior probability in MrBayes (Mean prob.@90).

Data Method Spearman Mean prob.@90
Real Bottom up 0.55 0.85
Real Middle out 0.47 0.78
Real Top down 0.39 0.73
Real Phyloformer 2 0.14 0.37
Synthetic Bottom up 0.87 0.98
Synthetic Middle out 0.61 0.93
Synthetic Top down 0.66 0.93
Synthetic Phyloformer 2 0.39 0.75

In the table we see a huge improvement over Phyloformer 2 with bottom-up performing strongest. It also reveals models have room for improvement generalizing to OOD real data.

Figure 3 reports “ELBO” with a downward arrow, indicating that lower is better. I suspect the plotted quantity is a negative ELBO / NELBO. The authors should clarify the sign convention and rename the metric accordingly

Thanks for spotting this! Yes, the numbers are correct NELBOs, the y axis label was missing the “N”.

One limitation that is not discussed sufficiently is simulator coverage/misspecification: as with other simulation-based inference methods, the learned posterior is only reliable to the extent that the simulator prior covers the evolutionary processes and parameter regimes encountered at test time. It would be useful for the authors to discuss robustness to poorly covered data.

Excellent point! We’ve added the synthetic data comparison to the table above to measure this phenomenon and indeed, our methods see a noticeable degradation on the real data, likely since it is not well-covered by the prior. We hypothesize, as in other simulation-based inference (e.g. Understanding and Relaxing the Limitations of Transformers for Linear Algebra by Potapczynski A et al 2026) settings, that more diverse data will narrow the gap considerably; indeed the result above is with a JC prior, the simplest phylogenetic model with potentially the most narrow coverage. We will add this discussion to the limitations section.

Thanks again for your thoughtful review. We value your support, and have put a significant effort into this response, including experimental results inspired by your feedback. We would greatly appreciate if you could consider raising your score in light of our response.

Reviewer eGVP · CommentOpenReview ↗

I thank the authors for their response, and for the substantial work put into directly addressing my initial questions. Considering the substantial improvements and clarifications in the revised version, resulting also from the response to reviewer bJGo, I have increased my score from 5 to 6.

Reviewer bJGoOpenReview ↗
Rating
5/6
Confidence
5/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This submission introduces PhyloPFN, a simulation-based inference method for phylogenetic trees from sequence alignments. PhyloPFN builds on Phyloformer 2, a previously introduced simulation-based inference method for the same task, and introduces discrete diffusion to represent the posterior distribution, as well as additional updates of the node embeddings during the reconstruction (denoising) process. It explores three possible factorizations of the posterior probability: top-down, middle-out and bottom-up. PhyloPFN is compared empirically against Phyloformer 2 and iqtree, a maximum-likelihood estimator.

Strengths and weaknesses

The article is generally well-written, although a lot of important information is in the Appendix and it is difficult to get more than a general idea of the method from the main manuscript. Figure 1 and 2 are very large and somewhat redundant, combining and reducing them could be an option to allow for a bit more details in the main manuscript. Nonetheless, the idea of simulation-based inference for phylogenetics is correctly introduced and motivated, and improving these methods is an important problem as likelihood-based methods are unable to handle realistic models of evolution.

My main concern is on the empirical evaluation against Phyloformer 2 and iqtree: Figure 4 shows that Phyloformer 2 has much larger RF error than iqtree regardless of the model of sequence evolution, sequence length or number of sequences. This is not consistent with the results presented in the Phyloformer 2 paper where it outperforms iqtree even on a tractable model and has an even stronger edge under intractable models. I am not sure what explains this discrepancy, but it suggests that Phyloformer 2 was not correctly trained and makes it difficult to interpret any of the result. For example PhyloPFN uniformly underperforms against iqtree under JC, which suggests that it would also perform less well than Phyloformer 2.

I trained a Phyloformer 2 network on the JC model (tractable model, so best case for iqtree) for N=65 and L=500, using the parameters reported in the submission. The RF reported in the submission is close to 40, and I obtained 5.85 after a single epoch on 500k training examples, with iqtree giving 6.92 on the same test set (similar to the one reported in the submission). If the reason for the discrepancy is the number of training examples (I could not find it in the submission) or training time, it is still an interesting finding that PhyloPFN performs better in this regime but this should be clarified. A related minor point is that the RF should be normalized, otherwise they are not comparable across values of N.

A second concern is on the clarity of the update mechanism introduced in PhyloPFN. This is one of the two main novelties, the other being the diffusion loss function. It seems like an important contribution and should be more clearly discussed and defined in the manuscript. The current definition l.1115 is not entirely clear. In addition, it is not possible in the current experiments to tell which of these novelties drives the performance. This could be addressed by an ablation study. It seems like an important point because the update mechanism is likely what causes the larger computational cost of PhyloPFN (appendix H), on par with iqtree and 2-3 orders of magnitude slower than Phyloformer 2. This is justified if this additional cost is what drives the performances.

Other points:

  • The removal of the pair reprensentation from Phyloformer 2 is justified by its quartic cost. However in in most of the considered N/L regimes, N^4 is less than N*L^2, so I am not sure why this would be a scalability issue. In the end, inference time is much larger for PhyloPFN than Phyloformer 2, so is the point 4 ("Computationally expensive architecture") of the comparison in A.1 really justified ? It would be interesing to have a comparison of the memory usage of all compared methods, and training time for Phyloformer 2 and PhyloPFN (e.g. compare the time for one step, and time for one epoch which would factor out the fact that PhyloPFN may handle larger batches).

  • l.152 "[Phyloformer 2] parameterizes the posterior distribution with only one forward pass through the neural network, producing embeddings for each taxon and then predicting a tree by running a neighbor-joining algorithm on the fixed predicted embeddings.": this is not a neighbor-joining algorithm, but a similar procedure to the bottom-up computation used in PhyloPFN. The main difference is that PhyloPFN updates node embeddings are after each merge (as noted in the first point of A.1).

  • At several points, the article suggests that the parameterization of the network affects the prior distribution, e.g.

l.640 "In Sec. 4.3, we explain how we re-paramaterize our neural network predictions to achieve the desired prior distribution over topologies at random initialization."

I am worried this could be misleading for some readers: the trained network approximates the posterior distribution of phylogenies defined by taking the simulation distribution (of trees) as prior. The fact that random initializations of the network approximate a different distribution is an interesting observation and may ask as an inductive bias for training but it seems important to clearly separate the two aspects and I would suggest to not describe this as a prior.

  • l.173 "performing multiple forward passes allows the model to represent arbitrarily complex distributions by conditioning on the intermediate state of the tree before predicting the next step": this seems like a rather strong claim. Can any distribution really be represented by this specific architecture ? A sketch of proof or at least an intuition would be welcome. Similarly, l.50 "Previous models map sequences to parameters of a parametric distribution over trees, limiting expressivity [11]" suggests that PhyloPFN proceeds differently. Yet, the probability distribution parameterized by PhyloPFN is also a product of logits (l.1117), with a factorization depending on the paradigm (bottom-up, middle-out or top-down). It is probably more expressive than [11] because of the updates on node embeddings, but not less parametric.

  • I find the discussion of the three decomposition paradigms interesting, but it raises the question of which one to choose in practice. None of the paradigms clearly dominates the others, but it seems like bottom-up is never much worse than the best one, could this be a guideline ? On a related point l. 290: "The superior performance of bottom-up on the simple data may reflect the bottom-up nature of the likelihood on this data [26]. On the intractable data, top-down may perform the best because it can use InDel patterns to accurately define the deepest splits first. Finally, middle-out may perform the best on the complex data since it conditions on a fully resolved partial tree at each step, allowing it to best implicitly infer the hyperparameters of the evolutionary process.": I don't understand these explanations. In particular, I don't understand what is meant by "bottom-up nature of the likelihood" under Jukes-Cantor, and I don't see why indel patterns would be more informative for deeper splits than for more recent ones.

  • Figure 3 compares ELBO for Phyloformer 2 and PhyloPFN. Since the ELBO was the objective maximized by PhyloPFN, isn't it expected that it would be larger for PhyloPFN ? One possibility would be to show the objectives of both methods ?

  • "6.1 Our models learn faster than previous state-of-the-art for simulation-based inference" this claim is not supported and not really related to the content of the section, is it a mistake ?

Questions
  • The most critical point to address from my point of view would be the discrepancy between Phyloformer 2's performance as reported in the paper (much worse than iqtree in most cases) and the one reported in the original paper (better than iqtree, which is also what I obtained by training a Phyloformer 2 under JC). One option is to find an explanation for this discrepancy (e.g. this could be an issue with the number of training examples), and possibly adapt the manuscript in consequence. You could also run PhyloPFN on the same experiment done in the Phyloformer 2 paper, at least under the LG model (their Figure 2) since your architecture already works on aminoacids. This way you would not have to worry about training Phyloformer 2 or running iqtree, just PhyloPFN.

  • I would also suggest adapting the manuscript to give more detail in the main text (maybe compacting Figures 1/2). In particular, it would be useful for the reader to know more on the update procedure currently described l.1115. Currently, the main manuscript does say that "multiple forward passes" are important, but doesn't explain what it means.

  • If possible, please provide experiments showing the separate effect of using a diffusion loss and of updating node embeddings, both on reconstruction accuracy and computational cost.

  • Please clarify the "Other points" raised in Strength/Weaknesses. Or let me know in the rebuttal if I misunderstood something for some of these points.

Limitations

Yes.

Final justification

The authors have adequately answered the concerns I raised in my initial review. In the light of their rebuttal, I find their contribution significant. I am confident that they will manage to address the clarity issues in the revised manuscript.

Formatting concerns

No concern.

7 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Thank you very much for your thoughtful review and deeply engaging with our work! We really appreciate it. We present new experiments confirming we used the intended implementation of Phyloformer 2 and decomposing the effect of the diffusion objective with the conditioning on the current state. We respond to your questions below. Please let us know if you would like us to clarify anything else about our implementation of PF2.

Phyloformer 2 (PF2) was evaluated correctly

In the PF2 paper, PF2 beat classical models like IQTree but in our setting it does worse. We show the discrepancy is because there was test leakage in PF2. We reproduce the numbers from their paper and show a fixed PF2. This could explain your results on JC. We will notify the authors of PF2 of our result.

We are running the correct model: we reproduce PF2 results

From the checkpoint pf2.tch in the latest code release, we evaluated normalized RF on 100 greedy-sampled trees from the paper_test_sets.tar.xz test data with N=50, L=500 from the Phyloformer 1 Zenodo page. We got 0.046 near their reported 0.048 and IQTree LG+G8 got 0.064 near their reported 0.07.

New experiment showing test leakage in PF2

The EvoPF architecture is not invariant to the permutation of sequence labels. This is because flatten(ai⊗aj)≠flatten(aj⊗ai)\mathrm{flatten}(a_i\otimes a_j)\neq \mathrm{flatten}(a_j\otimes a_i) in the outer product mean layer. And AliSim outputs rows in a traversal order which contains information about the tree topology.

In our training we always permuted sequence labels like real data. PF2 does not, leaking information about the tree. With the same data and model as above, when we simply permute the sequence labels, PF2 normalized RF jumps from 0.046 to 0.238.

Our results use a fixed PF2

Our implementation is identical to the command python train_fabric.py train --evopf --embed-dim 128 --pair-dim 256 --n-blocks 12 --n-heads 4 --symmetric --unambiguous-order --batch-size 16 --base-batch-size 16 --epochs 30 --warmup 1000 --learning-rate 1e-4 --weight-decay 0 in their codebase. There is less than a 1% difference in the loss after 10 h of training.

We train our models and PF2 on N=50, L=500 on LG-GC (no indel) data produced using code from PF1, but shuffled sequence order. We trained all models for the same wall time: 28 h on 2 A100 GPUs and evaluated on 100 8-consensus trees.

Method normalized RF
IQTree 0.064
Bottom up 0.071
Middle out 0.069
Top down 0.083
Phyloformer 2 (our implementation) 0.087
Phyloformer 2 (released checkpoint) 0.238

After fixing training, PF2 performs much better on their data but does not outperform IQ-Tree LG+G8 which is nearly correctly specified.

Exact run details including data size

In our experiments, we ran our models and Phyloformer 2 for the same wall time on 2 A100 GPUs: 48 h. Our models saw roughly 500 k examples and Phyloformer 2 saw roughly 1.1 million.

More detail on the loss function and “update procedure” in the main text

In our response to LXTD we make clear how we’ll promote an intuitive explanation of the loss and architecture to the main text. We’ll make space by shrinking the figures. We will also add relative RFs to the paper. Thank you for your suggestion!

The separate effect of using a diffusion loss and of updating node embeddings

We ran new ablations on the Phyloformer 2 architecture as in our JC experiment in Fig. 3 (wall-time budget matched to 48 h on 2 A100s) showing:

  • Phyloformer 2 has average upper bound on the KL of 35
  • After adding our architectural modifications and a learning rate sweep, we get 33
  • After adding the diffusion objective, we get 10
  • After conditioning the logits on the current tree (our bottom-up framework), we get 1

Therefore, both the diffusion objective and the flexibility from conditioning the logits on the current state of the tree make a major difference, justifying the inference cost of bottom-up.

We chose to evaluate using KL as it’s an absolute metric – relative metrics like ELBO and RF artificially make the difference between the last two models look smaller next to the gaps of the other models. We calculated the KL by estimating the entropy of the tree posterior from MrBayes runs on 100 data points.

Other points

Justification for removal of pair representation from Phyloformer 2. Comparison of memory usage.

In our experiments, pair attention was a compute bottleneck in practice. We chalked this up to poor scaling, but you’re right that L2L^2 is often much larger than N3N^3. We realized the difference was our row attention layers use flash attention in our implementation while the pair attention, due to its bias, could not. We will add this implementation-contingent explanation to the paper rather than the scaling explanation.

For runs on N=65, L=500 data, the median memory usage for our methods is 3.3-5.5 GiB across our 3 models, compared to 7.4 GiB for Phyloformer 2.

Phyloformer 2 does not use a neighbor-joining algorithm

We will clarify that the authors of Phyloformer 2 termed their “neighbour-joining inspired” procedure “BayesNJ”.

“Prior distribution at random initialization”

We will clarify that the tree prior is chosen before and independent of the neural network architecture. Indeed the question is whether our neural network is initialized at the chosen prior.

Expressivity of the parameterization of the posterior distribution

We will add the following to our paper.

New proof of lack of expressivity of PF2: BayesNJ is the distribution family used by PF2. For 6 species A, B, C, D, E, F, say we have a BayesNJ distribution pp where p(T)<ϵp(T)<\epsilon for any tree where A, B, C are not separated from D, E, F. Then ∣p(((A,B),C)((D,E),F))p(((A,C),B)((D,F),E))−p(((A,C),B)((D,E),F))p(((A,B),C)((D,F),E))∣<Kϵ|p(((A, B), C)((D, E), F))p(((A, C), B)((D, F), E))-p(((A, C), B)((D, E), F))p(((A, B), C)((D, F), E))|<K\epsilon for an absolute K>0K>0. Therefore BayesNJ cannot approach a distribution which puts mass on just trees ((A,B),C)((D,E),F)((A, B), C)((D, E), F) and ((A,C),B)((D,F),E)((A, C), B)((D, F), E) as the first term ↛0\not\to 0 and the second →0\to 0 in the bound.

Idea: the dependency between the clades cannot be represented by BayesNJ since representations in one clade are not affected by merges in another. A more expressive merge function or representation-to-logit map cannot fix this. Dependencies can occur in realistic data when the hyperparameters in one clade influence those in another.

Proof: Assume p=BayesNJ(v⃗A,v⃗B,…,v⃗F,f)p=BayesNJ(\vec v_A, \vec v_B, \dots, \vec v_F, f) has p(T)<ϵp(T)<\epsilon for any tree where A, B, C are not separated from D, E, F, where ff is the function (an MLP in PF2) that takes pairs of vectors to logits. A bit of algebra (we leave out the full calculation here for space) shows

p(((A,B),C)((D,E),F))=exp⁡(f(v⃗A,v⃗B)+f(v⃗D,v⃗E))(∑i<j∈{A,B,C}exp⁡(f(v⃗i,v⃗j)))(∑i<j∈{D,E,F}exp⁡(f(v⃗i,v⃗j)))+O(ϵ),p(((A, B), C)((D, E), F)) = \frac{\exp(f(\vec v_A, \vec v_B) + f(\vec v_D, \vec v_E))}{(\sum_{i<j\in\{A, B, C\}}\exp(f(\vec v_i, \vec v_j)) )(\sum_{i< j\in\{D, E, F\}}\exp(f(\vec v_i, \vec v_j)))}+O(\epsilon),

with similar equalities for ((A, C), B)((D, F), E), ((A, C), B)((D, E), F), and ((A, B), C)((D, F), E). The bound follows. QED.

Proof of expressivity of our models: As our ELBO is optimized, qθ(Tm−1∣Tm,X1:N)→Ep(T0∣Tm,X1:N)p(Tm−1∣Tm,T0)=p(Tm−1∣Tm,X1:N)q_{\theta}(T_{m-1}\mid T_m, X_{1:N})\to\mathbb E_{p(T_0\mid T_m, X_{1:N})}p(T_{m-1}\mid T_{m}, T_0)=p(T_{m-1}\mid T_{m}, X_{1:N}) in average KL. Therefore, optimizing the ELBO sends qθ(T0:M∣X1:N)→p(T0:M∣X1:N)q_{\theta}(T_{0:M}\mid X_{1:N})\to p(T_{0:M}\mid X_{1:N}) in KL.

Difference to PF2: A finite size network likely cannot optimize the ELBO. However, as we increase the network size, data, and compute, we approach the ELBO optimizer and therefore the true posterior pp. On the other hand, there are distributions that a PF2 model cannot approach, regardless of the capacity or fit of the neural network or the embedding dimension.

An analogy is the difference between a text XX to image YY model which outputs Y∼N(μθ(X),Σθ(X))Y\sim N(\mu_\theta(X), \Sigma_\theta(X)) and a diffusion model which outputs a distribution pθ(Y∣X)p_\theta(Y\mid X) which can take a much wider array of forms.

Choice among three generative paradigms and explanation of inductive biases

Indeed bottom-up seems the least likely to fit poorly but broader application could give better guidance.

Regarding inductive biases, likelihoods under JC are calculated using Felsenstein’s pruning algorithm which propagates information from leaves upwards through their parents, a calculation that the bottom-up paradigm could perform most easily. And the presence of an irreversible change such as an indel can be used to designate a clade-split; top-down is the only model that can designate a split clade during generation (e.g. Rare genomic changes as a tool for phylogenetics by Rokas and Holland 2000).

Figure 3 compares ELBO for Phyloformer 2 and PhyloPFN. Since the ELBO was the objective maximized by PhyloPFN, isn't it expected that it would be larger for PhyloPFN?

The values in Figure 3 are correct negative ELBOs (NELBOs), not ELBOs: the y axis label was mistakenly missing the “N”. Therefore, Figure 3 shows that the ELBO is larger for our methods than for PF2. Thanks for pointing this out!

To be clear, the PF2 objective (multiplied by NN) is also an ELBO since $log⁡qθ(T0∣X1:N)≥log⁡qθ(correct merges∣X1:N)\log q_\theta(T_0\mid X_{1:N})\geq \log q_\theta(\text{correct merges}\mid X_{1:N})$, that is, there are many possible merge orders that result in the same T0T_0. Figure 3 therefore shows the upper bound on the negative log likelihood both models are trying to minimize.

Claim that "Our models learn faster than previous state-of-the-art for simulation-based inference"

We framed our results as such since we controlled our experiments for wall time. We will rephrase it more concretely as “for a fixed amount of compute they reach a superior fit to the data”.

Thank you again for your detailed review. We have put a significant effort into this response, including several experiments and clarifications. We would appreciate it if you could consider raising your score in light of our response!

Reviewer bJGo · CommentOpenReview ↗

I thank the authors for their very thorough rebuttal and commend them for managing to pinpoint the cause of this discrepancy.

Regarding the training data size: the rebuttal provides the number of examples seen during training (across epochs), but my original question was really about the distinct sample size. The Phyloformer 2 paper used 1.3M distinct LG-G8 training examples, whereas the rebuttal experiments used 171k LG-GC examples for all networks. The number of distinct examples used throughout the PhyloPFN submission remains unclear.

This distinction seems important because Phyloformer 2's architecture and training schedule appear optimized for large-scale training (>1M samples) and may not be ideally suited to settings with ~10x fewer examples, potentially explaining the residual performance gap between PhyloPFN and Phyloformer 2 trained on shuffled sequences. If this gap was indeed explained by the choice of using fewer examples, this would still represent a valuable advance for low-data regimes, but should be explicitly framed as such.

I am now commenting on some of the other points only for the purpose of improving clarity as I don't think they are critical:

  • Ablation: thanks for doing the effort of running this ! Can you clarify which KL you are using ? You write "upper bound on the KL" in the first bullet point, and "entropy of the tree posterior from MrBayes runs on 100 data points" at the end. Are you computing the KL divergence between the 100 Mr Bayes samples and samples from the trained network ? If so, why mention an upper bound ?

  • Memory usage: I don't understand why not use flash attention for pair attention. There is a bias in column-wise attention, but I don't understand which bias you are referring to for pair attention and how it prevents you from using flash attention. This doesn't require any change but I think it could save time for readers wanting to build on PhyloPFN if they could better understand these architectural choices.

  • Objective function: my formulation was confusing, I was not referring to the fact that the plot showed NELBOs instead of ELBOs, I meant that Phyloformer 2 and PhyloPFN are not maximizing the same ELBO. If Phyloformer 2 was trained to assign high probability for a particular merge order, isn't it normal that it doesn't do well across merge orders (the PhyloPFN ELBO) compared to PhyloPFN ? This is why I suggested reporting both objective functions (or maybe at least clarify this point in the manuscript).

Authors · CommentOpenReview ↗

Response

Thank you for a prompt response and acknowledging we solved the discrepancy! We respond to your other questions below.

Training data size

The distinct sample size

The number of examples seen during training is the distinct sample size (e.g. 500k for the experiments in the paper). Unlike in PF2, we do not train for multiple epochs; we generate new trees with distinct seeds for every step, so in effect we train for <1 epoch. So our PF2 model saw roughly 1’100’000 distinct examples and our models saw roughly 500’000.

The LG-GC experiments were performed in the same way (<1 epoch) with reproduced code for simulating data. Training for only 28 h, our PF2 model saw roughly 650’000 distinct examples and our models saw roughly 300’000. We’re assuming you got the 171’000 number from the size of the LG set from PF1 of size 200’000, but we did not use this data. Please let us know if this isn’t what you meant.

We will make these numbers clear in our paper and contrast them with the numbers from the PF2 paper.

Potentially explaining the residual performance gap between PhyloPFN and Phyloformer 2

PF2 in our experiments trains on more distinct data than our models. Furthermore, in our KL ablation we add our architectural changes (MuP, Complete P) to Phyloformer 2 and perform a learning rate sweep. There was an improvement from 35 to 33, but not enough to explain the difference between the methods.

Others

Ablation

We bound

EX1:NKL(p(T0∣X1:N)∥qθ(T0∣X1:N))≤NELBO−EX1:NEntropy(p(T0∣X1:N)).\mathbb{E}_{X_{1:N}}KL(p(T_0\mid X_{1:N})\Vert q_\theta(T_0\mid X_{1:N})) \leq \mathrm{NELBO} - \mathbb{E}_{X_{1:N}}\mathrm{Entropy}(p(T_0\mid X_{1:N})).

The second term was estimated by taking 100 samples of X1:NX_{1:N}, estimating p(T0∣X1:N)p(T_0\mid X_{1:N}) using a long run of MrBayes for each sample, and then calculating the entropy of the tree distribution of that MCMC run. The NELBO is an upper bound and the entropy estimate is biased downwards, so we get an upper bound.

Flash attention

You’re right. We removed it early on as it slowed down training and its large memory footprint without making a noticeable difference in our loss. Then we only upgraded the O(NL2)O(NL^2) attention to flash. In principle the pair attention can also use flash attention. We’ll frame the removal of pair attention as a choice that could use some more investigation in the paper. Our code will support adding or removing it so practitioners can test its effects.

Objective function

In Fig. 3, we plot Phyloformer2 evaluated on its own NELBO / objective (exactly what is called the topology loss, or Lτ\mathcal L_\tau in the Phyloformer2 paper), not Phyloformer2 evaluated on the NELBO from our diffusion model.

Reviewer LXTDOpenReview ↗
Rating
5/6
Confidence
2/5
Quality
4/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes a new method to infer phylogenetic trees TT from sequence data (X1,…,XN)(X_1,\dots, X_N). Their method uses simulation-based inference, where synthetic data pairs (X,T)(X, T) are used to train a neural network to predict TT from XX. To predict TT from XX, the authors propose a discrete diffusion model. For noising in the diffusion model, the authors provide three different strategies. In experiments, their methods outperform Phyloformer 2, a previous state-of-the-art simulation based method which does not use diffusion.

Strengths and weaknesses

Strengths

  • phylogenetic tree inference is an important problem, discrete diffusion is well-motivated as an approach
  • experimental results are strong, improving upon previous state-of-the-art method (Phyloformer 2)

Weaknesses

  • not many computational details are given about the diffusion objective, making it difficult to understand exactly how the method works (e.g. how is the KL term between distributions of trees computed?) Also, more detail about qθq_{\theta} in the main text would be helpful - how does the architecture adapt to different tree sizes?
  • it can be difficult to distinguish methods in the figures - perhaps more transparent lines or dotted lines would be helpful
Questions

See above weaknesses.

Further:

  • line 250: I don't believe MrBayes has been explained nor referenced yet?
  • figure 3: should it be negative ELBO?
Limitations

Yes, authors were clear about limitations (no modeling of branch length in phylogenetic trees)

Final justification

The authors resolved my questions about the exposition. This, combined with their discussion with the other reviewers, led me to increase my score from 4 to 5.

Formatting concerns

NA

1 comment
Authors · RebuttalOpenReview ↗
Rebuttal

Thanks for your thoughtful and supportive review! We provide key clarifications and responses to your questions below.

not many computational details are given about the diffusion objective, making it difficult to understand exactly how the method works (e.g. how is the KL term between distributions of trees computed?)

We add the following intuitive description to the main text. The diffusion objective is KL(p(Tm−1∣Tm,T0)∣∣qθ(Tm−1∣Tm,X1:N))\mathrm{KL}(p(T_{m-1}\mid T_m, T_0)||q_\theta(T_{m-1}\mid T_m, X_{1:N})) where TmT_m is the current noisy tree and we’re trying to predict the last noising step applied given the sequence data qθ(Tm−1∣Tm,X1:N)q_\theta(T_{m-1}\mid T_m, X_{1:N}). For every TmT_m there are only finitely many possible Tm−1T_{m-1}, so p(Tm−1∣Tm,T0)p(T_{m-1}\mid T_m, T_0) is a vector, whose shape is given in Fig. 2 for each paradigm. All that’s missing to compute this KL is the exact formula for p(Tm−1∣Tm,T0)p(T_{m-1}\mid T_m, T_0) – this is what is given in E.2.2, E.3.2, and E.4.2, one section for each paradigm. Middle-out and top-down have vectors uniform over all Tm−1T_{m-1} that could be between TmT_m and true T0T_0, but bottom-up puts a bit more weight on some possible Tm−1T_{m-1} than others.

more detail about qθq_\theta in the main text would be helpful - how does the architecture adapt to different tree sizes?

The main trunk of the method does attention on a tensor with size [number nodes, sequence length, hidden dimension]: [N, L, D]. How to turn this into a prediction of the appropriate size is what’s described in App F. We will promote an intuitive description for each paradigm to the main text.

Here’s an example explanation for bottom-up. First we take a mean over the L dimension to get an embedding for every node: [N, D]. Now we must give a probability for every merge event, so for every pair of nodes with no parent, i,ji, j, we pass their embeddings through an MLP to give us a scalar q~ij\tilde q_{ij} which gives qijq_{ij} after softmaxing. The matrix (qij)i<j(q_{ij})_{i < j} describes the predictions of qθq_\theta for Tm−1T_{m-1}. Prop. 5 then describes the formula we derived for the ground truth p(Tm−1∣Tm,T0)p(T_{m-1}\mid T_m, T_0); this uses only the current topology of TmT_m and can also be written as a vector of probabilities (pij)i<j(p_{ij})_{i<j}. Finally we calculate the KL simply as ∑i<jpijlog⁡pijqij\sum_{i<j}p_{ij}\log \frac{p_{ij}}{q_{ij}}. Note the size of the vector (qij)i<j(q_{ij})_{i<j} differs with tree sizes and even the state TmT_m – the exact shape of the matrix is shown in Fig. 2.

it can be difficult to distinguish methods in the figures - perhaps more transparent lines or dotted lines would be helpful

We will make lines transparent and summarize the numbers in an exact table in the appendix.

line 250: I don't believe MrBayes has been explained nor referenced yet?

We had cited it but neglected to state its name! We will introduce MrBayes with a “... MrBayes [39], a popular MCMC Bayesian phylogenetics tool.”

figure 3: should it be negative ELBO?

Thanks for spotting this! Yes, the numbers are correct NELBOs, the y axis label was missing the “N”.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…