Abstract
Protein structure prediction has been revolutionized by deep learning models such as AlphaFold 2 and ESMFold. These models enable rapid in silico prediction and have been integrated into de novo protein design and protein-protein interaction (PPI) prediction. However, biologically relevant features dependent on conformational distributions cannot be estimated with these deterministic models. Diffusion models, a novel class of generative models, have been developed to learn conformational distributions and applied to de novo protein design. Limited work has been done on protein structure inpainting, where a masked section is recovered by simultaneously conditioning on its sequence and the rest of the structure. In this work, we propose FrameDiffinPainTing (FrameDiPT), a generalized model for protein inpainting. This is particularly important for T-cells given the hyper-variability of the complementarity determining region (CDR) loops. We evaluated the model on CDR loop design for T-cell receptors and achieved comparable prediction accuracy to ProteinGenerator and RFdiffusion with limited training data and learnable parameters. Unlike deterministic models, FrameDiPT captures the conformational distribution at different regions and binding states, highlighting a key advantage of generative models.
Introduction
While deep learning models like AlphaFold 2 provide high-accuracy protein structure predictions, they are largely deterministic, offering a single "static" snapshot. In reality, proteins are dynamic, and certain regions—like the Complementarity Determining Region (CDR) loops in T-cell receptors (TCRs)—are hyper-variable. These loops change shape depending on whether they are "unbound" or "bound" to a target, such as a peptide-MHC complex.
Existing generative models often focus on de novo design, creating entire proteins from scratch. However, there is a significant gap in "inpainting" tools that can accurately sample the possible shapes of a specific missing loop while respecting the fixed geometry of the surrounding protein context. FrameDiPT is a lightweight SE(3) diffusion model designed to fill this gap, providing a way to model the diverse range of shapes these critical loops can take.
Methods
FrameDiPT builds upon FrameDiff, a graph-based SE(3)-equivariant diffusion model. The SE(3) equivariance ensures the model understands that physical laws remain invariant under rotation or translation in 3D space. Key technical innovations include:
- Rigid-Frame Representation: Instead of predicting raw X, Y, Z coordinates, the model represents each residue as a "frame" (position and orientation), ensuring biologically plausible bond angles.
- Sequence Conditioning: Unlike de novo models, FrameDiPT is given the amino acid sequence as an input, allowing it to "fill in" the structure for a known sequence.
- Contextual Denoising: During diffusion, the model only noises and denoises the masked region (the loop). The rest of the protein structure remains fixed, acting as a spatial constraint.
- Efficiency: The model is remarkably compact, featuring only 18 million parameters, compared to over 130 million in models like RFdiffusion.
Experimental Setup
The model was trained on 32,000 monomer structures from the RCSB Protein Data Bank (PDB). Crucially, the authors excluded TCRs and antibodies from the training set to test the model's ability to generalize to unseen protein classes. Evaluation was performed on a curated dataset of TCR and TCR:pMHC structures, including 21 unbound TCRs and 80 bound complexes.
Results and Discussion
FrameDiPT achieved a backbone Root-Mean-Square Deviation (RMSD) of 2.18Å to 2.91Å across various TCR datasets. It reached this performance with only 2 GPU-weeks of training, a fraction of the resources required by competing models.
A key advantage of FrameDiPT is its ability to capture distributions rather than single point estimates. For flexible loops, a single "correct" answer often does not exist. PCA analysis of the generated conformations showed distinct clusters for "bound" vs. "unbound" states, indicating that the model understands how binding influences loop conformation.
Furthermore, the model correctly predicted lower variance at the "flanks" of the loops where they connect to rigid beta-strands, and higher variance in the middle of the loop, matching experimental observations. Despite never seeing a T-cell receptor during training, FrameDiPT achieved accuracy comparable to models trained on much larger, specialized datasets, suggesting that the underlying "physics" of protein folding it learned is highly transferable.
Conclusion
While FrameDiPT is excellent at capturing distributions, its best-case accuracy still lags behind deterministic models like AlphaFold 2 when provided with custom templates. Future work involves scaling the model to larger training sets and increasing parameter counts. A promising direction is using the generated conformational distributions to improve binding affinity predictions by accounting for loop flexibility.
Summary updated