dotan1111 commited on
Commit
ea62935
·
verified ·
1 Parent(s): 9caf8a0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -5
README.md CHANGED
@@ -14,12 +14,11 @@ tags:
14
 
15
  # Ancestral sequence reconstruction using generative models
16
 
17
- <!-- Provide a quick summary of what the model is/does. -->
18
- Ancestral sequence reconstruction (ASR) is a foundational task in evolutionary biology, providing insights into the molecular past and guiding studies of protein function and adaptation. Conventional ASR methods rely on a multiple sequence alignment (MSA), a phylogenetic tree, and an evolutionary model. However, the underlying alignments and trees are often uncertain, and existing models typically focus on substitutions and do not explicitly account for insertion-deletion (indel) processes. Here, we introduce BetaReconstruct, a novel generative approach to ASR that harnesses recent advances in natural language processing (NLP) and hybrid transformer architectures. Our model was initially trained on large-scale simulated datasets with gold-standard ancestral sequences and subsequently on real-world protein sequences. The reconstruction requires neither MSAs nor phylogenetic trees. We demonstrate that BetaReconstruct generalizes robustly across diverse evolutionary scenarios and reconstructs ancestral sequences more accurately than maximum-likelihood-based pipelines. We additionally provide evidence that the generative-model ASR approach is also more accurate when analyzing empirical datasets. This work provides a scalable, alignment-free strategy for ASR and highlights the ability of data-driven models to capture evolutionary signals beyond the reach of traditional methods.
19
 
20
-
21
- ![outline_image](https://cdn-uploads.huggingface.co/production/uploads/63047e2d412a1b9d381b045d/7ecb09ZApSmPCr2LhtlIH.png)
22
- Illustration of ASR using BetaReconstruct. (a) The “true” evolutionary dynamics, in which the ancestral sequence “AAMM” evolved along a phylogenetic tree. The leaf sequences are the proteins: “AAM”, “AYM”, and “ATMMM”; (b) The BetaReconstruct pipeline: (Ⅰ) the unaligned protein sequences are provided as input; (Ⅱ) the protein sequences are concatenated with special characters between them; (Ⅲ) the model processes the input; (Ⅳ) the model generates the root ancestral sequence.
23
 
24
 
25
  ### Model Sources [optional]
@@ -33,3 +32,15 @@ Illustration of ASR using BetaReconstruct. (a) The “true” evolutionary dynam
33
 
34
  See Github repository: https://github.com/technion-cs-nlp/BetaReconstruct
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  # Ancestral sequence reconstruction using generative models
16
 
17
+ ## Abstract:
18
+ Ancestral sequence reconstruction (ASR) is a foundational task in evolutionary biology, providing insights into the molecular past and guiding studies of protein function and adaptation. Conventional ASR methods rely on a multiple sequence alignment (MSA), a phylogenetic tree, and an evolutionary model. However, alignments and trees are often uncertain, and the evolutionary models typically assume a single, simplified process of substitutions and insertion–deletion (indel) events for all sites. Here, we introduce BetaReconstruct, a generative approach to ASR that builds on recent advances in natural language processing (NLP) and uses a hybrid transformer–state-space architecture. The model was first trained on large-scale simulated datasets with known ancestral sequences and then fine-tuned on empirical protein sequences. Reconstruction requires neither an MSA nor a phylogenetic tree; to reconstruct an internal node, the user only specifies which sequences descend from it (ingroup) and which do not (outgroup). On simulated data, BetaReconstruct achieved accuracy comparable to that of maximum-likelihood and Bayesian methods and inferred fewer false ancestral insertions. Its accuracy remained similar under evolutionary models not seen during training. When different regions of the sequence evolved under different processes, BetaReconstruct was more accurate than maximum-likelihood methods and close to the Bayesian method. In a structural analysis of mammalian proteins, the ancestors reconstructed by BetaReconstruct were, on average, more similar to their descendants than to the outgroup, whereas maximum-likelihood reconstructions were pulled toward the outgroup. This work provides a scalable, alignment-free strategy for ASR that can be adapted to new evolutionary processes by changing the simulations used for training.
19
 
20
+ ![fig1_internal_node](https://cdn-uploads.huggingface.co/production/uploads/63047e2d412a1b9d381b045d/HIRtC1fRsc5GZN4pG2_LT.png)
21
+ Illustration of ASR using BetaReconstruct. (a) The ‘true’ evolutionary dynamics, in which the ancestral sequence “AAMM” evolved along a phylogenetic tree. The leaf sequences are “AAL”, “AYM”, and “ATMMM”. The target internal node, “AAM”, is the ancestor of the ingroup sequences “AAL” and “AYM”, and the sequence "ATMMM" serves as the outgroup. (b) The BetaReconstruct pipeline: (Ⅰ) the unaligned protein sequences are provided as input; (Ⅱ) the sequences are concatenated into a single string, in which the outgroup sequence is followed by a “#” character, ingroup sequences are separated by a “|” character, and a special “<RECONSTRUCT>” token marks the start of the prediction; (Ⅲ) the model processes the input; (Ⅳ) the model generates the ancestral sequence. (c) A typical ASR pipeline, which runs multiple independent tools: (Ⅰ) the unaligned protein sequences are provided as input; (Ⅱ) an alignment program infers an MSA; (Ⅲ) the resulting MSA, including newly introduced gap characters; (Ⅳ) a tree inference program uses the MSA to infer the phylogeny; (Ⅴ) the inferred tree, shown in a Newick format; (Ⅵ) specialized ASR software uses both the MSA and the tree as inputs to perform the reconstruction; (Ⅶ) the final output is the reconstructed ancestral sequence. Joint methods such as BAli-Phy combine steps (Ⅱ)–(Ⅵ).
 
22
 
23
 
24
  ### Model Sources [optional]
 
32
 
33
  See Github repository: https://github.com/technion-cs-nlp/BetaReconstruct
34
 
35
+
36
+ **[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.
37
+
38
+
39
+ ### Tokenization
40
+ 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.
41
+
42
+ Related Resources
43
+ - [BiologicalTokenizers repository](https://github.com/technion-cs-nlp/BiologicalTokenizers): You can find the source code and training scripts for biological tokenizers.
44
+ - [Research paper](https://academic.oup.com/bioinformatics/article/40/4/btae196/7645044): For detailed methodology and performance benchmarks, please see our paper: *"Effect of tokenization on transformers for biological sequences"* (2024; Bioinformatics).
45
+
46
+