Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2026 Jul 10.
Published in final edited form as: Proc Natl Acad Sci U S A. 2026 Jul 2;123(27):e2535494123. doi: 10.1073/pnas.2535494123

Beyond native sequence recovery: Improved modeling of the sequence-energy landscape of protein structures

Foster Birnbaum a,b, Amy E Keating a,b,c,1
PMCID: PMC13342849  NIHMSID: NIHMS2191880  PMID: 42391398

Abstract

Computational protein design using machine learning models has advanced rapidly since the introduction of AlphaFold2. There is now a suite of tools that enable in silico design of proteins with desired structures and properties. Most design workflows require fitting a designed backbone with a sequence that stabilizes it, and many machine learning sequence design models have been proposed. These models are trained to recover the native sequence paired with a known structure, a task known as native sequence recovery (NSR). Here, we demonstrate the limitations of optimizing a sequence design model only for NSR. We show that NSR is often misaligned with more important metrics of model performance: the compatibility of the generated sequence with the desired fold and the ability of the model to predict the energetic effects of mutations. We introduce PottsMPNN, which is trained to generate a Potts energy function consisting of single-residue and residue-pair terms from a protein backbone, and we demonstrate that learning a Potts model reduces NSR but improves sequence generation and energy prediction. We also trained PottsMPNN with noised backbone structures and multiple sequence alignments. In tests on held-out data, NSR decreased, but the quality of the designed sequences and energy predictions improved. By demonstrating the limitations of optimizing for NSR and the effectiveness of strategies that avoid NSR overoptimization, our work advances sequence design and highlights future directions for the broader protein design field.

Introduction

Computational protein design can address outstanding needs in many areas, including human health and sustainability (1). A common design approach is to generate a protein backbone structure with desired properties (e.g., shape complementarity to a desired binding target) and then design a sequence that is consistent with that backbone (1). Deep learning methods that can be used for this task have advanced rapidly (2). Broadly, such techniques involve optimizing a mathematical model defined by a specific functional form and a set of parameters. The parameters are determined through a training process that involves learning from examples. In the field of protein modeling and design, AlphaFold (versions 1 through 3) is a deep learning method that can predict a protein structure from a protein sequence (35), and RFdiffusion is a deep learning method that can generate novel, realistic protein structure backbones (6). Both models were trained using large numbers of experimentally determined or predicted protein structures.

Several deep learning methods have been trained to predict amino-acid sequences compatible with a given protein backbone structure (715). These models learn the probability distribution over possible sequences conditioned on the input backbone, Pθ(sf), where s is the sequence, f is the backbone, and θ represents the learned parameters. Of these models, ProteinMPNN is the most widely used for protein design (10). ProteinMPNN was built on foundational work that established that using a graph neural network (GNN), with residues as graph nodes and model parameters θ describing the properties of nodes and relationships between them, facilitates learning sequence-structure relationships (7). In this framework, for a protein of length L,Pθ(sf) is represented as L single-site probability distributions over the 20 standard amino acids that are extracted from the node embeddings in the graph.

Li et al. developed a model, COORDinator, that is based on an alternative framework where Pθ(sf) is represented as a function that decomposes the sequence-energy landscape into a sum of self energies and pair energies, expressed as H(s)=i=1|s|hi(s[i])+i=1|s|j>i|s|Jij(s[i],s[j]) for self energies h and pair energies J (see Potts model for details) (11). This functional form is called a Potts model. Such models, along with other pairwise interaction analyses such as double-mutant cycles, have been used to model protein energies for decades because protein folding and stability emerge from networks of cooperative pairwise interactions, such as hydrogen bonds, hydrophobic packing, and salt bridges (1620). Li et al. and several other groups have shown that learning a pairwise-decomposable energy function from a backbone structure can outperform learning single-site probability distributions on some tasks (11, 2123).

One way to assess the success of a sequence design model is to determine whether the sequences it generates fold into the desired structures. A definitive assessment requires experimental testing, but as a computational proxy, and to determine the sequences most worth testing, tools like AlphaFold and the structure-modeling method Rosetta (24) are frequently used to assess the quality of sequence designs. Because designed sequences lack homologs, AlphaFold is run without multiple sequence alignments (MSAs) or templates when used as a design filter (10). Design pipelines that generate large numbers of sequences with ProteinMPNN, score them with AlphaFold or Rosetta, and retain only the high-scoring designs have generated sequences that adopt desired structures with high experimental success rates (2528).

Because sequence design models learn the probability distribution of residues given a protein backbone, they can also predict the effect of mutations (9, 11, 29, 30). This task relies on the learned probability distribution Pθ(sf) matching the real sequence-energy landscape for a given structure: i.e., if a model evaluates one sequence to be more likely than another, that should reflect greater protein stability. Because sequence design models are trained to predict the probability of a sequence given a structure, they should be evaluated using physical properties that are closely tied to structural features (e.g., folding and binding energies) as opposed to molecular or cellular functions (e.g., effects on protein expression or cell growth) that are indirect readouts of such thermodynamic properties (31).

The two use cases described above provide two optimization objectives for sequence design models: (1) sequence-structure self-consistency, which assesses the compatibility of the designed sequence with the desired structure, and (2) mutation-effect prediction, which assesses the accuracy of the learned sequence-energy landscape and is quantified by the correlation between experimentally observed and predicted mutation energies. Unfortunately, there are impediments to training on either objective. The sequence-structure self-consistency scores are either nondifferentiable with respect to sequence (Rosetta) or slow to compute and difficult to optimize in sequence space (AlphaFold). And although energy prediction is an effective objective on which to fine-tune the weights of a previously trained model (29, 30), there are insufficient experimental energy data to train a generalizable model from scratch.

Because of these limitations, sequence design models are trained on the task of native sequence recovery (NSR). Given a pairing of backbone structure, fnat, and native sequence, snat, from the Protein Data Bank (PDB) (32) or AlphaFoldDB (9, 33, 34), the task is to maximize Pθsnatfnat. Training on NSR is empirically effective. The reference energies for amino acids in the Rosetta energy function were set by optimizing for NSR (24, 35), and Rosetta has been successfully used to design many proteins (36). ProteinMPNN was trained on NSR and can design sequences that fold to intended structures and can be fine-tuned to predict energies with state-of-the-art performance (29, 30).

However, there are several reasons why optimizing for continual improvement in NSR may fail to produce corresponding improvements in sequence-structure self-consistency and energy prediction. A fundamental challenge is that the relationship between protein sequence and structure is many-to-many, not one-to-one. For any given fold fnat,snat is not the only sequence that will adopt that fold; many proteins that share only 40% sequence identity adopt highly similar structures (37, 38). Furthermore, the native sequence is usually not the sequence that maximizes the stability of a structure. Deep mutational scanning experiments show that although most mutations in native proteins are energetically unfavorable, many positions have at least one favorable substitution relative to wildtype (3941). Furthermore, a protein sequence snat does not adopt a single structure: the structures of proteins are over-specified by the atomic coordinates deposited in the PDB, which capture a single conformation that lies in a local optimum of the force field used for structure refinement. Optimizing for similarity to snat ignores sequence-structure degeneracy and the fact that evolution may select for sequences that are good enough to function and not necessarily optimal in any way. Continuously maximizing Pθsnatfnat may therefore result in an unrealistic model of the sequence-energy landscape.

We benchmarked state-of-the-art sequence design models on sequence-structure self-consistency and energy prediction. We found that ProteinMPNN (10), Frame2Seq (12), and Caliby (23) achieved the best performance, even though they generate sequences with lower NSR compared to other models. We then tested several ways of altering the training task to better reflect principles underlying protein sequence-structure relationships. First, we developed PottsMPNN, a sequence design model that is trained to learn a Potts model and, simultaneously, single-site amino-acid probability distributions. PottsMPNN achieved lower NSR but outperformed all models on sequence-structure self-consistency and energy prediction. Second, consistent with an observation by Dauparas et al., we found that training with coordinate noise improves sequence-structure self-consistency (10). We show that introducing noise during training also improves energy prediction and that training with noise is beneficial because it prevents overfitting to NSR during training. Third, and most importantly for reducing reliance on NSR, we trained on MSAs to directly provide the model with examples of related sequences that adopt a shared fold. Doing so improved both sequence-structure self-consistency and energy prediction. Our results demonstrate that NSR is not the right objective for state-of-the-art sequence design models and that optimizing for more biologically appropriate objectives increases model performance.

Results

PottsMPNN architecture.

PottsMPNN is a GNN that represents the protein backbone structure as a graph. Nodes in the graph represent residues and are used to predict single-site amino acid probability distributions, and edges in the graph represent interactions between residues and are used to predict energies. PottsMPNN generates sequences autoregressively by iterating over the node representations and selecting high-probability amino acids at each site. PottsMPNN generates a Potts model by using the self edges in the graph to predict the self energies (h) and using the pair edges to predict the pair energies (J) (Fig. 1; see Model architecture for details). The Potts model is used to score sequence variants, such as those resulting from point mutations.

Fig. 1.

Fig. 1.

PottsMPNN is a graph neural network that learns a Potts model energy function and single-site residue probabilities conditioned on protein structure. The model input is a protein structure backbone that is used to define a k-NN graph. The nodes and edges of the graph are encoded using a message-passing neural network. The edges, including self edges, are supervised to learn single and pairwise residue interaction energies in the form of a Potts model (H(s)), which is used to compute the energies of sequences conditioned on structure. The Potts model is supervised using a negative log composite pseudo-likelihood loss (E) that maximizes the probabilities of native-residue pairs. The nodes are decoded autoregressively to generate single-site amino-acid probabilities and are supervised by a negative log-likelihood loss V that maximizes the likelihood of the native sequence; during inference, the nodes are used to generate a sequence (sgen). See Methods for details.

PottsMPNN integrates two models: COORDinator (11) and ProteinMPNN (10). PottsMPNN uses the same architecture as ProteinMPNN, with the addition of a single neural network layer that applies a linear function to reshape the edge embeddings into the form of a Potts model. The Potts model is supervised using the negative log composite pseudo-likelihood loss developed for COORDinator, which rewards the model for assigning a high probability to the native pair of residues at a given pair of positions (graph edge loss E). As observed by Li et al., the Potts model learned using this loss function can predict energies effectively, but the sequences derived from using Markov chain Monte Carlo (MCMC) to sample from the Potts model are often low complexity, and running MCMC sampling takes a long time (11). Accordingly, PottsMPNN retains the autoregressive sequence generation method from ProteinMPNN to generate single-site probability distributions at each graph node that are supervised to reward the model for assigning a high probability to the native residues at each site (graph node loss V). The model is trained using a composite loss that is the sum of E and V, equally weighted.

Model benchmarking.

We compared PottsMPNN with many other sequence design models. Because the data on which models were trained can have a significant effect on performance, we focused on models that were trained—or that we retrained—on the structurally nonredundant dataset curated by Ingraham et al. (7) from the CATH 4.2 database (42) with no CATH topology classification overlap between the training, validation, and test sets (we refer to this nonredundant dataset as the CATH 4.2 dataset; see Datasets for details). These models are ProteinMPNN (10), GVP (8), Frame2Seq (12), KW-Design (13), and MapDiff (15). We also tested UniIF (14), which was trained on a nonredundant dataset curated from the CATH 4.3 database. We tested ProteinMPNN because it provided the model architecture that we used to train PottsMPNN and because it is the most widely used model for protein design; we retrained ProteinMPNN on the CATH 4.2 dataset to facilitate direct comparisons and, because ProteinMPNN was originally trained on the larger PDB-clust dataset (10) (see Datasets for details) that includes multichain proteins, we also trained versions of PottsMPNN on the PDB-clust dataset. We tested GVP because it introduced the Geometric Vector Perceptron graph neural network layer, an architecture used by several other sequence design models, including ESM-IF (9). We selected the other four models to include those with among the highest reported NSR (MapDiff and UniIF), one model with intermediate NSR (KW-Design), and one model shown to be experimentally successful even at low NSR (Frame2Seq).

Sequence-structure self-consistency was evaluated on the CATH 4.2 or PDB-clust test sets in two ways. First, we predicted structures of generated sequences with AlphaFold2 and calculated the TM-score (43) between predicted and native structures. TM-score is a metric of structural similarity that ranges from 0 to 1, with 0 indicating no structural similarity and 1 indicating structural identity. Second, we calculated length-normalized Rosetta energies for proteins constructed by fitting generated sequences onto the native structures. Rosetta provides an assessment of biophysical structural plausibility that is orthogonal to AlphaFold-derived metrics and is frequently used to assess designed protein quality (25, 26). See Sequence-structure self-consistency for details.

To validate model performance using experimental data, we evaluated energy prediction on three large datasets of point mutation effects: the Megascale dataset (202,804 mutations across 232 proteins) (40), FireProt (2,301 mutations across 64 proteins) (44), and SARS-CoV-2 RBD (~ 4,000 mutations) (41) (see Energy prediction for details). Notably, many Megascale proteins are de novo designs, providing a stringent test of generalization to non-natural sequences.

Figure 2 shows the results of PottsMPNN and six sequence design models trained without noise on NSR, sequence-structure self-consistency, and energy prediction. Fig. 2A shows that the NSR of ProteinMPNN and PottsMPNN are very low relative to other models: the best model, MapDiff, achieves ~58% NSR, while PottsMPNN achieves only ~44% NSR. However, Figs. 2BC show a very different trend for sequence-structure self-consistency. PottsMPNN achieves the highest sequence-structure self-consistency: PottsMPNN sequences folded by AlphaFold2 have a significantly higher average TM-score to the native structures compared to the sequences generated by all other models (Fig. 2B), and PottsMPNN sequences threaded onto the native structure have significantly better Rosetta scores than the sequences generated by all other models except Frame2Seq (Fig. 2C). The improved sequence-structure self-consistency of PottsMPNN sequences is also apparent when examining the fraction of sequences with TM-scores above various thresholds (SI Appendix, Fig. S1) and the confidence of the predicted structures (SI Appendix, Fig. S2).

Fig. 2.

Fig. 2.

NSR does not correlate with performance on sequence-structure self-consistency or energy prediction for models trained on the CATH 4.2 dataset (except for UniIF, which was trained on the CATH 4.3 dataset) and tested on the benchmarking subset of the CATH 4.2 test set. (A) NSR results for each model. (B) TM-scores between native structures and AlphaFold2 predicted structures for sequences generated using each model. (C) Rosetta scores (multiplied by −1 and normalized for sequence length) after threading generated sequences onto the native backbone and relaxing for each model. (D) Pearson r for using each model to predict the effect of single-site mutations on protein stability for three datasets. For (A - C), error bars show SEM over the proteins in the test set after averaging results over three retrained model replicates for ProteinMPNN and PottsMPNN; for (D), error bars show SEM over three retrained model replicates for ProteinMPNN and PottsMPNN. Stars indicate statistical significance relative to PottsMPNN, assessed using a two-tailed paired t test over per-protein values for (A - C) and a two-tailed unpaired t-test over average Pearson r values for (D) (*P < 0.05, **P < 0.01, ***P < 0.001, ****P < 0.0001; for (A - C), no star indicates nonsignificance).

For stability prediction, PottsMPNN outperforms the other models (Fig. 2D). A case study of 2KXD (45, 46), a protein in the Megascale protein stability test set, shows that PottsMPNN predictions are more correlated with experimental values than are ProteinMPNN predictions (SI Appendix, Figs. S3AB). Coloring the structure by persite Pearson r values shows that PottsMPNN is especially good at predicting the effects of mutations in the core of the protein (SI Appendix, Figs. S3CD).

We observed the same trend in expanded benchmarking that included additional models and models trained on the significantly larger PDB (32) or AlphaFoldDB (9, 33, 34) datasets: models with the highest NSR do not have the best sequence-structure self-consistency or energy prediction performance (SI Appendix, Table S1).

Local sequence optimization using energy predictions.

Given that the Potts model performs well when predicting the effects of single-site mutations, we hypothesized that it could improve the sequences generated autoregressively using the single-site probability distributions. To test this, we visited each position in the sequence and used the Potts model to find favorable substitutions (see Sequence generation for details). We tracked how sequence-structure self-consistency changed during the local optimization process, and we found that both TM-scores and Rosetta scores consistently improved, with notable alignment between the change in energies predicted by the Potts model and the change in Rosetta scores (SI Appendix, Fig. S4). Energies predicted using single-site probabilities did not reflect that the sequences improve in quality as the local optimization progresses (SI Appendix, Fig. S4). Iterative optimization to convergence did not result in continued improvement in sequence quality after each site had been visited once (SI Appendix, Fig. S5). Because the local optimization requires scoring every possible mutation at all positions in the sequence, it requires more inference time, but sequence generation remains fast at 0.32 ± 0.16 seconds per sequence (SI Appendix, Fig. S6).

The importance of explicitly modeling pairwise interactions.

We explored why PottsMPNN is superior to ProteinMPNN for energy prediction. PottsMPNN learns a Potts model from the edges in the graph embedding of the protein—by supervising joint probability distributions at pairs of sites—and simultaneously learns single-site probability distributions. In contrast, ProteinMPNN only learns single-site probability distributions. To test if the Potts model learned by PottsMPNN is critical to its performance, we compared the sequence scoring ability of the Potts model from PottsMPNN with the sequence scoring ability of the single-site probability distributions from PottsMPNN. Although these two functions are learned simultaneously during training, subject to a joint loss function, using the single-site probabilities to predict energies resulted in significantly worse performance than using the Potts model; using the single-site probabilities from PottsMPNN performs equivalently to using the single-site probabilities from ProteinMPNN (SI Appendix, Fig. S7A). Consistent with this, when we used the single-site probabilities for local optimization of sequences generated using the autoregressive decoder, we observed significantly lower sequence-structure self-consistency scores than we did when using the Potts model for local optimization (SI Appendix, Figs. S7BD). Indeed, the TM-scores for single-site locally optimized sequences were significantly worse than the TM-scores for the original sequences (SI Appendix, Fig. S7C). The Potts model energies recognize that the sequences do not improve in quality as the single-site local optimization progresses (SI Appendix, Fig. S8). These tests establish the utility of the Potts function as an output of the model.

To test whether supervising residue pairs during training is critical to learning an informative Potts model, we trained two simplified versions of PottsMPNN: PottsOnlyMPNN and PottsSingleMPNN (SI Appendix, Fig. S9; see Loss functions and optimization for details). Both models were trained only to learn a Potts model.

PottsOnlyMPNN was trained with the standard graph edge loss E that supervises the model predictions for pairs of positions based on the self and pair energies from the Potts model that involve each pair. PottsSingleMPNN, in contrast, was trained only on the model predictions for single sites, where each single-site probability distribution was calculated from the Potts model by summing the self energies at that site and the pair energies with the native residues at neighboring sites. PottsOnlyMPNN performs similarly to PottsMPNN at energy prediction, but PottsSingleMPNN performs significantly worse, supporting the importance of supervising residue pairs during training (SI Appendix, Fig. S7A).

We also tested whether certain pairwise interactions in the Potts model are more important than others by summing over different numbers of residue pairs at inference time. Progressively removing residue pairs substantially reduced energy prediction performance (SI Appendix, Fig. S10). Removing interactions between near neighbors had a greater effect than removing interactions between far neighbors for most tests.

Adding noise during training.

We tested the effect of adding increasing amounts of noise to the input structures during training. For these experiments, models were trained on the larger PDB-clust dataset. Following Dauparas et al., noise was added by perturbing the position of each atom by sampling a displacement in each coordinate axis independently from a Gaussian distribution of a set standard deviation, σ, which we refer to as the noise level (10). As the amount of noise added during training increased, the models generated sequences with lower NSR but significantly higher sequence-structure self-consistency scores, and they performed significantly better at energy prediction on the Megascale test set, up to 0.3 Å of noise (Fig. 3AC).

Fig. 3.

Fig. 3.

Training PottsMPNN on the PDB-clust dataset with noise improves performance and prevents overfitting to NSR. (A) NSR decreases, whereas the TM-score between the native structure and AlphaFold2 structure predicted from generated sequences improves with increasing noise. (B) Rosetta scores from modeling generated sequences on native backbones improve with increasing noise up to 0.3 Å. (C) Pearson r for predicting the Megascale single-residue mutation energies improves with increasing noise up to 0.3 Å. For (A - B), error bars represent SEM over the proteins in the test set after averaging results over at least two retrained model replicates; for (C), error bars show SEM over at least two retrained model replicates. (D - F) TM-score (D), Rosetta score (E), and Megascale Pearson r values (F) for various epoch checkpoints when PottsMPNN was trained without noise. (G - I) TM-score (G), Rosetta score (H), and Megascale Pearson r values (I) for various epoch checkpoints when PottsMPNN was trained with 0.2 Å of noise. For (D), (E), (G), and (H), error bars show SEM over the proteins in the PDB-clust test set.

To investigate why adding noise during training improves performance, we compared the training and validation loss curves and sequence-structure self-consistency and energy prediction performance at selected epochs of training for two models: one trained without noise (Fig. 3DF) and one trained with 0.2 Å of noise (Fig. 3GI). The model trained without noise exhibits signs of overfitting to NSR: the model continually generates sequences that more closely match the native sequence, but these sequences are not more compatible with the target structure. However, the model trained with noise exhibits the opposite behavior: sequence-structure self-consistency either fluctuates around a constant value (AlphaFold2 TM-scores) or improves up to epoch 100 (Rosetta scores). Also, the model trained with noise shows greater improvement in energy prediction over the course of training. The train loss for the model with noise is higher than the validation loss because noise is only added during training.

Training using MSAs.

Because many protein sequences can adopt the same structure, we tested the effect of modifying the loss function by averaging the loss over sequences sampled from an MSA (see Loss functions and optimization and Datasets for details, including how the MSAs were constructed; SI Appendix, Fig. S11 and Fig. S12). We compared models trained on the CATH 4.2 dataset with and without noise and with and without MSAs. Training on MSAs significantly reduced NSR (Fig. 4A) but significantly increased sequence-structure self-consistency (Fig. 4BC). There is a positive, albeit modest, effect of using MSAs on energy prediction performance (Fig. 4D). The trends in performance are consistent with or without noise, so the best model is trained with noise and MSAs. Using multiple sequences from the MSA during each training iteration is key: when a single random sequence is chosen for each protein for each iteration, performance does not improve (SI Appendix, Fig. S13).

Fig. 4.

Fig. 4.

Training on the CATH 4.2 dataset with an MSA loss function improves performance. (A) NSR for models trained with and without noise and with and without an MSA loss function. (B) TM-scores between native structures and AlphaFold2 structures predicted for sequences generated using each model. (C) Rosetta scores after modeling generated sequences on the native backbone. (D) Pearson r for using each model to predict the effect of single-site mutations on protein stability for three datasets. For (A - C), error bars show SEM over the proteins in the test set after averaging results over at least two retrained model replicates; for (D), error bars show SEM over at least two retrained model replicates. Stars indicate statistical significance comparing the model trained without MSAs to the model trained with MSAs in each condition, assessed using a two-tailed paired t-test over per-protein values for (A - C) and a two-tailed unpaired t test over average Pearson r values for (D) (*P < 0.05, **P < 0.01, ***P < 0.001, ****P < 0.0001; n.s. indicates nonsignificance).

We compared PottsMPNN and ProteinMPNN trained on the larger PDB-clust dataset with and without noise and with and without MSAs. Both models improve when trained with noise and MSAs, and PottsMPNN performs better in both conditions (SI Appendix, Fig. S14). To investigate the difference between training on the CATH 4.2 and PDB-clust datasets, we compared PottsMPNN models trained on both datasets with and without noise and with and without MSAs. When evaluated on a subset of the PDB-clust test set made non-redundant with the CATH 4.2 train set, the PDB-clust models perform better on sequence-structure self-consistency and energy prediction (SI Appendix, Fig. S15).

We tested the performance of MSA-trained models in two other ways. First, we calculated TM-scores from AlphaFold3 structure predictions (5). These results confirm that PottsMPNN trained with noise and MSAs outperforms other PottsMPNN models and highlight the significant improvement over the standard ProteinMPNN model (i.e., trained with 0.2 Å of noise) (SI Appendix, Fig. S16). Second, we used ESM C, a large protein language model trained on native protein sequences (4749), to evaluate the likelihood of sequences generated by several models, all trained on the CATH 4.2 or CATH 4.3 datasets. Of these, only PottsMPNN trained with noise and MSAs generated sequences with mean ESM C log probabilities comparable to those of native sequences (SI Appendix, Fig. S17).

Model interpretability.

We assessed the interpretability of the PottsMPNN Potts model trained with noise and MSAs. We examined how the energies change upon sequence mutations for two proteins randomly selected from the Megascale dataset. These case studies revealed biophysically interpretable self and pair energies. For example, PottsMPNN correctly predicts that the G56P mutation in 2KXD (located in a flexible loop) is highly stabilizing and that the R41P mutation in 2KXD (located in a rigid β-sheet) is highly destabilizing, and the predictions are driven by changes in the self energies at those positions (SI Appendix, Fig. S18A, D). PottsMPNN also made structurally reasonable pair-energy predictions: Q42K forms a destabilizing interaction with K35 and a stabilizing interaction with E37 (SI Appendix, Fig. S18B); K5Y forms a stabilizing interaction with K36 (SI Appendix, Fig. S19A); and F35K forms a destabilizing interaction with K30 (SI Appendix, Fig. S19D).

We further investigated the interpretability of the pair energies predicted by PottsMPNN. We calculated the Shannon entropy of the distribution of pair energies at all pairs of positions in the PDB-clust test set and found that pairs of positions only have low entropy when they are relatively close in the structure (SI Appendix, Fig. S20A). Among low entropy positions, native residues of opposite formal charge are scored favorably by the model relative to other possible pairs of residues at that position, while native residues of the same charge are scored unfavorably (SI Appendix, Fig. S20B). We examined how the pair energies of certain pairs of residues vary with distance and found biophysically reasonable trends, such as aspartate-lysine interactions having a shorter CαCα minimum than glutamate-lysine interactions and cysteine-cysteine interactions having very favorable energies at short distances (SI Appendix, Fig. S20C). We also found that PottsMPNN pair energies strongly correlate with experimental residue-residue coupling energies measured using double-mutant cycles in a model coiled-coil protein (50) (SI Appendix, Fig. S20D).

Finally, we tested the effect of training using MSAs on the learned single-site and pairwise amino acid probability distributions. We found that training with MSAs slightly but consistently improves the correlation between the entropy of the learned single-site probability distributions and the entropy of the associated site in the MSA (SI Appendix, Fig. S21A). The Jensen-Shannon divergence between the learned single-site probability distributions and the MSA single-site probability distributions also tended to decrease, indicating greater similarity, when the model was trained with an MSA (SI Appendix, Fig. S21B). The correlation between entropies of probability distributions at pairs of positions also improved upon training with MSAs, although the effect was less noticeable than for single sites (SI Appendix, Fig. S21C). Also, we used the learned Potts models to predict energies for sequences in the MSA and found that for models trained with and without MSAs, the energies increased as the sequences diverge from the native, but the model trained with MSAs predicted significantly lower energies for sequences across all distances from the native (SI Appendix, Fig. S21D).

Discussion

State-of-the-art sequence design models are trained on NSR, under the assumption that maximizing the similarity between a generated sequence and the native sequence also maximizes the likelihood that the generated sequence adopts the desired fold. Our results show that models trained on NSR—especially ProteinMPNN, Frame2Seq, and Caliby, which achieve NSR values that are low compared to other models—can achieve strong performance on sequence-structure self-consistency and show predictive capabilities on energy prediction tests. The high quality of Frame2Seq sequences is consistent with the finding of Akpinaroglu et al. that Frame2Seq can generate sequences with 0% NSR that fold to stable structures with secondary structures consistent with the input backbone structures (12). In general, however, our results demonstrate that optimizing solely for NSR is insufficient to drive further model improvement: compared to ProteinMPNN, Frame2Seq, and Caliby, models like MapDiff and UniIF achieve significantly higher NSR but perform poorly on the sequence-structure self-consistency and energy prediction tests (Fig. 2; SI Appendix, Table S1).

PottsMPNN achieves substantial improvements over ProteinMPNN trained under identical conditions: a 22.6% improvement in predicting Megascale mutation energies and an 8% improvement in AlphaFold2 TM-scores (Fig. 2B, D). When trained with noise and MSAs, PottsMPNN achieves a Pearson r of 0.639 for Megascale mutation energies, representing a 25% improvement over standard ProteinMPNN trained with 0.2 Å noise (Pearson r = 0.511) and a 7.8% improvement over the best non-PottsMPNN model (ESM-IF, Pearson r = 0.593) (SI Appendix, Table S1). This increased performance resulted from three strategies that we used to improve the training objective, motivated by better aligning the sequence design models with established principles of protein sequence-structure relationships.

First, learning a Potts model improved model performance, with especially large increases in energy prediction performance (Figs. 2; SI Appendix, Figs. S1S3; SI Appendix, Table S1). The basis for our work on PottsMPNN is the COORDinator model developed by Li et al., which learns a Potts model and performs well on energy prediction tasks compared to contemporary models (11). We establish that the COORDinator framework can be improved by incorporating an additional loss based on single-site probabilities, V, and using single-site probabilities for autoregressive sequence design, as is done by ProteinMPNN. PottsMPNN, a model trained with a joint objective, generates high-quality sequences as assessed by sequence-structure self-consistency. Sequence quality can be further improved by local optimization using the Potts model energies, indicating that Potts model energies are predictive of sequence quality in the local space around the initial sequence (SI Appendix, Fig. S4). The single-site probability distributions were unable to recognize the improved quality of the locally optimized sequences, further supporting the importance of the Potts model for improved energy prediction (SI Appendix, Fig. S4). Continuing the Potts model optimization until convergence did not improve sequence quality, indicating that the Potts model may not be as informative in the global sequence space (SI Appendix, Fig. S5).

Performing local optimization using the Potts model allows PottsMPNN to use the high-quality energetics information in the Potts model without resulting in low complexity sequences, as Li et al. observed when using MCMC to find low energy sequences in the Potts model sequence-energy landscape (11). We also observed low complexity sequences when using MCMC, even when using models trained with noise and MSAs. Another way to avoid low complexity sequences is to apply a complexity penalty term while sampling. Li et al., Ingraham et al., and Shuai et al. demonstrated this approach, but we found that even penalizing low-complexity sequences while sampling did not outperform autoregressive generation, as evaluated using AlphaFold2 TM-scores and Rosetta scores, and is much slower, even when autoregressive generation is followed by local energy optimization (11, 23, 51).

We postulated that the ability of PottsMPNN to optimize sequences and compute energies derives from the explicit residue-pair terms in the Potts model. Learning pairwise interactions allows PottsMPNN to capture physical constraints (e.g., electrostatic repulsion between proximal residues with the same charge) in a way that a model that only learns single-site probability distributions must learn implicitly through the message passing between sites that occurs in the decoder. This could allow PottsMPNN to capture more complex physical constraints. Although protein energetics involve many-body effects, approximating protein energetics using only self and pair energies has proven effective in many other studies (52, 53).

We performed experiments that withheld all or partial residue-pair information from the model during inference (SI Appendix, Fig. S7, S8, S10), and we compared models trained with a single-residue loss function to those trained with residue-pair loss functions (SI Appendix, Figs. S7, S9). In all cases, the performance of PottsMPNN degraded when the residue-pair information in the Potts model was limited. The near- and far-neighbor ablation series results suggest that model performance starts saturating when each residue has information about its nearest 24 or its furthest 32 of its 48 neighbors, which is consistent with previous observations on the effect of changing the number of nearest neighbors in the k-NN graph on the performance of ProteinMPNN (10).

Second, we found that adding noise improves model performance (Fig. 3AC). This idea was introduced in the context of ProteinMPNN, and the most used version of ProteinMPNN was trained with 0.2 Å of noise. Dauparas et al. suggested that training with noise is beneficial because it may prevent the model from memorizing nongeneralizable artifacts of structural refinement (10). We found evidence consistent with this hypothesis by measuring trends in sequence-structure self-consistency and energy prediction over the duration of training with and without noise: training with noise prevents overoptimization to NSR (Fig. 3DI).

Third, training using an MSA recovery objective instead of an NSR objective improves performance (Figs. 4; SI Appendix, Figs. S13S17). Because many evolutionarily related proteins adopt closely related structures, we reasoned that including information about homologs would improve the ability of the model to capture meaningful sequence-structure relationships. MSA-based training rewards models that recognize that many sequences can adopt a given structure and prevents overoptimization to a native sequence that may not be optimal in any meaningful sense. We found that model performance decreases if the MSAs are filtered too stringently so that the sequences in the MSA do not provide diversity (SI Appendix, Fig. S12). We did not explore other ways to improve the use of information in the MSA, such as weighting sequences by their similarity to other sequences in the MSA to increase the effective sequence diversity seen by the model, so we expect that work in this area could result in further performance improvements. Similar to our work, InvMSAFold uses a Potts model parameterization and MSA-based training (54); however, our approach differs in that PottsMPNN jointly learns a Potts model and single-site distributions within a unified GNN architecture. Also, while InvMSAFold focused on improving sequence diversity and sampling speed, we show that MSA-based training improves sequence-structure self-consistency and energy prediction performance.

We trained models with and without noise and with and without MSAs on two different datasets, CATH 4.2 and PDB-clust, and observed consistent performance trends. CATH 4.2 is substantially smaller and has a more rigorous, structure-based train-test split, making it ideal for experimenting with different model architectures and optimization objectives. However, models trained on PDB-clust tend to perform better on shared held-out test sets (SI Appendix, Fig. S15). This is likely due to the increased structural diversity in the PDB-clust dataset. Because energy data are not used in training, limiting the possibility of data leakage, we recommend using large structure sets when training models for energy prediction. The energy data also show that models trained on both CATH 4.2 and PDB-clust generalize to de novo proteins: on the subset of the Megascale dataset consisting only of de novo designs, models trained with noise and MSAs on both datasets achieve a Pearson r of approximately 0.55.

In addition to the state-of-the-art sequence-structure compatibility and energy prediction performance, PottsMPNN produces energy decompositions that are biophysically interpretable. We used case studies of eight mutations in two structures to demonstrate that the Potts model energy predictions are structurally interpretable (SI Appendix, Figs. S1819). The pair energies capture charge-charge interactions well and give a strong correlation with experimentally measured coiled-coil coupling energies (50) (SI Appendix, Fig. S20). Together, these results suggest that PottsMPNN has learned a physically meaningful model of sequence-structure compatibility rather than a superficial statistical mapping; this may partly explain its strong generalization across diverse sequence-structure self-consistency and energy prediction tests. We also found that training with MSAs makes the learned probability distributions and Potts model better match the variability observed in MSAs (SI Appendix, Fig. S21).

Learning residue-pair energies, introducing coordinate noise, and training on homologs of a target sequence do not improve NSR. Nevertheless, these modifications result in a model that is superior at the two tasks that sequence design models are most used for: generating a sequence that folds into a desired structure and predicting the energies of mutations given a structure. Thus, our results demonstrate that NSR should not be the primary metric of success for sequence design models.

There is substantial room for further progress on moving sequence design models away from optimizing for NSR. One approach is post-training alignment: several groups have demonstrated that pre-trained sequence design models can be fine-tuned on energy data (29, 30). These approaches are effective but operate as a second stage on top of a model that was initially trained on NSR; the improvements they achieve may be limited by the representations learned during pretraining. Our results suggest that improving the pre-training objective itself, through pairwise energy terms, noise, and MSA-based training, could provide a stronger foundation for such downstream alignment strategies. Additionally, the generalization of post-training alignment methods remains underexplored. Another way to improve the pre-training objective is to optimize in structure space instead of sequence space. Optimizing only in sequence space leaves the model unaware of potential off-target folding. DivPro incorporates a structure prediction model during training to guide a VAE-like latent sequence space toward structural fidelity, resulting in improved sequence diversity without compromising sequence-structure self-consistency (55). In an orthogonal approach, Pacesa et al. developed BindCraft (56) to directly optimize sequences iteratively according to a gradient derived from AlphaFold predictions. BindCraft generates sequences with high experimental success rates—after redesigning part of the generated sequence with ProteinMPNN and filtering for structure quality using AlphaFold2—indicating the promise of supervising sequence design models in structure space instead of sequence space. Accordingly, future work should explore training or fine-tuning a sequence design model directly on sequence-structure self-consistency or other desired tasks.

Methods

Potts model.

A Potts model is a function H(s) that decomposes the sequence-energy landscape for a sequence s of length n into a sum of self energies and pair energies: H(s)=i=1nhi(s[i])+i=1nj>inJij(s[i],s[j]), where h=hi(a)1in,a𝒜 is a lookup table for self energies, J=Jij(a,b)1i<jn,a,b𝒜 is a lookup table for pair energies, and 𝒜 is the set of all 20 amino acids. Several machine learning sequence design models have successfully parameterized a Potts model with learned weights θ: they learn Hθsfnat by maximizing PsnatHθsfnat=softmaxHθsfnats=snat (see Loss functions and optimization for details) (11, 23, 51).

Model architecture.

We use the same GNN architecture and hyperparameters as ProteinMPNN (10). In brief, the protein backbone is encoded as a k-nearest neighbors (k-NN) graph, with k=48. Nodes V in the graph are residues and are initialized with null vectors. Edges E are interactions between residues. For each pair of residues, the interaction representation is initialized using radial basis functions to parameterize the interatomic distances for all 25 pairs of backbone heavy atoms, including virtual Cβ atoms. The node and edge embeddings are then updated using a three-layer message passing neural network (MPNN) encoder. Finally, the node embeddings are updated using a three-layer MPNN autoregressive decoder that selects residues incrementally, conditioning on previously selected residues. The encoder and decoder use a hidden dimensionality of 128. The final edge embeddings (including self edges) are converted to the Potts model H(θ,E)(sf) using a single linear layer. (Fig. 1)

Datasets.

To benchmark against other models, we used the dataset that Ingraham et al. curated from the CATH 4.2 database. We refer to this dataset as the CATH 4.2 dataset, and it consists of 19,700 single-chain structures split 80/10/10 on CATH protein structure classification codes (7, 42). We also trained on the larger set of structures that was used to train ProteinMPNN. This dataset was created by clustering chains from the PDB at 30% sequence identity, creating 25,361 clusters split 90/5/5 such that no chain in the training set is in a complex with chains in the validation or test clusters (10, 32). When using this dataset during training, following Dauparas et al., a new member from each cluster was randomly selected every two epochs. We refer to this dataset as the PDB-clust dataset. Because training on CATH 4.2 is much faster, we generally experimented with models trained on that dataset. We note when models are trained on the PDB-clust dataset.

MSAs for 140,000 unique protein chains were downloaded from the OpenFold OpenProteinSet database (57). These MSAs were generated using HHblits (-n3)(58) and JackHMMER (59) and searching against the MGnify (60), BFD (4), UniRef90 (61, 62), and UniClust30 (63) databases. For each biological assembly in the PDB-clust dataset, we create a paired MSA from the OpenFold chain MSAs following the AlphaFold-Multimer species-pairing methodology (64, 65). For each chain in the CATH 4.2 dataset, we generated MSAs using the ColabFold MSA server (66).

Because PottsMPNN relies on a graph representation of the protein backbone with a fixed number of nodes and edges, and because an assumption of the MSA approach is that Pfnats is high for all sMSA, sequences in the MSA with gaps or insertions present a difficulty to the model. For a gap, we masked that position and all pairwise interactions that involve that position from affecting the loss calculation. We ignored insertions. We tested various filtering hyperparameters: the minimum sequence identity to the native sequence, the maximum gap percentage, and the maximum insertion percentage. The minimum sequence identity hyperparameter has the largest effect on performance, as models trained with a 70% minimum perform worse across all tasks compared to models trained with a 50% minimum and the same noise level (SI Appendix, Fig. S12). Changing the other hyperparameters did not have large effects, and while no set of hyperparameters resulted in the best performance across all tests, using a 50% sequence identity minimum, a 20% gap maximum, and a 20% insertion maximum resulted in strong performance across all tests (SI Appendix, Fig. S12). MSAs were only used during training.

Structural noise.

To add noise during training, we moved each backbone atom by independently sampling a displacement in all three axes from a Gaussian distribution with mean 0 Å and standard deviation σ Å, as done by Dauparas et al. (10). We tested σ[0,0.02,0.05,0.2,0.3,0.5]. When training with noise, we apply noise only in training, not in validation. This creates a deliberately more challenging training task that improves model generalization.

Loss functions and optimization.

We trained PottsMPNN using an equally weighted composite of two loss functions. First, we supervised the nodes using the negative log likelihood loss used to train ProteinMPNN (10), shown in Equation 1:

vsnat,fnat=12000i=1nlogPθ,Vsnatifnat,snati, [1]

where n is the sequence length, Pθ,Vs[i]fnat,snat[i] is the model’s predicted probability distribution for all 20 amino acids at position i conditioned on the structure (fnat) and the native residues prior in the decoding order (snat[i]), and snat[i] is the native residue at position i.

Second, we supervised the edges using the negative log composite pseudo-likelihood loss used to train COORDinator (11), shown in Equation 2:

Esnat,fnat=1nedges(i,j)ElogPθ,Esnati,snatjfnat,snat\i,j, [2]

where nedges is the number of edges in the graph, i and j are the indices of the residues connected by an edge, and Pθ,Es[i],s[j]fnat,snat\(i,j) is the model’s predicted probability distribution for all 400 pairs of amino acids at the pair of positions (i,j) conditioned on the structure (fnat) and the native sequence at all other sites (snat\(i,j)). This distribution is defined according the energies in the Potts model as in Equation 3:

Pθ,Es[i],s[j]fnat,snat\(i,j)=softmaxhi(s[i])+hj(s[j])+Jij(s[i],s[j])+kN(i)kjJiks[i],snat[k]+kN(j)kiJjks[j],snat[k], [3]

where 𝒩(i) denotes the set of all neighbors of the residue at site i. That is, the composite pseudo-likelihood loss rewards the model for assigning a high probability to the native pair of residues at each pair of positions in the sequence, given the native sequence at all other positions.

To train with MSAs, we used the loss function shown in Equation 4:

MSAfnat=1MbatchsMMbatchVsM,fnat+EsM,fnat, [4]

where Mbatch is the set of sequences in the filtered MSA subsampled to fit in memory for the current training batch (i.e., such that the total number of residues does not exceed 10,000).

We trained a single-site version of PottsMPNN called PottsSingleMPNN that extracts single-site residue probabilities from the conditional distributions of the Potts model as shown in Equation 5:

Pθ,E,sss[i]fnat,snat\i=softmaxhi(s[i])+j𝒩(i)Jijs[i],snat[j]. [5]

That is, the conditional probability distribution at site i is defined by summing the energies of each possible residue at site i interacting with all its neighbors given the identities of those residues but not given the identity at site i. These probabilities were supervised using the negative log likelihood loss function shown in Equation 6:

E,sssnat,fnat=12000i=1nlogPθ,E,sssnatifnat,snat\i. [6]

We used the same optimization hyperparameters used to originally train ProteinMPNN (10): an Adam optimizer with β1=0.9,β2=0.98,ϵ=109, the standard attention learning rate schedule with 4000 warm-up steps, and a dropout rate of 10%. We used a batch size of 10,000 tokens. When training without MSAs, we included as many different proteins as possible until the total number of sequence tokens exceeded 10,000. With MSAs, each batch consisted of a single protein, and we included as many randomly sampled sequences from the protein’s MSA as possible given the 10,000 token limit. For each model, we trained for 200 epochs, evaluated the validation loss after each epoch, and tested the model checkpoint with the best validation loss.

Sequence generation.

We used the autoregressive decoding process from ProteinMPNN (10) to iteratively generate a sequence from Pθ,V(sf). We used a fixed, randomly chosen decoding order for each protein to control for the effect of the decoding order on model performance by ensuring that every model variant and replicate uses the same order. We used the default ProteinMPNN temperature of 0.1. We experimented with optimizing the autoregressively generated sequences by searching the local space around sgen. In the local optimization protocol, we iterate over the positions in sequence, evaluate the energy of all amino-acid substitutions at that position according to the Potts model (with the current identity at that position masked), and update the sequence with the best-scoring residue. We iterate in the same decoding order used to generate the sequence. We refer to sequences generated using local optimization with the Potts energies as “optimized.” We experimented with continuing to iterate over the sequence, in the same order used to generate the sequence, until the Potts model finds no favorable substitution at any position (i.e., until convergence). Finally, we experimented with scoring the substitutions using the single-site probabilities. See Energy prediction for details on how energies are calculated. To estimate the feasibility of generated sequences, we calculated sequence log probabilities using ESM C 300M, a state-of-the-art protein language model (4749).

Sequence-structure self-consistency.

We mainly used two methods for evaluating Pfnatsgen. First, we used the monomer_ptm version of AlphaFold2 to predict a structure fpred from sgen (4). We ran AlphaFold2 without MSAs or templates. We then calculated the TM-score, a metric of structure similarity, between fpred and fnat (43). We also examined AlphaFold2 confidence using pLDDT. Second, we used Rosetta to evaluate the compatibility between sgen and fnat. To do so, we threaded sgen onto fnat and relaxed using the FastRelax protocol with the standard full-atom energy function to minimize steric clashes and optimize side-chain packing (6769). Following relaxation, the total all-atom energy was evaluated with the same scoring function. To attain the final Rosetta score, we normalize the energy by the protein length. For a few models, we also used AlphaFold3 to predict fpred and calculate TM-scores (5). For AlphaFold2 and AlphaFold3, we generated five structures for each sequence and scored the highest-confidence structure.

Because some models cannot predict residue identities for positions that lack structural information, for the benchmarking experiments, we removed structures with gaps, leaving around 700 structures. We refer to these structures as the CATH 4.2 test set benchmarking subset. For PDB-clust, to facilitate running AlphaFold2 and Rosetta, we limited the length of proteins to 500 residues, resulting in 702 single- and multi-chain protein structures.

Energy prediction.

To compute energies from single-site probabilities Pθ,V(sf)— from PottsMPNN, ProteinMPNN, or a benchmark model—we compare the mutant and wild-type probabilities:

ΔΔGpred,Vswt,smut=logPθ,VsmutflogPθ,Vswtf.

To generate energy predictions from the Potts model, we compute the energy of a mutation as follows:

ΔΔGpred,Eswt,smut=Hθ,EsmutfHθ,Eswtf.

Unless otherwise specified, PottsMPNN energy predictions use the Potts model.

For the benchmarking comparisons, we used the scoring functions for each model as described in the literature to score the wildtype and mutant sequences. For example, most models predict single-site probabilities, so for those models we used the log probability approach described above. Because Caliby predicts a Potts model (23), we used the approach that we used for the PottsMPNN Potts models.

We evaluated energy prediction performance by calculating the Pearson correlation between predicted and observed energies for three datasets. First, we used 238,661 point mutations in the Megascale dataset, which contains stability energy measurements for 298 single-chain proteins (40). Second, we used 2,542 point mutations in the FireProt dataset, which contains stability energy measurements for 88 proteins curated from the literature; energies were measured using various methods (44). Third, we used a dataset of ~4,000 single mutants from a DMS screen over the SARS-CoV-2 receptor binding domain (41). Each mutation has expression data, which we used as a proxy for stability. We removed 200 mutations that affected binding but not stability according to thresholds used by Starr et al. During training, the models never saw any energy data, but out of an abundance of caution we took steps to prevent data leakage. For the Megascale and FireProt datasets, we removed any proteins that are in the CATH 4.2 and PDB-clust training sets, leaving 202,804 point mutations from 232 proteins for Megascale and 2,301 point mutations from 64 proteins for FireProt. For the SARS-CoV-2 dataset, the structure, 6M0J (70, 71), is in the PDB-clust training set and is not in the CATH 4.2 training set. To facilitate comparison across proteins, we centered both predicted and observed energies to zero mean for each protein before computing the Pearson correlation over all mutations in a dataset; this per-protein centering had little effect on PottsMPNN correlations but noticeably improved results for some other models.

Model interpretability.

All interpretability experiments were conducted with PottsMPNN trained with noise and MSAs on the PDB-clust dataset, except for the MSA interpretability experiments, which involved PottsMPNN trained with noise on the PDB-clust dataset with and without MSAs.

Using mutations from two randomly selected proteins from the Megascale dataset, 2KXD (45, 46) and the de novo designed protein EHEE_rd3_0053 (72), we performed case studies on the interpretability of the Potts model energies. For each protein, we selected the following mutations: the most favorable, the 33rd percentile most favorable, the 66th percentile most favorable, and the least favorable. For each mutation, we visualized the change in self energy, the total change in pair energy, and the five individual changes in pair energy with the largest magnitudes. We used PyMOL to view the structures, perform mutagenesis to structurally model the mutation, and manually select rotamers of the mutated and neighboring residues to minimize the PyMOL strain score (73).

We performed the pair energy interpretability analysis on the proteins in the PDB-clust test set. To account for variance in the scale of the energy values, we used z-scores to compare energy values across different positions. Also, we compared the Potts model pair energies to coupling energies, measured using double-mutant cycles, between residues at the ge interface in the leucine zipper coiled coil (50).

For the MSA interpretability analyses, we computed single-site probability distributions for a given site as follows: for each sequence sampled from the MSA, we obtained the distribution output by the decoder when conditioned on the residue identities in the sampled sequence at all positions except the given site and averaged these distributions across all sampled sequences. We computed pairwise distributions for a given pair of sites analogously, obtaining for each sampled sequence the pseudolikelihood distribution calculated from the Potts model by conditioning on the residue identities at all positions except the given pair of sites and averaging across all sampled sequences. We filtered the MSAs to exclude sequences with more than 20% gaps or insertions. For the plots comparing predicted and observed distributions, we analyzed 50 proteins randomly selected from the CATH 4.2 test set with lengths under 100 residues. For the energy comparison plot, we used the entire CATH 4.2 test set.

Supplementary Material

Supplementary figures and table

Acknowledgments

Research reported in this publication was supported by the National Institute of General Medical Sciences of the National Institutes of Health under R35GM149227 to A.E.K, a Takeda Fellowship awarded to F.B., and a MathWorks Science Fellowship awarded to F.B. The content herein is solely the responsibility of the authors and does not represent the official views of any of the funding organizations. The authors acknowledge the Massachusetts Institute of Technology Office of Research Computing and Data for providing high performance computing resources that contributed to the results reported in this paper.

Footnotes

Use of AI tools. We incorporated suggestions from Claude Opus 4.6 to improve text that authors wrote and to confirm that the final manuscript addressed reviewer comments.

Data, Materials, and Software Availability

The code for PottsMPNN is available at (DOI 10.5281/zenodo.18274667). The repository includes training and inference scripts, as well as Colab implementations of the sequence design, sequence optimization, and energy prediction tasks discussed in the paper. The repository also includes the experimental energy data used to evaluate the models, which are also available at their respective literature sources: Megascale (40), FireProt (44), and SARS-CoV-2 (41).

References

  • 1.Huang PS, Boyken SE, Baker D, The coming of age of de novo protein design. Nature 537, 320–327 (2016). [DOI] [PubMed] [Google Scholar]
  • 2.Frappier V, Keating AE, Data-driven computational protein design. Curr. Opin. Struct. Biol 69, 63–69 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Senior AW, et al. , Improved protein structure prediction using potentials from deep learning. Nature 577, 706–710 (2020). [DOI] [PubMed] [Google Scholar]
  • 4.Jumper J, et al. , Highly accurate protein structure prediction with AlphaFold. Nature 596, 583–589 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Abramson J, et al. , Accurate structure prediction of biomolecular interactions with AlphaFold 3. Nature 630, 493–500 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Watson JL, et al. , De novo design of protein structure and function with RFdiffusion. Nature 620, 1089–1100 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Ingraham JB, Garg V, Barzilay R, Jaakkola T, Generative Models for Graph-Based Protein Design in Advances in Neural Information Processing Systems. (Curran Associates, Inc.), Vol. 32, (2019). [Google Scholar]
  • 8.Jing B, Eismann S, Suriana P, Townshend RJL, Dror R, Learning from Protein Structure with Geometric Vector Perceptrons. Int. Conf. on Learn. Represent (2021). [Google Scholar]
  • 9.Hsu C, et al. , Learning inverse folding from millions of predicted structures in Proceedings of the 39th International Conference on Machine Learning. (PMLR; ), pp. 8946–8970 (2022). [Google Scholar]
  • 10.Dauparas J, et al. , Robust deep learning–based protein sequence design using ProteinMPNN. Science 378, 49–56 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Li AJ, et al. , Neural network-derived Potts models for structure-based protein design using backbone atomic coordinates and tertiary motifs. Protein Sci. 32, e4554 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Akpinaroglu D, et al. , Structure-conditioned masked language models for protein sequence design generalize beyond the native sequence space. bioRxiv [Preprint] (2023). https://www.biorxiv.org/content/10.1101/2023.12.15.571823v1. [Google Scholar]
  • 13.Gao Z, et al. , KW-Design: Pushing the Limit of Protein Design via Knowledge Refinement. Int. Conf. on Learn. Represent 2024, 34556–34574 (2024). [Google Scholar]
  • 14.Gao Z, et al. , UniIF: Unified Molecule Inverse Folding. Adv. Neural Inf. Process. Syst 37, 135843–135860 (2024). [Google Scholar]
  • 15.Bai P, et al. , Mask-prior-guided denoising diffusion improves inverse protein folding. Nat. Mach. Intell 7, 876–888 (2025). [Google Scholar]
  • 16.Horovitz A, Double-mutant cycles: a powerful tool for analyzing protein structure and function. Fold. Des 1, R121–R126 (1996). [DOI] [PubMed] [Google Scholar]
  • 17.Morcos F, et al. , Direct-coupling analysis of residue coevolution captures native contacts across many protein families. Proc. Natl. Acad. Sci 108, E1293–E1301 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Marks DS, et al. , Protein 3D Structure Computed from Evolutionary Sequence Variation. PLOS ONE 6, e28766 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Ekeberg M, Lövkvist C, Lan Y, Weigt M, Aurell E, Improved contact prediction in proteins: Using pseudolikelihoods to infer Potts models. Phys. Rev. E 87, 012707 (2013). [DOI] [PubMed] [Google Scholar]
  • 20.Levy RM, Haldane A, Flynn WF, Potts Hamiltonian models of protein co-variation, free energy landscapes, and evolutionary fitness. Curr. Opin. Struct. Biol 43, 55–62 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Defresne M, Barbe S, Schiex T, Scalable Coupling of Deep Learning with Logical Reasoning. bioRxiv [Preprint] (2023). http://arxiv.org/abs/2305.07617. [Google Scholar]
  • 22.Dessaux D, et al. , Designing symmetrical multi-component proteins using a hybrid generative AI approach. bioRxiv [Preprint] (2024). https://www.biorxiv.org/content/10.1101/2024.06.13.598662v1. [Google Scholar]
  • 23.Shuai RW, Lu T, Bhatti S, Kouba P, Huang PS, Ensemble-conditioned protein sequence design with Caliby. bioRxiv [Preprint] (2025). https://www.biorxiv.org/content/10.1101/2025.09.30.679633v4. [Google Scholar]
  • 24.Alford RF, et al. , The Rosetta All-Atom Energy Function for Macromolecular Modeling and Design. J. Chem. Theory Comput 13, 3031–3048 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Goudy OJ, Nallathambi A, Kinjo T, Randolph NZ, Kuhlman B, In silico evolution of autoinhibitory domains for a PD-L1 antagonist using deep learning models. Proc. Natl. Acad. Sci 120, e2307371120 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Bennett NR, et al. , Improving de novo protein binder design with deep learning. Nat. Commun 14, 2625 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Sumida KH, et al. , Improving Protein Expression, Stability, and Function with ProteinMPNN. J. Am. Chem. Soc 146, 2054–2061 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.de Haas RJ, et al. , Rapid and automated design of two-component protein nanomaterials using ProteinMPNN. Proc. Natl. Acad. Sci 121, e2314646121 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Dieckhaus H, Brocidiacono M, Randolph NZ, Kuhlman B, Transfer learning to leverage larger datasets for improved prediction of protein stability changes. Proc. Natl. Acad. Sci 121, e2314853121 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Deng A, Householder KD, Wu F, Garcia KC, Trippe BL, Predicting mutational effects on protein binding from folding energy in Proceedings of the 42nd International Conference on Machine Learning. (PMLR; ), pp. 13129–13151 (2025). [Google Scholar]
  • 31.Notin P, et al. , ProteinGym: Large-Scale Benchmarks for Protein Fitness Prediction and Design. Adv. Neural Inf. Process. Syst 36, 64331–64379 (2023). [Google Scholar]
  • 32.Berman HM, et al. , The Protein Data Bank. Nucleic Acids Res. 28, 235–242 (2000). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Varadi M, et al. , AlphaFold Protein Structure Database: massively expanding the structural coverage of protein-sequence space with high-accuracy models. Nucleic Acids Res. 50, D439–D444 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Varadi M, et al. , AlphaFold Protein Structure Database in 2024: providing structure coverage for over 214 million protein sequences. Nucleic Acids Res. 52, D368–D375 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Kuhlman B, Baker D, Native protein sequences are close to optimal for their structures. Proc. Natl. Acad. Sci 97, 10383–10388 (2000). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Leman J Koehler, et al. , Macromolecular modeling and design in Rosetta: recent methods and frameworks. Nat. methods 17, 665–680 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Sander C, Schneider R, Database of homology-derived protein structures and the structural meaning of sequence alignment. Proteins: Struct. Funct. Bioinforma 9, 56–68 (1991). [DOI] [PubMed] [Google Scholar]
  • 38.Rost B, Twilight zone of protein sequence alignments. Protein Eng. 12, 85–94 (1999). [DOI] [PubMed] [Google Scholar]
  • 39.DM Fowler S Fields, Deep mutational scanning: a new style of protein science. Nat. methods 11, 801–807 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Tsuboyama K, et al. , Mega-scale experimental analysis of protein folding stability in biology and design. Nature 620, 434–444 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41.Starr TN, et al. , Deep Mutational Scanning of SARS-CoV-2 Receptor Binding Domain Reveals Constraints on Folding and ACE2 Binding. Cell 182, 1295–1310.e20 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Orengo CA, et al. , CATH – a hierarchic classification of protein domain structures. Structure 5, 1093–1109 (1997). [DOI] [PubMed] [Google Scholar]
  • 43.Zhang Y, Skolnick J, Scoring function for automated assessment of protein structure template quality. Proteins: Struct. Funct. Bioinforma 57, 702–710 (2004). [DOI] [PubMed] [Google Scholar]
  • 44.Stourac J, et al. , FireProtDB: database of manually curated protein stability data. Nucleic Acids Res. 49, D319–D324 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Kutyshenko VP, et al. , NMR structure and dynamics of the chimeric protein SH3-F2. Mol. Biol 44, 948–957 (2010). [PubMed] [Google Scholar]
  • 46.Kutyshenko VP, et al. , The structure of SH3-F2. Worldwide Protein Data Bank (2010) 10.2210/pdb2kxd/pdb. Deposited 30 April 2010. [DOI] [Google Scholar]
  • 47.Rives A, et al. , Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences. Proc. Natl. Acad. Sci 118, e2016239118 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 48.Lin Z, et al. , Evolutionary-scale prediction of atomic-level protein structure with a language model. Science 379, 1123–1130 (2023). [DOI] [PubMed] [Google Scholar]
  • 49.ESM Team, ESM Cambrian: Revealing the mysteries of proteins with unsupervised learning (2024).
  • 50.Krylov D, Barchi J, Vinson C, Inter-helical interactions in the leucine zipper coiled coil dimer: ph and salt dependence of coupling energy between charged amino acids. J. Mol. Biol 279, 959–972 (1998). [DOI] [PubMed] [Google Scholar]
  • 51.Ingraham JB, et al. , Illuminating protein space with a programmable generative model. Nature 623, 1070–1078 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52.Figliuzzi M, Barrat-Charlaix P, Weigt M, How Pairwise Coevolutionary Models Capture the Collective Residue Variability in Proteins? Mol. Biol. Evol 35, 1018–1027 (2018). [DOI] [PubMed] [Google Scholar]
  • 53.Haldane A, Flynn WF, He P, Levy RM, Coevolutionary Landscape of Kinase Family Proteins: Sequence Probabilities and Functional Motifs. Biophys. J 114, 21–31 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 54.Silva L Alessandro, Meynard-Piganeau B, Lucibello C, Feinauer C, Fast uncovering of protein sequence diversity from structure. J. Stat. Mech. Theory Exp 2025, 084003 (2025). [Google Scholar]
  • 55.Zhou X, Shen G, Chen Y, Chen G, Heng PA, DivPro: diverse protein sequence design with direct structure recovery guidance. Bioinformatics 41, i382–i390 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Pacesa M, et al. , One-shot design of functional protein binders with BindCraft. Nature 646, 483–492 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Ahdritz G, et al. , Openproteinset: Training data for structural biology at scale in Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track. (2023). [Google Scholar]
  • 58.Remmert M, Biegert A, Hauser A, Söding J, HHblits: lightning-fast iterative protein sequence searching by HMM-HMM alignment. Nat. Methods 9, 173–175 (2012). [DOI] [PubMed] [Google Scholar]
  • 59.Johnson LS, Eddy SR, Portugaly E, Hidden Markov model speed heuristic and iterative HMM search procedure. BMC Bioinforma. 11, 431 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 60.Richardson L, et al. , MGnify: the microbiome sequence data analysis resource in 2023. Nucleic Acids Res. 51, D753–D759 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 61.Suzek BE, Huang H, McGarvey P, Mazumder R, Wu CH, UniRef: comprehensive and non-redundant UniProt reference clusters. Bioinformatics 23, 1282–1288 (2007). [DOI] [PubMed] [Google Scholar]
  • 62.The UniProt Consortium, UniProt: the Universal Protein Knowledgebase in 2023. Nucleic Acids Res. 51, D523–D531 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 63.Mirdita M, et al. , Uniclust databases of clustered and deeply annotated protein sequences and alignments. Nucleic Acids Res. 45, D170–D176 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 64.Evans R, et al. , Protein complex prediction with AlphaFold-Multimer. bioRxiv [Preprint] (2022). https://www.biorxiv.org/content/10.1101/2021.10.04.463034v2. [Google Scholar]
  • 65.Zhou Tm, Wang S, Xu J, Deep learning reveals many more inter-protein residue-residue contacts than direct coupling analysis. bioRxiv [Preprint] (2018). https://www.biorxiv.org/content/10.1101/240754v3. [Google Scholar]
  • 66.Mirdita M, et al. , ColabFold: making protein folding accessible to all. Nat. Methods 19, 679–682 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 67.Khatib F, et al. , Algorithm discovery by protein folding game players. Proc. Natl. Acad. Sci 108, 18949–18953 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 68.Tyka MD, et al. , Alternate states of proteins revealed by detailed energy landscape mapping. J. molecular biology 405, 607–618 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 69.Chaudhury S, Lyskov S, Gray JJ, PyRosetta: a script-based interface for implementing molecular modeling algorithms using Rosetta. Bioinformatics 26, 689–691 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 70.Lan J, et al. , Structure of the SARS-CoV-2 spike receptor-binding domain bound to the ACE2 receptor. Nature 581, 215–220 (2020). [DOI] [PubMed] [Google Scholar]
  • 71.Lan J, et al. , Crystal structure of SARS-CoV-2 spike receptor-binding domain bound with ACE2. Worldwide Protein Data Bank. (2020) 10.2210/pdb6m0j/pdb. Deposited 21 February 2020. [DOI] [Google Scholar]
  • 72.Rocklin GJ, et al. , Global analysis of protein folding using massively parallel design, synthesis, and testing. Science 357, 168–175 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 73.The PyMOL Molecular Graphics System, Version 3.1 (Schrödinger LLC, New York, NY, 2025). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary figures and table

RESOURCES