← all repositories
microsoft/foldingdiff

Folding proteins by diffusing angles through BERT

It generates novel protein backbones with a diffusion model, then stress-tests them by trying to design sequences that actually fold into the predicted shape.

564 stars Jupyter Notebook Domain AppsML Frameworks
foldingdiff
Not currently ranked — collecting fresh signals.
star history

What it does foldingdiff is a diffusion model that generates novel protein backbone structures. Instead of operating directly on 3D coordinates, it diffuses and denoises internal bond and torsion angles—treating protein geometry as a trigonometry problem. The model is built on a BERT-style transformer (BertForDiffusion) and trained on the CATH dataset, outputting angular representations that are converted to standard PDB files.

The interesting bit The project repurposes a masked-language-model architecture for continuous structural diffusion, and it does not stop at generation. It runs synthesized backbones through an inverse-folding gauntlet—using ProteinMPNN or ESM-IF1 to propose amino acid sequences, then OmegaFold or AlphaFold to check if those sequences refold into the original shape—to compute self-consistency TM scores and filter out implausible structures.

Key highlights

  • Generates backbones of varying lengths via angle-space diffusion, with pre-trained weights hosted on HuggingFace.
  • Core architecture is a BERT-style transformer adapted for continuous regression over noise schedules.
  • Includes a browser-accessible demo on HuggingFace Spaces and tools to render the diffusion process as animated GIFs.
  • Evaluates structural “designability” by coupling generation with external inverse-folding and structure-prediction pipelines.

Caveats

  • The full designability pipeline requires orchestrating several external bioinformatics tools (ProteinMPNN, ESM-IF1, OmegaFold, AlphaFold) in separate environments.
  • Sampling on CPU is functional but described as “very slow” compared to GPU inference.
  • Training and some evaluations require downloading large CATH datasets not bundled in the repository, and the codebase emits warnings about illegal omega values that the authors note are expected.

Verdict Structural biologists and protein designers looking for a generative backbone model with built-in validation hooks should look here; developers seeking a lightweight, self-contained generative tool may find the external evaluation dependencies burdensome.

Frequently asked

What is microsoft/foldingdiff?
It generates novel protein backbones with a diffusion model, then stress-tests them by trying to design sequences that actually fold into the predicted shape.
Is foldingdiff open source?
Yes — microsoft/foldingdiff is open source, released under the MIT license.
What language is foldingdiff written in?
microsoft/foldingdiff is primarily written in Jupyter Notebook.
How popular is foldingdiff?
microsoft/foldingdiff has 564 stars on GitHub.
Where can I find foldingdiff?
microsoft/foldingdiff is on GitHub at https://github.com/microsoft/foldingdiff.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.