E NERGY - BASED MODELS FOR ATOMIC - RESOLUTION PROTEIN CONFORMATIONS
A BSTRACT
We propose an energy-based model (EBM) of protein conformations that operates at atomic scale.
The model is trained solely on crystallized protein data.
By contrast, existing approaches for scoring conformations use energy functions that incorporate knowledge of physical principles and features that are the complex product of several decades of research and tuning.
To evaluate the model, we benchmark on the rotamer recovery task, the problem of predicting the conformation of a side chain from its context within a protein structure, which has been used to evaluate energy functions for protein design.
The model achieves performance close to that of the Rosetta energy function, a state-of-the-art method widely used in protein structure prediction and design.
An investigation of the model’s outputs and hidden representations ﬁnds that it captures physicochemical properties relevant to protein energy.
I NTRODUCTION
Methods for the rational design of proteins make use of complex energy functions that approximate the physical forces that determine protein conformations (Cornell et al., 1995; Jorgensen et al., 1996; MacKerell Jr et al., 1998), incorporating knowledge about statistical patterns in databases of protein crystal structures (Boas & Harbury, 2007).
The physical approximations and knowledge-derived features that are included in protein design energy functions have been developed over decades, building on results from a large community of researchers (Alford et al., 2017).
In this work we investigate learning an energy function for protein conformations directly from protein crystal structure data.
To this end, we propose an energy-based model using the Transformer architecture (Vaswani et al., 2017), that accepts as inputs sets of atoms and computes an energy for their conﬁguration.
Our work is a logical extension of statistical potential methods (Tanaka & Scheraga, 1976; Sippl, 1990; Lazaridis &
Karplus, 2000) that ﬁt energetic terms from data, which, in combination with physically motivated force ﬁelds, have contributed to the feasibility of de novo design of protein structures and functions (Kuhlman et al., 2003; Ambroggio & Kuhlman, 2006; Jiang et al., 2008; King et al., 2014).
To date, energy functions for protein design have incorporated extensive feature engineering, encoding knowledge of physical and biochemical principles (Boas & Harbury, 2007;
Alford et al., 2017).
Learning from data can circumvent the process of developing knowledge-based potential functions by automatically discovering features that contribute to the protein’s energy, including terms that are unknown or are difﬁcult to express with rules or simple functions.
Since energy functions are additive, terms learned by neural energy-based models can be naturally composed with those derived from physical knowledge.
In principle, neural networks have the ability to identify and represent non-additive higher order dependencies that might uncover features such as hydrogen bonding networks.
Such features have been shown to have important roles in protein structure and function (Guo & Salahub, 1998; Redzic & Bowler, 2005; Livesay et al., 2008), and are important in protein design (Boyken et al., 2016).
Incorporation of higher order terms has been an active research area for energy function design (Maguire et al., 2018).
Evaluations of molecular energy functions have used as a measure of ﬁdelity, the ability to identify native side chain conﬁgurations (rotamers) from crystal structures where the ground-truth conﬁguration has been masked out (Jacobson et al., 2002; Bower et al., 1997).
Leaver-Fay et al.
(2013) introduced a set of benchmarks for the Rosetta energy function that includes the task of rotamer recovery.
In the benchmark, the ground-truth conﬁguration of the side chain is masked and rotamers (possible conﬁgurations of the side chain) are sampled and evaluated within the surrounding molecular context (the rest of the atoms in the protein structure not belonging to the side chain).
The energy function is scored by comparing the lowest-energy rotamer (as determined by the energy function) against the rotamer that was observed in the empirically-determined crystal structure.
This work takes an initial step toward fully learning an atomic-resolution energy function from data.
Prediction of native rotamers from their context within a protein is a restricted problem setting for exploring how neural networks might be used to learn an atomic-resolution energy function for protein design.
We compare the model to the Rosetta energy function, as detailed in Leaver-Fay et al.
(2013), and ﬁnd that on the rotamer recovery task, deep learning-based models obtain results approaching the performance of Rosetta.
We investigate the outputs and representations of the model toward understanding its representation of molecular energies and exploring relationships to physical properties of proteins.
Our results open for future work the more general problem settings of combinatorial side chain optimization for a ﬁxed backbone (Tuffery et al., 1991; Holm & Sander, 1992) and the inverse folding problem (Pabo, 1983) – the recovery of native sequences for a ﬁxed backbone – which has also been used in benchmarking and development of molecular energy functions for protein design (Leaver-Fay et al., 2013).
B ACKGROUND
Protein conformation Proteins are linear polymers composed of an alphabet of twenty canonical amino acids (residues), each of which shares a common backbone moiety responsible for formation of the linear polymeric backbone chain, and a differing side chain moiety with biochemical properties that vary from amino acid to amino acid.
The energetic interplay of tight packing of side chains within the core of the protein and exposure of polar residues at the surface drives folding of proteins into stable molecular conformations (Richardson & Richardson, 1989; Dill, 1990).
The conformation of a protein can be described through two interchangeable coordinate systems.
Each atom has a set of spatial coordinates, which up to an arbitrary rotation and translation of all coordinates describes a unique conformation.
In the internal coordinate system, the conformation is described by a sequence of rigid-body motions from each atom to the next, structured as a kinematic tree.
The major degrees of freedom in protein conformation are the dihedral rotations (Richardson & Richardson, 1989), about the backbone bonds termed phi ( φ ) and psi ( ψ ) angles, and the dihedral rotations about the side chain bonds termed chi ( χ ) angles.
Within folded proteins, the side chains of amino acids preferentially adopt conﬁgurations that are determined by their molecular structure.
A relatively small number of conﬁgurations separated by high energetic barriers are accessible to each side chain (Janin et al., 1978).
These conﬁgurations are called rotamers .
In Rosetta and other protein design methods, rotamers are commonly represented by libraries that estimate a probability distribution over side chain conﬁgurations, conditioned on the backbone φ and ψ torsion angles.
We use the
Dunbrack library (Shapovalov & Dunbrack Jr, 2011) for rotamer conﬁgurations.
Energy-based models A variety of methods have been proposed for learning distributions of highdimensional data, e.g. generative adversarial networks (Goodfellow et al., 2014) and variational autoencoders (Kingma & Welling, 2013).
In this work, we adopt energy-based models (EBMs) (Dayan et al., 1995;
Hinton & Salakhutdinov, 2006; LeCun et al., 2006).
This is motivated by their simplicity and scalability, as well as their compelling results in other domains, such as image generation (Du & Mordatch, 2019).
In EBMs, a scalar parametric energy function E θ ( x ) is ﬁt to the data, with θ set through a learning procedure such that the energy is low in regions around x and high elsewhere.
The energy function maps to a probability density using the Boltzmann distribution: p θ ( x ) = exp( − E θ ( x )) /Z
( θ ) , where Z = (cid:82) exp( − E θ ( x ))
dx denotes the partition function.
EBMs are typically trained using the maximum-likelihood method (ML), in which θ is adjusted to minimize
KL ( p D ( x ) || p
θ ( x )) , the Kullback-Leibler divergence between the data and the model distribution.
This corresponds to maximizing the log-likelihood of the data under the model:
[Equation]
Following Carreira-Perpinan & Hinton (2005), the gradient of this objective can be written as:
[Equation]
Intuitively, this gradient decreases the energy of samples from the data distribution x + and increases the energy of samples drawn from the model x − .
Sampling from p θ can be done in a variety of ways, such as
Markov chain Monte Carlo or Gibbs sampling (Hinton & Salakhutdinov, 2006), possibly accelerated using
Langevin dynamics (Du & Mordatch, 2019).
Our method uses a simpler scheme to approximate ∇ θ L ML , detailed in Section 3.4.
M ETHOD
Our goal is to score molecular conﬁgurations of the protein side chains given a ﬁxed target backbone structure.
We deﬁne an architecture for an energy-based model and describe its training procedure.
3. M ODEL
The model calculates scalar functions, f θ ( A ) , of size- k subsets, A , of atoms within a protein.
Selection of atom subsets In our experiments, we choose A to be nearest-neighbor sets around the residues of the protein and set k = 64 .
For a given residue, we construct A to be the k atoms that are nearest to the residue’s beta carbon.
Atom input representations Each atom in A is described by its 3D Cartesian coordinates and categorical features: (i) the identity of the atom (N, C, O, S); (ii) an ordinal label of the atom in the side chain (i.e. which speciﬁc carbon, nitrogen, etc.
atom it is in the side chain) and (iii) the amino acid type (which of thetypes of amino acids the atom belongs to).
The coordinates are normalized to have zero mean across the k [Figure] atoms.
Each categorical feature is embedded into 28 dimensions, and the spatial coordinates are projected into 172 dimensions 2 , which are then concatenated into a 256-dimensional atom representation.
The parameters for the input embeddings and projections of spatial information are learned via training.
During training, a random rotation is applied to the coordinates in order to encourage rotational invariance of the model.
For visualizations, a ﬁxed number of random rotations ( 100 ) is applied and the results are averaged.
Architecture In our proposed approach, f θ ( A ) takes the form of a Transformer model (Vaswani et al., 2017) that processes a set of atom representations.
The self-attention layers allow each atom to attend to the representations of other atoms in the set, modeling the energy of the molecular conﬁguration as a non-linear interaction of single, pairwise, and higher-order interactions between the atoms.
The ﬁnal hidden representations of the Transformer are pooled across the atoms to produce a single vector, which is ﬁnally passed to a two-layer multilayer perceptron (MLP) that produces the scalar output of the model.
Figureillustrates the model.
For all experiments, we use a 6-layer Transformer with embedding dimension of 256 (split over 8 attention heads) and feed-forward dimension of 1024.
The ﬁnal MLP contains 256 hidden units.
The models are trained without dropout.
Layer normalization (Ba et al., 2016) is applied before the attention blocks.
3. P ARAMETERIZATION OF PROTEIN CONFORMATIONS
The structure of a protein can be represented by two parameterizations: (1) absolute Cartesian coordinates of the set of atoms, and (2) internal coordinates of the atoms encoded as a set of in-plane/out-of-plane rotations and displacements relative to each atom’s reference frame.
Out-of-plane rotations are parameterized by χ angles which are the primary degrees of freedom in the rotamer conﬁgurations.
The coordinate systems are interchangeable.
3. U SAGE AS AN ENERGY FUNCTION
We specify our energy function E θ ( x, c ) to take an input set composed of two parts: (1) the atoms belonging to a rotamer to be predicted, x , and (2) the atoms of the surrounding molecular context, c .
The energy function is deﬁned as follows:
[Equation]
where A ( x, c ) is the set of embeddings from k atoms nearest to the rotamer’s beta carbon.
3. T RAINING AND LOSS FUNCTIONS
In all experiments, the energy function is trained to learn the conditional distribution of the rotamer given its context by approximately maximizing the log likelihood of the data.
[Equation]
To estimate the partition function, we note that:
[Equation]
for some importance sampler q ( x | c ) .
Furthermore, if we assume q ( x | c ) is uniformly distributed on supported conﬁgurations, we obtain a simpliﬁed maximum likelihood objective given by
[Equation]
for some context dependent importance sampler q ( x | c ) .
We choose our sampler q ( x | c ) to be an empirically collected rotamer library (Shapovalov & Dunbrack Jr, 2011) conditioned on the amino acid identity and the backbone φ and ψ angles.
We write the importance sampler as a function of atomic coordinates which are interchangeable with the angular coordinates in the rotamer library.
The library consists of lists of means and standard deviations of possible χ angles for each 10 degree interval for both φ and ψ .
We sample rotamers uniformly from this library, given by a continuous φ and ψ , by sampling from a weighted mixture of
Gaussians of χ angles at each of the four surrounding bins, with weights given by distance to the bins via bilinear interpolation.
Every candidate rotamer at each bin is assigned uniform probability.
To ensure our context dependent importance sampler effectively samples high likelihood areas in the model, we further add the real context as a sample from q ( x | c ) .
Training setup Models were trained for 180 thousand parameter updates using 32 NVIDIA V100 GPUs, a batch size of 16,384, and the Adam optimizer ( α = 2 · 10 − 4 , β 1 = 0 .
99 , β 2 = 0 .
We evaluated training progress using a held-out 5% subset of the training data as a validation set.
E XPERIMENTS 4. D ATASETS
We constructed a curated dataset of high-resolution PDB structures using the CullPDB database, with the following criteria: resolution ﬁner than 1.8 ˚A; sequence identity less than 90%; and R value less than 0.
as deﬁned in Wang & R. L. Dunbrack (2003).
To test the model on rotamer recovery, we use the test set of structures from Leaver-Fay et al.
To prevent training on structures that are similar to those in the test set, we ran BLAST on sequences derived from the PDB structures and removed all train structures with more than 25% sequence identity to sequences in the test dataset.
Ultimately, our train dataset consisted of 12, structures and our test dataset consisted of 129 structures. [Table]
B ASELINES
We compare to three baseline neural network architectures: a fully-connected network, the architecture for embedding sets in the set2set paper (Vinyals et al., 2015); and a graph neural network (Veliˇckovi´c et al., 2017).
All models have around 10 million parameters.
Details of the baseline architectures are given in
Appendix A.1.2.
Results are also compared to Rosetta.
We ran Rosetta using score12 and and ref15 energy functions using the rotamer trials and rtmin protocols with default settings.
4.2. E VALUATION
For the comparison of the model to Rosetta in Table 1, we reimplement the sampling scheme that Rosetta uses for rotamer trials evaluation.
We take discrete samples from the rotamer library, with bilinear interpolation of the mean and standard deviations using the four grid points surrounding the backbone φ and ψ angles for the residue.
We take discrete samples of the rotamers at µ , except that for buried residues we sample χ 1 and χat µ and µ ± σ as was done in Leaver-Fay et al.
We deﬁne buried residues to have ≥ 24 C β neighbors within 10 ˚A of the residue ’s C β
( C α for glycine residues).
For buried positions we accumulate rotamers up to 98% of the distribution, and for other positions the accumulation is to 95%.
We score a rotamer as recovered correctly
if all χ angles are within 20 ◦ of the ground-truth residue.
We also use a continuous sampling scheme which approximates the empirical conditional distribution of the rotamers using a mixture of Gaussians with means and standard deviations computed by bilinear interpolation as above.
Instead of sampling discretely, the component rotamers are sampled with the probabilities given by the library, and a sample is generated with the corresponding mean and standard deviation.
This is the same sampling scheme used to train models, but with component rotamers now weighted by probability as opposed to uniform sampling.
4. R OTAMER RECOVERY RESULTS
Table 1 directly compares our EBM model (which we refer to as the Atom Transformer) with two versions of the Rosetta energy function.
We run Rosetta on the set of 152 proteins from the benchmark of Leaver-Fay et al.
We also include published performance on the same test set from Leaver-Fay et al.
As discussed above, comparable sampling strategies are used to evaluate the models, enabling a fair comparison of the energy functions.
We ﬁnd that a single model evaluated on the benchmark performs slightly worse than both versions of the Rosetta energy function.
An ensemble of 10 models improves the results.
Table 2 evaluates the performance of the energy function under alternative sampling strategies with the goal of optimizing recovery rates.
We indicate performance of the Rosetta energy function on recovery rates using the rtmin protocol for continuous minimization.
We evaluate the learned energy function with the continuous sampling from a mixture of Gaussians conditioned on the φ / ψ settings of the backbone angles as detailed [Table] [Table] above.
We ﬁnd that with ensembling the model performance is close to that of the Rosetta energy functions.
We also compare to three baselines for embedding sets with similar numbers of parameters to the Atom
Transformer model and ﬁnd that they have weaker performance.
Buried residues are more constrained in their conﬁgurations by tight packing of the side chains within the core of the protein.
In comparison, surface residues are more free to vary.
Therefore we also report performance separately on both categories.
We ﬁnd that the ensembled Atom Transformer has a 91.2% rotamer recovery rate for buried residues, compared to 59.5% for surface residues.
Table 3 reports recovery rates by residue comparing the Rosetta score12 results reported in Leaver-Fay et al.
(2013) to the Atom Transformer model using the Rosetta discrete sampling method.
The Atom Transformer model appears to perform well on smaller rotameric amino acids as well as polar amino acids such as glutamate/aspartate while Rosetta performs better on larger amino acids like phenylalanine and tryptophan and more common ones like leucine.
4. V ISUALIZING E NERGIES
In this section, we visualize and understand how the Atom Transformer models the energy of rotamers in their native contexts.
We explore the response of the model to perturbations in the conﬁguration of side chains away from their native state.
We retrieve all protein structures in the test set and individually perturb rotameric χ angles across the unit circle, plotting results in Figures 2, 3, and 4.
[Figure] [Figure] Core/Surface Energies Figure 2 shows that steeper response to variations away from the native state is observed for residues in the core of the protein (having ≥ 24 contacting side chains) than for residues on the surface ( ≤ 16), consistent with the observation that buried side chains are tightly packed (Richardson &
Richardson, 1989).
Rotameric Energies Figure 3 shows a relation between the residue size and the depth of the energy well, with larger amino acids having steeper wells (more sensitive to perturbations).
Furthermore Figure 4 shows that the model learns the symmetries of amino acids.
We ﬁnd that responses to perturbations of the χ 2 angle for the residues Tyr, Asp, and Phe are symmetric about χ 2 .
A 180 ◦ periodicity is observed, in contrast to the non-symmetric residues.
Embeddings of Atom Sets Building on the observation of a relation between the depth of the residue and its response to perturbation from the native state, we ask whether core and surface residues are clustered within the representations of the model.
To visualize the ﬁnal hidden representation of the molecular contexts within a protein, we compute the ﬁnal vector embedding for the 64 atom context around the carbon- β atom (or for glycine, the carbon- α atom) for each residue.
We ﬁnd that a projection of these representations by t-SNE (Maaten & Hinton, 2008) into 2 dimensions shows a clear clustering between representations of core residues and surface residues.
A representative example is shown in Figure 5.
[Figure]
Saliency Map
The 10-residue protease-binding loop in a chymotrypsin inhibitor from barley seeds is highly structured due to the presence of backbonebackbone and backbone-sidechain hydrogen bonds in the same residue (Das, 2011).
To visualize the dependence of the energy function on individual atoms, we compute the energy of the 64 atom context centered around the backbone carbonyl oxygen of residue 39 (isoleucine) in PDB: 2CI2 (McPhalen & James, 1987) and derive the gradients with respect to the input atoms.
Figure 6 overlays the gradient magnitudes on the structure, indicating the model attends to both sidechain and backbone atoms, which participate in hydrogen bonds. [Figure]
R ELATED W ORK
Energy functions have been widely used in the modeling of protein conformations and the design of protein sequences and structures (Boas & Harbury, 2007).
Rosetta, for example, uses a combination of physically motivated terms and knowledge-based potentials (Alford et al., 2017) to model proteins and other macromolecules.
Leaver-Fay et al.
(2013) proposed optimizing the feature weights and parameters of the terms of an energy function for protein design; however their method used physical features designed with expert knowledge and data analysis.
Our work draws on their development of rigorous benchmarks for energy functions but in contrast automatically learns complex features from data.
Neural networks have also been explored for protein folding.
Xu (2018) developed a deep residual network that predicts the pairwise distances between residues in the protein structure from evolutionary covariation information.
Senior et al.
(2018) used evolutionary covariation to predict pairwise distance distributions, using maximization of the probability of the backbone structure with respect to the predicted distance distribution to fold the protein.
Ingraham et al.
(2018) proposed learning an energy function for protein folding by backpropagating through a differentiable simulator.
AlQuraishi (2019) investigated predicting protein structure from sequence without using co-evolution.
Deep learning has shown practical utility in the related ﬁeld of small molecule chemistry.
Gilmer et al.
(2017) achieved state-of-the-art performance on a suite of molecular property benchmarks.
Similarly, Feinberg et al.
(2018) achieved state-of-the-art performance on predicting the binding afﬁnity between proteins and small molecules using graph convolutional networks.
Mansimov et al.
(2019) used a graph neural network to learn an energy function for small molecules.
In contrast to our work, these methods operate over small molecular graphs and were not applied to large macromolecules, like proteins.
In parallel, recent work proposes that generative models pre-trained on protein sequences can transfer knowledge to downstream supervised tasks (Bepler & Berger, 2019; Alley et al., 2019;
Yang et al., 2019;
Rives et al., 2019).
These methods have also been explored for protein design (Wang et al., 2018).
Generative models of protein structures have also been proposed for generating protein backbones (Anand &
Huang, 2018) and for the inverse protein folding problem (Ingraham et al., 2019).
D ISCUSSION
In this work we explore the possibility of learning an energy function of protein conformations at atomic resolution.
We develop and evaluate the method in the benchmark problem setting of recovering protein side chain conformations from their native context, ﬁnding that a learned energy function nears the performance in this restricted domain to energy functions that have been developed through years of research into approximation of the physical forces guiding protein conformation and engineering of statistical terms.
The method developed here models sets of atoms and can discover and represent the energetic contribution of high order dependencies within its inputs.
We ﬁnd that learning an energy function from the data of protein crystal structures automatically discovers features relevant to computing molecular energies; and we observe that the model responds to its inputs in ways that are consistent with an intuitive understanding of protein conformation and energy.
Generative biology (Rives et al., 2019) proposes that the design principles used by nature can be automatically learned from data and can be harnessed to generate and design new biological molecules and systems. High-ﬁdelity generative modeling for proteins, operating at the level of structures and sequences, can enable generative protein design.
To create new proteins outside the space of those discovered by nature, it is necessary to use design principles that generalize to all proteins.
Huang et al.
(2016) have argued that since the physical principles that govern protein conformation apply to all proteins, encoding knowledge of these physical and biochemical principles into an energy function will make it possible to design de novo new protein structures and functions that have not appeared before in nature.
Learning features from data with generative methods is a possible direction for realizing this goal to enable design in the space of sequences not visited by evolution.
The generalization of neural energy functions to harder problem settings used in the protein design community, e.g. combinatorial side chain optimization (Tuffery et al., 1991; Holm & Sander, 1992), and inverse-folding (Pabo, 1983), is a direction for future work.
The methods explored here have the potential for extension into these settings. A CKNOWLEDGMENTS
We thank Kyunghyun Cho, Siddharth Goyal, and Yann LeCun for helpful conversations.
Alexander Rives was supported by NSF Grant #1339362.
A. A PPENDIX A.1. P SEUDOCODE FOR THE T RAINING A LGORITHM
Pseudocode for the training algorithm is given below in Algorithm 1.
Algorithm
for the EBM
Input: Rotamer library q ( x | c ) , Training set of proteins D for Protein d i of D do (cid:46)
Sample random amino acid from d i
R ∼ d i (cid:46) Set positive sample to 64 nearest neighbor atoms of carbon beta of R c + ← NN 64 ( R ) (cid:46)
Generate N negative samples from the rotamer library c − ← q ( x | c + ) (cid:46) Compute loss of model (logsumexp across all negative samples)
L ml =
E ( c + ; θ ) + logsumexp ( − E ( c + ; θ ) , − E ( c − 0 ; θ ) , − E ( c − 1 ; θ ) , . . .
, − E ( c − N ; θ ))
(cid:46) Minimization step of L ml using Adam optimizer θ ← θ − ∇ θ L ml end for
A.1. M ODEL A RCHITECTURE
Architectural descriptions are provided below for each the three neural network baselines as well as for the
Atom Transformer.
For Set2set models, we use 6 processing steps of computation.
For graph networks, we add residual connections between each layer.
Embed Each Atom to 256 Dim
Flatten
Dense →1024 →1024 →
ResBlock down
Global Mean Pooling
Dense →(
[Figure]
) Fully Connected Model
Embed Each Atom to 256 Dim
Dense →
Repeat (6x):
LSTM
Attention 2048 → 128 →
End Repeat
Dense →1024 →
[Figure]
Embed Each Atom to 512 Dim
Graph Attention Layer
Graph Attention Layer Graph Attention Layer Graph Attention Layer
Graph Attention Layer Graph Attention Layer
Graph
[Figure]
Layer
[Figure]
to
Transformer Encoder Block (8 heads, feedforward dim 1024, 256 encoder dim) Transformer Encoder Block (8 heads, feedforward dim 1024, 256 encoder dim)
Transformer Encoder Block (8 heads, feedforward dim 1024, 256 encoder dim) Transformer Encoder Block (8 heads, feedforward dim 1024, 256 encoder dim)
Transformer Encoder Block (8 heads, feedforward dim 1024, 256 encoder dim) Transformer Encoder Block (8 heads, feedforward dim 1024, 256 encoder dim)
[Figure]