CryoFM: A Flow-based Foundation Model for Cryo-EM Densities

Yi Zhou, Yilai Li, Jing Yuan, Quanquan Gu

TL;DR

CryoFM is the first flow-based generative foundation model designed to learn the prior probability distribution of high-quality 3D biomolecular density maps from cryo-EM data. By pairing this learned prior with a novel flow posterior sampling method, CryoFM can solve a variety of downstream structural biology tasks—such as denoising, missing wedge restoration, and ab initio modeling—in a plug-and-play manner without any fine-tuning.

What Problem Does This Paper Address?

Cryo-electron microscopy (cryo-EM) and cryo-electron tomography (cryo-ET) have revolutionized structural biology by capturing 3D images of biomolecules at near-atomic resolution. However, the raw data is incredibly noisy, and reconstructing a clean 3D structure from 2D projections is a challenging mathematical inverse problem.

While deep learning has recently been applied to help denoise and modify these maps, existing models are typically task-specific: they are trained to directly map a specific type of degraded input to a clean output. This makes them inflexible when faced with new types of noise or different imaging artifacts. CryoFM addresses this limitation by shifting the paradigm: instead of learning a specific mapping, it learns a generalized, data-driven "prior" distribution of what a high-quality protein structure should look like, creating a true foundation model for the cryo-EM field.

Methods

CryoFM is built on Flow Matching, an elegant and computationally efficient alternative to traditional diffusion models (like DDPMs) that regresses a time-dependent vector field to continuously transform a simple noise distribution into the target data distribution.

Figure 1: The overview of CRYOFM. In the training stage, CRYOFM learns a vector field vΘ(t, xt), whose corresponding probability flow generates the data distribution p0(x0) of high-quality protein densities. In the inference stage, given an observation y, a likelihood term pt(y|xt) is incorporated to convert the unconditional vector field vΘ(t, xt) to a conditional one vΘ(t, xt|y), so that we can sample from the posterior distribution p0(x0|y). This enables signal restoration of the density map, resulting in improved resolution of the alpha helices in the shown case.

The authors introduced two model variants:

  • CryoFM-S: Captures fine, high-resolution local details.
  • CryoFM-L: Focuses on the overall global shape of the biomolecule at medium-to-low resolutions.

To handle the massive computational complexity of processing 3D data, CryoFM utilizes a hierarchical Transformer architecture based on the Hourglass Diffusion Transformer (HDiT).

Figure 2: CRYOFM’s architecture. The side length D of the input xt undergoes dimension reduc- tion through down-sampling layers and is then expanded back to its original size. To minimize computational cost near the input and output, the model employs neighborhood attention (NA). Neighborhood attention only attend to a localized area, whereas global attention (GA) calculates attention across all positions.

As shown in the architecture diagram above, the model downsamples spatial dimensions at the outer layers to reduce token counts. It applies Neighborhood Attention (NA) at high resolutions to capture local dependencies efficiently, and reserves Global Attention (GA) for the lower-resolution bottleneck where global context matters most.

During inference, the authors use a novel Flow Posterior Sampling algorithm. By combining the frozen, pretrained CryoFM prior with a task-specific mathematical description of the degradation (the likelihood term), they can guide the generative process to solve specific inverse problems without retraining the model.

Datasets

The model was trained on a curated subset of data from the Electron Microscopy Data Bank (EMDB). The authors selected 3,479 high-quality single-particle cryo-EM density maps with reported resolutions better than 3.0 Å. They manually excluded exceptionally large complexes, helical structures, and maps with highly inconsistent local resolutions. Thirty-two maps were held out as a test set to evaluate performance across downstream tasks.

Key Insights and Ideas

  • The Power of Decoupling: By separating the structural prior $p(\mathbf{x})$ from the task-specific likelihood $p(\mathbf{y}|\mathbf{x})$, CryoFM achieves remarkable versatility. As long as a researcher can mathematically define the forward degradation process (e.g., how a missing wedge or specific noise alters the data), CryoFM can solve it.
  • Voxel Space vs. Latent Space: A common trend in generative AI is to train diffusion models in a compressed latent space (like Stable Diffusion). However, the authors discovered that for structural biology, Latent Flow Models fail. The compression step (VAE) acts as a bottleneck that destroys high-frequency structural details like $\alpha$-helices. Training directly in the voxel space, despite the compute cost, is essential for maintaining atomic-level fidelity.
  • Data Normalization is Crucial: Standardizing the variance and range of the 3D density maps during preprocessing significantly improves both training stability and downstream task performance.

Key Results

CryoFM achieved state-of-the-art or highly competitive results across four distinct downstream challenges:

  1. Spectral Noise Denoising: CryoFM significantly outperformed established baselines like DeepEMhancer and EMReady, particularly at medium resolutions, while maintaining a 0% failure rate (whereas baselines frequently failed to produce meaningful structures on heavily degraded maps).
  2. Anisotropic Noise Denoising: When noise varies by direction, CryoFM successfully restored the corrupted signal without introducing the artificial shape biases or artifacts seen in baseline methods.
  3. Missing Wedge Restoration: In simulated cryo-ET environments where a wedge of data is physically missing in Fourier space, CryoFM effectively filled in the blanks, achieving a Fourier Shell Correlation ($FSC_{AUC}$) of 0.76 within the missing region.
  4. Ab initio Modeling: Using CryoFM-L, the model successfully generated coarse 3D initial structures from as few as two to eight clean 2D projections, matching the refinement quality of industry-standard tools like cryoSPARC.

Limitations and Future Work

While CryoFM represents a massive step forward, the authors note a few key limitations. First, while the model was evaluated using real protein structures, the noise models applied to them were mathematically simulated; adapting CryoFM to handle the complex, raw, real-world noise of experimental microscopes remains an open challenge. Additionally, the current iteration of the model does not yet support full 3D reconstruction directly from thousands of raw, unaligned 2D particle images, which is a primary goal for future developments in this line of research.

Summary updated

BibTeX
@inproceedings{zhou2025cryofm,
  author = {Yi Zhou and Yilai Li and Jing Yuan and Quanquan Gu},
  title = {{CryoFM: A Flow-based Foundation Model for Cryo-EM Densities}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=T4sMzjy7fO},
}
Figure