How to use from
Docker Model Runner
docker model run hf.co/dotan1111/BetaInfer_Configuration2
Quick Links

Phylogenetic tree inference using generative models

Abstract:

Accurate inference of phylogenetic trees is fundamental to evolutionary biology, yet existing methods rely on complex pipelines involving multiple sequence alignment, explicit evolutionary models, and computationally intensive tree search procedures. Here, we present BetaInfer, a generative framework that reformulates phylogenetic tree inference as a sequence generation problem. BetaInfer leverages hybrid transformer-based architectures to directly map sets of unaligned sequences to phylogenetic trees represented in Newick format. Trained primarily on large-scale simulated evolutionary data with known ground truth, BetaInfer learns to capture complex evolutionary signals directly from sequence data. Ensemble-based generation of multiple candidate trees further improves robustness, reducing reconstruction error by over 30% relative to single predictions. Across extensive evaluations on both simulated and empirical datasets, BetaInfer achieves competitive performance relative to state-of-the-art phylogenetic pipelines, matching or exceeding the accuracy of established likelihood-based and distance-based methods under a wide range of conditions. Probing analyses further reveal that BetaInfer does not simply emulate classical distance-based algorithms, but instead encodes evolutionary relationships in a more integrated, global representation that supports direct tree generation. Together, these results demonstrate that generative models can serve as a viable and scalable alternative to standard phylogenetic pipelines.

Figure1

Illustration of predicting a phylogenetic tree using BetaInfer. Panel (a) shows the simulated “true” evolutionary dynamics, in which the ancestral sequence “AAMM” diverged along a phylogenetic tree evolving into four leaves: “ADAM”, “ADAW”, “AAM”, and “ATMMM”. Panel (b) illustrates the BetaReconstruct pipeline: (Ⅰ): unaligned protein sequences serve as input for our model; (Ⅱ): The unaligned protein sequences are concatenated into the input “sentence”, and the special token marking the start of the phylogenetic tree inference is added; (Ⅲ): Our trained model processes the input and generates the phylogenetic tree (the output); (Ⅳ): the generated phylogenetic tree. Panels (c) highlights the labeling of the taxa in the resulting tree, in which, the first protein sequence is labeled ℓ0, and the second is labeled ℓ1, and so forth.

link: https://www.biorxiv.org/content/10.64898/2026.06.14.732140v1

Public models

[IMPORTANT] Note on Generalization: While we have verified the models' ability to generalize to out-of-distribution data (as detailed in the main text), performance is highest when inference is performed on data distributions similar to those used during training.

Tokenization

The models utilize a data-driven tokenizer specifically optimized for evolutionary related protein sequences. Instead of relying on standard single-amino-acid characters, this approach allows the model to learn and represent frequently occurring sequence patterns as distinct tokens. For a comprehensive technical breakdown of the tokenizer architecture and its training process, please refer to the main text of our publication.

Related Resources

  • BiologicalTokenizers repository: You can find the source code and training scripts for biological tokenizers.
  • Research paper: For detailed methodology and performance benchmarks, please see our paper: "Effect of tokenization on transformers for biological sequences" (Dotan et al., 2024; Bioinformatics).
Downloads last month
-
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support