According to recent reports, models of protein evolution are foundational to biology, underpinning essential techniques such as phylogenetic tree inference1,2,3, ancestral sequence reconstruction4, multiple sequence alignment5, variant effect prediction6 and protein design7. Historically, for computational tractability, these models have relied on the simplifying—but biologically unrealistic—assumption that sites in a given protein evolve independently of each other. A crucial test of any evolutionary model is its ability to simulate realistic evolutionary trajectories, but the independent-sites assumption leads to simulations that poorly reflect the complexity of natural protein evolution. Here we introduce PEINT (protein evolution in time)—a flexible and generalizable deep learning framework for modelling how the entire protein sequence evolves over time while incorporating complex interactions between sites. This framework enables learning realistic patterns of constrained evolutionary transitions directly from millions of protein sequences spanning diverse fold families. Furthermore, unlike classical models that require pre-aligned sequences, PEINT learns indel dynamics directly from raw, unaligned sequences, thereby eliminating potential biases from alignment errors that can lead to incorrect inference of evolutionary patterns. By capturing higher-order epistatic interactions and modelling insertion–deletion processes that classical models typically ignore, PEINT accurately reproduces key signatures of natural evolution, including conservation patterns and family-specific dynamics. When simulating evolution along phylogenetic trees, PEINT generates sequences that preserve protein function, which we validate through experimental characterization of simulated carbonic anhydrase variants that retain enzymatic activity. PEINT thus enables realistic simulation of protein evolution that explores newly introduced sequence space while respecting structural and functional constraints. This evolution-informed generative modelling framework offers a powerful new tool for advancing both phylogenetic inference and protein engineering.

Models of protein evolution describe how protein sequences evolve over time under mutation and various selective pressures. These models are at the core of most applications in evolutionary biology, and act as the engine that powers a variety of phylogenetic methods1,2,3,4,5,6,7. Classical models of protein evolution date back to Margaret Dayhoff8, and further refinements of her seminal work have proceeded in lockstep with ever-increasing data in sequencing databases9,10,11. These methods typically use continuous-time Markov chains (CTMCs) to model protein evolution. A CTMC is parametrized by a rate matrix (frequently denoted by Q) that describes the relative mutation rates and transition probabilities of different amino acids as a function of evolutionary time. Until now, the models of protein evolution used most widely are the WAG10 and LG11 models, both parametrized by a rate matrix Q that is learned using maximum likelihood methods. The LG model generalizes WAG by adding the notion of site-rate variation, in which different sites are allowed to evolve with different overall rates, providing a means to deal with different patterns of conservation across sequences.

Sources indicate that although successful, these classical models come with two important shortcomings: they require sequences to be pre-aligned with gap characters (‘–’) to ensure equal length, and they assume that each site evolves independently of all other sites. Although alignment errors can lead to incorrect inference of evolutionary patterns and the independent-sites assumption is biologically unrealistic, these simplifications have remained standard in phylogenetics due to computational tractability. If a model of protein evolution is viewed as translating between ‘past’ and ‘future’ versions of a protein, then the independent-sites assumption is analogous to translating a sentence between languages one word at a time, without considering the surrounding context.

Industry observers note that although some early models relaxed the independent-sites assumption by enlarging the evolutionary unit either to paired sites in a structure12 or to entire structure-dependent sequences13, these models were, by and large, computationally intractable, and efforts in the field turned instead towards developing more sophisticated substitution rate matrices (Fig. 1a). In particular, this led to the advent of biologically motivated mixture models that combine a base substitution matrix with learned amino acid profiles to generate a set of related rate matrices that better capture the selective pressures experienced in different structural and functional environments14. The most sophisticated versions of these models estimate site- and family-specific profiles using a combination of single-site and pairwise interaction terms15.

a, Top: classically, models of protein evolution learn the parameters for a shared rate matrix that describes how each site in a protein’s MSA evolves over time. Bottom: the problem of learning from evolution can be recast as learning transitions between full sequences in the cherries of the tree. b, Our PEINT transformer learns to model evolutionary transitions in these cherries, accounting for mutations, insertions and deletions. PEINT does not require the sequences to be aligned. S, M and E denote Start, Masked and End tokens, respectively.

In a different vein, probabilistic models over sequence distributions have made great strides capturing epistatic signals in protein sequences. Historically, these models also relied on multiple sequence alignments (MSAs), starting from the Potts model16 to its neural analogue—the MSA transformer that serves as the backbone of the MSA processing module in AlphaFold models17,18 and is used widely as a stand-alone MSA processing architecture19,20. More recent work has highlighted the promise of using techniques from natural language processing to learn probabilistic models from single protein sequences21,22,23,24. Although these models can capture interactions between residues, they do not model explicitly how proteins evolve over time under structural and functional constraints. Moreover, treating sequences as independent ignores their phylogenetic relatedness and biases learned distributions toward overrepresented lineages25,26. Clustering sequence databases mitigates this bias but also removes variation vital for specialized functions within protein families27,28.

Here we demonstrate how to achieve the best of both worlds: by integrating principled evolutionary reasoning with modern protein language models (pLMs), we introduce a fresh framework for learning models of ‘protein evolution in time’ that is alignment-free and accounts for higher-order interactions. This enables us to make use of epistatic signals within sequences to build more sophisticated models of variation between sequences. We show that our approach can make use of evolutionary data at scale, leading to models that show substantially improved performance at modelling both retrospective and prospective evolution. We anticipate that further work along these lines will lead to new insights about the evolution that has led to our current protein universe, as well as models that can predict more accurately forward evolution of proteins involved in disease processes.

The objective of evolutionary modelling is to estimate a likelihood over a set of sequences that are related under a phylogenetic tree (for a more thorough treatment, see Supplementary Text). The difficulty arises from the fact that we typically only have access to the leaves of the tree (extant sequences) and ancestral sequences must be integrated out. This computation is tractable only for independent-sites models29, which, by definition, cannot accurately model the higher-order epistatic interaction patterns that are known to be essential for protein structure and function. Recent work has shown that one can instead ignore the ancestral states completely, by using a composite likelihood over cherries, and learn models of protein evolution that move beyond the independent-sites assumption30. The composite likelihood approach recasts the problem of learning a complicated joint probability over many sequences to one of learning many conditional probability paths between pairs of sequences—termed ‘cherries’—on a tree. Intuitively, this can be thought of as decomposing a larger tree into many smaller trivial trees—‘sticks’—in which both the root and leaf are observed, assuming time-reversibility. This allows us to train a model using a negative composite log-likelihood loss:.

It has been revealed that in equation (1), a triple (x, y, t) makes up a cherry and p(y|x, t) quantifies the conditional probability of observing a sequence y given a starting sequence x and the time t on the tree that separates them. The composite likelihood formulation has a key advantage: in sidestepping the ancestral state integration step, evolutionary transitions are no longer constrained to occur between aligned positions in an MSA. This has two vital consequences. First, it allows for the use of arbitrary model classes, including deep neural networks, to learn directly from evolutionary transitions across entire sequences in one go. Second, it removes the constraints of relying on a precomputed alignment, which may contain errors, and in doing so enables models to learn more natively from insertion and deletion (indel) processes within protein families. Despite their outsized importance in evolution31, indels have traditionally been difficult to incorporate into classical models of evolution.

Industry observers note that here we present the protein evolution in time (PEINT) framework, a deep neural network that learns explicit models of full protein sequence evolution in time (Fig. 1b). The PEINT model uses a coupled encoder–decoder transformer—the standard architecture in the field of machine translation32—and is aptly suited to learning under a composite likelihood framework that recasts the fitting of protein evolutionary models into a direct sequence-to-sequence setup33. Concretely, the transformer parametrizes the transition probability in a single cherry as \(p({y|x},t)=\prod _{i\in \text{sites}(y)}p({y}_{i}|{y}_{1:i-1},x,t)\), that is, for each site i in sequence y, estimating its likelihood given the conditioning sequence x, the branch length t and the already generated positions in y ({1, ..., i − 1}). We found that overall model performance was correlated with the strength of the encoder module and therefore used a pretrained, frozen 150 million (150 M)-parameter evolutionary scale modelling 2 (ESM2) encoder22 to provide rich representations of the input sequence x. The resulting PEINT model adds 5 encoder and decoder layers with approximately 57 million trainable parameters and is trained on TrRosetta evolutionary transitions using a composite task of masked language modelling of x and autoregressive prediction of y (Supplementary Methods and Supplementary Fig. 1).

Sources indicate that we note that, as a general framework, PEINT is agnostic to the particular choice of encoder model. To demonstrate encoder modularity, we also trained a second PEINT model on the same data, termed ‘PEINT (ESMC)’ after the base encoder ESMC34 (Extended Data Fig. 1), which was released while this manuscript was in revision, and we show its evaluations throughout. Architectures, training configurations and computational costs are summarized in Supplementary Table 1. Models typically converged in a matter of 1–2 days on 2 × A100 graphics processing units.

A model of protein evolution should be able to reason over various combination of its inputs, that is, a pair of sequences (x, y) and the branch length that separates them (t). By varying which inputs were provided to PEINT, we assayed its ability to reconcile how evolutionary time is related to mutational burden across protein families.

Recent findings suggest that first, we evaluated the composite likelihood function on held-out transitions from real data. To build intuition for this task, we can compare with the uniform random guess model—a trivial model of evolution which assumes that each site in a protein will mutate randomly to any of the 20 amino acids regardless of how much time has passed. This model would assign a uniform data likelihood of \(\frac{1}{20}\) (\(=\,0.05\)) across all times (Fig. 2a, dotted grey line). A more sophisticated model should be able to reason about the kinds of mutations that are most likely to occur (or not occur) over various evolutionary distances. The classical models WAG10 and LG11 show good performance at short divergence times, and the LG model in particular improves upon WAG by incorporating site-rate variation to better account for patterns of conservation across sites in protein families (Fig. 2a). The PEINT transformer indicates superlative performance across all time ranges assayed (Fig. 2a). Most importantly, this improvement persists even on transitions from trees held out during training (Fig. 2a, right), highlighting the ability of PEINT to generalize evolutionary insights across protein families.

Models of protein evolution must learn to relate sequences and evolutionary times. a, Given held out evolutionary transitions from subtree splits (left) and entirely held-out trees (right), PEINT outperforms classical models (WAG and LG) substantially in terms of data likelihood over all evolutionary times. b, Given a pair of sequences x and y, PEINT can estimate the time separating them by maximizing \(p({y|x},t)+p({x|y},t)\) over t (left). This procedure can be applied at scale to pairs of sequences in a single tree (middle), as well as across 150 held-out families (right, Pearson’s r = 0.95). c, Given a starting sequence and time, PEINT generates latest sequences with defined mutational loads that mirror those of classical models (left). Compared with independent-sites models, PEINT generates structurally coherent sequences (right). Each point demonstrates the mean and s.d. of ten independent samples from the model.

Industry observers note that ablation studies demonstrated that masked language modelling stabilized training, whereas low-rank adaptation (LoRA)35 fine-tuning provided no measurable benefit (Extended Data Fig. 2). We report the decoder depth analysis in Supplementary Fig. 2. See Supplementary Methods for the full ablation discussion, including the role of additional encoder layers in early training.

Sources indicate that intuitively, a model of protein evolution should learn a notion of the evolutionary time that separates sequences based on the number and types of mutation that occur between them. Classically, one can obtain a maximum likelihood estimate of the evolutionary time separating a pair of aligned sequences x,y in an MSA using classical models by maximizing p(y|x,t). This information is the basis for neighbour-joining tree reconstruction algorithms36. Similarly, one can use PEINT to estimate \({{\rm{argmax}}}_{t}\{p({y|x},t)+p({x|y},t)\}\), that is, the time that maximizes the transition probability between a pair of observed sequences (in both directions), even in the absence of an explicit alignment. Empirically we found that PEINT generates concave likelihood curves as a function of time, so we used gradient ascent on the likelihood to solve this optimization problem (Fig. 2b, left). We carried out this procedure on cherries from held-out families—for a specific held-out family (Fig. 2b, middle) and also across 150 randomly selected held-out families (Fig. 2b, right)—and observed strong correlations between PEINT’s time estimates and those from classical models (Pearson’s r = 0.95). This strong correlation suggests that PEINT is able to provide consistent estimates of evolutionary distances within the time framework in which it is trained, even in trees it has not seen. As PEINT estimates are obtained from unaligned sequences, our results indicate the potential of deep models of protein evolution to more accurately reconstruct phylogenies that reflect the full spectrum of mutational processes—mutations, insertions and deletions.

Models of protein evolution are fundamentally generative in that they can be used to propose a distribution over sequences given a starting sequence and a branch length (that is, the evolutionary time separating those sequences). Unlike classical models, which sample substitutions for each position in the protein’s alignment as a function of branch length, PEINT can generate upcoming sequences with both substitutions as well as new indels. We compared the generative capabilities of the classical models WAG and LG, as well as PEINT, by fixing a starting sequence (x) and decoding a distribution of sequences with progressively larger branch lengths (longer t) (Fig. 2c). We evaluated these sequences for their mutational load, as well as the structural confidence score—predicted local distance difference test (pLDDT)—assigned to them using OmegaFold37, a structure prediction model that uses single sequences as input. All model classes showed similar behaviour in that the average mutational load increased monotonically with evolutionary time and generated comparable numbers of mutations across the evaluated time range (Fig. 2c, left).

However, we found that the quality of generated sequences differed greatly, even controlling for numbers of mutations, with PEINT generating consistently high quality sequences even at high mutational loads (Fig. 2c, right) whereas the classical models show a marked drop in the predicted folding quality of their sampled sequences. We surmise that the ability of a deep learning model such as PEINT to capture epistatic interactions allows it to generate compensatory mutations that account for already mutated positions and thus maintain functionally key contacts. This is a crucial aspect that is new to deep models of evolution, and prompted further investigation into the ability of PEINT to simulate evolution within protein families.

According to recent reports, simulations on trees are central to developing and benchmarking phylogenetic methods because true evolutionary histories are generally unknown38. Yet classical independent-sites models often generate sequences that are easily distinguishable from naturally evolved proteins39 and struggle to model realistic indel processes, sometimes relying on insertion patterns extracted from individual alignments40.

Sources indicate that we therefore tested whether the ability of PEINT to generate realistic sequences, including indels, along individual branches (Fig. 2c) extends to entire phylogenetic trees (Fig. 3a). We compared PEINT with widely used classical models WAG, LG, LG4X, LG + C60 and LG + S256, spanning single-rate matrix approaches, models with among-site rate variation and increasingly flexible mixture models that capture variation in amino acid preferences across sites (Supplementary Methods). All models produced comparable mutational loads along single branches and throughout the entire pathway down the tree (Extended Data Fig. 3a–c), and generated sequences with generally less than approximately 50% identity to natural sequences (Extended Data Fig. 3d).

a, Simulation setup—existing trees are re-rooted on a randomly chosen leaf sequence. From this root sequence, all internal and leaf nodes are generated progressively using classical (LG or WAG) or PEINT evolutionary models. To account for normal variation within each family, a subtree is retained for evaluation—its distance to the latest root node remains unchanged. b, PEINT generates sequences that maintain amino acid usage at conserved sites, whereas simulations using classical models (LG) do not. Example shown for a single family, Human TRAAK. c, J–S divergence of amino acid usage at conserved sites compared with real sequences, aggregated across 545 simulation trees. d, PEINT faithfully recapitulates family-specific indel rates (number of indels per family; each dot represents a family). e, Per-event indel length (number of amino acids inserted or deleted) distribution from PEINT simulation matches closely that inferred from real data. f, When evaluated using AF2Rank, PEINT-generated leaf sequences have pLDDTs that are almost identical to real sequences, and markedly higher than those generated using the best classical model (LG + S256). g, Similar analysis as in f, evaluated using OmegaFold. Boxplots show the median value as the centre, and the box is bounded by Q1 (25th percentile) and Q3 (75th percentile). The whiskers extend to the furthest data point within 1.5× the interquartile range (IQR), with outliers beyond the minimum and maximum of the whiskers shown as individual points.

We first examined whether simulations faithfully capture amino acid usage patterns at conserved sites. For example, the mechanosensitive human TRAAK channel41 has many conserved residues in the selectivity filter of its ion conducting pore, as well as pore-adjacent domains that regulate channel currents42 (Fig. 3b). The expected level of divergence can be captured by examining the real sequences from the evaluation subtree, which show relatively little divergence relative to the other subtree, with a mean Jensen–Shannon (J–S) divergence across sites of around 0.2 (Fig. 3b). PEINT-simulated sequences show a similar level of J–S divergence (around 0.25), mostly with subtle differences in non-pore residues that show lower conservation in natural sequences. In contrast, the LG + S256 model—despite having access to conservation statistics and optimal per-site residue frequencies—struggles to maintain these functionally notable sites across the tree and generates sequences with highly dissimilar patterns of amino acid usage across all conserved positions, reflected in a much higher J–S divergence of around 0.42. In general, mutations at highly conserved sites are not tolerated, and it is likely that this level of divergence would lead to non-functional proteins. These results hold over the remaining 545 held-out simulation trees (Fig. 3c and Extended Data Fig. 1b). PEINT accurately recapitulates real patterns of amino acid usage at conserved sites, whereas the classical models show more divergent amino acid usage profiles at these highly conserved positions for each protein family. A complementary analysis of conserved structural environments, represented by Foldseek 3Di states43, supported this finding (Extended Data Fig. 4a,b). Furthermore, PEINT simulations accurately reflect family-specific indel rates (Fig. 3d and Extended Data Fig. 1e–g) and lengths (Fig. 3e). Notably, this correlation is explained only partially by sequence length (Extended Data Fig. 4c) and indicates that PEINT can match the indel dynamics of different protein families in simulation.

We evaluated simulated leaf sequences using both forward-folding models (OmegaFold37 and AF2Rank44) and an inverse-folding model (ESM-IF45) to provide structural confidence scores using models with varying reliance on homology. Across pLDDT from forward-folding (Fig. 3f,g) and structure-conditioned likelihood and sequence recovery from inverse folding (Extended Data Fig. 5d,e), PEINT-generated sequences scored similarly to natural sequences from the same families. PEINT (ESMC), which uses an encoder with better structural understanding at scale than the ESM2 series, further improved upon PEINT (ESM2). In contrast, classical model simulations yielded sequences with poor folding propensity; median pLDDT scores were around 50, with few sequences exceeding 80.

To mitigate the confounding effects of homology biases and the boost of a strong template, we used AlphaFold2 (ref. 17) as an unbiased discriminator by providing MSAs constructed from simulated leaf sequences. MSAs based on classical model-driven simulations frequently yielded low-confidence structure predictions, whereas PEINT-generated MSAs produced substantially higher-confidence predictions, with many falling within the range observed for natural MSAs, despite the latter being explicitly represented in the AlphaFold2 training set (Extended Data Fig. 5).

In a recent development, because PEINT’s performance tracks the characteristics of their pretrained encoder, what then is the benefit of training PEINT on evolutionary transitions? Indeed, others have explored the use of a base pLM to perform Markov chain Monte Carlo (MCMC) ‘evolutionary’ sampling in sequence space46,47 (Extended Data Fig. 6a). We replicated these approaches in our simulation setup. We found that the strength of the language model was notable for judicious evaluation of mutation proposals (Extended Data Fig. 6b), with strong pLM-based energy terms leading to more realistic evolutionary endpoints, but at substantially higher computational cost to reach the expected number of mutations for a given branch (Extended Data Fig. 6c–e). This runtime difference reflects a fundamental distinction between a model of protein sequences and a model of protein evolution. Although both are ultimately trained on the same data (extant protein sequences), PEINT learns directly from evolutionary transitions and conditions explicitly on evolutionary time, effectively amortizing iterative rejection sampling into a single proposal. Consequently, its runtime is constant with respect to branch length. Furthermore, because PEINT places no restrictions on the types of evolutionary transition used for training, it natively generates indels, whereas the MCMC approaches tested here are limited to substitutions.

Recent findings suggest that we further evaluated how these results generalize beyond the train and/or test split we used. We stratified performance by family based on their degree of similarity to training sequences (Extended Data Fig. 7). PEINT simulations remained broadly comparable with natural sequences even for families more divergent from the training data. Inverse-folding scores decreased modestly for these families, but similar decreases occurred for natural sequences, suggesting that they are also challenging for the evaluation models themselves. Together, these results indicate that PEINT captures key features of natural protein evolution and generalizes beyond the sequences it was trained on.

Industry observers note that carbonic anhydrases are a ubiquitous family of enzymes that catalyse the hydration of carbon dioxide into aqueous bicarbonate. These enzymes balance an exceptional turnover rate (kcat) with poor affinity for substrate (KM)—carbon dioxide is a small, linear molecule with negligible dipole moment. We reasoned that carbonic anhydrase would present a stringent test of the ability of PEINT to realistically simulate evolution while preserving function across large sequence distances. To ensure the generalizability of these results, we selected a held-out tree, and simulated from its seed sequence—that of the β-carbonic anhydrase sequence from cultivated pea (Pisum sativum) (Fig. 4a). Although other β-carbonic anhydrases were present in the training set, by design they show minimal sequence identity to this family, as they come from stringent clustering of the underlying fold space, with a maximal percent identity of approximately 60% to any sequence in the training set. All leaves showed exceptional designability metrics, with OmegaFold pLDDT values above 85 and exact maintenance of the enzyme’s catalytic site (Fig. 4b). This contrasts with simulations using the LG model to suggest substitutions, in which the generated sequences show notably worse structural confidence scores, despite showing similar mutational event burdens (Fig. 4c, top). We also highlight how most leaves generated using either model showed 40–50% sequence identity to any known gene in the National Center for Biotechnology Information nonredundant database, indicating how PEINT naturally explores upcoming regions of sequence space in the process of simulating evolution down a tree (Fig. 4c, bottom). We selected 20 leaves randomly from the PEINT simulation tree for experimental characterization.

a, Starting from the sequence of the P. sativum (pea) β-carbonic anhydrase (β-CA), PEINT and LG simulations were carried out on the same tree without filtering. Simulated leaves are coloured by pLDDT (colour bar). b, Structural predictions of the PEINT-generated leaves are shown, coloured by pLDDT (scale as in a). All sequences maintain the catalytic site (inset) but show structural variation at neighbouring sites that is predicted to maintain protein fold with high confidence. In comparison, the LG simulation leads to sequences with poor structural confidence metrics (pLDDT dots in a). c, Top: both PEINT- and LG-simulated sequences show similar numbers of mutations compared with pea β-carbonic anhydrase, but LG-generated sequences have substantially worse pLDDT scores. Bottom: PEINT-generated sequences show low sequence identity to any extant sequence in BLAST databases, despite their high pLDDT. d, Growth over time in the carbonic anhydrase-free functional complementation assay. Six simulated leaves show growth between that of the pea β-carbonic anhydrase and D152N mutation. Curves show the mean and s.d. from three independent growth measurements. e, In vitro CO2 hydration demonstrates a similar trend. Each curve shows the mean behaviour from n = 4 independent measurements. f, Distribution of kcat parameters for natural carbonic anhydrase enzymes (n = 57) span a large range. To roughly situate PEINT-simulated sequences, empirical kcat values of D152N site mutations are shown (yellow lines). The boxplot shows the median value as the centre, with the box bounded by Q1 (25th percentile) and Q3 (75th percentile). The whiskers extend to the furthest data point within 1.5× the IQR. a.u., arbitrary units; OD600, optical density at 600 nm.

In a recent development, as an initial assay to test the functionality of the simulated carbonic anhydrase genes, we used a functional complementation assay in the Escherichia coli carbonic anhydrase-free48,49 background. This engineered bacterial strain is deficient in endogenous carbonic anhydrase genes and cannot grow in low CO2 concentration in the absence of an exogenously provided functional carbonic anhydrase gene. We transformed the 20 selected leaves, the root sequence50 as a wild-type control and a previously characterized mutant at a conserved aspartic acid residue, D152N (D162N in our construct) that is shown to yield slower, but still marginally functional, carbonic anhydrase enzymes51,52,53. At an intermediate, but not growth-permissive, CO2 concentration of 1%, we found that 6 of the 20 designs could rescue growth better than the D152N mutation (Fig. 4d), although all intriguingly showed a long lag phase phenotype. We followed this growth-based functional complementation assay with an in vitro characterization of CO2 hydration rates. We expressed and purified the wild-type pea β-carbonic anhydrase and the D152N mutant, as well as one of our growth-rescuing simulation endpoints, seq1360, and measured the rate of hydration using the pH indicator assay54 at a saturating concentration of 17 mM CO2 (Supplementary Fig. 3). This assay validated our results from functional complementation, with seq1360 showing a slower rate of hydration than the wild-type enzyme (despite being assayed at a higher concentration), but faster reaction kinetics than the D152N mutant, which is only marginally faster than the uncatalysed reaction (Fig. 4e).

Recent findings suggest that despite a historical notion that carbonic anhydrase is essentially a perfect enzyme, carbonic anhydrases across the tree of life are not universally perfect in their rates55, with many possessing more modest kcat values in the approximately 104 s−1 range (roughly 1% of the well-known human carbonic anhydrase II enzyme) (Fig. 4f). Although we did not measure full kinetic curves, we can place our functional PEINT-generated sequences approximately relative to independent measurements of the kinetics of mutations at the conserved aspartic acid (D152) in orthologous enzymes from spinach53 and the archaeon Methanobacterium thermoautotrophicum52 (Fig. 4f, yellow dashed lines), which implies that our designed enzymes’ kcat values should fall within the range that is naturally observed in different organisms. It is possible that, by training more broadly on evolutionary transitions across the tree of life, PEINT has learned patterns of evolution from organisms for which the rapid hydration of CO2 is not as imperative as it is in human and plant metabolism, and may predominantly generate enzymes with modest, but measurable, activity.

In a recent development, as the need to maintain function constrains protein evolution, extant protein families contain a partial record of millions of years of evolutionary trial and error selecting for a given function. Density models fit on evolutionarily related sequences, either for specific families56 or across the whole tree of life57 have shown to be strong zero-shot variant effect predictors, which means that they do not require access to assay-labelled training data to score variant effects. However, recent works also suggest that increasing scaling of pLMs does not necessarily translate to increased performance on variant effect prediction (VEP) tasks58,59, due potentially to its likelihood being biased towards certain evolutionary neighbourhoods25, suggesting that better accounting for phylogenetic relationships might be a promising approach for improving the performances of these models for VEP. Although some approaches have been proposed to improve VEP with pLMs by accounting for wild-type preference58 or injecting information from homologous sequences at inference time59, our approach can be viewed as a complementary approach, with the potential benefit of more fully leveraging the phylogenetic information from evolutionary data with a flexible model coupled with a principled training objective.

Industry observers note that herein we explored ways to leverage the PEINT framework to predict the effect of substitutions in families from ProteinGym60—a standardized benchmark for protein VEP—by training smaller PEINT models on top of a base pLM (for example, ESM2-150) using cherries from each family in the ProteinGym substitution benchmark. Following ref. 61, we score mutants (mut) using \(\log \left[\frac{p({x}^{\text{mut}}|{x}^{\text{wt}},t)}{p({x}^{\text{wt}}|{x}^{\text{wt}},t)}\right]\), where t is a hyper-parameter controlling the size of the evolutionary neighbourhood around the wild type (wt). At t = 0, all mutants should have zero probability and, as t increases from 0, mutant sequences will be assigned non-zero probabilities, and the extent to which these probabilities change depends on how likely it is that the mutant could have arisen from the process of mutation and selection according to the model.

Sources indicate that each family in the ProteinGym substitution benchmark has been categorized by the assay type of the deep mutational scanning. We found that PEINT offers the largest performance gains on datasets where the assays measure the extent to which mutations affect the growth rate of an organism (Fig. 5a), while improving on the pretrained backbone model ESM2 across all mutational depths (Fig. 5b). The growth rate is a more holistic proxy for the overall fitness constraints imposed on an organism compared with other molecular phenotypes (for example, binding and stability); hence, it stands to reason that a model that is better able to extract information from evolutionarily related sequences would be a better zero-shot variant effect predictor. We saw that PEINT was able to rescue performance in many families where ESM2-150M struggled to generate reasonable predictions (Spearman’s ρ < 0.2) (Fig. 5c,d).

a, Mean Spearman correlation on 201 families in the ProteinGym substitution benchmark60. The families are stratified by assay type: organismal fitness (n = 69), stability (n = 66), expression (n = 16), activity (n = 38) and binding (n = 12). The height of each bar represents the mean of the per-family Spearman correlations for each assay type. Error bars, s.d. across proteins within each assay type. For each model, the average over the mean Spearman correlations for the five assay types is shown in the key on the figure. ESM2, the 150 M parameters ESM2 model; PEINT, a PEINT model trained on transitions of the deep mutational scanning families, using the frozen 150 M parameters ESM2 in its encoder. b, Mean Spearman correlation stratified by mutational depths across 201 substitution assays, with mean and s.e.m. shown for each depth. c, Spearman correlation for each family in the ProteinGym substitution benchmark with the assay type ‘organismal fitness’, where the assays measure the extent to which mutations affect an organism’s growth rate. Each protein family is denoted by its identifier in the ProteinGym dataset. d, ESM2 versus PEINT Spearman correlation for each family in the ProteinGym substitution benchmark with the assay type ‘organismal fitness’.

Industry observers note that as the PEINT framework refines the learned representation of ESM2 in its encoder, it can in principle leverage more performant encoders to achieve better performance. To test this hypothesis, we trained additional PEINT models on the larger 650 M parameter ESM2, as well as the recently released 300 M parameter ESMC (Extended Data Fig. 8a). Although both ESM2-650M and ESMC were already more performant than ESM2-150M on the ProteinGym benchmark, in both cases training a PEINT model on these pretrained pLMs led to substantial improvements in predicting the outcomes of organismal fitness assays (Extended Data Fig. 8a,c). In this light, one can view PEINT as a general and principled framework to align pretrained pLMs with evolutionary information and thereby improve their VEP performance to be among the best single-sequence input models on the benchmark (Extended Data Fig. 8a,b).

According to recent reports, previous studies in mechanistic interpretability of pLMs have focused primarily on encoder-only (bidirectional encoder representations from transformers (BERT)) architectures, revealing that the masked language modelling objective naturally drives such models to learn rich sequence–structure relationships62,63. As PEINT uses the more elaborate encoder–decoder architecture, we focused our attention on the decoder module, as well as inter-module communication. The ‘categorical Jacobian’ calculation, first introduced by Zhang and colleagues63, mutates each position in an input to a deep neural network systematically and measures how these perturbations propagate through the model. It provides a fully unsupervised means to evaluate the inner workings of models that operate on protein sequences. We first applied this technique to investigate the Transformer decoder module of PEINT. As the PEINT decoder works in an autoregressive manner, we perturbed positions in the input to the decoder systematically (that is, the already generated tokens) and measured their effect on downstream model outputs (Extended Data Fig. 9a). This decoder categorical Jacobian63 calculation reveals a highly structured pattern of inter-residue couplings that captures the topological structure of a protein’s contact map (Extended Data Fig. 9b). Evaluated on a larger scale, we find that the strongest couplings learned by the PEINT decoder do correlate with structure, but more weakly than those learned by encoder-only models such as ESM2 (Extended Data Fig. 9c). Indeed, previous work showed that the outputs of ‘mutant cycles’ carried out using autoregressive models are less attuned to direct structural contacts than masked language models64 and we hypothesize that functionally linked, but structurally dispersed, allosteric networks may be a large source of false positives when assayed against a static contact map.

Industry observers note that we next investigated how the representations learned by PEINT’s encoder are shared with its decoder module. In the PEINT model for p(y|x,t), we systematically identified positions in the output y that were most affected by perturbations in the input sequence x (Extended Data Fig. 9d). The cross-module categorical Jacobian couplings strongly resembled pairwise alignment trace matrices, suggesting that a large driver of PEINT’s ability to model evolution comes from its learned ability to align representations of the target sequence y with the source sequence x during decoding (Extended Data Fig. 9e). Across around 900 examples of curated alignments from the Pfam-A seed alignments65, we find that PEINT encoder–decoder categorical Jacobian couplings natively recover ground truth alignments with similar accuracy as gold standard dynamic programming based alignment algorithms66 (Extended Data Fig. 9f), despite not being explicitly trained to do so. Taken together, these results suggest that the PEINT encoder and decoder modules serve fairly distinct purposes: the encoder builds a structural representation of the input sequence, whereas the decoder learns to align the target sequence to this representation while also learning patterns of evolution reflective of subfamily specialization.

In a recent development, here we show how to use the composite likelihood objective over pairs of sequences to train a deep model of protein evolution with the PEINT transformer. By moving beyond the independent-sites assumption that has stymied classical models for decades, PEINT demonstrates superlative performance across all facets of evolutionary modelling. The transformative potential of deep models of protein evolution is perhaps best exemplified by PEINT’s capacity for prospective evolutionary simulations. We demonstrate that PEINT naturally simulates evolutionary trajectories that explore new regions of sequence space while maintaining fold and function. The ability to generate realistic evolutionary trajectories at will has many implications for evaluating and improving phylogenetic inference methods, and synergizes particularly well with recent forays into using deep neural networks for this task67. Along similar lines, realistic simulations allow us to ‘replay the tape of life’ under controlled conditions and can help generate testable hypotheses about the evolutionary forces that shape protein families68. By innately capturing higher-order epistatic interactions and indel processes that classical models ignore, deep evolutionary models promise to provide new avenues to advance our understanding of how proteins evolve in nature.

Although classical models learn predominantly general trends of evolutionary drift, deep models of protein evolution can capture both general and family-specific selective pressures critical for maintaining function. This dual capability endows models such as PEINT with the ability to balance exploration and exploitation—as evidenced by maintaining function in evolutionary trajectories that explore new regions of sequence space that are substantially different from known proteins. This outcome naturally lends itself to protein engineering, especially within the machine learning-guided directed evolution framework69. In this context, the ability to generate diverse starting points enables design efforts that can traverse a protein’s functional landscape more efficiently.

In a recent development, current methods aiming to better align pLMs with variant effect data show mixed results. Simple model scaling yields diminishing returns and leads frequently to overfitting25,26, whereas protein-specific fine tuning can be challenging and unstable57. By conditioning on wild-type sequences and evolutionary time, PEINT provides an encoder-agnostic framework for aligning general pLMs with family-specific evolutionary information. The PEINT framework offers a principled alternative to previous approaches, with a lightweight training scheme that yields substantial performance gains in a matter of hours on a single graphics processing unit. These benefits are most pronounced when evaluating variants encompassing several mutations, as well as on assays representative of general protein function, and showcase how PEINT can tune broadly pretrained pLMs by grounding them in local evolutionary neighbourhoods. As we demonstrated using different ESM models, we note that PEINT is a general framework that can use any pretrained BERT-style pLM as the base encoder model.

In sum, our work lays the foundation for understanding and training deep models of protein evolution on sequence data at scale, and demonstrates their effectiveness across key tasks relevant to interpreting natural protein evolution. We anticipate that future work will refine this framework for specific applications of interest.

Sources indicate that architecturally, we use an autoregressive decoder for its simplicity and access to exact likelihoods for comparison with classical models. However, other generative architectures may be more suitable for simulating sequences with user-defined constraints or incorporating experimental data to bias outputs in specific directions70.

It has been revealed that we note that by adopting a more flexible architecture, we trade certain theoretical properties for increased expressivity. For example, we lose the guarantee of time consistency inherent to CTMC-based formulations, in which evolving a sequence from x to y directly over time t1 + t2 is identical in distribution to evolving x for time t1 to an intermediate state z, and then for an additional t2 to reach y. Although PEINT does not explicitly enforce such path composability across intermediate time points, this trade-off allows it to directly model complex indels and non-Markovian sequence dependencies. In practice, we found the resulting deviations from time consistency to be relatively minor over short branch lengths. A principled middle ground is to treat the alignment as a fixed input to a neural network that can learn powerful site-specific evolutionary operators15,71.

In a recent development, on the data front, future work is needed to develop more principled strategies for combining information from different sources. In this study, we train the PEINT transformer on evolutionary transitions spanning a variety of protein families. The importance of this diversity for modelling a given single protein family remains not well understood, and identifying optimal strategies for a user’s protein of interest will require further investigation. This may be especially important for modelling rapid evolutionary processes, such as those seen in viral proteins.

Finally, our current PEINT framework treats protein folds and families as independent evolutionary units. We believe that extending this approach to model protein complexes and multi-domain proteins in a principled way presents both a challenge and an exciting direction for future research.

Methodological details can be found in the Supplementary Methods, including details about dataset creation, model design and implementation, evaluation of transition likelihoods, ablation studies, simulation of evolution along single branches, branch length estimations, MCMC sampling of evolutionary trajectories, simulation of evolution on phylogenetic trees, simulation benchmarking, assessment of the generalizability of PEINT, model interpretation, variant effect prediction and in vivo and in vitro characterizations of carbonic anhydrases.

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

Industry observers note that preprocessed data, including simulation outputs, predicted structures and held-out evaluation data, are available at Zenodo (https://doi.org/10.5281/zenodo.23315010)72. All other data supporting the findings of this study are available within the paper and its Supplementary Information.

Industry observers note that code used to train and build PEINT models can be found at https://github.com/songlab-cal/peint. Code used to evaluate the models and build paper figures can be found at https://github.com/songlab-cal/peint-paper. Pretrained PEINT model checkpoints are available at Zenodo (https://doi.org/10.5281/zenodo.23315010)72.

Industry observers note that minh, B. Q. et al. IQ-TREE 2: newly introduced models and efficient methods for phylogenetic inference in the genomic era. Mol. Biol. Evol. 37, 1530–1534 (2020).

Article  CAS  PubMed  PubMed Central  Google Scholar.

In a recent development, stamatakis, A. RAxML version 8: a tool for phylogenetic analysis and post-analysis of large phylogenies. Bioinformatics 30, 1312–1313 (2014).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Sources indicate that price, M. N., Dehal, P. S. & Arkin, A. P. FastTree 2—approximately maximum-likelihood trees for large alignments. PLoS ONE 5, e9490 (2010).

Article  PubMed  PubMed Central  Google Scholar.

Yang, Z., Kumar, S. & Nei, M. A new method of inference of ancestral nucleotide and amino acid sequences. Genetics 141, 1641–1650 (1995).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Industry observers note that henikoff, S. & Henikoff, J. G. Amino acid substitution matrices from protein blocks. Proc. Natl Acad. Sci. USA 89, 10915–10919 (1992).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Sources indicate that laine, E., Karami, Y. & Carbone, A. GEMME: a simple and fast global epistatic model predicting mutational effects. Mol. Biol. Evol. 36, 2604–2619 (2019).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Industry observers note that spence, M. A., Kaczmarski, J. A., Saunders, J. W. & Jackson, C. J. Ancestral sequence reconstruction for protein engineers. Curr. Opin. Struct. Biol. 69, 131–141 (2021).

Article  CAS  PubMed  Google Scholar.

Eck, R. V. & Dayhoff, M. O. Evolution of the structure of ferredoxin based on living relics of primitive amino acid sequences. Science 152, 363–366 (1966).

Article  CAS  PubMed  Google Scholar.

According to recent reports, jones, D. T., Taylor, W. R. & Thornton, J. M. The rapid generation of mutation data matrices from protein sequences. Comput. Appl. Biosci. 8, 275–282 (1992).

CAS  PubMed  Google Scholar.

Sources indicate that whelan, S. & Goldman, N. A general empirical model of protein evolution derived from multiple protein families using a maximum-likelihood approach. Mol. Biol. Evol. 18, 691–699 (2001).

Article  CAS  PubMed  Google Scholar.

In a recent development, le, S. Q. & Gascuel, O. An improved general amino acid replacement matrix. Mol. Biol. Evol. 25, 1307–1320 (2008).

Article  CAS  PubMed  Google Scholar.

Schöniger, M. & von Haeseler, A. A stochastic model for the evolution of autocorrelated DNA sequences. Mol. Phylogenet. Evol. 3, 240–247 (1994).

Article  PubMed  Google Scholar.

Robinson, D. M., Jones, D. T., Kishino, H., Goldman, N. & Thorne, J. L. Protein evolution with dependence among codons due to tertiary structure. Mol. Biol. Evol. 20, 1692–1704 (2003).

Article  CAS  PubMed  Google Scholar.

According to recent reports, le, S. Q., Dang, C. C. & Gascuel, O. Modeling protein evolution with several amino acid replacement matrices depending on site rates. Mol. Biol. Evol. 29, 2921–2936 (2012).

Article  CAS  PubMed  Google Scholar.

In a recent development, de Leonardis, M., Pagnani, A. & Barrat-Charlaix, P. Reconstruction of ancestral protein sequences using autoregressive generative models. Mol. Biol. Evol. 42, msaf070 (2025).

Article  PubMed  PubMed Central  Google Scholar.

Weigt, M., White, R. A., Szurmant, H., Hoch, J. A. & Hwa, T. Identification of direct residue contacts in protein–protein interaction by message passing. Proc. Natl Acad. Sci. USA 106, 67–72 (2009).

Article  CAS  PubMed  Google Scholar.

It has been revealed that jumper, J. et al. Highly accurate protein structure prediction with AlphaFold. Nature 596, 583–589 (2021).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Abramson, J. et al. Accurate structure prediction of biomolecular interactions with AlphaFold 3. Nature 630, 493–500 (2024).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Rao, R. M. et al. MSA transformer. In Proc. 38th International Conference on Machine Learning (eds Meila, M. & Zhang, T.) 8844–8856 (PMLR, 2021).

It has been revealed that akiyama, Y. et al. Expanding the scope of protein language modeling to protein-protein interactions with MSA pairformer. Cell 189, 4964–4979 (2026).

Article  CAS  PubMed  Google Scholar.

In a recent development, alley, E. C., Khimulya, G., Biswas, S., AlQuraishi, M. & Church, G. M. Unified rational protein engineering with sequence-based deep representation learning. Nat. Methods 16, 1315–1322 (2019).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Industry observers note that lin, Z. et al. Evolutionary-scale prediction of atomic-level protein structure with a language model. Science 379, 1123–1130 (2023).

Article  MathSciNet  CAS  PubMed  Google Scholar.

Madani, A. et al. Large language models generate functional protein sequences across diverse families. Nat. Biotechnol. 41, 1099–1106 (2023).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Alamdari, S. et al. Protein generation with evolutionary diffusion: sequence is all you need. Preprint at https://doi.org/10.7554/elife.112029.1 (2026).

In a recent development, ding, F. & Steinhardt, J. Protein language models are biased by unequal sequence sampling across the tree of life. In ICLR 2024 Workshop on Generative and Experimental Perspectives for Biomolecular Design (ICLR, 2024).

Hou, C., Liu, D., Zafar, A. & Shen, Y. Understanding language model scaling for protein fitness prediction. Nat. Comput. Sci. 6, 778–788 (2026).

Article  CAS  PubMed  Google Scholar.

According to recent reports, jagota, M. et al. Cross-protein transfer learning substantially improves disease variant prediction. Genome Biol. 24, 182 (2023).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Ye, C. et al. Predicting genome-wide functional constraints with GPN-star. Nature 659, 141–150 (2026).

Article  PubMed  PubMed Central  Google Scholar.

Felsenstein, J. Maximum likelihood and minimum-steps methods for estimating evolutionary trees from data on discrete characters. Syst. Biol. 22, 240–249 (1973).

Article  Google Scholar.

Recent findings suggest that prillo, S. et al. CherryML: scalable maximum likelihood estimation of phylogenetic models. Nat. Methods 20, 1232–1236 (2023).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Tenthorey, J. L. et al. Indels allow antiviral proteins to evolve functional novelty inaccessible by missense mutations. Cell Genom. 5, 100818 (2025).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Vaswani, A. et al. Attention is all you need. In Proc. 31st International Conference on Neural Information Processing Systems (eds von Luxburg, U. et al.) 6000–6010 (NeurIPS, 2017).

Sutskever, I., Vinyals, O. & Le, Q. V. Sequence to sequence learning with neural networks. In Proc. 28th International Conference on Neural Information Processing Systems (eds Ghahramani, Z. et al) 3104–3112 (NeurIPS, 2014).

In a recent development, candido, S. et al. Language modeling materializes a world model of protein biology. Preprint at bioRxiv https://doi.org/10.64898/2026.06.03.729735 (2026).

Sources indicate that hu, E. J. et al. LoRA: low-rank adaptation of large language models. In Proc. 10th International Conference on Learning Representations (ICLR, 2022).

Sources indicate that atteson, K. The performance of neighbor-joining methods of phylogenetic reconstruction. Algorithmica 25, 251–278 (1999).

Article  MathSciNet  Google Scholar.

In a recent development, wu, R. et al. High-resolution de novo structure prediction from primary sequence. Preprint at bioRxiv https://doi.org/10.1101/2022.07.21.500999 (2022).

It has been revealed that fletcher, W. & Yang, Z. INDELible: a flexible simulator of biological sequence evolution. Mol. Biol. Evol. 26, 1879–1888 (2009).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Recent findings suggest that trost, J. et al. Simulations of sequence evolution: how (un)realistic they are and why. Mol. Biol. Evol. 41, msad277 (2024).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Industry observers note that strope, C. L., Scott, S. D. & Moriyama, E. N. Indel-seq-gen: a upcoming protein family simulator incorporating domains, motifs, and indels. Mol. Biol. Evol. 24, 640–649 (2007).

Article  CAS  PubMed  Google Scholar.

Brohawn, S. G., Mármol del, J. & MacKinnon, R. Crystal structure of the human K2P TRAAK, a lipid- and mechano-sensitive K+ ion channel. Science 335, 436–441 (2012).

Article  CAS  PubMed  PubMed Central  Google Scholar.

According to recent reports, natale, A. M., Deal, P. E. & Minor, D. L. Jr. Structural insights into the mechanisms and pharmacology of K2P potassium channels. J. Mol. Biol. 433, 166995 (2021).

Article  CAS  PubMed  PubMed Central  Google Scholar.

van Kempen, M. et al. Fast and accurate protein structure search with Foldseek. Nat. Biotechnol. 42, 243–246 (2024).

Article  PubMed  Google Scholar.

Roney, J. P. & Ovchinnikov, S. State-of-the-art estimation of protein model accuracy using AlphaFold. Phys. Rev. Lett. 129, 238101 (2022).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Hsu, C. et al. Learning inverse folding from millions of predicted structures. In Proc. 39th International Conference on Machine Learning (eds Chaudhuri, K. et al.) 8946–8970 (PMLR, 2022).

It has been revealed that renne, V. & Bitbol, A.-F. Phylogeny-ESM2. GitHub https://github.com/Bitbol-Lab/Phylogeny-ESM2 (2024).

Industry observers note that verkuil, R. et al. Language models generalize beyond natural proteins. Preprint at bioRxiv https://doi.org/10.1101/2022.12.21.521521 (2022).

Desmarais, J. J. et al. DABs are inorganic carbon pumps found throughout prokaryotic phyla. Nat. Microbiol. 4, 2204–2215 (2019).

Article  CAS  PubMed  PubMed Central  Google Scholar.

In a recent development, merlin, C., Masters, M., McAteer, S. & Coulson, A. Why is carbonic anhydrase essential to Escherichia coli? J. Bacteriol. 185, 6415–6424 (2003).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Kimber, M. S. & Pai, E. F. The active site architecture of Pisum sativum β-carbonic anhydrase is a mirror image of that of α-carbonic anhydrases. EMBO J. 19, 1407–1418 (2000).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Rowlett, R. S. et al. Kinetic characterization of wild-type and proton transfer-impaired variants of β-carbonic anhydrase from Arabidopsis thaliana. Arch. Biochem. Biophys. 404, 197–209 (2002).

Article  CAS  PubMed  Google Scholar.

According to recent reports, smith, K. S., Ingram-Smith, C. & Ferry, J. G. Roles of the conserved aspartate and arginine in the catalytic mechanism of an archaeal β-class carbonic anhydrase. J. Bacteriol. 184, 4240–4245 (2002).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Bracey, M. H., Christiansen, J., Tovar, P., Cramer, S. P. & Bartlett, S. G. Spinach carbonic anhydrase: investigation of the zinc-binding ligands by site-directed mutagenesis, elemental analysis, and EXAFS. Biochemistry 33, 13126–13131 (1994).

Article  CAS  PubMed  Google Scholar.

Sources indicate that khalifah, R. G. The carbon dioxide hydration activity of carbonic anhydrase. I. Stop-flow kinetic studies on the native human isoenzymes B and C. J. Biol. Chem. 246, 2561–2573 (1971).

Article  CAS  PubMed  Google Scholar.

Bar-Even, A. et al. The moderately efficient enzyme: evolutionary and physicochemical trends shaping enzyme parameters. Biochemistry 50, 4402–4410 (2011).

Article  CAS  PubMed  Google Scholar.

Sources indicate that frazer, J. et al. Disease variant prediction with deep generative models of evolutionary data. Nature 599, 91–95 (2021).

Article  CAS  PubMed  Google Scholar.

Recent findings suggest that meier, J. et al. Language models enable zero-shot prediction of the effects of mutations on protein function. In Advances in Neural Information Processing Systems 34 (eds Ranzato, M. et al.) 29287–29303 (NeurIPS, 2021).

Gordon, C. W., Lu, A. X. & Abbeel, P. Protein language model fitness is a matter of preference. In Proc. 13th International Conference on Learning Representations (ICLR, 2025).

Pugh, C. W. J., Nuñez-Valencia, P. G., Dias, M. & Frazer, J. From likelihood to fitness: improving variant effect prediction in protein and genome language models. In Advances in Neural Information Processing Systems 38 (eds Belgrave, D. et al.) 130835–130866 (NeurIPS, 2025).

Notin, P. et al. Proteingym: large-scale benchmarks for protein fitness prediction and design. In Advances in Neural Information Processing Systems 36(eds Oh, A. et al.) 64331–64379 (NeurIPS, 2023).

Article  Google Scholar.

Prillo, S., Wu, W. Y. & Song, Y. S. Ultrafast classical phylogenetic method beats large protein language models on variant effect prediction. In Advances in Neural Information Processing Systems 37 (eds Globerson, A. et al.) 130265–130290 (NeurIPS, 2024).

Article  PubMed  PubMed Central  Google Scholar.

In a recent development, vig, J. et al. BERTology meets biology: interpreting attention in protein language models. In Proc. 9th International Conference on Learning Representations (ICLR, 2021).

In a recent development, zhang, Z. et al. Protein language models learn evolutionary statistics of interacting sequence motifs. Proc. Natl Acad. Sci. USA 121, e2406285121 (2024).

Article  CAS  PubMed  PubMed Central  Google Scholar.

It has been revealed that trinquier, J., Uguzzoni, G., Pagnani, A., Zamponi, F. & Weigt, M. Efficient generative modeling of protein sequences using simple autoregressive models. Nat. Commun. 12, 5800 (2021).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Mistry, J. et al. Pfam: the protein families database in 2021. Nucleic Acids Res. 49, D412–D419 (2021).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Needleman, S. B. & Wunsch, C. D. A general method applicable to the search for similarities in the amino acid sequence of two proteins. J. Mol. Biol. 48, 443–453 (1970).

Article  CAS  PubMed  Google Scholar.

Nesterenko, L., Blassel, L., Veber, P., Boussau, B. & Jacob, L. Phyloformer: fast, accurate, and versatile phylogenetic reconstruction with deep neural networks. Mol. Biol. Evol. 42, msaf051 (2025).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Starr, T. N., Picton, L. K. & Thornton, J. W. Alternative evolutionary histories in the sequence space of an ancient protein. Nature 549, 409–413 (2017).

Article  CAS  PubMed  PubMed Central  Google Scholar.

Yang, K. K., Wu, Z. & Arnold, F. H. Machine-learning-guided directed evolution for protein engineering. Nat. Methods 16, 687–694 (2019).

Article  CAS  PubMed  Google Scholar.

Xiong, J. et al. Property guidance for protein sequence generative models with ProteinGuide. Nat. Biotechnol. https://doi.org/10.1038/s41587-026-03207-z (2026).

Article  PubMed  Google Scholar.

Lu, S. Z. et al. Conditionally site-independent neural evolution of antibody sequences. In Proc. 43rd International Conference on Machine Learning (eds Zhang, T. et al.) 81609–81636 (PMLR, 2026).

It has been revealed that koehl, A., Prillo, S., Cao, Y., Xiong, J. & Song, Y. PEINT: data, model checkpoints, and reproducibility artifacts. Zenodo https://doi.org/10.5281/zenodo.22151901 (2026).

According to recent reports, we thank members of the Song and Savage laboratories for feedback on the manuscript, and N. Daniel and A. Martin for help with the stopped-flow system. We thank M. Steinegger and E. Levy Karin for helpful discussions on our work.

This research is supported in part by National Institutes of Health (NIH) grants 5K99GM152766, R35-GM134922 and R35-GM161566, and by the University of California National Laboratory Fees Research Program of the University of California Office of the President (UC AI Science at Scale Grant L26CR10102). D.F.S. is an investigator with the Howard Hughes Medical Institute.

These authors contributed equally: Antoine Koehl, Sebastian Prillo.

Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, Berkeley, CA, USA.

Antoine Koehl, Sebastian Prillo, Yufan Cao, Matthew Liu, Junhao Xiong, Lillian Weng & Yun S. Song.

Department of Molecular and Cell Biology, University of California, Berkeley, Berkeley, CA, USA.

Howard Hughes Medical Institute, University of California, Berkeley, Berkeley, CA, USA.

Innovative Genomics Institute, University of California, Berkeley, Berkeley, CA, USA.

Department of Statistics, University of California, Berkeley, Berkeley, CA, USA.

Center for Computational Biology, University of California, Berkeley, Berkeley, CA, USA.

Search author on:PubMed Google Scholar.

Search author on:PubMed Google Scholar.

Search author on:PubMed Google Scholar.

Search author on:PubMed Google Scholar.

Search author on:PubMed Google Scholar.

Search author on:PubMed Google Scholar.

Search author on:PubMed Google Scholar.

Search author on:PubMed Google Scholar.

A.K., S.P. and Y.S.S. conceptualized the study. A.K. developed and implemented the encoder–decoder model. S.P. constructed training data. A.K., S.P., M.L. and Y.S.S. designed benchmarks. A.K., S.P., Y.C., M.L., J.X. and L.W. tested the method and analysed data, with guidance from Y.S.S. J.X. developed the variant effect prediction pipeline. Y.C. performed ablation studies. D.F.S. provided advice on experimental characterizations of carbonic anhydrases. Y.S.S. supervised the project. A.K. wrote the initial draft of the manuscript and Y.S.S. edited it; all authors reviewed the manuscript.

Correspondence to Yun S. Song.

Recent findings suggest that A.K., S.P. and Y.S.S. are listed as inventors on a provisional patent application related to the methods described in this manuscript: US Provisional Application No. 63/962,012 filed by the University of California, Berkeley. D.F.S. is a co-founder and scientific advisory board member of Scribe Therapeutics. The other authors declare no competing interests.

Recent findings suggest that nature thanks Bastien Boussau, who co-reviewed with Estelle Bergiron, and Pranam Chatterjee for their contribution to the peer review of this work. Peer reviewer reports are available.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Recent findings suggest that A PEINT model was trained on top of the pretrained ESMC (300 M) encoder model. Results illustrate performance on the same evaluation metrics for the PEINT (ESM2-150M) model presented in the main text. All plots show data from 545 held-out families. a, Held-out transition likelihood. b, Jensen-Shannon Divergence of amino acid usage at conserved sites compared to real sequences for simulated sequences. Boxplots show the median value as the center, and the box is bounded by Q1 (25th percentile) and Q3 (75th percentile). The whiskers extend to the furthest data point within 1.5 times the interquartile range (IQR), with outliers beyond the min/max of the whiskers shown as individual c, Evaluation of simulation endpoints using AF2Rank. d, Evaluation of simulation endpoints using OmegaFold. The stronger base model ESMC leads to improved performance across these metrics, with most clear separation occurring on structure confidence metrics. PEINT (ESMC) measured per-family insertion/deletion (indel) rates are similar to inferred rates in real sequence (e) and are highly congruent with those generated by PEINT (ESM2-150M) (f). Each point indicates the total indel count for a family. PEINT-ESMC tends to generate longer indel events (g) than what is observed in real sequences and from simulations using PEINT-ESM2 (\(n=545\) families).

Industry observers note that a, Model variants compared. We trained PEINT transformer models with frozen ESM2-8M, ESM2-35M, ESM2-150M, or ESMC (300 M) as pretrained backbones, as well as a variant in which the ESM2-150M backbone was fine-tuned with LoRA. We additionally performed ablations of the ESM2-150M model by removing the auxiliary masked language modeling (MLM) loss or the extra trainable encoder layers (which effectively also removes the MLM loss). b, Mean per-site transition likelihood on held-out cherries as a function of transition time \(t\). Inset: the short-branch region where the curves are tightly clustered near their peak and are magnified to read their ranking. Two pairs nonetheless overlap at this scale (ESM2-35M with no MLM loss, and LoRA with frozen ESM2-150M), and are resolved in c. c, Mean held-out per-site likelihood at \(t\approx 0.1\) over the course of training, for the same models. Performance is primarily determined by and scales with the pretrained backbone capacity. Removing the auxiliary MLM loss results in early saturation and instability in continued training. Removing the extra encoder layers results in lower performance in early stages, although this difference disappears with further training. LoRA fine-tuning performs on par with the frozen ESM2-150M backbone.

According to recent reports, results shown are for simulations of 545 held-out families. a, Mutation rates of various models across parent-child pairs were compared to those inferred using ancestral reconstructions from real trees and aggregated by branch length. b, Back-mutation rates as a function of branch length, stratified by model. A back mutation at a site is counted if the parent to child mutation re-establishes the grandparent state. The LG + S256 demonstrates the highest back mutation rate of any simulation model. c, Per-path summed mutation counts vs root-to-leaf hamming distance, normalized by non-gap sites, for various models and inferred real data, showing similar mutational burdens across simulations, though mildly elevated saturation in the LG + S256 model. d, Similarity of simulated sequences to any extant sequence in the BLAST nonredundant protein database (nr). For each family, the closest sequence (by \( \% \) identity) to each leaf node in the nr database was identified, and the median closest distance was calculated. Comparison between different simulation methods show they all generate sequences that are distinct from extant sequences (\( < 60 \% \) sequence identity). Boxplots show the median value as the center, and the box is bounded by Q1 (25th percentile) and Q3 (75th percentile). The whiskers extend to the furthest data point within 1.5 times the interquartile range (IQR), with outliers beyond the min/max of the whiskers shown as individual points.

In a recent development, a, 3Di conservation analysis schematic. For each protein family, real and simulated sequences were translated to 3Di states using the ProstT5 model. Conserved sites were identified from the real MSA, and usage patterns of 3Di states at those sites were compared between real sequences and simulated ones. Matrices show per-site 3Di state frequencies in both subtrees of real sequences, as well as the various simulation methods, including PEINT (ESMC). b, Aggregate mean per-site Jensen-Shannon divergence between real and simulated 3Di frequencies at empirically conserved sites across all simulation families (\(n=545\)). c, Comparison of the number of per-family indel events in real or PEINT-simulated sequences as a function of median sequence length in that family (\(n=545\) held out families). This correlation is lower than between models.

Industry observers note that a, For the 545 held-out families from the hold-out dataset split, we compare the quality of simulated sequences to real sequences using AlphaFold2 and ESM-Inverse Folding (ESM-IF) as evaluating models. The simulated sequences are aligned and provided to AlphaFold2 as the multiple sequence alignment to aid in structure prediction. b, AlphaFold2 pLDDT per family (\(n=545\)). c, Per-family pLDDT (\(n=545\)) difference to the structure predicted using a real MSA. Classical simulators using independent sites models (WAG, LG, LG + C60, LG + S256) generate poor MSAs for the purpose of structure prediction. PEINT (green) generates MSAs that yield structure predictions with substantially higher confidence scores, many of which fall within the range observed for natural MSAs (purple). d,e, Orthogonal validation using an inverse folding model (ESM-IF) highlights similar patterns. Sequences generated using PEINT models (both ESM2-150M and ESMC derived) show structure-conditioned likelihoods (d, \(p({seq}{\rm{| }}{structure})\) using the family representative structure) and sequence recovery from OmegaFold-predicted structures (e) that are in line with real sequences and better than classical simulators. Boxplots show the median value as the center, and the box is bounded by Q1 (25th percentile) and Q3 (75th percentile). The whiskers extend to the furthest data point within 1.5 times the interquartile range (IQR). In the case that outliers extend beyond the whiskers, they are shown as individual points.

a, Markov chain Monte Carlo (MCMC) setup: To simulate on trees, branches are converted to expected mutation counts as \(\sim {tL}\) where \(L\) is the length of the protein. Mutations are proposed and energies calculated using either a single protein language model (pLM) pseudolikelihood ratio or a composite term containing an attenuated pseudolikelihood ratio combined with a predicted distogram loss on structure. Mutations are proposed until the number of accepted mutations equals the expected count. b, The weight of the pLM pseudolikelihood lowers proposal acceptance rates (blue line), but leads to more evolutionarily reasonable sequences (red line). c, Runtime of the MCMC approaches is much higher than PEINT, which amortizes proposals and time calibration by training on evolutionary transitions. d, The endpoints of limited simulations using classical (gray), PEINT (green), or MCMC sampling using pure pLM (blue) or a composite, attenuated pLM energy (red) show that the pLM maintains conservation patterns. e, They lead to sequences that are congruent with the family fold, as measured by ESM-IF. Bar plots show the mean and standard deviation from \(n=7\) runs, with raw per-family data points overlaid.

Recent findings suggest that ESM-IF inverse folding structure conditioned likelihoods (a), and sequence recovery (b) stratified by the closest training sequence to each of the held-out families in Fig. 3, Extended Data Fig. 1. All models show similar behavior, with a pronounced decrease in structural confidence for families that are true evolutionary isolates that mirrors what is observed for real sequences. Boxplots show the median value as the center, and the box is bounded by Q1 (25th percentile) and Q3 (75th percentile). The whiskers extend to the furthest data point within 1.5 times the interquartile range (IQR). In the case that outliers extend beyond the whiskers, they are shown as individual points.

Recent findings suggest that a, Mean Spearman correlation on 201 families in the ProteinGym substitution benchmark60. The families are stratified by assay type (Organismal Fitness (\(n=69\)), Stability (\(n=66\)), Expression (\(n=16\)), Activity (\(n=38\)), Binding (\(n=12\))), and model, with the base protein language model grouped with its PEINT adapter model. The height of each bar represents the mean of the per-family Spearman correlations for each assay type. Error bars represent the standard deviation across proteins within each assay type. For each model, the average over the mean Spearman correlations for the five assay types is shown in the figure legend. b, Comparison of single-sequence input models across all ProteinGym assays. c, Comparison of single-sequence input models across the “Organismal Fitness” assays in ProteinGym. The PEINT alignment of base protein language models is most pronounced in this setting.

According to recent reports, top: Categorical Jacobian63 analysis of the decoder half of the PEINT model. a, Cartoon showing the categorical Jacobian approach for the decoder. The \(x\) sequence is fixed, and each position in \(y\)’s input are mutated, and perturbations are measured at downstream positions as a logit ratio to non-mutated. b, Example output (top right) categorical Jacobian matrix, overlayed with the contact map (bottom left) from the structure of the input sequence (PDB ID: 4K6E). The top \(L\) strongest categorical Jacobian couplings are coloured blue if they correspond to a pair of residues in contact with one another, and red if not. c, Aggregated contact precision of the Top \(L\) categorical Jacobian couplings across \(553\) sequences from test-set families (green) compared to ESM (encoder-only) categorical jacobian couplings (purple). Bottom: Categorical Jacobian analysis between PEINT encoder and decoder blocks. Inset boxplots show the median, first (Q1) and third (Q3) quartiles and inter-quartile range, defined as 1.5 times Q3-Q1. d, Cartoon showing the categorical Jacobian calculation for the decoder. The \(x\) sequence is mutated one site at a time, and perturbations to each position in the output of \(y\) are measured. e, Example for a single pair of sequences from a Pfam seed alignment. The ground truth alignment from Pfam is shown as gray squares. Top: The trace matrix from a classical pairwise alignment algorithm (Needleman-Wunsch) is shown as circles, colored if each aligned site is correct (green) or incorrect (red). Bottom: PEINT’s encoder-decoder categorical Jacobian matrix is shown, with couplings colored green if they correspond to correctly aligned residue pairs, and red if not. Inset: the raw values from the categorical Jacobian are shown at a stretch of inserted residues suggesting a ‘soft’ alignment in the gap region. f, Aggregate metrics as in e are shown over 891 randomly selected Pfam-A domain seed alignments. Predicted alignment F1 scores are shown as a function of the pairwise sequence identity from the ground truth Pfam-seed alignment. Information flow between PEINT’s encoder and decoder suggests a learned alignment. The plot indicates the mean model F1 score and standard deviation for each percent identity bin.

In a recent development, supplementary Methods, Text, Table 1, Figs. 1–3 and References.

Koehl, A., Prillo, S., Cao, Y. et al. A general framework for modelling realistic protein evolution in time. Nature (2026). https://doi.org/10.1038/s41586-026-11370-1.

Version of record: 02 December 2026.

DOI: https://doi.org/10.1038/s41586-026-11370-1.

Anyone you share the following link with will be able to read this content:.

Sorry, a shareable link is not at the moment available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative.

📌 Read also:

→ Read original article