원시데이터 수집 시스템
선정목록으로

Amortized template matching of molecular conformations from cryoelectron microscopy images using simulation-based inference

관련 필름·전자재료 · (16) CPI(투명 폴리이미드)

기본 정보

저자
  1. Lars Dingeldein — Faculty of Physics, Goethe University Frankfurt|||Frankfurt Institute for Advanced Studies|||Institute of Physics|||Institute of Physics, Faculty of Physics, Goethe University Frankfurt, Frankfurt am Main 60438, Germany
  2. David Silva-Sánchez — Department of Applied Mathematics|||Yale University|||Department of Applied Mathematics, Yale University, New Haven, CT 06520
  3. Luke Evans — Center for Computational Mathematics|||Flatiron Institute
  4. Edoardo D’Imprima — Istituto di Ricovero e Cura a Carattere Scientifico Humanitas Research Hospital|||Unit of Correlative Light Emission Microscopy Core|||Istituto di Ricovero e Cura a Carattere Scientifico Humanitas Research Hospital, Unit of Correlative Light Emission Microscopy Core, Rozzano, Milan 20089, Italy
  5. Nikolaus Grigorieff — HHMI, University of Massachusetts Chan Medical School|||RNA Therapeutics Institute|||University of Massachusetts Chan Medical School
  6. Roberto Covino — Faculty of Computer Science and Mathematics, Goethe University Frankfurt|||Frankfurt Institute for Advanced Studies|||Institute of Computer Science|||Frankfurt Institute for Advanced Studies, Frankfurt am Main 60438, Germany
  7. Pilar Cossio — Center for Computational Biology|||Center for Computational Mathematics|||Flatiron Institute
DOI
10.1073/pnas.2420158122
저널
Proceedings of the National Academy of Sciences
발행년도
2025
발행기관
National Academy of Sciences
피인용수
9
라이선스
cc-by-nc-nd
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1073/pnas.2420158122
토픽
Electron and X-Ray Spectroscopy Techniques
OpenAlex ID
W4411020658

평가 내용

관련도
관련
사업분야
필름·전자재료 · (16) CPI(투명 폴리이미드)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '필름·전자재료 > CPI(투명 폴리이미드)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Characterizing the conformational ensemble of biomolecular systems is key to understand their functions. Cryoelectron microscopy (cryo-EM) captures two-dimensional snapshots of biomolecular ensembles, giving in principle access to thermodynamics. However, these images are very noisy and show projections of the molecule in unknown orientations, making it very difficult to identify the biomolecule's conformation in each individual image. Here, we introduce cryo-EM simulation-based inference (cryoSBI) to infer the conformations of biomolecules and the uncertainties associated with the inference from individual cryo-EM images. CryoSBI builds on simulation-based inference, a merger of physics-based simulations and probabilistic deep learning, allowing us to use Bayesian inference even when likelihoods are too expensive to calculate. We begin with an ensemble of conformations, templates from experiments, and molecular modeling, serving as structural hypotheses. We train a neural network approximating the Bayesian posterior using simulated images from these templates and then use it to accurately infer the conformation of the biomolecule from each experimental image. Training is only done once on simulations, and after that, it takes just a few milliseconds to make inference on an image, making cryoSBI suitable for arbitrarily large datasets and direct analysis on micrographs. CryoSBI eliminates the need to estimate particle pose and imaging parameters, significantly enhancing the computational speed compared to explicit likelihood methods. Importantly, we obtain interpretable machine learning models by integrating physics-based approaches with deep neural networks, ensuring that our results are transparent and reliable. We illustrate and benchmark cryoSBI on synthetic data and showcase its promise on experimental single-particle cryo-EM data.

본문 69,553자

본문 펼치기
# Amortized template matching of molecular conformations from cryoelectron microscopy images using simulation-based inference Lars Dingeldein <sup>a,b</sup>, David Silva-Sánchez <sup>c</sup>, Luke Evans <sup>d</sup> <sup>[ID](https://orcid.org/0000-0003-1683-503X)</sup>, Edoardo D’Imprima <sup>e</sup> <sup>[ID](https://orcid.org/0000-0002-9830-7929)</sup>, Nikolaus Grigorieff <sup>f,g</sup> <sup>[ID](https://orcid.org/0000-0002-1506-909X)</sup>, Roberto Covino <sup>b,h,1</sup> <sup>[ID](https://orcid.org/0000-0003-0884-0402)</sup>, and Pilar Cossio <sup>d,i,1</sup> <sup>[ID](https://orcid.org/0000-0002-5404-9948)</sup> Affiliations are included on p. 9. Edited by Andrej Sali, University of California, San Francisco, CA; received October 1, 2024; accepted April 30, 2025 Characterizing the conformational ensemble of biomolecular systems is key to understand their functions. Cryoelectron microscopy (cryo-EM) captures two-dimensional snapshots of biomolecular ensembles, giving in principle access to thermodynamics. However, these images are very noisy and show projections of the molecule in unknown orientations, making it very difficult to identify the biomolecule’s conformation in each individual image. Here, we introduce cryo-EM simulation-based inference (cryoSBI) to infer the conformations of biomolecules and the uncertainties associated with the inference from individual cryo-EM images. CryoSBI builds on simulationbased inference, a merger of physics-based simulations and probabilistic deep learning, allowing us to use Bayesian inference even when likelihoods are too expensive to calculate. We begin with an ensemble of conformations, templates from experiments, and molecular modeling, serving as structural hypotheses. We train a neural network approximating the Bayesian posterior using simulated images from these templates and then use it to accurately infer the conformation of the biomolecule from each experimental image. Training is only done once on simulations, and after that, it takes just a few milliseconds to make inference on an image, making cryoSBI suitable for arbitrarily large datasets and direct analysis on micrographs. CryoSBI eliminates the need to estimate particle pose and imaging parameters, significantly enhancing the computational speed compared to explicit likelihood methods. Importantly, we obtain interpretable machine learning models by integrating physics-based approaches with deep neural networks, ensuring that our results are transparent and reliable. We illustrate and benchmark cryoSBI on synthetic data and showcase its promise on experimental single-particle cryo-EM data. cryo-EM | biophysics | Bayesian inference | modeling | template matching Biomolecules continuously reorganize between alternative conformations to perform essential functions in the cell. Understanding the mechanisms of these biological functions requires knowing the structure of the various conformations and the dynamics of how one conformation reorganizes into another. Characterizing in experiments the collection of all conformations—the conformational ensemble—is challenging. Most techniques provide only ensemble averages, while single-molecule methods usually lack the structural resolution to characterize different conformations precisely. While molecular simulations provide trajectories at high temporal and spatial resolution, sampling and accuracy issues limit their ability to explore conformational ensembles. Integrative methods in structural biology combine experimental and computational techniques with the promise to describe a complete picture of biomolecular structural dynamics (1). Cryoelectron microscopy (cryo-EM) is an experimental technique that captures different conformations of a biomolecule at the single-molecule level. In cryo-EM, a transmission electron microscope records two-dimensional projected images of a thin sample containing many identical copies of the same molecule (micrographs). Particlepicking software then identifies the two-dimensional images displaying a single copy of the molecule (particle) (2). The sample is prepared by flash-freezing an aqueous solution of randomly oriented biomolecules. Since freezing is very fast (3–5), the biomolecules are trapped in different conformations. In other words, cryo-EM provides snapshots (samples) from the entire conformational probability distribution. In practice, reconstructing sparsely populated conformations with cryo-EM remains an outstanding challenge. The frozen sample is imaged with a limited number of Significance Biomolecules reorganize between alternative conformations to perform their functions. Mapping out all their different conformations is critical to understanding how they work. Cryoelectron microscopy provides 2-d snapshots of copies of a biomolecule, each in a possible conformation. If we could assign each image to a specific conformation, we could identify and count important conformations. However, assigning conformations to images is challenging because the images are noisy and show projections along unknown orientations. We developed a computational method combining Bayesian inference and machine learning to assign a biomolecule’s conformation in individual cryo-EM images. Our method provides not only a most probable assignment but also an associated statistical confidence. It is very fast, enabling the analysis of massively large datasets. The authors declare no competing interest. This article is a PNAS Direct Submission. Copyright © 2025 the Author(s). Published by PNAS. This article is distributed under Creative [Commons](https://creativecommons.org/licenses/by-nc-nd/4.0/) [Attribution-NonCommercial-NoDerivatives](https://creativecommons.org/licenses/by-nc-nd/4.0/) License 4.0 [(CC BY-NC-ND).](https://creativecommons.org/licenses/by-nc-nd/4.0/) 1To whom correspondence may be addressed. Email: [covino@fias.uni-frankfurt.de](mailto:covino@fias.uni-frankfurt.de) or [pcossio@flatironinstitu](mailto:pcossio@flatironinstitute.org) [te.org.](mailto:pcossio@flatironinstitute.org) This article contains supporting information online [at https://www.pnas.org/lookup/suppl/doi:10.1073/pnas.](https://www.pnas.org/lookup/suppl/doi:10.1073/pnas.2420158122/-/DCSupplemental) [2420158122/-/DCSupplemental.](https://www.pnas.org/lookup/suppl/doi:10.1073/pnas.2420158122/-/DCSupplemental) Published June 4, 2025. electrons to avoid radiation damage, resulting in picked particles that are very noisy projections of the molecular density in unknown conformations and orientations. Obtaining highresolution structures requires averaging over many particles to reduce the noise. Consequently, 3-d classification methods can reconstruct a limited number of different conformations (6– 9), which can be combined with molecular dynamics (MD) approaches to estimate a conformational ensemble (10–13). However, these methods require grouping particles into a relatively small set of classes. Each class must contain enough particles necessary for a high-resolution reconstruction. Particles belonging to scarcely populated classes are discarded. Thus, current 3D classification methods may result in an incomplete understanding of a molecule’s biological function (14). Rare conformations and transition states that occur infrequently will be missed in these analyses, which are also unsuitable for studying highly flexible biomolecules; additionally, class refinement often fails to converge, with repeated analyses yielding different particle classifications depending on the random seed used (15), and these methods depend on averaging, preventing the identification of conformations at the level of individual images. Machine learning (ML) enabled an important step toward extracting heterogeneous reconstructions from cryo-EM, from pioneering approaches using manifold embedding (16) to stateof-the-art deep generative models (17–21). The key idea is to use ML to learn the mapping between the particles in a cryoEM dataset and the corresponding conformational volumes (22). However, the statistical inference can become computationally intractable, especially when both the conformation and pose (projection direction and location) must be inferred simultaneously. This is why most cryo-EM ML methods, as well as non-ML variability methods (23–26), rely on “consensus” maps and costly explicit-likelihood methods to calculate the particle poses, which fail for highly flexible molecules. CryoAI (27) and its implementation in cryoDRGN (28) use direct gradient-based optimization to amortize the particle poses while still requiring the direct estimation of a pose for each particle. Additionally, these methods do not provide statistical errors when assigning each particle to a specific conformational state in the latent space, and the latent space itself lacks physical interpretability (29, 30). Template-matching-based approaches assign each single particle to a molecular structure with high fidelity. BioEM can discriminate molecular conformations in individual particles by integrating over poses and imaging parameters within a Bayesian framework (31, 32). Recently, high-resolution template matching identified biomolecular conformations in situ using a cross-correlation-based approach in 2-d (33, 34) and 3-d (35). When the poses are sampled on a fine angular grid, and the matching is repeated for templates representing different molecular conformations, this method provides a highly accurate metric for conformational identification. However, this bruteforce likelihood optimization rapidly becomes computationally prohibitive. Currently, there is no fast and tractable method for identifying molecular structures in individual cryo-EM images that also provides assignment uncertainties. Here, we leveraged recent advances in simulation-based inference (36, 37) to develop cryo-EM simulation-based inference (cryoSBI), a computational framework that uses Bayesian inference to assign a molecular conformation to an individual cryoEM image avoiding expensive pose searches or costly likelihood optimizations. Our framework provides amortized inference and accurate statistical confidence. Standard cryo-EM reconstruction techniques combined with molecular modeling such as advanced MD schemes (38) and AI-based structure-prediction tools (39, 40) provide a set of structural templates that serve as structural hypotheses. We then simulate cryo-EM experiments to produce particles that answer the question: “What would an experimental particle look like if it depicted this molecular conformation?.” The synthetic particles arise from random poses and imaging parameters with adequate noise levels. Neural network density estimation allows us to learn from these particles the Bayesian posterior. We illustrate the cryoSBI algorithm, benchmark it on synthetic data, and showcase its use on experimental data. CryoSBI has several key advantages: _i)_ it provides not only the most probable assignment but also a statistical confidence; _ii)_ the inference is amortized, making it exceptionally fast and enabling analysis of an arbitrarily large number of images; _iii)_ training ML models on simulated particles—on which we have full control— guarantees that the ML embedding is robust and interpretable. CryoSBI solves the problem of identifying molecular conformations in individual cryo-EM images, paving the way for learning the entire conformational ensemble, including rare and transient conformations, directly from experiments. Results Simulation-Based Inference of Single-Particle Cryo-EM. We formulate the task of inferring molecular conformations from a single-particle cryo-EM image as a Bayesian inference problem. In essence, we want to quantify the probability that a given image _I_ depicts a molecular conformation _X_ . Let us consider a set of molecular conformations, that is, a set of structures, and a vector _휃_ that parameterizes them. In general, _휃_ is simply the index of each structure in the set. In specific situations, it is possible instead to map the structures to a low-dimensional parameterization describing a conformational change. For instance, we could describe the movement between two protein domains with an angle or a distance. For clarity, we will illustrate cryoSBI using structural ensembles that represent a conformational change that can be described by a one-dimensional _휃_ . However, the cryoSBI algorithm does not require such a low-dimensional parameterization to be formulated or to be effective. Given a cryo-EM image _I_, we aim to infer the conformation _휃_ of the molecule observed in the image. Therefore, we want to compute the Bayesian posterior _p_ ( _휃_ | _I_ ), quantifying how compatible _휃_ (that is associated with conformation _X_ ) is with the observed image _I_ . The posterior can be computed by Bayes’ theorem _p_ ( _휃_ | _I_ ) ∝ _p_ ( _I_ | _휃_ ) _p_ ( _휃_ ) _,_ [1] where _p_ ( _I_ | _휃_ ) is the likelihood of generating an image _I_ given a molecular conformation _휃_ and the prior _p_ ( _휃_ ) encodes all available knowledge before making the inference on how the conformations are distributed. Modeling the image formation process described by the likelihood requires taking into account the details of the experiment and the function of the electron microscope. For instance, it is often assumed that the molecule is randomly rotated, that the images are noisy, and that the microscope will introduce aberrations. The full likelihood of the image formation process is, therefore, _p_ ( _I_ | _휃, 휙_ ), containing additional parameters _휙_ required to model the details of the experiments and microscope. Usually, we are not interested in making inference of _휙_, treated as nuisance parameters. In other words, the likelihood is a marginalization _p_ ( _I_ | _휃_ ) = _p_ ( _I_ | _휃, 휙_ ) _p_ ( _휙_ ) _d_ _휙_ _,_ [2] Fig. 1. Schematic representation of cryoSBI: Simulation-based inference for cryo-EM. Simulated particle images generated from template conformations _휃_ and imaging parameters _휙_, such as rotation, defocus, and translation, are used to train the cryoSBI embedding network and posterior estimator (black boxes). _휃_ and _휙_ are sampled from a prior distribution, and fed to a forward model _M_ to generate a particle image _I_ . An embedding network that featurizes the images _S_ ( _I_ ) and a density estimator of the joint distribution of features and parameters are trained simultaneously using millions of simulated particle images. CryoSBI learns a computationally efficient approximation of the posterior _p_ ( _휃_ | _S_ ( _I_ )), which takes an image as input to predict the posterior distribution over _휃_, enabling amortized template matching of experimental images (magenta boxes). For each experimental particle, cryoSBI provides the full posterior, indicating both the most probable conformation that generated the image and the statistical confidence of the inference. with the prior of the imaging parameters _p_ ( _휙_ ). Maximizing the marginal likelihood _p_ ( _I_ | _휃_ ) is computationally very expensive (32, 33) because each evaluation requires integrating over all imaging parameters. The high computational cost of approaches that require explicit likelihood optimization restricts their applicability to small sets of images. Simulation-based inference (SBI) is an alternative approach to do Bayesian inference with intractable or computationally expensive likelihoods (36, 37, 41–44). The main idea is to replace a likelihood evaluation with a forward model to simulate synthetic data and then learn an approximation of the posterior on them. Here, we develop an SBI framework for amortized template matching of conformations from single-particle cryoEM images (Fig. 1). While the inverse problem of inferring a conformation from a cryo-EM image _I_ is challenging, the forward problem is much simpler. We can easily encode the image formation process described by the likelihood _p_ ( _I_ | _휃, 휙_ ) in a cryo-EM simulator, and repeatedly sample it by running forward simulations to produce synthetic images, i.e., _Ii_ ∼ _p_ ( _I_ | _휃i, 휙i_ ) with _휃i_ ∼ _p_ ( _휃_ ), _휙i_ ∼ _p_ ( _휙_ ). In this way, we accumulate a dataset of simulated images and parameters describing their generation, _D_ = { _휃i, 휙i, Ii_ }. Here, we used Neural Posterior Estimation (45) with a normalizing flow to directly approximate the Bayesian posterior from _D_ . We used an embedding network _S_ ( _I_ ) to extract features and map each image into a medium-dimensional representation. We then used another neural network _q_ as a conditional density estimator to build a surrogate model of the posterior, i.e., a statistical model that approximates the posterior, _q_ ( _휃_ | _S_ ( _I_ )) ≈ _p_ ( _휃_ | _I_ ). We then trained _S_ and _q_ jointly on _D_ using standard supervised deep learning methods. In this way, we learned an approximation of the desired Bayesian posterior, bypassing any explicit likelihood evaluation and marginalization. After training on the simulated images, the neural density estimator _q_ estimates the posterior for any new experimental image. The inference is computationally efficient for two reasons: First, it does not require any marginalization over the nuisance parameters _휙_ ; and second, the inference is amortized. The computationally expensive part due to the sampling, must be paid only once upfront by repeatedly running the simulator to build the dataset _D_ . Once the conditional estimator _q_ is trained, any new inference requires only an evaluation of the neural network underlying _q_ . In summary, cryoSBI involves the following steps: _i)_ Prepare a set of experimental cryo-EM particles or micrographs. _ii)_ Obtain a set of molecular conformations that serve as structural hypotheses—template structures—by using molecular simulations or ML methods. _iii)_ Simulate many synthetic particles sampling all possible template structures and nuisance parameters. _iv)_ Obtain a surrogate of the Bayesian posterior by training the embedding and conditional density estimator simultaneously on the set of simulated template particles. _v)_ Perform inference on the experimental particles with the trained surrogate posterior. Validation and Benchmark with Synthetic Data. How precisely is it possible to identify a structure in a single cryo-EM image? We answered this question by validating and benchmarking cryoSBI using synthetic data obtained from hsp90, an established benchmark model in the field (46, 47). Hsp90 comprises two chains that perform a large conformational change corresponding to their opening and closing. We selected twenty structures spanning the opening of the one of the chains, measured by the rmsd with respect to the closed structure (Fig. 2 _A_ ). CryoSBI accurately infers molecular configurations from single images. We trained cryoSBI on synthetic cryo-EM particle images generated under realistic conditions, with random orientations, a wide range of defocus values, center translations, and signalto-noise ratios (SNRs). We learned a surrogate model of the posterior, that we used to make inference on the synthetic particles. For each inference, we obtained an estimate of the Bayesian posterior that we could compare with the structure A B C D Fig. 2. Validation and benchmark with synthetic data. ( _A_ ) The opening of the two arms of hsp90 defines a conformational change, quantified by _휃_, the rmsd w.r.t the closed conformation. We selected 20 configurations equally spaced along _휃_ . Examples of cryoSBI inference for three particles. Each inference on synthetic images (gray-scale images in the _Insets_ ) resulted in a posterior (blue curve), quantifying which structural model was the most compatible with the image. Red lines represent the true configurations. The shaded region is the 2 _휎_ interval. ( _B_ ) Inference precision for 10,000 images as a function of SNR and projection direction. Each point represents the _휎_ interval (color bar, from dark blue—low confidence, to deep red—high confidence) of the posterior obtained from a synthetic image produced at a given SNR and projection angle. On _Top_, we show the schematic definition of _휙_, the angle formed between the direction of the electron beam and the direction of movement of the two arms of hsp90. ( _C_ ) Inference accuracy for 10,000 images for sets with different SNR. The two scatter plots show the correlation between the estimated opening obtained as a sample of the posterior, and the true opening, using SNR = 0.1 and SNR = 0.01, respectively. We colored each sample according to _휎_ (colors as for panel _B_ ). The black dashed line describes the average of the posterior means, while the blue line corresponds to the mean of the maximum-likelihood estimates using BioEM (32). ( _D_ ) Scaling of the computational cost w.r.t. the number of images of cryoSBI and maximum likelihood methods (BioEM). Wall-times were obtained using an NVIDIA RTX A6000 GPU for cryoSBI, and an AMD EPYC 7742 CPU for BioEM. that we actually used to produce the specific image (red line in Fig. 2 _A_ ). While we focused here for clarity on a onedimensional posterior, cryoSBI is general and can be used to inspect higher-dimensional posterior distributions ( _[SI Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, Fig. S1). The posterior provides information both on the accuracy of the inference—whether the bulk of the distribution contains the ground truth—and the precision—the spread of the distribution. The precision estimate is accurate, as shown by the convergence of training loss and simulation-based calibration checks ( _[SI Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, Fig. S2). The SNR and projection direction are the main experimental factors determining how precisely we can infer a molecular configuration from a single image. As the SNR of an image decreases, the inference is still accurate but the posterior gradually broadens, corresponding to an increasing uncertainty (Fig. 2 _A_ and _B_ ). The precision also decreases for projection directions that occlude the conformational change of interest. In the case of hsp90, this occurs by projecting along a direction where one arm covers the other one (Fig. 2 _B_ ), where the projection direction is parallel to the relevant conformational motion. For very low SNR and bad projection directions, the inference returns an approximately flat posterior. In other words, cryoSBI correctly tells us that these images cannot be reliably assigned to specific conformations. A more systematic evaluation confirms that cryoSBI is accurate and precise for SNRs within experimental range (46). We compared inferred configurations to ground truths for 10,000 images, assuming high and low SNR (Fig. 2 _C_ ). For SNR = 0.1, 68% of inferred configurations were accurate within 1 Å with an average uncertainty of 0.75 Å measured by the posterior _휎_ interval (color bar). For SNR = 0.01, the accuracy of the prediction declined slightly to 68% of the inferred structures being within 2.7 Å of the true structure. The average uncertainties rose to 2.1 Å. In comparison to an explicit likelihood method (dashed lines), cryoSBI’s predictions are slightly worse for low SNR. This is expected, as SBI methods tend to lose some accuracy due to the approximations of the ML models that make amortization possible, a phenomenon also observed in 3D reconstruction (48). We note that for flat posteriors, the mean is biased toward the center due to cryoSBI being trained on a finite domain of _휃_, therefore, we used samples of the posterior that do not exhibit this issue. CryoSBI is fast and enables inference of very large sets of images and molecular structures. We compared the computational cost of performing inference on the synthetic dataset with cryoSBI and methods that optimize an explicit likelihood model (31, 32). These require to evaluate the likelihood and marginalize over all model parameters for each image, leading to a linear scaling of the computational cost with the number of images and the number of conformations (Fig. 2 _D_ ). The cost quickly becomes prohibitive, particularly for high-resolution template matching that may involve evaluating millions of orientations (33). CryoSBI’s inference is instead amortized, that is, the largest computational cost occurs upfront to produce simulations and train the model (approximately a few hours), after which the inference is effectively free. Each inference only requires a forward pass of the trained neural network that serves as a surrogate model of the posterior. Amortization opens the door to comparing thousands of structures to datasets containing an arbitrarily large number of images. Validating with Experimental Data. Having validated cryoSBI on synthetic data, we sought to demonstrate that it correctly maps individual experimental particles of apoferritin to their corresponding reference structure. So far, the training templates and the synthetic data have been generated with the same forward model simulator and parameter distributions. This will not be the case with experimental data, for which we must generally assume model misspecification. In other words, the data we simulate to train the model and the experimental particles that we want to make inferences on will always differ. However, we cannot access a ground truth with experimental particles and therefore first validate our method using a standard experimental benchmark system: apoferritin. Apoferritin is a 474 kDa large cytosolic globular protein complex composed of 24 subunits forming a hollow nanocage (Fig. 3 _A_ ). It is highly symmetric and rigid, making it a standard benchmark in the cryo-EM field. We used a published dataset containing 483 particles of apoferritin. Due to the absence of conformational flexibility, it is likely that the particles do not include alternative conformations. We selected the PDB structure built from the cryo-EM map reconstructed from the same dataset (49) as our ground truth (Fig. 3 _A_ ). We generated a hypothetical conformational ensemble by varying our ground truth structure along two normal modes (Fig. 3 _A_ ). The order parameter is A _휃_ = _훾_ rmsd to ground truth, where _훾_ = −1 for normal mode 1 and _훾_ = 1 for normal mode 10, which quantifies the distance of the resulting structures from the ground truth reference that sits at _휃_ = 0 by construction. We selected normal modes 1 and 10 to ensure two distinct conformational changes, thereby avoiding degeneracies caused by symmetry. CryoSBI correctly maps individual experimental particles of apoferritin to their corresponding reference structure. Following our pipeline, we trained a surrogate posterior on synthetic templates generated starting from the structural ensemble shown in Fig. 3 _A_ . Posteriors are peaked around _휃_ = 0, both for individual particles (Fig. 3 _B_ ) and for the entire experimental dataset (Fig. 3 _C_ ), indicating that we could identify the 3D structure corresponding to the individual particle accurately. The posterior width shows that the mapping is also quite precise, with uncertainty in the order of a few Angstroms. Since we are analyzing single-molecule data (snapshots of a single protein in a specific conformation) and not averaged observables (e.g., 3D maps), we should not expect that every posterior conditioned on each image is sharply peaked precisely at the reference structure. Some particles will be more informative than others. Building a histogram by resampling each posterior conditioned on each image provides a statistical view of how informative the particles in the dataset are. Interestingly, the histogram is shaped like a funnel. Particles whose posterior samples are closest to the cryo-EM structure (i.e., centered around _휃_ = 0) are those that we can map with the highest confidence (Fig. 3 _D_ ). A Challenging Experimental Dataset. Next, we challenged cryoSBI using an experimental dataset containing particles of hemagglutinin, a homotrimeric protein complex found on the surface of influenza viruses (50). Compared to apoferritin, the hemagglutinin dataset presents several additional challenges. Hemagglutinin is more dynamic, and the particles capture a much more heterogeneous structural ensemble. In fact, only around 47% of the particles led to the reconstruction of the <u>C</u> <u>B</u> <u>D</u> Fig. 3. CryoSBI applied to experimental particles of apoferritin. ( _A_ ) Apoferritin conformational change along _휃_, generated by varying the ground truth reference cryo-EM structure (PDB ID 4v1w) along two normal mode directions. The conformational change is quantified by the rmsd in Å to the reference cryo-EM structure. We multiplied the rmsd by −1 for variations along mode 1 ( _Left_ half of the axis). By construction _휃_ = 0 Å for the reference structure. ( _B_ ) Example of cryoSBI posteriors for experimental apoferritin particle images. The particles are low pass filtered for better visibility. The red dashed line indicates the position of the reference structure along _휃_ . ( _C_ ) Histogram of the inferred conformation from the posterior mean _휃_ mean for the particles in the dataset. ( _D_ ) Two-dimensional histogram reporting 1,000 posterior samples from the posterior of each apoferritin. A B C <u>D</u> E F G Fig. 4. CryoSBI applied to experimental particles of hemagglutinin. ( _A_ ) Example of cryoSBI posteriors for experimental hemagglutinin particle images (low pass filtered for better visibility). The conformational change along _휃_ was modeled normal mode analysis, _휃_ = _훾_ rmsd from reference cryo-EM structure (red dashed line) where _훾_ = −1 or 1 for normal mode 1 and 2, respectively. ( _B_ ) Two-dimensional histogram showing 1,000 posterior samples for each of the 271,558 posteriors. The black dashed line indicates the cryo-EM reference structure. The dotted lines show the size of the expected fluctuation around the reference structure estimated with MD simulations. ( _C_ ) UMAP 2D projection of the latent space of the simulated particles used for training (gray) and a random subset of 10% of experimental particles (red). ( _D_ ) UMAP 2D projection of the latent representation of a random subset of 10% of experimental particles colored according to their posterior _휎_ interval. ( _E_, _F_, and _G_ ) Experimental particles, selected from different positions in the UMAP in ( _D_ ) (low pass filtered for better visibility). published high-resolution structure. Additionally, the protein adopted a preferred orientation in the experimental sample, leading to a particle distribution that does not cover uniformly the entire space of possible orientations. This can be problematic for mapping two-dimensional projections into a three-dimensional structure. Despite these challenges, cryoSBI could correctly identify hemagglutinin configurations in single particles. We generated a hypothetical structural ensemblebyperturbingthePDBstructure along two normal modes (Fig. 4 _A_, _Bottom_ ). We used these structures to produce synthetic templates and train a posterior model to evaluate experimental particles. The posterior could identify the reconstructed cryo-EM structure accurately and precisely (Fig. 4 _A_ ). Evaluating the posterior on the entire dataset, we found a large concentration of particles (∼50%) that we could map to the high-resolution hemagglutinin structure with high confidence, consistent with the 47% used to generate the cryo-EM reference structure (Fig. 4 _B_ ). These particles are distributed in a region spanning approximately 4 Å around the high-resolution structure, consistent with thermal fluctuation at room temperature, as shown by atomistic MD simulations in explicit solvent ( _SI_ _[Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, Fig. S3). As expected, no other conformation is identified in the dataset with high confidence. For many particles, the posterior is approximately uniform and therefore uninformative. Validating Inference with Latent Space Analysis. The embedding provides a powerful tool for analyzing the particles. The embedding is done by a neural network that encodes all particles from 128 <sup>2</sup> pixels into a 256-dimensional representation. Conventional dimensionality reduction techniques can further reduce the dimensionality of the representation to generate plots that allow us to visually inspect the entire dataset. Each red point in Fig. 4 _C_ corresponds to a single experimental particle, whereas synthetic particles are represented as a grayscale heat map (see _SI_ _[Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_ for details on the UMAPs calculation). The two coordinates, UMAP1 and UMAP2, are nonlinear functions of the pixels defining the original images, which should quantify some “essential” features. Indeed, we can correlate different values of these coordinates to different modeling and imaging parameters, like the SNR, or conformations ( _SI_ _[Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, [Fig. S4).](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials) When examining the embedding space, an initial question is whether the synthetic hemagglutinin particles used to train our posterior are consistent with the experimental particles. Fig. 4 _C_ shows that synthetic particles are distributed in a region that contains the experimental ones. In other words, the simulator generates templates very similar to the experimental ones. Synthetic particles populate a larger region than the experimental ones. This is expected, and means that not all configurations, or imaging parameters, we considered as template hypotheses correspond to particles that constitute the ensemble captured by the cryo-EM experiment. A more quantitative statistical analysis based on the maximum mean discrepancy metric confirms that synthetic and experimental particles are very similar ( _Materials_ _and_ _Methods_ and _SI_ _[Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, Fig. S5). This analysis is essential to detect model misspecification, which occurs when the posterior is trained with synthetic data that do not accurately mimic the experimental data, leading to incorrect inference. This issue is demonstrated with nonwhitened particles, where the distributions of simulated and experimental particles do not overlap ( _[SI Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, Fig. S5). We then applied a similar analysis on the experimental particles only, obtaining an insightful low-dimensional view of the entire experimental dataset. Each point in Fig. 4 _D_ corresponds to a single experimental image, colored according to the confidence with which the posterior maps it to a specific configuration. The confidence clearly describes a gradient correlating with the first reduced variable defining the plane (UMAP1’). The confidence of the inference is high for particles on the left of the plot and gradually decreases going to the right. Particles on the left of the plot (low values of UMAP1’) all contain a clearly visible copy of hemagglutinin in their center (Fig. 4 _E_ ). On the contrary, particles on the right (large values of UMAP1’) do not contain any protein (Fig. 4 _F_ ). This observation shows that UMAP1’ sorts particles according to how well hemagglutinin is visible. A slender appendix in the 2D UMAP’ plot containing highconfidence points detaches from the distribution of points on the top of the plot. These particles clearly contain contaminants, e.g., unfolded proteins, structured ice, or other types of contamination (Fig. 4 _G_ ). Then, why does our inference lead to a high confidence? The posterior evaluated on these particles peaks at both extreme values of the prior range ( _[SI Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, Fig. S6). In other words, the posterior tells us that these particles are highly atypical and incompatible with all structures in our hypothesis ensemble, while they have low-resolution contrast that match some lowresolution template features. This observation is consistent with the appendix-like morphology of the region containing these particles. Typical particles are points with many neighbors. On the contrary, these particles are all on the border, making them very atypical. The analysis of the cryoSBI embedding is a powerful way of validating the inference and analyzing the experimental dataset. Amortized Template Matching in a Micrograph. In singleparticle cryo-EM, particle picking algorithms identify candidate particles within micrographs but often suffer from high false positive rates. Misclassification of noise or junk as target molecules requires further filtering through time-consuming steps like 3D classification. The cryoSBI posterior can match templates directly on a micrograph (Fig. 5). Fig. 5 _A_ presents a hemagglutinin micrograph (3,824 × 3,824 pixels) from the same dataset as discussed so far. For this micrograph, we employed a sliding window approach, using the trained cryoSBI posterior with a box size of 256 × 256 pixels. Evaluating many windows in parallel proved to be computationally efficient, achieving posterior evaluations for the entire micrograph in a couple of minutes. This allowed us to extract the posterior mean and width, which we then associated with the center of each box. Fig. 5 _B_ illustrates the effectiveness of our method in identifying the cryoEM reference structure from particles within the micrograph using the posterior mean. Examples of boxes with centers exhibiting a mean value close to the reference are shown in Fig. 5 _C_ - _E_ together with the posterior width. We note that because a convolutional neural network (which is translation equivariant) is used for the embedding, the exact particle position is not precisely determined. This results in a relatively wide range of pixels where the posterior mean closely matches the reference structure (red in Fig. 5 _C_ - _E_ ). Analysis of the latent space combined with the shape of the cryoSBI posterior, could also facilitate the identification of outliers versus hemagglutinin particles in the micrograph, as shown above for the picked particles. Micrographs are likely to contain more junk and out-ofdistribution images compared to a stack of previously picked particles. Since cryoSBI has not been trained on junk particles, applying it to an entire micrograph may lead to greater model misspecification than when used on preprocessed particles. Analyzing the latent space alongside the shape of the cryoSBI posterior could help distinguish outliers from hemagglutinin particles within the micrograph, as demonstrated earlier for the selected particles (Fig. 4 _D_ ). However, training the model with junk particles and ice-mimicking simulations might ultimately prove more effective. Discussion Accurately and precisely identifying rare conformations of dynamic biomolecules from individual images is an outstanding challenge in biophysics. CryoSBI aims to overcome this problem by training a neural network with simulations that enables Bayesian inference of biomolecular conformations from singleparticle cryo-EM images. Given an initial structural ensemble hypothesis—a set of 3D templates—cryoSBI builds on simulation-based inference, a merger of physics-based simulations and probabilistic deep learning, to perform very fast amortized template matching in cryo-EM. Here, we show how this approach can produce high fidelity inferences from noisy experimental cryo-EM particles and micrographs. A B C D E Fig. 5. Evaluating the posterior learned by cryoSBI on a micrograph directly. ( _A_ ) Cropped micrograph (3,824 × 3,824 pixels) from the hemagglutinin EMPIAR dataset 10026. ( _B_ ) Absolute Distance in _휃_ between the posterior mean and the cryo-EM reference structure _휃_ = 0 as a function of window position on the micrograph. ( _C_ - _E_ ) Example windows ( _Top_ ) from the micrograph with a posterior mean close to the cryo-EM reference ( _Bottom_ ) and a small posterior width ( _Middle_ ). The cryoSBI framework is based on Bayesian inference, which allows us to include prior knowledge and accurately assess uncertainties. CryoSBI can start from standard reconstruction, or AI-based structure prediction, to obtain one or a few reasonable conformations of the biomolecule of interest. Then, MD simulations and AI-methods can generate a hypothetical conformational ensemble from the initial few structures. This ensemble, which does not need to be entirely accurate but should provide a list of structural templates, becomes the prior for our inference. The outcome of the inference is the posterior, a distribution describing the probability that a given particle contains a specific structural template. The cryoSBI posterior not only gives us information about the most probable conformation but also, crucially, provides an accurate statistical CI given by the posterior width. The ability to go beyond point estimates is crucial to distinguish particles that provide useful structural information—characterized by a peaked posterior—from those for which the inference leads to very broad posterior distributions and are, therefore, not informative. In other words, some particles will be too noisy, or originate from a specific pose, such that a precise inference is not feasible, and the cryoSBI posterior will indicate this. CryoSBI provides amortized inference, enabling the analysis of massive datasets. Given initial structural templates, cryoSBI trains an embedding and neural posterior density using simulated particles. Simulated template particles range over different conformations, poses, and other values of all the nuisance parameters associated with the image formation process. All these simulations are performed once upfront, with which we can train an embedding and a neural density estimator for the inference. The inference is a function only of the templates, marginalized over all other parameters, including the pose. The inference is amortized, i.e., we do not have to perform any optimization to solve the inference problem from scratch for each particle. We have only to evaluate the trained posterior, a forward pass evaluation of a neural network that takes milliseconds. Therefore, in contrast to most traditional and ML reconstruction frameworks, cryoSBI bypasses the pose and defocus estimate, resulting in an extremely fast inference and enabling its efficient application to micrographs and datasets containing millions of particles. Moreover, training with simulations enables connecting the underlying physics of the experiment to the embedding features of the neural network. We still face significant challenges. In this work, we have demonstrated that cryoSBI can accurately infer large conformational changes in synthetic data and correctly identify conformations in experimental data. Our current focus is on expanding this framework to detect small conformational changes in large proteins and identify multiple alternative states. However, the most critical challenge is identifying and overcoming model misspecification. Any parametric inference is only as good as the model we assume to describe the underlying physical process. In our case, this is the structural ensemble that we use as a starting hypothesis and the simulator encoding the image formation process. Here, we have shown that problems occur when our ensemble is missing structures or when the simulator is missing features depicted in the experimental particles (e.g., Fig. 4 _G_ ). This can result in “hallucinations”-high-confidence inferences that are completely incorrect (note that this differs from “model-bias” in cryo-EM, where noise is aligned during reconstruction). These problems may become more pronounced when analyzing micrographs directly. However, they could be mitigated by incorporating junk particles into the training data, ensuring the ratio of target molecules to noise/junk matches the expected distribution across the micrograph, and explicitly training a network for both detection and inference to better define the task. An additional limitation of the current implementation is that new models must be trained for each new biomolecule of interest. The embedding and neural density estimation are specific to the conformational ensemble used during training, making the model nontransferable across different biomolecules. Future development could leverage recent advancements in generativeAI protein structure generation, which connect protein sequence with their structure or structural ensemble (39, 40, 51). These approaches allow us to represent conformational ensembles (52), creating a natural integration point with cryoSBI. Additionally, pretraining the posterior or embedding networks on diverse proteins and conformations could enable efficient fine-tuning for specific biomolecules, significantly reducing computational costs for new applications. Importantly, we have shown that the analysis of the latent space provides a powerful framework to diagnose modelmisspecification. The accuracy of cryoSBI’s inference is only guaranteed if the distribution of points corresponding to the simulated particles largely contains the points corresponding to the experimental ones. This is equivalent to saying that the templates capture the underlying physical features in the cryoEM data. A small overlap in the latent space would instead immediately reveal inadequate template simulations (e.g., _[SI](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_ _[Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, Fig. S5). To this end, we have initiated a thorough quantitative study of the cryoSBI latent space (53), which outlines a validation and physical interpretation of the latent space through manifold learning and dimension reduction techniques. There are many exciting opportunities for this direction, such as reducing model-misspecification by learning from data, which is a very active field of research. Moreover, utilizing equivariant embedding representations may enhance the efficiency of the training process and reduce the number of required simulations. CryoSBI can improve current cryo-EM reconstruction pipelines. The posterior confidence can be used to classify and sort particles with sharp posteriors (54) and weight the particle contribution to the reconstruction. It could also be used to improve imaging conditions, such as the electron dose per frame, by monitoring the sharpness of posterior widths. An advantage of cryoSBI is that it provides a per-particle measurement plus an error, not suffering from orientational bias. Moreover, it can explain the relation between the conformational motion of interest and the projection direction (Fig. 2 _B_ ). Therefore, it could be combined with the ML heterogeneous reconstruction methods to sieve particles that do not provide information along the relevant conformational motion due to their projection direction. Even though we focused on inferring conformations in this work, cryoSBI can also be directly used to infer all other parameters involved in the image formation process, such as pose and defocus, setting priors, and ranges for cryo-EM reconstruction. Cryo-EM has heavily relied on averaging particles. Even the state-of-the-art ML heterogeneous reconstruction methods rely on starting from a consensus volume and struggle with highly dynamic systems. CryoSBI provides a single-particle inference that can contribute to overcoming several problems, such as identifying rare conformations, structural intermediates (transition states), or studying highly flexible biomolecules by leveraging structural hypotheses from molecular simulations. The amortized inference could significantly speed up the recovery of free-energy landscapes from cryo-EM (22, 47, 55, 56) by quickly comparing millions of particles to thousands of structures. Data-driven techniques applied to the latent space of experimental particles can lead to the discovery of new metastable states and the learning of the overall organization of the conformational landscape (53). Moreover, cryoSBI could speed-up the identification of biomolecules in situ, for studying their cellular contexts and environment-dependent properties by comparing the particles to the templates within the embedding space. In summary, cryoSBI not only provides accurate structural inferences but also quantifies uncertainties through Bayesian posterior distributions. CryoSBI is a modular and flexible framework. The simulator, the embedding network, and the density estimator can readily integrate more sophisticated algorithms to overcome challenges emerging from complex datasets. Future work will focus on addressing model misspecification and enhance the simulator for more realistic scenarios, such as in situ scenarios, and expanding its capabilities to detect subtle conformational changes. These improvements will be vital for studying molecular conformational ensembles of flexible biomolecules in biologically relevant environments. Materials and Methods CryoSBI Simulations. We begin with a conformational ensemble parameterized with a 1D degree of freedom _휃_, where _f_ : ℝ <sup>3</sup> <sup>_N_</sup> <sup>atom</sup> → ℝ maps a structure _X_ to a real number _휃_ = _f_ ( _X_ ), which can be discretized, _휃i_, to select a specific 3D template. The goal of cryoSBI is to learn the posterior probability _p_ ( _휃i_ | _I_ ). To train cryoSBI, we run millions of forward model simulations of cryo-EM template images by using the forward model described in _SI_ _[Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_ . We sample from the prior parameter distributions _p_ ( _휃i, 휙_ ) = _p_ ( _휃i_ ) _p_ ( _휙_ ), where and _휙_ contains the nuisance and imaging parameters, and generate a corresponding synthetic image (details in _[SI Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_ ). The embedding network for the image featurization and a neural density estimator, a function that approximates the joint distribution of model parameters and features, are trained simultaneously as described below. Embedding Network. We used a modified ResNet-18 architecture (57) as embedding network _S휓_ ( _I_ ) with parameters _휓_ to learn a compressed representation of the images _I_ . We adapted the ResNet-18 to grayscale images and 256-dimensional output. Learning the Posterior. We used the Neural Posterior Estimation (NPE) algorithmtoapproximatetheposteriordistributionfromsyntheticparticles(45). NPEusesaneuralnetworkdensityestimator _q휑_ ofparameters _휑_ toapproximate the posterior, _p_ ( _휃_ | _I_ ) ≈ _q휑_ ( _휃_ | _S휓_ ( _I_ )). For each system, we created a large dataset of _N_ synthetic particles _In_ ∼ _p_ ( _I_ | _휃n, 휙n_ ) by drawing from the prior conformations, _휃n_ ∼ _p_ ( _휃_ ), nuisance imaging parameters, _휙n_ ∼ _p_ ( _휙_ ), and then running a total of _N_ forward model cryo-EM template simulations, with _n_ = 1 _, . . ., N_ . We then trained jointly the embedding network and the density estimator by maximizing the average log-likelihood of the posterior probability under the training samples, _L_ ( _휑, 휓_ ) = <sup><u>1</u></sup> _N_ _N_ _n_ =1 log _q휑_ ( _휃n_ | _S휓_ ( _In_ )) _._ [3] Latent-Space Analysis. To detect model misspecification, we compared the latent representations from the embedding network of both experimental and simulated particles using two approaches. The first is a qualitative visual inspection relying on the dimensionality reduction technique UMAP (60) ( _[SI](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_ _[Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_ ). In a more quantitative way, we compared the distributions of the latent representations using the maximum mean discrepancy (MMD) metric. MMD is a standard metric to statistically test whether two independent sets of samples come from two different distributions (61) and is often used in the SBI community to test model misspecification (62). Let _S_ 1 = { _s_ 1} and _S_ 2 = { _s_ 2} be two datasets containing the 256-dimensional latent representations. For the MMD, we used a Gaussian kernel with Euclidean distances in the embedding space, so that for a pair of _s_ 1 _, s_ 2, the kernel is _k휖_ ( _s_ 1 _, s_ 2) = exp(−|| _s_ 1 − _s_ 2|| <sup>2</sup> _/휖_ ), where || _._ || <sup>2</sup> is the _l_ 2-norm. We choose the bandwidth _휖_ as the median of pairwise squared distances between the datasets _S_ 1 and _S_ 2. Biomolecular Systems. To validate and showcase cryoSBI, we analyzed three biomolecular systems: hsp90, apoferritin, and hemagglutinin (for details, see _SI_ _[Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_ ). For hsp90, we generated synthetic data representing a conformational change of the opening of one of its chains, quantified by the rmsd relative to the closed structure across 20 templates. Simulations involved varying structural B-factors, orientations, defocus, and SNRs. For apoferritin, experimental data from EMPIAR 10026 (49) were analyzed. The templates were generated via normal mode analysis, and cryo-EM simulations were conducted with similar settings. Hemagglutinin images and micrographs from EMPIAR 10532 (50) were used to infer the cryo-EM structure from individual particles. Normal modes were used as structural hypotheses. Experimental particles were downsampled and whitened to align with simulated data. For details about the cryoSBI parameter, ranges, training, hemagglutinin micrograph analysis,andMDsimulations,see _[SIAppendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_ .Acrossallcases,cryoSBIenabled detailed inference of the molecular structures from the individual cryo-EM images. Data, Materials, and Software Availability. The code is available at GitHub [(https://github.com/flatironinstitute/cryoSBI)](https://github.com/flatironinstitute/cryoSBI) and is based on LAMPE (63), a PyTorch implementation for simulation-based inference. Data and scripts necessary to reproduce all the results in this paper are freely accessible at [the Zenodo repository (https://zenodo.org/records/14593608) (64).](https://zenodo.org/records/14593608) ACKNOWLEDGMENTS. The Flatiron Institute is a division of the Simons Foundation. E.D. acknowledges Istituto di Ricovero e Cura a Carattere Scientifico Humanitas Research Hospital for financial support. L.D. and R.C. acknowledge the support of Goethe University Frankfurt, the Frankfurt Institute of Advanced Studies, the Landes-Offensive zur Entwicklung Wissenschaftlich-ökonomischer Exzellenz (LOEWE) Center for Multiscale Modelling in Life Sciences of the state of Hesse, the Collaborative Research Center (CRC) of the German Science Foundation 1507: Membrane-associated Protein Assemblies, Machineries, and Supercomplexes (P09), and the International Max Planck Research School on Cellular Biophysics, as well as computational resources and support from the Center for Scientific Computing of the Goethe University and the Jülich Supercomputing Centre. L.D., D.S.-S, and R.C. thank the Flatiron Institute for hospitality while a portion of this research was carried out. Author affiliations: <sup>a</sup> Institute of Physics, Faculty of Physics, Goethe University Frankfurt, Frankfurt am Main 60438, Germany; <sup>b</sup> Frankfurt Institute for Advanced Studies, Frankfurt am Main 60438, Germany; <sup>c</sup> Department of Applied Mathematics, Yale University, New Haven, CT 06520; <sup>d</sup> Center for Computational Mathematics, Flatiron Institute, New York, NY 10010; <sup>e</sup> Istituto di Ricovero e Cura a Carattere Scientifico Humanitas Research Hospital, Unit of Correlative Light Emission Microscopy Core, Rozzano, Milan 20089, Italy; <sup>f</sup> RNA Therapeutics Institute, University of Massachusetts Chan Medical School, Worcester, MA 01605; <sup>g</sup> HHMI, University of Massachusetts Chan Medical School, Worcester, MA 01605; hInstitute of Computer Science, Faculty of Computer Science and Mathematics, Goethe University Frankfurt, Frankfurt am Main 60325, Germany; and <sup>i</sup> Center for Computational Biology, Flatiron Institute, New York, NY 10010 Author contributions: R.C. and P.C. designed research; L.D., D.S.-S., L.E., R.C., and P.C. performed research; E.D. and N.G. contributed new reagents/analytic tools; L.D., D.S.-S, L.E., R.C., and P.C. analyzed data; and L.D., R.C., and P.C. wrote the paper. We used a Neural Spline Flow (58) as density estimator, containing five transformation stages. The neural network in each transformation stage contained 12 layers. The first ten layers had 256 hidden nodes, while the last two had 128 and 64 hidden nodes, respectively. We trained the network using anAdamWoptimizer(59),withalearningrateof0.0003,gradientclippingwith a maximum norm of 5, and a batch size of 256. Because the forward model simulation is inexpensive, we generated synthetic images during training on demand and did not store the training set. Therefore, each batch of images was newlygenerated,allowingtraininguntilconvergenceandpreventingoverfitting. In _[SI Appendix](https://www.pnas.org/lookup/doi/10.1073/pnas.2420158122#supplementary-materials)_, we provide details about how we evaluate the trained posterior. 1. M. P. Rout, A. Sali, Principles for integrative structural biology studies. _Cell_ 177, 1384–1403 (2019). 2. Y. Cheng, Single-particle cryo-EM at crystallographic resolution. _Cell_ 161, 450–457 (2015). 3. J. Dubochet _et al_ ., Cryo-electron microscopy of vitrified specimens. _Q. Rev. Biophys._ 21, 129–228 (1988). 4. L. V. Bock, H. Grubmüller, Effects of cryo-EM cooling on structural ensembles. _Nat. Commun._ 13, 1709 (2022). 5. N. J. Mowry, C. R. Kruger, M. Drabbels, U. J. Lorenz, Direct measurement of the critical cooling rate [for the vitrification of water. arXiv [Preprint] (2024). http://arxiv.org/abs/2407.01087 (Accessed 20](http://arxiv.org/abs/2407.01087) June 2024). 6. S. H. Scheres, Relion: Implementation of a Bayesian approach to cryo-EM structure determination. _J. Struct. Biol._ 180, 519–530 (2012). 7. D. Lyumkis, A. F. Brilot, D. L. Theobald, N. Grigorieff, Likelihood-based classification of cryo-EM images using frealign. _J. Struct. Biol._ 183, 377–388 (2013). 8. A. Punjani, J. L. Rubinstein, D. J. Fleet, M. A. Brubaker, cryoSPARC: Algorithms for rapid unsupervised cryo-EM structure determination. _Nat. Methods_ 14, 290–296 (2017). 9. P. Cossio, G. Hummer, Likelihood-based structural analysis of electron microscopy images. _Curr. Opin. Struct. Biol._ 49, 162–168 (2018). 10. M. Bonomi, R. Pellarin, M. Vendruscolo, Simultaneous determination of protein structure and dynamics using cryo-electron microscopy. _Biophys. J._ 114, 1604–1613 (2018). 11. S. E. Hoff, F. E. Thomasen, K. Lindorff-Larsen, M. Bonomi, Accurate model and ensemble refinement using cryo-electron microscopy maps and Bayesian inference. _PLoS Comput. Biol._ 20, e1012180 (2024). 12. C. Blau, L. Yvonnesdotter, E. Lindahl, Gentle and fast all-atom model refinement to cryo-EM densities via a maximum likelihood approach. _PLoS Comput. Biol._ 19, e1011255 (2023). 13. T. Włodarski _et al_ ., Bayesian reweighting of biomolecular structural ensembles using heterogeneous cryo-EM maps with the cryoensemble method. _Sci. Rep._ 14, 18149 (2024). 14. M. Beck, R. Covino, I. Hänelt, M. Müller-McNicoll, Understanding the cell: Future views of structural biology. _Cell_ 187, 545–562 (2024). 15. C. Sorzano _et al_ ., On bias, variance, overfitting, gold standard and consensus in single-particle analysis by cryo-electron microscopy. _Acta Crystallogr. Sec. D Struct. Biol._ 78, 410–423 (2022). 16. A. Dashti _et al_ ., Trajectories of the ribosome as a Brownian nanomachine. _Proc. Natl. Acad. Sci. U.S.A._ 111, 17492–17497 (2014). 17. E. D. Zhong, T. Bepler, B. Berger, J. H. Davis, CryoDRGN: Reconstruction of heterogeneous cryo-EM structures using neural networks. _Nat. Methods_ 18, 176–185 (2021). 18. M. Chen, S. J. Ludtke, Deep learning-based mixed-dimensional Gaussian mixture model for characterizing variability in cryo-EM. _Nat. Methods_ 18, 930–936 (2021). 19. A. Punjani, D. J. Fleet, 3D flexible refinement: Structure and motion of flexible proteins from cryo[EM. bioRxiv [Preprint] (2021). https://doi.org/10.1101/2021.04.22.440893 (Accessed 17 June](https://doi.org/10.1101/2021.04.22.440893) 2024). 20. I. Hamitouche, S. Jonic, Deephemnma: Resnet-based hybrid analysis of continuous conformational heterogeneity in cryo-EM single particle images. _Front. Mol. Biosci._ 9, 965645 (2022). 21. J. Schwab, D. Kimanius, A. Burt, T. Dendooven, S. H. W. Scheres, DynaMight: Estimating molecular motions with improved reconstruction from cryo-EM images. _Nat. Methods_ 21, 1855–1862 (2024). 22. W. S. Tang, E. D. Zhong, S. M. Hanson, E. H. Thiede, P. Cossio, Conformational heterogeneity and probability distributions from single-particle cryo-electron microscopy. _Curr. Opin. Struct. Biol._ 81, 102626 (2023). 23. A. Punjani, D. J. Fleet, 3D variability analysis: Resolving continuous flexibility and discrete heterogeneity from single particle cryo-EM. _J. Struct. Biol._ 213, 107702 (2021). 24. M. A. Gilles, A. Singer, Cryo-EM heterogeneity analysis using regularized covariance estimation and kernel regression. _Proc. Natl. Acad. Sci. U.S.A._ 122, e2419140122 (2025). 25. D. Herreros _et al_ ., Estimating conformational landscapes from cryo-EM particles by 3d Zernike polynomials. _Nat. Commun._ 14, 154 (2023). 26. R. Vuillemot _et al_ ., Extracting continuous conformational landscapes from cryo-EM single particle datasets using 3D-to-2D flexible fitting based on molecular dynamics simulation. _J. Mol. Biol._ 435, 16795167951 (2023). 27. A. Levy _et al_ ., “Cryoai: Amortized inference of poses for ab initio reconstruction of 3d molecular volumes from real cryo-EM images” in _European Conference on Computer Vision_ (Springer, 2022), pp. 540–557. 28. A. Levy, G. Wetzstein, J. N. Martel, F. Poitevin, E. Zhong, Amortized inference for heterogeneous reconstruction in cryo-EM. _Adv. Neural Inf. Process. Syst._ 35, 13038–13049 (2022). 29. R. R. Lederman, B. Toader, “On manifold learning in plato’s cave: Remarks on manifold learning and physical phenomena” in _2023 International Conference on Sampling Theory and Applications_ _(SampTA)_ (IEEE, 2023), pp. 1–7. 30. D. A. Klindt, A. Hyvärinen, A. Levy, N. Miolane, F. Poitevin, Towards interpretable cryo-EM: Disentangling latent spaces of molecular conformations. _Front. Mol. Biosci._ 11, 1393564 (2024). 31. P. Cossio, G. Hummer, Bayesian analysis of individual electron microscopy images: Towards structures of dynamic and heterogeneous biomolecular assemblies. _J. Struct. Biol._ 184, 427–437 (2013). 32. P. Cossio _et al_ ., Bioem: Gpu-accelerated computing of Bayesian inference of electron microscopy images. _Comput. Phys. Commun._ 210, 163–171 (2017). 33. J. P. Rickgauer, N. Grigorieff, W. Denk, Single-protein detection in crowded molecular environments in cryo-EM images. _eLife_ 6, e25648 (2017). 34. B. A. Lucas _et al_ ., Locating macromolecular assemblies in cells by 2d template matching with cistem. _eLife_ 10, e68946 (2021). 35. S. Cruz-León _et al_ ., High-confidence 3D template matching for cryo-electron tomography. _Nat._ _Commun._ 15, 3992 (2024). 36. K. Cranmer, J. Brehmer, G. Louppe, The frontier of simulation-based inference. _Proc. Natl. Acad. Sci._ _U.S.A._ 117, 30055–30062 (2020). 37. L. Dingeldein, P. Cossio, R. Covino, Simulation-based inference of single-molecule experiments. _Curr. Opin. Struct. Biol._ 91, 102988 (2025). 38. H. Jung _et al_ ., Machine-guided path sampling to discover mechanisms of molecular selforganization. _Nat. Comput. Sci._ 3, 334–345 (2023). 39. J. Abramson _et al_ ., Accurate structure prediction of biomolecular interactions with AlphaFold 3. _Nature_ 630, 493–500 (2024). 40. S. Lewis _et al_ ., Scalable emulation of protein equilibrium ensembles with generative deep learning. [bioRxiv [Preprint] (2024). https://doi.org/10.1101/2024.12.05.626885 (Accessed 13 December](https://doi.org/10.1101/2024.12.05.626885) 2024). 41. G. Papamakarios, I. Murray, Fast _휀_ -free inference of simulation models with Bayesian conditional density estimation. _Adv. Neural Inf. Process. Syst._ 29, 06376 (2016). 42. L. Dingeldein, P. Cossio, R. Covino, Simulation-based inference of single-molecule force spectroscopy. _Mach. Learn. Sci. Technol._ 4, 025009 (2023). 43. M. Dax _et al_ ., Real-time gravitational wave science with neural posterior estimation. _Phys. Rev. Lett._ 127, 241103 (2021). 44. P. J. Gonçalves et al., Training deep neural density estimators to identify mechanistic models of neural dynamics. _eLife_ 9, e56261 (2020). 45. J. M. Lueckmann, J. Boelts, D. Greenberg, P. Goncalves, J. Macke, “Benchmarking simulationbased inference” in _International Conference on Artificial Intelligence and Statistics_ (PMLR, 2021), pp. 343–351. 46. E. Seitz, F. Acosta-Reyes, P. Schwander, J. Frank, Simulation of cryo-EM ensembles from atomic [models of molecules exhibiting continuous conformations. bioRxiv [Preprint] (2019). https://doi.](https://doi.org/10.1101/864116) [org/10.1101/864116 (Accessed 8 July 2024).](https://doi.org/10.1101/864116) 47. J. Giraldo-Barreto _et al_ ., A Bayesian approach to extracting free-energy profiles from cryo-electron microscopy experiments. _Sci. Rep._ 11, 13657 (2021). 48. C. Donnat, A. Levy, F. Poitevin, E. D. Zhong, N. Miolane, Deep generative modeling for volume reconstruction in cryo-electron microscopy. _J. Struct. Biol._ 214, 107920 (2022). 49. C. J. Russo, L. A. Passmore, Ultrastable gold substrates for electron cryomicroscopy. _Science_ 346, 1377–1380 (2014). 50. Y. Z. Tan, J. L. Rubinstein, Through-grid wicking enables high-speed cryo-EM specimen preparation. _Acta Crystallogr. Sec. D Struct. Biol._ 76, 1092–1103 (2020). 51. A. Levy _et al_ ., Solving inverse problems in protein space using diffusion-based priors. [arXiv [Preprint] (2024). http://arxiv.org/abs/2406.04239 (Accessed 9 July 2024).](http://arxiv.org/abs/2406.04239) 52. A. Maddipatla _et al_ ., Inverse problems with experiment-guided AlphaFold. arXiv [Preprint] (2025). [http://arxiv.org/abs/2502.09372 (Accessed 12 March 2025).](http://arxiv.org/abs/2502.09372) 53. L. Evans _et al_ [., Cryo-EM images are intrinsically low dimensional. arXiv [Preprint] (2025). https://](https://doi.org/10.48550/arXiv.2504.11249) [doi.org/10.48550/arXiv.2504.11249 (Accessed 15 May 2025).](https://doi.org/10.48550/arXiv.2504.11249) 54. J. Zhu _et al_ ., A minority of final stacks yields superior amplitude in single-particle cryo-EM. _Nat. Commun._ 14, 7822 (2023). 55. W. S. Tang _et al_ ., Ensemble reweighting using cryo-EM particle images. _J. Phys. Chem. B_ 127, 5410–5421 (2023). 56. L. Evans _et al_ ., Counting particles could give wrong probabilities in cryo-electron microscopy. [bioRxiv [Preprint] (2025). https://doi.org/10.1101/2025.03.27.644168 (Accessed 1 April](https://doi.org/10.1101/2025.03.27.644168) 2025). 57. K. He, X. Zhang, S. Ren, J. Sun, “Deep residual learning for image recognition” in _Proceedings of_ _the IEEE Conference on Computer Vision and Pattern Recognition_ (2016), pp. 770–778. 58. C. Durkan, A. Bekasov, I. Murray, G. Papamakarios, Neural spline flows. _Adv. Neural Inf. Process._ _Syst._ 32, 7511–7522 (2019). 59. [I. Loshchilov, F. Hutter, Decoupled weight decay regularization. arXiv [Preprint] (2017). http://arxiv.](http://arxiv.org/abs/1711.05101) [org/abs/1711.05101 (Accessed 10 July 2024).](http://arxiv.org/abs/1711.05101) 60. L. McInnes, J. Healy, J. Melville, Umap: Uniform manifold approximation and projection for [dimension reduction. arXiv [Preprint] (2018). http://arxiv.org/abs/1802.03426 (Accessed 12 July](http://arxiv.org/abs/1802.03426) 2024). 61. A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Schölkopf, A. Smola, A kernel two-sample test. _J. Mach. Learn. Res._ 13, 723–773 (2012). 62. M. Schmitt, P. C. Bürkner, U. Köthe, S. T. Radev, Detecting model misspecification in amortized [Bayesian inference with neural networks. arXiv [Preprint] (2021). http://arxiv.org/abs/2112.08866](http://arxiv.org/abs/2112.08866) (Accessed 11 July 2024). 63. F. Rozet _et al_ [., Lampe: Likelihoodfree amortized posterior estimation. https://pypi.org/project/](https://pypi.org/project/lampe/) [lampe/. Accessed 19 May 2025.](https://pypi.org/project/lampe/) 64. L. Dingeldein _et al._, Amortized template-matching of molecular conformations from cryo-electron [microscopy images using simulation-based inference: Code and data. Zenodo. https://zenodo.org/](https://zenodo.org/records/14593608) [records/14593608. Deposited 8 February 2025.](https://zenodo.org/records/14593608)

섹션 본문 61문단 · 57,446자

(제목 없음)

1Biomolecules undergo conformational changes to perform their function.Cryo-electron microscopy (cryo-EM) can capture snapshots of biomolecules in various conformations.However, these images are noisy and display the molecule in unknown orientations, making it difficult to separate conformational differences from differences due to noise or projection directions.Here, we introduce cryo-EM simulation-based inference (cryoSBI) to infer the conformations of biomolecules and the uncertainties associated with the inference from individual cryo-EM images.CryoSBI builds on simulation-based inference, a combination of physics-based simulations and probabilistic deep learning, allowing us to use Bayesian inference even when likelihoods are too expensive to calculate.We begin with an ensemble of conformations, which can be templates from molecular simulations or modelling, and use them as structural hypotheses.We train a neural network approximating the Bayesian posterior using simulated images from these templates, and then use it to accurately infer the conformations of biomolecules from experimental images.Training is only done once, and after that, it takes just a few milliseconds to make inference on an image, making cryoSBI suitable for arbitrarily large datasets.CryoSBI eliminates the need to estimate particle pose and imaging parameters, significantly enhancing the computational speed in comparison to explicit likelihood methods.We illustrate and

Introduction

2Biomolecules constantly reorganize their structure to perform their biological functions.Channels and transporters cycle between open and closed conformations to regulate traffic through cellular membranes.Molecular motors alternate between different states to advance in discrete steps.A pathogen's invasion protein-like the spike of SARS-CoV-2opens up to anchor to the surface of our cells to infect them.Understanding the mechanisms underlying biomolecular function requires the knowledge of their alternative structures and an understanding of how they interconvert.

3An accurate determination of the various important molecular conformations is challenging.Many experimental techniques report average observables.Single-molecule methods can report on dynamics but are limited in their structural resolution.On the computational side, molecular dynamics (MD) simulations provide trajectories at high temporal and spatial resolution.However, the inability to sample relevant timescales and force-field accuracy issues limit simulation approaches.Integrative methods in structural biology combine experimental and computational techniques with the promise to describe a more complete picture of biomolecular phenomena [1].

4Cryo-electron microscopy (cryo-EM) enables the study of biomolecular structures at atomic resolution [2,3].In cryo-EM, a transmission electron microscope records two-dimensional projected images of a thin sample containing many molecules (micrographs).Specialized software then cuts out the two-dimensional images containing single molecules (particles) [4].The sample is prepared by flash-freezing an aqueous solution of randomly oriented biomolecules.Since freezing is very fast [5,6,7], the biomolecules are trapped in all of their different conformations.To avoid radiation damage, the frozen sample is imaged with a limited number of electrons, resulting in picked particles that are very noisy projections of the molecule's density in unknown conformations and orientations.

5Cryo-EM 3D classification methods can identify different particle conformations in a dataset, provided the dataset contains a sufficient number of particles in each conformation [8].Reconstructing a molecular conformation at high resolution requires averaging over many different particles that depict the same conformation.Most 3D classification methods assume that a dataset contains particles that can be classified into a relatively small set of conformational states.The classes are then iteratively refined by explicitly comparing multiple poses (i.e., rotations and translations) of the current best class averages to the experimental particle using a cross-correlation or least squares metric within a likelihood calculation [9,10,11] to minimize inter-class variability.The 3D maps can be successfully combined with MD approaches to extract a conformational ensemble consistent with each cryo-EM map [12,13,14].

6However, rare conformations, as well as conformations that are structurally similar but functionally different, might be missed in such an analysis.This could lead to an incomplete analysis of the full landscape of conformations needed to understand the molecule's biological function [15].To obtain high-resolution reconstructions, each 3D class has to have a sufficient number of particles to cover the entire projection (i.e., reciprocal) space.Particles belonging to classes with insufficient sampling and other low-resolution classes are often discarded.Moreover, the refinement of classes often does not converge and repetitions of the same analysis with different random seeds leads to particles assigned to different classes [16].These problems make it difficult to identify rare conformations or transition states, which occur far less frequently and might therefore be missed.

7Machine learning (ML) has enabled an important step towards extracting conformational heterogeneity from cryo-EM.Milestones in the field were set by manifold embedding [17] and deep generative models [18,19,20,21,22] to represent conformational landscapes.The key idea is to use ML to learn the mapping between the particles in a cryo-EM dataset and the corresponding conformational volumes [23].However, the statistical inference can become computationally intractable, especially when both the conformation and pose are inferred simultaneously.This is why most cryo-EM ML methods, as well as non-ML variability methods [24,25,26,27], rely on costly explicit-likelihood methods to calculate the particle poses.cryoAI [28] and its implementation in cryoDRGN [29] use direct gradient-based optimization to amortize the particle poses while still requiring the direct estimation of a pose for each particle.Furthermore, these methods do not obtain likelihood estimates or statistical errors in assigning each particle to a given conformation.

8Template-matching based approaches assign a particle to a molecular structure with high fidelity.The BioEM approach can be used to discriminate molecular conformations from individual particles by integrating over poses and imaging parameters within a Bayesian framework [30,31].Recently, high-resolution 2D template matching has been applied to identify biomolecular conformations in situ using a cross-correlation-based approach [32,33].When the poses are sampled on a fine angular grid, and the matching is repeated for templates representing different Figure 1: Schematic representation of cryoSBI: Simulation-based inference for cryo-EM.Simulated particle image templates generated from conformations θ and imaging parameters ϕ, such as rotation, defocus, and translation, are used to train the cryoSBI embedding network and posterior estimator (black boxes).θ and ϕ are sampled from a prior distribution, and fed to a forward model M to generate a particle image I.An embedding network that featurizes the images S(I) and a density estimator of the joint distribution of features and parameters are trained simultaneously using millions of simulated particle images.CryoSBI learns a computationally efficient approximation of the posterior p(θ|S(I)), which enables amortized template matching of experimental images (magenta boxes).For each experimental particle, cryoSBI provides the full posterior, indicating both the most probable conformation that generated the image and the statistical confidence of the inference.molecular conformations, this method provides a highly accurate metric for conformational identification.However, this brute-force likelihood optimization becomes quickly intractable.

9Here, we leverage recent advances in simulation-based inference in combination with molecular simulations to develop cryoSBI, a computational framework that matches a particle image to molecular three-dimensional conformations without having to search the template poses or calculate any likelihood explicitly.Additionally, our framework provides amortized inference and accurate statistical confidence.Learning high-resolution structures and conformational variability simultaneously from a cryo-EM is a highly challenging problem.We, therefore, decompose the problem in two steps.First, we assume that one (or a few) high-resolution structures can be reconstructed using conventional methods.Second, we assume that molecular simulations such as advanced MD schemes [34] or ML tools such as AlphaFold [35] can provide a set of conformations that serve as structural hypotheses starting from one (or few) experimental structures.We then simulate cryo-EM experiments to produce template particles that answer the question: "What would an experimental particle look like if this was the molecular conformation?".The synthetic particles arise from random poses and imaging parameters with adequate noise levels.Neural network density estimation allows us to learn from these particles the Bayesian posterior, which quantifies the most probable structure corresponding to a particle.We illustrate the cryoSBI algorithm, benchmark it on synthetic data, and showcase its use on experimental particles.

Simulation-based inference of single-particle cryo-EM

10We formulate the task of inferring molecular conformations from single cryo-EM particle image as a Bayesian inference problem.In essence, we wish to quantify the probability that a given image I depicts a molecular conformation X.Let us consider a set of molecular conformations parametrized by a vector θ.In the following, we will assume without loss of generality that θ is one dimensional, i.e., a function f (X) = θ that maps molecular configurations to a real number.Given a cryo-EM image I, we aim to infer the conformation θ of the molecule observed in the image.Therefore, we want to compute the Bayesian posterior p(θ|I), quantifying how compatible θ (that is associated with conformation X) is with the observed image I.The posterior can be computed by Bayes' theorem p(θ|I) ∝ p(I|θ)p(θ) ,

11where p(I|θ) is the likelihood of generating an image I given a molecular conformation θ and the prior p(θ) encodes all available knowledge before making the inference on how the conformations are distributed.Modeling the image formation process described by the likelihood requires taking into account the details of the experiment and the functioning of the electron microscope.For instance, that the molecule is randomly rotated, that the image will be noisy, and that the microscope will introduce an aberration.The full likelihood of the image processing is, therefore, p(I|θ, ϕ), which contains the additional parameters ϕ required to model the details of the experiments and microscope.Usually, we are not interested in making inference of ϕ, which are therefore nuisance parameters.In other words, the likelihood is actually a marginalization

12with the prior of the imaging parameters p(ϕ).Maximizing the marginal likelihood p(I|θ) is computationally very expensive [31,32] because each evaluation requires integrating over all imaging parameters.The high computational cost of approaches that require explicit likelihood optimization restricts their applicability to small sets of images.

13Simulation-based inference (SBI) is an alternative approach to do Bayesian inference with intractable or computationally expensive likelihoods [36,37,38,39].The main idea is to replace a likelihood evaluation with a forward model to simulate synthetic data and then learn an approximation of the posterior on them.Here, we develop an SBI framework for amortized template-matching of conformations from single-particle cryo-EM images (Figure1).While the inverse problem of inferring a conformation from a cryo-EM image I is challenging, the forward problem is much simpler.We can easily encode the image formation process described by the likelihood p(I|θ, ϕ) in a cryo-EM simulator, and repeatedly sample it by running forward simulations to produce synthetic images, i.e., I i ∼ p(I|θ i , ϕ i ) with θ i ∼ p(θ), ϕ i ∼ p(θ).In this way, we accumulate a data set of images and parameters describing their generation, D = {θ i , ϕ i , I i }.

14We used Neural Posterior Estimation [40] to directly approximate the Bayesian posterior from the data set of images D. We first used an embedding network S(I) to extract features and map each image into a medium-dimensional representation.We then used another neural network q as a conditional density estimator to build a surrogate model of the posterior, i.e., a statistical model that approximates the posterior, q(θ|S(I)) ≈ p(θ|I).We then trained S and q jointly on D using standard supervised deep learning methods.In this way, we learned an approximation of the desired Bayesian posterior, bypassing any explicit likelihood evaluation and marginalization.

15After training on the simulated images, the neural density estimator q estimates the posterior for any new experimental image.The inference is computationally efficient for two reasons: first, it does not require any marginalization over the nuisance parameters ϕ; and second, the inference is amortized.The computationally expensive part due to the sampling must be paid only once upfront by repeatedly running the simulator to build the data set D. Once the conditional estimator q is trained, any new inference requires only an evaluation of the neural network underlying q.

16In summary, cryoSBI involves the following steps:

171. Prepare a data-set of experimental cryo-EM particles obtained with conventional workflows.2. Obtain a set of molecular conformations that serve as structural hypotheses-template structures-by using molecular simulations or ML methods.3. Simulate many synthetic particles sampling all possible template structures and nuisance parameters.4. Obtain a surrogate of the Bayesian posterior by training the embedding and conditional density estimator simultaneously on the set of simulated template particles.5. Perform inference on the experimental particles with the trained surrogate posterior.

Validation and benchmark with synthetic data

18How precisely is it possible to identify a structure in a single cryo-EM image?We answered this question by validating and benchmarking cryoSBI using synthetic data obtained from Hsp90, an established benchmark model in the field [41,42].Hsp90 comprises two chains that perform a large conformational change corresponding to their opening and closing.We selected twenty structures spanning the opening of the chains, measured by the root-mean-squared-deviation (RMSD) with respect to the closed structure (Figure 2A).CryoSBI accurately infers molecular configurations from single images.We trained cryoSBI on synthetic cryo-EM particle images generated under realistic conditions, with random orientations, a wide range of defocus values, center translation, and signal-to-noise ratio (SNR).We learned a surrogate model of the posterior, that we used to make inference on the selected synthetic particles.For each inference, we obtained an estimate of the Bayesian posterior that we could compare with the structure that we actually used to produce the specific image (red line in Figure 2A).The posterior provides information both on the accuracy of the inference-whether the bulk of the distribution contains the ground truth-and the precision-the spread of the distribution.The shaded region is the 2σ interval.B) Inference precision for 10,000 images as a function of SNR and projection direction.Each point represents the σ interval (color bar, from dark blue -low confidence, to deep red -high confidence) of the posterior obtained from a synthetic image produced at a given SNR and projection angle.On top, we show the schematic definition of ϕ, the angle formed between the direction of the electron beam and the direction of movement of the two arms of Hsp90.C) Inference accuracy for 10,000 images for sets with different SNR.The two scatter plots show the correlation between the estimated opening of Hsp90 obtained as a sample of the posterior, and the true opening, using SNR=0.1 and SNR=0.01,respectively.We drew one sample from the posterior for each image, and colored them according to the posterior σ interval (color palette, colors as for panel B).The black dashed line describes the average of the posterior means, while the blue line corresponds to the mean of the maximum-likelihood estimates obtained via BioEM [31].D) Scaling of the computational cost w.r.t. the number of images of cryoSBI and maximum likelihood methods (BioEM).The computational cost corresponds to wall-time using an NVIDIA RTX A6000 GPU for cryoSBI, and AMD EPYC 7742 CPU for BioEM.

19The SNR and projection direction are the main experimental factors determining how precisely we can infer a molecular configuration from a single image.As the SNR of an image decreases, the inference is still accurate but the posterior gradually broadens, corresponding to an increasing uncertainty (Figure 2A,B).The precision also decreases for projection directions that "hide" the conformational change of interest.In the case of Hsp90, this occurs by projecting along a direction where one arm covers the other one (Figure 2B), where the projection direction is parallel to the relevant conformational motion.For very low SNR and bad projection directions, the inference returns an approximately flat posterior.In other words, cryoSBI correctly tells us that these images cannot be reliably assigned to specific configurations.

20A more systematic evaluation confirms that cryoSBI is accurate and precise for SNRs within experimental range [41].We compared inferred configurations to ground truths for 10,000 images, assuming high and low SNR (Figure 2C).For SNR=0.1, 68% of inferred configurations were accurate within 1 Å with an average uncertainty of 0.75Å measured by the posterior σ interval (color bar).For SNR=0.01, the accuracy of the prediction declined slightly to 68% of the inferred structures being within 2.7 Å of the true structure.The average uncertainties rose to 2.1Å.In comparison to an explicit likelihood method (dashed lines), cryoSBI's predictions are slightly worse for low SNR.This is expected, as SBI methods tend to lose some accuracy due to the approximations of the ML models that make amortization possible, a phenomenon also observed in 3D reconstruction [43].We note that for flat posteriors, the mean is biased toward the center due to cryoSBI being trained on a finite domain of θ, therefore, we used samples of the posterior that do not exhibit this issue.

21CryoSBI is fast and enables inference of very large data image sets and molecular conformational ensembles.We compared the computational cost of performing inference on the synthetic data set generated with Hsp90 with cryoSBI and methods that optimize an explicit likelihood model [30,31].These require to evaluate the likelihood and marginalize over all model parameters for each image, leading to a linear scaling of the computational cost with the number of images and the number of conformations (Figure 2D).The cost becomes quickly prohibitive (several days for 100,000 images, 20 structures using 36864 orientations on a CPU node).CryoSBI's inference is instead amortized, that is, the largest computational cost occurs upfront to produce simulations and train the model (approximately a few hours), after which the inference is effectively for free.Each inference only requires a forward pass of the trained neural network that serves as a surrogate model of the posterior, which takes approximately a millisecond.The benefit of amortization is that the computational cost of doing inference does not scale significantly with the number of images (Figure 2D).Amortization opens the door to comparing hundreds-to-thousands of structures to datasets containing an arbitrary large number of images.

Validating with experimental data

22Having validated CryoSBI on synthetic data, we sought to demonstrate that it is also accurate in making inferences from actual experimental particles.So far, the training templates and the synthetic data have been generated with the same forward model simulator and parameter distributions.This will not be the case with experimental data, for which we must generally assume model misspecification.In other words, the data we simulate to train the model and the experimental particles that we want to make inferences on will always differ.However, we cannot access a ground truth with experimental particles, and therefore first validate our method using a standard experimental benchmark system: apoferritin.

23Apoferritin is 474 kDa large cytosolic globular protein complex composed of 24 subunits forming a hollow nanocage (Figure 3A).It is highly symmetric and rigid, making it a standard benchmark in the cryo-EM field.We used a published data set containing 483 particles of apoferritin.Due to the absence of conformational flexibility, the particles do not include alternative conformations.We selected the PDB structure built from the cryo-EM map reconstructed from the same dataset [44] as our ground truth (Figure 3A).We generated a hypothetical conformational ensemble by varying our ground truth structure along two normal modes (Figure 3A).The order parameter is θ = γ RMSD to ground truth, where γ = −1 for normal mode 1 and γ = 1 for normal mode 10, which quantifies the distance of the resulting structures from the ground truth reference that sits at θ = 0 by construction.We selected normal modes 1 and 10 to ensure two distinct conformational changes, thereby avoiding degeneracies caused by symmetry.

24CryoSBI correctly maps individual experimental particles of apoferritin to their corresponding reference structure.Following our pipeline, we trained a surrogate posterior on synthetic templates generated starting from the structural ensemble shown in Figure 3A.Posteriors are peaked around θ = 0, both for individual particles (Figure 3B) and for the entire experimental data set (Figure 3C), indicating that we could identify the 3D structure corresponding to the individual particle accurately.

25The posterior width shows that the mapping is also quite precise, with uncertainty in the order of a few Angstroms.Since we are analyzing singe-molecule data (snapshots of a single protein in a specific conformation) and not averaged observables (e.g., 3D maps), we should not expect that every posterior conditioned on each image is sharply peaked precisely at the reference structure.Some particles will be more informative than others.Building a histogram by resampling each posterior conditioned on each image provides a statistical view of how informative the particles in the data set are.Interestingly, the histogram is shaped like a funnel.Particles whose posterior samples are closest to the cryo-EM structure (i.e., centered around θ = 0) are those that we can map with the highest confidence (Figure 3D).

A challenging experimental data set

26Next, we challenged cryoSBI using an experimental dataset containing particles of hemagglutinin, a homotrimeric protein complex found on the surface of influenza viruses [45].Compared to apoferritin, the hemagglutinin data set presents several additional challenges.Hemmaglutinin is more dynamic, and the particles capture a much more heterogeneous structural ensemble.In fact, only around 47% of the particles led to the reconstruction of the published high-resolution structure.Additionally, the protein adopted a preferred orientation in the experimental sample, leading to a particle distribution that does not cover uniformly the entire space of possible rotations.This can be problematic for mapping two-dimensional projections into a three-dimensional structure.Despite these challenges, cryoSBI could correctly identify hemagglutinin configurations in single particles.We generated a hypothetical structural ensemble by perturbing the PDB structure (PDB ID 6wxb), from a 2.9Å resolution cryo-EM map [45], along two normal modes (Figure 4A-bottom), where θ is defined as the RMSD distance from the PDB structure.We used these structures to produce synthetic templates and train a posterior model to evaluate experimental particles.The posterior could identify the reconstructed cryo-EM structure accurately and precisely (Figure 4A).Evaluating the posterior on the entire dataset, we found a large concentration of particles (∼ 50%) that we could map to the high-resolution hemagglutinin structure with high confidence, consistent with the 47% used to generate the cryo-EM reference structure (Figure 4B).These particles are distributed in a region spanning approximately 4Å around the high-resolution structure, consistent with thermal fluctuation at room temperature, as shown by atomistic MD simulations in explicit solvent (Supplementary Figure 1).As expected, no other conformation is identified in the dataset with high confidence.For many particles, the posterior is approximately uniform and therefore uninformative.

Validating inference with latent space analysis

27The embedding provides a powerful tool for analyzing the particles.The embedding is done by a neural network that encodes all particles from a 128 2 pixels into a 256-dimensional representation.Conventional dimensionality reduction techniques can further reduce the dimensionality of the representation to generate plots that allow us to visually inspect the entire dataset.Each red point in Figure 4C corresponds to a single experimental particle, whereas synthetic particles, much more numerous, are represented as a grayscale heat map.The two coordinates, UMAP1 and UMAP2, are non-linear functions of the pixels defining the original images, which should quantify some "essential" features.Indeed, we can correlate different values of these coordinates to different modelling and imaging parameters, like the SNR, or conformations (Supplementary Figure 2).

28When examining the embedding space, an initial question is whether the synthetic hemagglutinin particles used to train our posterior are consistent with the experimental particles.Figure 4C shows that synthetic particles are distributed in a region that contains the experimental ones.In other words, the simulator generates templates very similar to the experimental ones.Synthetic particles populate a larger region than the experimental ones.This is expected, and means that not all configurations, or imaging parameters, we considered as template hypotheses correspond to particles that constitute the ensemble captured by the cryo-EM experiment.A more quantitative statistical analysis based on the maximum mean discrepancy metric confirms that synthetic and experimental particles are very similar (Methods and Supplementary Figure 3).This analysis is essential to detect model misspecification, which occurs when the posterior is trained with synthetic data that do not accurately mimick the experimental data, leading to incorrect inference.This issue is demonstrated with non-whitened particles, where the distributions of simulated and experimental particles do not overlap (Supplementary Figure 3).We then applied a similar analysis on the experimental particles only, obtaining an insightful low-dimensional view of the entire experimental data set.Each point in Figure 4D corresponds to a single experimental image, colored according to the confidence with which the posterior maps it to a specific configuration.The confidence clearly describes a gradient correlating with the first reduced variable defining the plane (UMAP1).The confidence of the inference is high for particles on the left of the plot and gradually decreases going to the right.Particles on the left of the plot (low values of UMAP1) all contain a clearly visible copy of hemagglutinin in their center (Figure 4E).On the contrary, particles on the right (large values of UMAP1) do not contain any protein (Figure 4F).This observation shows that UMAP1 sorts particles according to how well hemagglutinin is visible.It quantifies how much structural information is contained in each particle.

29A slender appendix in the 2D UMAP plot containing high-confidence points detaches from the distribution of points on the top of the plot.These particles clearly contain contaminants, e.g., unfolded proteins, structured ice, or other type of contamination (Figure 4G).Then, why does our inference lead to a high confidence?The posterior evaluated on these particles peaks at both extreme values of the prior range (Supplementary Figure 4).In other words, the posterior tells us that these particles are highly atypical and incompatible with all structures in our hypothesis ensemble, while they have low-resolution contrast that match some low-resolution template features.This observation is consistent with the appendix-like morphology of the region containing these particles.Typical particles are points with many neighbors.On the contrary, these particles are all on the border, making them very atypical.The analysis of the cryoSBI embedding is a powerful way of validating the inference and analyzing the experimental data set.

Template matching in a micrograph

30The cryoSBI posterior can also match templates directly on a micrograph, bypassing the need to pick particles for the experimental data set.Figure 5A presents a hemagglutinin micrograph (3584 × 3584 pixels) from the same dataset as discussed so far.For this micrograph, we employed a sliding window approach, using the trained cryoSBI posterior with a box size of 256 × 256 pixels.Evaluating many windows in parallel proved to be computationally efficient, achieving posterior evaluations for the entire micrograph in a couple of minutes.This allowed us to extract the posterior mean and width, which we then associated with the center of each box.Figure 5B illustrates the effectiveness of our method in identifying the cryo-EM reference structure from particles within the micrograph using the posterior mean.Examples of boxes with centers exhibiting a mean value close to the reference are shown in Figure 5C-E together with the posterior width.We note that because a convolutional neural network (which is translation equivariant) is used for the embedding, the exact particle position is not precisely determined.This results in a relatively wide range of pixels where the posterior mean closely matches the reference structure (red in Figure 5C-E).Analysis of the latent space combined with the shape of the cryoSBI posterior, could also facilitate the identification of outliers versus hemaggluting particles in the micrograph, as shown above for the picked particles.

Discussion

31Reconstructing the conformational landscape of biomolecular systems from experiments is an outstanding challenge in molecular biology and biophysics.CryoSBI aims to overcome this problem by enabling Bayesian inference of biomolecular conformations from individual cryo-EM particle images.Given an initial structural ensemble hypothesisa set of 3D templates-cryo-EM builds on simulation-based inference, a merger of physics-based simulations and probabilistic deep learning, to perform very fast amortized template matching in cryo-EM.Here, we show how this approach can produce accurate and precise inferences from noisy experimental cryo-EM particles.

32The cryoSBI framework is based on Bayesian inference, which allows us to include prior knowledge and accurately assess uncertainties.Reconstructing the entire conformational landscape is a challenging inverse problem.To address this, we take a practical approach and divide the solution into two parts.Whether we use standard reconstruction or AI-based structure prediction, we can easily obtain one or a few reasonably accurate conformations.Then, molecular dynamics simulations, enhanced sampling, and artificial intelligence-methods can generate a hypothetical conformational ensemble from the initial few structures.This ensemble, which does not need to be entirely accurate but should provide a list of structural templates, becomes the prior for our inference.

33The outcome of the inference is the posterior, a distribution describing the probability that a given particle contains a specific structural template.The cryoSBI posterior not only gives us information about the most probable conformation but also, crucially, provides an accurate statistical confidence interval given by the posterior width.The ability to go beyond point estimates is crucial to distinguish particles that provide useful structural information-characterized by a peaked posterior-from those for which the inference leads to very broad posterior distributions and are, therefore, not informative.In other words, some particles will be too noisy or originate from a specific pose such that a precise inference is not feasible, and the cryoSBI posterior will indicate this.CryoSBI provides amortized inference, enabling the analysis of massive data sets.Given initial structural templates, cryoSBI trains an embedding and neural posterior density using simulated particles.Simulated template particles range over different conformations, poses, and other values of all the nuisance parameters associated with the image formation process.All these simulations are performed once upfront, after which we can train an embedding and a neural density estimator for the inference.The inference is a function only of the templates, marginalized over all other parameters, including the pose.The inference is amortized, i.e., we do not have to perform any optimization to solve the inference problem from scratch for each particle.We have only to evaluate the trained posterior, a forward pass evaluation of a neural network that takes of the order of milliseconds.Therefore, in contrast to most traditional and ML reconstruction frameworks, cryoSBI bypasses the pose and defocus estimate, resulting in an extremely fast inference.The amortized posterior enables the efficient application of cryoSBI to micrographs and data sets containing millions and billions of particles.

34We still face significant challenges.In this work, we have demonstrated that cryoSBI can accurately infer large conformational changes in synthetic data and correctly identify conformations in experimental data.Our current focus is on expanding this framework to detect small conformational changes in large proteins and identify multiple alternative states.However, the most critical challenge is identifying and overcoming model misspecification.Any parametric inference is only as good as the model we assume to describe the underlying physical process.In our case, this is the structural ensemble that we use as a starting hypothesis and the simulator encoding the image formation process.Here, we have shown that the only real problem occurs when our ensemble is missing structures or when the simulator is missing features depicted in the experimental particles (e.g., Figure 4G).This instance leads to 'hallucinations', i.e., high-confidence inferences that are entirely wrong.However, we have also shown that the analysis of the latent space provides a powerful framework to diagnose model-misspecification.The accuracy of cryoSBI's inference is only guaranteed if the distribution of points corresponding to the simulated particles largely contains the points corresponding to the experimental ones.This is equivalent to saying that the templates capture the underlying physical features in the cryo-EM data.A small overlap in the latent space would instead immediately reveal inadequate template simulations (e.g., Supplementary Figure 3).How to reduce model-misspecification by learning from data is an active field of research.

35CryoSBI can improve current cryo-EM reconstruction pipelines.The posterior confidence can be used to classify and sort particles with sharp posteriors [46] and weight the particle contribution to the reconstruction.It could also be used to improve imaging conditions, such as the electron dose per frame, by monitoring the sharpness of posterior widths.An advantage of cryoSBI is that it provides a per-particle measurement plus an error, not suffering from orientational bias.Moreover, it can explain the relation between the conformational motion of interest and the projection direction (Figure 2B).Therefore, it could be combined with the ML heterogeneous reconstruction methods to sieve particles that do not provide information along the relevant conformational motion due to their projection direction.Even though we focused on inferring conformations in this work, cryoSBI can also be directly used to infer all other parameters involved in the image formation process, such as pose and defocus, setting priors, and ranges for cryo-EM reconstruction.

36Cryo-EM has heavily relied on averaging particles.Even the state-of-the-art ML heterogeneous reconstruction methods rely on starting from a consensus volume and struggle with highly dynamic systems.CryoSBI provides a singleparticle inference that can contribute to overcoming several problems, such as identifying rare conformations, structural intermediates (transition states), or studying highly flexible biomolecules by leveraging structural hypotheses from molecular simulations.The amortized inference could significantly speed up the recovery of free-energy landscapes or probability distributions from cryo-EM estimates [47,23] by quickly comparing millions of particles to thousands of structures.Data-driven techniques applied to the latent space of experimental particles can lead to the discovery of new metastable states and the learning of the overall organization of the conformational landscape.Moreover, cryoSBI could identify particles in situ for visual proteomics within cellular contexts and study their environment-dependent properties by comparing the particles to the templates within the embedding space.

37In summary, cryoSBI not only provides accurate structural inferences but also quantifies uncertainties through Bayesian posterior distributions.cryoSBI is a modular and flexible framework.The simulator, the embedding network, and the density estimator can readily integrate more sophisticated algorithms to overcome challenges emerging from complex datasets.Future work will focus on addressing model misspecification, enhance the simulator for more realistic scenarios, and expanding its capabilities to detect subtle conformational changes.These improvements will be vital for learning functional molecular conformational ensembles directly from experimental data in biologically relevant environments.

Cryo-EM image formation forward model

38We used a standard forward model [41,42] to simulate cryo-EM particles from a starting 3D molecular structure X.The model approximates the electron density ρ(X) as a Gaussian mixture model, comprising a number of Gaussian functions equivalent to the number of amino acids, all of equal amplitude.Each Gaussian is centered on the position of an amino-acid C α , with standard deviation sampled from a uniform distribution (see Biomolecular Systems section).The density ρ(X) is randomly rotated and translated.The rotation R q is defined by a quaternion q and the translation by a vector τ .The rotated density is then projected along the z-axis by the projection operator P z , using the weak-phase approximation, and then convolved with a point-spread function PSF, which models aberration and defocus of the microscope.In practice, we perform the convolution in Fourier space using the Fourier equivalent of the PSF, i.e., the Contrast Transfer Function defined as CTF A,b,∆z (s) = e −bs 2 /2 A cos(π∆zλ e s 2 ) − √ 1 − A 2 sin(π∆zλ e s 2 ) with the reciprocal radial component s = 2π/ x 2 + y 2 , B-factor b, amplitude A, defocus ∆z, and electron wavelength λ e .Finally, we add Gaussian white noise to the images.The variance of the Gaussian noise is determined by the SNR and the amplitude of the signal, σ 2 noise = σ 2 signal /SNR, where σ signal is the mean squared intensity of the image without noise within a circular mask of a given radius (for details see Biomolecular Systems section).The forward imaging model can be written as

39where the noise is drawn from a normal distribution ϵ ∼ N (0, σ 2 noise ), the imaging parameters are ϕ = {q, τ, A, b, ∆z, σ noise } and * denotes a convolution.

CryoSBI template simulations

40In this paper, we parameterized a conformational ensemble with a 1D degree of freedom θ, defined as a function f : R 3Natom → R, which maps an atomic structure X to a real number θ = f (X).We then selected a small number of molecular structures spanning θ, obtaining a discrete parameter θ i containing our structural templates.The goal of cryoSBI is to learn the posterior probability p(θ i |I).To train cryoSBI, we run millions of forward model simulations of cryo-EM template images by using the forward model described above.We sample from the priors parameter distributions p(θ i , ϕ) = p(θ i )p(ϕ), where each θ i selects a specific template, while ϕ contains the nuisance and imaging parameters, and generate a corresponding synthetic image.

41An important aspect of cryoSBI is that it links (θ i , ϕ) to the image features, S(I), in a high-dimensional space (top middle Figure 1).The embedding network for the image featurization and a neural density estimator, a function that approximates the joint distribution of model parameters and features, are trained simultaneously.Details are provided below.

Priors

42We chose a uniform prior p(θ i ), giving each template equal a priori probability.While samples θ ∼ p(θ) from the prior are continuous, we used the closest representative template in θ i , with min|θ i − θ|.The priors for the imaging and nuisance parameters p(ϕ) were uniform within specific ranges (see details below for each system).Rotations were sampled from a uniform prior in SO(3) [48].

Embedding network

43We used a modified ResNet-18 architecture [49] as embedding network S ψ (I) with parameters ψ to learn a compressed representation of the images I.We adapted the ResNet-18 to grayscale images and 256-dimensional output.

Learning the posterior

44We used the Neural Posterior Estimation (NPE) algorithm to approximate the posterior distribution from synthetic particles [40].NPE uses a neural network density estimator q φ of parameters φ to approximate the posterior, p(θ|I) ≈ q φ (θ|S ψ (I)).For each system, we created a large dataset of N synthetic particles I n ∼ p(I|θ n , ϕ n ) by drawing the prior conformations, θ n ∼ p(θ), nuisance imaging parameters, ϕ n ∼ p(ϕ), and then running a total of N forward model cryo-EM template simulations, with n = 1, . . ., N .We then trained jointly the embedding network and the density estimator by maximizing the average log-likelihood of the posterior probability under the training samples

45We used a Neural Spline Flow (NSF) [50] as density estimator, containing 5 transformation stages.The neural network in each transformation stage contained 12 layers.The first ten layers had 256 hidden nodes, while the last two had 128 and 64 hidden nodes, respectively.We trained the network using an AdamW optimizer [51], with a learning rate of 0.0003, gradient clipping with a maximum norm of 5, and a batch size of 256.Because the forward model simulation is inexpensive, we generated synthetic images during training on demand and did not store the training set.Therefore, each batch of images was newly generated, allowing training until convergence and preventing overfitting.

Amortized posterior evaluation

46To evaluate the trained posterior p(θ|I ′ ) ≈ q φ (θ|S ψ (I ′ )) conditioned on an observed image I ′ , we generated samples by drawing directly from the neural posterior using the trained density estimator and embedding network [49].The process includes drawing samples from the base Gaussian distribution of the NSF, transforming them using the normalizing flow, and simultaneously computing the latent representation for the image of interest that will condition the posterior.This entire procedure is automatically parallelized through batch computations in PyTorch.Typically, we generated around 20,000 posterior samples per image to estimate the continuous posterior density.

Latent-space analysis

47To identify model misspecification, we compared the latent representations of the embedding network of experimental and simulated particles.We evaluated the similarity between these sets of points in the latent space in two ways.The first is a qualitative visual inspection relying on the dimensionality reduction technique UMAP [52].We concatenated the latent representations (256 dimensions) from the simulated and experimental particles, and performed a UMAP analysis to identify a 2D projection.We inspected the 2D UMAP to make sure that simulated and experimental particles overlapped.

48In a second, more quantitative way, we compared the distributions of the latent representation of experimental and simulated particles using the maximum mean discrepancy (MMD) metric.MMD is a standard metric to statistically test whether two independent sets of samples come from two different distributions [53], and is often used in the SBI community to test model misspecification [54].

49Let S 1 = {s 1 } and S 2 = {s 2 } be two datasets containing the 256-dimensional latent representations.For the MMD, we used a Gaussian kernel with Euclidean distances in the embedding space, so that for a pair of s 1 , s 2 , the kernel is k ϵ (s 1 , s 2 ) = exp(−||s 1 − s 2 || 2 /ϵ) where ||.|| 2 is the l2-norm.We choose the bandwidth ϵ as the median of pairwise squared distances between the datasets S 1 and S 2 .

Hsp90

50We used Hsp90 as a first system to validate cryoSBI by having ground truth synthetic data [41,42].Hsp90's conformational landscape can be described by the relative motions of its chains, A and B. Here, we focus on the opening of chain B depicted by θ in Figure 2A, and measured it as the RMSD with respect to the closed structure.We built a set of 20 templates θ i , with θ i+1 − θ i = 2 • angle difference in chain B's displacement.We produced synthetic particles with image size 128 × 128 pixels, and a pixel size of 1.5 Å.Each residue of Hsp90 was represented by a Gaussian density with a standard deviation whose prior ranged between 0.5 and 5 Å.The SNR prior ranged from 0.5 to 0.001.The signal of the images without noise was determined by a circular mask with a radius of 64 pixels.For the CTF, the defocus prior was sampled uniformly between 0.5 and 2 µm, the amplitude A was constant at 0.1, and the B-factor was sampled uniformly between 1 and 100 Å 2 .

51To learn an amortized posterior, we trained the NSF density estimator for 150 epochs with 2000 batches per epoch.To compare cryoSBI to an explicit-likelihood method, we used the BioEM software [31] with the same parameter ranges, and sampled orientations with a uniform grid of 36864 quaternions on SO(3) [55].

Apoferritin

52We used apoferritin experimental images [44] available at EMPIAR 10026.We started from the reconstructed highresolution cryo-EM structure (PDB id: 4v1w) and generated a set of templates by building normal modes using ProDy [56].To avoid multimodal posteriors due to symmetry, we concatenated two normal mode displacements, modes 1 and 10, with maximum displacements of 12.0 Å (left and right side of Figure 3A), from the reconstructed cryo-EM structure.We defined θ = γ RMSD where γ = −1 if the structure x belongs to mode 1 and γ = 1 if the structure belongs to mode 2, calculating the RMSD is with respect to the cryo-EM structure.We obtained 51 templates θ i with a θ i+1 − θ i = 0.48Å.We simulated synthetic cryo-EM particles with an image size of 132 × 132 pixels and a pixel size of 1.346 Å, equivalent to the experimental particles.Each residue of apoferritin was represented by a Gaussian density centered at the C α position, with standard deviation uniformly sampled between 0.5 and 5 Å.The SNR ranged from 0.1 to 0.001.The signal of the simulated images without noise was determined by using a circular mask with a radius of 66 pixels.For the CTF, the defocus was sampled uniformly between 1.0 and 4.0 µm, the amplitude was constant at 0.1, and the B-factor was sampled uniformly between 1 and 100 Å 2 .The orientations were sampled uniformly in SO(3).To learn an amortized posterior, we trained the NSF density estimator for 100 epochs with 1600 batches per epoch.The experimental particles were whitened using the Python implementation of ASPIRE [57].

Hemagglutinin

53We used the hemagglutinin experimental images available at EMPIAR 10532 [45].A subset of these particles were used to reconstruct a structure at around 3Å resolution (PDB id: 6wxb).Similarly to apoferritin, we used cryoSBI and normal mode displacements to test if the cryo-EM structure can be inferred from each individual particle.The normal mode trajectory was generated using ProDy [56].To avoid multimodal posteriors due to symmetry, we concatenated two normal mode displacements mode 1 and 2 (left and right side of Figure 4A-bottom) from the cryo-EM structure.The maximum displacement for mode one is 20 Å and for mode two 8 Å.We defined θ = γ RMSD where γ = −1 and 1 for structures from mode 1 and 2, respectively.Normal mode structures were mapped along θ with a 0.4 Å interval.To train cryoSBI, we simulated cryo-EM templates with an image size of 128 × 128 pixels and a pixel size of 2.06 Å.Each residue of hemagglutinin was represented by a Gaussian density centered at the C α position with standard deviation uniformly sampled between 0.5 and 5 Å.The SNR ranged from 0.1 to 0.001.The signal of the simulated images without noise was determined by a using circular mask with a radius of 64 pixels.For the CTF, the defocus was uniformly sampled between 0.5 and 5 µm, the amplitude was constant set to 0.1, and the B-factor was set to 1 Å 2 .The orientations were sampled uniformly from SO(3).We applied a low pass filter cutting frequencies higher than 10Å.The low pass filter was applied in order to reduce artifacts from the background.We trained the neural network density estimator for 450 epochs, each containing 800 batches.To test the experimental particles with cryoSBI, we first downsampled them to match the pixel and box sizes of the simulated images.Then, we whitened them using the Python implementation of ASPIRE [57].Whitening is necessary to avoid a noise-model misspecification, which can be assessed by comparing the projection of the simulated templates and the experimental in the latent space of the embedding (Supplementary Figure 3B).

54Latent-space analysis of hemagglutinin.We used the MMD to compare the entire set of simulated templates with SNR ranging between 0.001 and 0.1 to subsets of simulated templates with different SNR ranges, and to sets of raw and whitened experimental particles (Supplementary Figure 3A).Due to the large dataset sizes of 271558 particles, we approximated the MMD by bootstrapping with random subsets of size 10 4 from each set, and then took the average MMD over 100 trials.

55Hemagglutinin micrograph analysis.We analyzed a cropped micrograph (3824 × 3824 pixels) using a 256x256 pixel large sliding window, moving it in steps of 16 pixels.This resulted in a total of 58081 (241 × 241) windows.We whitened each window using the ASPIRE Python implementation [57] and downsampled it to 128x128 pixels.In each window, we evaluated the same posterior learned for the hemagglutinin single particles .To visualize different posterior properties as a function of the crop center position, we upscaled the 241×241 matrix to the size of the micrograph.

56Molecular dynamics simulation of hemagglutinin.We ran a molecular dynamics simulation of hemagglutinin using the Charmm36m [58] forcefield to estimate the fluctuations around its folded conformation.We started from the cryo-EM structure PDB: 6WXB.We added 24 missing residues and solvated the structure with TIP3P water with 0.15M of NaCl.We minimised the energy of the systems with 5000 steps of the steepest-descent algorithm.Afterwards, we performed a 125 ps long equilibration in the NVT ensemble using the Nose-Hoover thermostat set at a reference temperature of 310 K.We simulated the systems in the NPT ensemble for 557.75 ns, keeping a reference temperature of 310 K (Nose-Hoover thermostat with τ t = 1 ps) and a reference pressure of 1 bar (Parrinello-Rahman barostat with τ p = 5 ps).We used a radius-cut-off = 1.2 nm for the Van der Waals (Verlet) and the Coulomb forces (Particle Mesh Ewald).We used a simulation timestep of 2 fs.We computed the pairwise RMSD for residues which have a RMSF of 2.0 Å or lower within the trajectory to estimate the expected fluctuations.We calculated a histogram from the pairwise RMSD values and selected the value at the 68% quantile, corresponding to approx.2.0 Å (Supplementary Figure 1).Therefore, we expect that in 68% of cases, the difference between structures will be not more than 2Å (Figure 4B dotted lines around dashed line).

Code Availability

57The code is available at GitHub https://github.com/flatironinstitute/cryoSBIand is based on LAMPE [59], a PyTorch implementation for simulation-based inference.Data and scripts necessary to reproduce all the results in this paper are freely accessible at the Zenodo repository https://zenodo.org/records/12608562.

Figure 2 :

58Figure 2: Validation and benchmark with synthetic data.A) The opening of the two arms of Hsp90 defines a conformational change, quantified by θ, the RMSD w.r.t the closed conformation.We selected 20 configurations equally spaced along θ as structural models.Examples of cryoSBI inference for three particles.Each inference on synthetic images (gray-scale images in the insets) resulted in a posterior (blue curve), quantifying which structural model was the most compatible with the image.Red lines represent the true configurations that generated the images in the insets.The shaded region is the 2σ interval.B) Inference precision for 10,000 images as a function of SNR and projection direction.Each point represents the σ interval (color bar, from dark blue -low confidence, to deep red -high confidence) of the posterior obtained from a synthetic image produced at a given SNR and projection angle.On top, we show the schematic definition of ϕ, the angle formed between the direction of the electron beam and the direction of movement of the two arms of Hsp90.C) Inference accuracy for 10,000 images for sets with different SNR.The two scatter plots show the correlation between the estimated opening of Hsp90 obtained as a sample of the posterior, and the true opening, using SNR=0.1 and SNR=0.01,respectively.We drew one sample from the posterior for each image, and colored them according to the posterior σ interval (color palette, colors as for panel B).The black dashed line describes the average of the posterior means, while the blue line corresponds to the mean of the maximum-likelihood estimates obtained via BioEM[31].D) Scaling of the computational cost w.r.t. the number of images of cryoSBI and maximum likelihood methods (BioEM).The computational cost corresponds to wall-time using an NVIDIA RTX A6000 GPU for cryoSBI, and AMD EPYC 7742 CPU for BioEM.

Figure 3 :

59Figure 3: CryoSBI applied to experimental particles of apoferritin.A) Apoferritin conformational change along θ, generated by varying the ground truth reference cryo-EM structure (PDB ID 4v1w) along two normal mode directions.The conformational change is quantified by the RMSD in Å to the reference cryo-EM structure.We multiplied the RMSD by -1 for variations along mode 1 (left half of the axis).By construction θ = 0 Å for the reference structure.B) Example of cryoSBI posteriors for experimental apoferritin particle images.The particles are low pass filtered for better visibility.The red dashed line indicates the position of the reference structure along θ.C) Histogram of the inferred conformation from the posterior mean θ mean for the particles in the dataset.D) Two-dimensional histogram reporting 1000 posterior samples from the posterior of each apoferritin particle.

Figure 4 :

60Figure 4: CryoSBI applied to experimental particles of hemagglutinin.A) Example of cryoSBI posteriors for experimental hemagglutinin particle images (low pass filtered for better visibility).The conformational change along θ was modelled normal mode analysis, θ = γ RMSD from reference cryo-EM structure (red dashed line) where γ = −1 or 1 for normal mode 1 and 2, respectively.B) Two-dimensional histogram showing 1000 posterior samples for each of the 271558 posteriors.The black dashed line indicates the cryo-EM reference structure.The dotted lines show the size of the expected fluctuation around the reference structure estimated with MD simulations.C) UMAP 2D projection of the latent space of the simulated particles used for training (gray) and a random subset of 10% of experimental particles (red).D) UMAP 2D projection of the latent representation of a random subset of 10% of experimental particles colored according to their posterior σ interval.(E-F) Experimental particles, selected from different positions in the UMAP in D. (low pass filtered for better visibility).

Figure 5 :

61Figure 5: Evaluating the posterior learned by cryoSBI on a micrograph directly.A) Cropped micrograph (3824 × 3824 pixels) from the hemagglutinin EMPIAR dataset 10026.B) Absolute Distance in θ between the posterior mean and the cryo-EM reference structure θ = 0 as a function of window position on the micrograph.C-E) Example windows (top) from the micrograph with a posterior mean close to the cryo-EM reference (bottom) and a small posterior width (middle).

참고문헌 57건

  1. Ultrastable gold substrates for electron cryomicroscopy Science · American Association for the Advancement of Science · 2014 10.1126/science.1259530
  2. Bayesian analysis of individual electron microscopy images: Towards structures of dynamic and heterogeneous biomolecular assemblies Journal of Structural Biology · Elsevier BV · 2013 10.1016/j.jsb.2013.10.006
  3. Trajectories of the ribosome as a Brownian nanomachine Proceedings of the National Academy of Sciences · National Academy of Sciences · 2014 10.1073/pnas.1419276111
  4. Single-Particle Cryo-EM at Crystallographic Resolution Cell · Cell Press · 2015 10.1016/j.cell.2015.03.049
  5. Cryo-electron microscopy of vitrified specimens Quarterly Reviews of Biophysics · Cambridge University Press · 1988 10.1017/s0033583500004297
  6. RELION: Implementation of a Bayesian approach to cryo-EM structure determination Journal of Structural Biology · Elsevier BV · 2012 10.1016/j.jsb.2012.09.006
  7. Likelihood-based classification of cryo-EM images using FREALIGN Journal of Structural Biology · Elsevier BV · 2013 10.1016/j.jsb.2013.07.005
  8. Deep Residual Learning for Image Recognition 2016 10.1109/cvpr.2016.90
  9. BioEM: GPU-accelerated computing of Bayesian inference of electron microscopy images Computer Physics Communications · Elsevier BV · 2016 10.1016/j.cpc.2016.09.014
  10. cryoSPARC: algorithms for rapid unsupervised cryo-EM structure determination Nature Methods · Nature Portfolio · 2017 10.1038/nmeth.4169
  11. Single-protein detection in crowded molecular environments in cryo-EM images eLife · eLife Sciences Publications Ltd · 2017 10.7554/elife.25648
  12. Simultaneous Determination of Protein Structure and Dynamics Using Cryo-Electron Microscopy Biophysical Journal · Elsevier BV · 2018 10.1016/j.bpj.2018.02.028
  13. Likelihood-based structural analysis of electron microscopy images Current Opinion in Structural Biology · Elsevier BV · 2018 10.1016/j.sbi.2018.03.004
  14. Principles for Integrative Structural Biology Studies Cell · Cell Press · 2019 10.1016/j.cell.2019.05.016
  15. Fast $ε$-free Inference of Simulation Models with Bayesian Conditional Density Estimation arXiv (Cornell University) · Cornell University · 2016 10.48550/arxiv.1605.06376
  16. Simulation of cryo-EM ensembles from atomic models of molecules exhibiting continuous conformations bioRxiv (Cold Spring Harbor Laboratory) · Cold Spring Harbor Laboratory · 2019 10.1101/864116
  17. The frontier of simulation-based inference Proceedings of the National Academy of Sciences · National Academy of Sciences · 2020 10.1073/pnas.1912789117
  18. Training deep neural density estimators to identify mechanistic models of neural dynamics eLife · eLife Sciences Publications Ltd · 2020 10.7554/elife.56261
  19. Through-grid wicking enables high-speed cryoEM specimen preparation Acta Crystallographica Section D Structural Biology · 2020 10.1107/s2059798320012474
  20. Benchmarking Simulation-Based Inference arXiv (Cornell University) · Cornell University · 2021
  21. Deep learning-based mixed-dimensional Gaussian mixture model for characterizing variability in cryo-EM Nature Methods · Nature Portfolio · 2021 101038s41592021012205
  22. CryoDRGN: reconstruction of heterogeneous cryo-EM structures using neural networks Nature Methods · Nature Portfolio · 2021 10.1038/s41592-020-01049-4
  23. 3D variability analysis: Resolving continuous flexibility and discrete heterogeneity from single particle cryo-EM Journal of Structural Biology · Elsevier BV · 2021 10.1016/j.jsb.2021.107702
  24. Locating macromolecular assemblies in cells by 2D template matching with cisTEM eLife · eLife Sciences Publications Ltd · 2021 10.7554/elife.68946
  25. 3D Flexible Refinement: Structure and Motion of Flexible Proteins from Cryo-EM bioRxiv (Cold Spring Harbor Laboratory) · Cold Spring Harbor Laboratory · 2021 10.1101/2021.04.22.440893
  26. A Bayesian approach to extracting free-energy profiles from cryo-electron microscopy experiments Scientific Reports · Nature Portfolio · 2021 10.1038/s41598-021-92621-1
  27. Real-Time Gravitational Wave Science with Neural Posterior Estimation Physical Review Letters · American Physical Society · 2021 101103physrevlett127241103
  28. On bias, variance, overfitting, gold standard and consensus in single-particle analysis by cryo-electron microscopy Acta Crystallographica Section D Structural Biology · 2022 101107s2059798322001978
  29. Effects of cryo-EM cooling on structural ensembles Nature Communications · Nature Portfolio · 2022 10.1038/s41467-022-29332-2
  30. On bias, variance, overfitting, gold standard and consensus in single-particle analysis by cryo-electron microscopy Acta Crystallographica Section D Structural Biology · 2022 10.1107/s2059798322001978
  31. DeepHEMNMA: ResNet-based hybrid analysis of continuous conformational heterogeneity in cryo-EM single particle images Frontiers in Molecular Biosciences · Frontiers Media · 2022 10.3389/fmolb.2022.965645
  32. Amortized Inference for Heterogeneous Reconstruction in Cryo-EM arXiv (Cornell University) · Cornell University · 2022 10.48550/arxiv.2210.07387
  33. Deep generative modeling for volume reconstruction in cryo-electron microscopy Journal of Structural Biology · Elsevier BV · 2022 10.1016/j.jsb.2022.107920
  34. CryoAI: Amortized Inference of Poses for Ab Initio Reconstruction of 3D Molecular Volumes from Real Cryo-EM Images Lecture notes in computer science · Springer Science+Business Media · 2022 10.1007/978-3-031-19803-8_32
  35. MDSPACE: Extracting Continuous Conformational Landscapes from Cryo-EM Single Particle Datasets Using 3D-to-2D Flexible Fitting based on Molecular Dynamics Simulation Journal of Molecular Biology · Elsevier BV · 2023 10.1016/j.jmb.2023.167951
  36. Estimating conformational landscapes from Cryo-EM particles by 3D Zernike polynomials Nature Communications · Nature Portfolio · 2023 10.1038/s41467-023-35791-y
  37. Simulation-based inference of single-molecule force spectroscopy Machine Learning Science and Technology · IOP Publishing · 2023 10.1088/2632-2153/acc8b8
  38. Machine-guided path sampling to discover mechanisms of molecular self-organization Nature Computational Science · Nature Portfolio · 2023 10.1038/s43588-023-00428-z
  39. Ensemble Reweighting Using Cryo-EM Particle Images The Journal of Physical Chemistry B · American Chemical Society · 2023 10.1021/acs.jpcb.3c01087
  40. Conformational heterogeneity and probability distributions from single-particle cryo-electron microscopy Current Opinion in Structural Biology · Elsevier BV · 2023 10.1016/j.sbi.2023.102626
  41. Gentle and fast all-atom model refinement to cryo-EM densities via a maximum likelihood approach PLoS Computational Biology · Public Library of Science · 2023 10.1371/journal.pcbi.1011255
  42. Amortized Inference for Heterogeneous Reconstruction in Cryo-EM. PubMed · 2022
  43. On Manifold Learning in Plato’s Cave: Remarks on Manifold Learning and Physical Phenomena 2023 10.1109/sampta59647.2023.10301403
  44. A minority of final stacks yields superior amplitude in single-particle cryo-EM Nature Communications · Nature Portfolio · 2023 10.1038/s41467-023-43555-x
  45. Understanding the cell: Future views of structural biology Cell · Cell Press · 2024 10.1016/j.cell.2023.12.017
  46. Accurate structure prediction of biomolecular interactions with AlphaFold 3 Nature · Nature Portfolio · 2024 10.1038/s41586-024-07487-w
  47. High-confidence 3D template matching for cryo-electron tomography Nature Communications · Nature Portfolio · 2024 10.1038/s41467-024-47839-8
  48. Towards interpretable Cryo-EM: disentangling latent spaces of molecular conformations Frontiers in Molecular Biosciences · Frontiers Media · 2024 10.3389/fmolb.2024.1393564
  49. Accurate model and ensemble refinement using cryo-electron microscopy maps and Bayesian inference PLoS Computational Biology · Public Library of Science · 2024 10.1371/journal.pcbi.1012180
  50. Amortized template-matching of molecular conformations from cryo-electron microscopy images using simulation-based inference bioRxiv (Cold Spring Harbor Laboratory) · Cold Spring Harbor Laboratory · 2024 10.1101/2024.07.23.604154
  51. Bayesian reweighting of biomolecular structural ensembles using heterogeneous cryo-EM maps with the cryoENsemble method Scientific Reports · Nature Portfolio · 2024 10.1038/s41598-024-68468-7
  52. DynaMight: estimating molecular motions with improved reconstruction from cryo-EM images Nature Methods · Nature Portfolio · 2024 10.1038/s41592-024-02377-5
  53. Scalable emulation of protein equilibrium ensembles with generative deep learning bioRxiv (Cold Spring Harbor Laboratory) · Cold Spring Harbor Laboratory · 2024 10.1101/2024.12.05.626885
  54. Simulation-based inference of single-molecule experiments Current Opinion in Structural Biology · Elsevier BV · 2025 10.1016/j.sbi.2025.102988
  55. Cryo-EM heterogeneity analysis using regularized covariance estimation and kernel regression Proceedings of the National Academy of Sciences · National Academy of Sciences · 2025 10.1073/pnas.2419140122
  56. Counting particles could give wrong probabilities in Cryo-Electron Microscopy bioRxiv (Cold Spring Harbor Laboratory) · Cold Spring Harbor Laboratory · 2025 10.1101/2025.03.27.644168
  57. Cryo-em images are intrinsically low dimensional arXiv (Cornell University) · Cornell University · 2025 10.48550/arxiv.2504.11249