Method and device for cryo-em image reconstruction, electronic equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ACAD OF ARTIFICIAL INTELLLIGENCE
- Filing Date
- 2026-04-17
- Publication Date
- 2026-08-04
AI Technical Summary
然而,这类方法存在明显缺陷:一方面,传统变分后验常采用简单的各向同性高斯分布,无法准确捕捉真实后验的多峰、非高斯特性,导致对多种共存构象的建模能力不足;另一方面,现有方法在隐变量空间中仅依赖确定性编码或有限的随机采样,难以充分探索高维后验分布,容易陷入局部最优,且对抗训练中判别器的梯度不稳定,使得生成的三维结构在细节保真度和构象多样性上均受到限制,无法满足高分辨率冷冻电镜重建对复杂分子动态行为的精确刻画需求
[0016]This application provides a cryo-electron microscopy image reconstruction method, apparatus, electronic device, and storage medium. The method involves acquiring two-dimensional projection image samples obtained by a cryo-electron microscope and sampling prior latent variables from a preset prior distribution. These prior latent variables characterize the three-dimensional structural information of biological macromolecules. For each two-dimensional projection image sample, multiple negative latent variable samples are obtained by sampling from the current variational posterior distribution using stochastic gradient Langevin dynamics. These negative latent variable samples simulate different conformational states of the biological macromolecules. A discriminator network is optimized based on the prior latent variables and the negative latent variable samples. The discriminator network distinguishes between the prior distribution and the variational posterior distribution. The parameters of the encoder network and decoder network are jointly updated based on the negative latent variable samples to optimize the three-dimensional structure reconstruction quality of the cryo-electron microscope image. The encoder network maps the two-dimensional projection image samples to the mean of the latent variables, and the decoder network reconstructs the latent variables into two-dimensional projection images. Therefore, this embodiment of the application, by sampling prior latent variables from the prior distribution and using stochastic gradient Langevin dynamics to sample multiple negative latent variable samples from the current variational posterior distribution, can effectively simulate the distribution of biomolecules in different conformational states, avoiding the limitation of the posterior distribution being simplified to a single Gaussian distribution in traditional methods. Furthermore, the discriminator network is optimized based on the prior latent variables and negative latent variable samples, enabling the discriminator to more accurately distinguish between the prior distribution and the variational posterior distribution, thereby guiding the variational posterior to converge towards the prior. Simultaneously, the introduction of negative latent variable samples when jointly updating the encoder and decoder networks enhances the structural representativeness of the encoder's output latent variable mean and improves the decoder's ability to reconstruct multiple conformations. This significantly improves the conformational diversity, posterior fitting accuracy, and final reconstruction quality of cryo-electron microscopy 3D structure reconstruction without relying on other additional constraints.
Smart Images

Figure CN122510079A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image reconstruction technology, and in particular to a cryo-electron microscopy image reconstruction method, apparatus, electronic device and storage medium. Background Technology
[0002] In cryo-electron microscopy single-particle analysis, reconstructing the three-dimensional structure of biomacromolecules from a large number of two-dimensional projection images is a key step in resolving their high-resolution conformations.
[0003] Existing techniques typically employ reconstruction methods based on variational autoencoders. An encoder maps the projected image into latent variables, which are then reconstructed by a decoder to represent the 2D projection of the 3D structure. Adversarial training or KL divergence constraints are used to approximate the prior distribution of the latent variables, thus handling molecular flexibility or conformational heterogeneity. However, these methods have significant drawbacks: firstly, traditional variational posteriors often employ simple isotropic Gaussian distributions, failing to accurately capture the multimodal and non-Gaussian nature of the true posterior, resulting in insufficient modeling capabilities for multiple coexisting conformations; secondly, existing methods rely solely on deterministic encoding or limited random sampling in the latent variable space, making it difficult to fully explore high-dimensional posterior distributions, easily leading to local optima. Furthermore, the gradient instability of the discriminator during adversarial training limits the detail fidelity and conformational diversity of the generated 3D structures, failing to meet the demands of high-resolution cryo-electron microscopy reconstruction for precise characterization of complex molecular dynamics. Therefore, a solution to address these issues is urgently needed. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for cryo-electron microscopy image reconstruction to address the deficiencies in the prior art.
[0005] This application provides a method for reconstructing cryo-electron microscopy images, including: Two-dimensional projection image samples acquired by cryo-electron microscopy are obtained, and prior latent variables are sampled from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules; For each two-dimensional projected image sample, multiple negative latent variable samples corresponding to the two-dimensional projected image sample are obtained by sampling from the current variational posterior distribution through stochastic gradient Langevin dynamics; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule. Based on the prior latent variables and the negative latent variable samples, the discriminator network is optimized; wherein, the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; Based on the negative latent variable samples, the parameters of the encoder network and the decoder network are jointly updated to optimize the 3D structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the 2D projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a 2D projection image.
[0006] According to an embodiment of this application, a cryo-electron microscopy image reconstruction method is provided, wherein for each two-dimensional projection image sample, multiple negative latent variable samples corresponding to the two-dimensional projection image sample are obtained by sampling from the current variational posterior distribution using stochastic gradient Langevin dynamics, including: For each two-dimensional projected image sample, multiple latent variable particles are initialized; wherein each of the multiple latent variable particles represents a candidate three-dimensional structural conformation. For each hidden variable particle, the following update operation is performed iteratively: calculate the gradient of the target energy function corresponding to the hidden variable particle, and update the hidden variable particle based on the gradient, the preset step size, and the noise term; The latent variable particles after the iteration are used as negative latent variable samples to characterize the posterior conformational distribution of the biomacromolecules in the cryo-electron microscopy data.
[0007] According to an embodiment of this application, a cryo-electron microscopy image reconstruction method is provided, wherein the target energy function is composed of at least one of the following: The discriminator network outputs to hidden variable particles; The logarithmic probability of the prior distribution; The distance penalty between the latent variable mean output by the encoder network and the latent variable particles; And the reconstruction loss between the reconstructed projection image generated by the decoder network based on hidden variable particles and the two-dimensional projection image sample.
[0008] According to an embodiment of this application, a cryo-electron microscopy image reconstruction method is provided, wherein optimizing the discriminator network based on the prior latent variable and the negative latent variable samples includes: Maximize the output of the discriminator network for the prior latent variable and minimize the output of the discriminator network for the negative latent variable sample; The discriminator network satisfies a preset Lipschitz constraint to stabilize adversarial training during cryo-electron microscopy image reconstruction.
[0009] According to an embodiment of this application, a cryo-electron microscopy image reconstruction method includes, in which the parameters of the encoder network and the decoder network are jointly updated based on the negative latent variable samples, the method comprises: Minimize the first reconstruction error between the first reconstructed projection image and the two-dimensional projection image sample; wherein, the first reconstructed projection image is generated by the decoder network based on the mean of the latent variables output by the encoder network; Minimize the mean distance between the latent variable mean output by the encoder network and the negative latent variable sample; Minimize the second reconstruction error between the second reconstructed projection image and the two-dimensional projection image sample; wherein the second reconstructed projection image is generated by the decoder network based on the negative latent variable sample.
[0010] A cryo-electron microscopy image reconstruction method according to an embodiment of this application further includes: With the discriminator network fixed, the variational posterior distribution is obtained by soft maximization optimization of the two-dimensional projected image samples and the entropy regularization utility function constructed by the discriminator network; The entropy regularization utility function includes the output term of the discriminator network and the reconstruction cost term based on the decoder network.
[0011] A cryo-electron microscopy image reconstruction method according to an embodiment of this application further includes: In each training round, the discriminator network optimization steps are performed multiple times first, followed by a joint update step of the encoder network and the decoder network. In the optimization step of the discriminator network, the parameters of the encoder network and the decoder network are frozen.
[0012] This application also provides a cryo-electron microscopy image reconstruction apparatus, comprising: The first sampling module is used to acquire two-dimensional projection image samples obtained by cryo-electron microscopy and to sample prior latent variables from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules. The second sampling module is used to sample from the current variational posterior distribution for each two-dimensional projected image sample using stochastic gradient Langevin dynamics to obtain multiple negative latent variable samples corresponding to the two-dimensional projected image sample; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule. An optimization module is used to optimize the discriminator network based on the prior latent variables and the negative latent variable samples; wherein the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; The reconstruction module is used to jointly update the parameters of the encoder network and the decoder network based on the negative latent variable samples in order to optimize the three-dimensional structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the two-dimensional projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a two-dimensional projection image.
[0013] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the cryo-electron microscopy image reconstruction methods described above.
[0014] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the cryo-electron microscopy image reconstruction method as described above.
[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the cryo-electron microscopy image reconstruction methods described above.
[0016] This application provides a cryo-electron microscopy image reconstruction method, apparatus, electronic device, and storage medium. The method involves acquiring two-dimensional projection image samples obtained by a cryo-electron microscope and sampling prior latent variables from a preset prior distribution. These prior latent variables characterize the three-dimensional structural information of biological macromolecules. For each two-dimensional projection image sample, multiple negative latent variable samples are obtained by sampling from the current variational posterior distribution using stochastic gradient Langevin dynamics. These negative latent variable samples simulate different conformational states of the biological macromolecules. A discriminator network is optimized based on the prior latent variables and the negative latent variable samples. The discriminator network distinguishes between the prior distribution and the variational posterior distribution. The parameters of the encoder network and decoder network are jointly updated based on the negative latent variable samples to optimize the three-dimensional structure reconstruction quality of the cryo-electron microscope image. The encoder network maps the two-dimensional projection image samples to the mean of the latent variables, and the decoder network reconstructs the latent variables into two-dimensional projection images. Therefore, this embodiment of the application, by sampling prior latent variables from the prior distribution and using stochastic gradient Langevin dynamics to sample multiple negative latent variable samples from the current variational posterior distribution, can effectively simulate the distribution of biomolecules in different conformational states, avoiding the limitation of the posterior distribution being simplified to a single Gaussian distribution in traditional methods. Furthermore, the discriminator network is optimized based on the prior latent variables and negative latent variable samples, enabling the discriminator to more accurately distinguish between the prior distribution and the variational posterior distribution, thereby guiding the variational posterior to converge towards the prior. Simultaneously, the introduction of negative latent variable samples when jointly updating the encoder and decoder networks enhances the structural representativeness of the encoder's output latent variable mean and improves the decoder's ability to reconstruct multiple conformations. This significantly improves the conformational diversity, posterior fitting accuracy, and final reconstruction quality of cryo-electron microscopy 3D structure reconstruction without relying on other additional constraints. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic flowchart of the cryo-electron microscopy image reconstruction method provided in the embodiments of this application.
[0019] Figure 2 This is an analysis diagram of the latent space and observation space under the six-modal Gaussian mixture model provided in the embodiments of this application.
[0020] Figure 3This is a schematic diagram comparing the optimization behavior of WAE and EVIA under a fixed objective function, as provided in the embodiments of this application.
[0021] Figure 4 This is a schematic diagram of the cryo-electron microscopy image reconstruction apparatus provided in the embodiments of this application.
[0022] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the embodiments of this application.
[0024] The following describes, with reference to the accompanying drawings, a method, apparatus, electronic device, and storage medium for cryo-electron microscopy image reconstruction according to an embodiment of this application.
[0025] Figure 1 This is a schematic flowchart of the cryo-electron microscopy image reconstruction method provided in the embodiments of this application, as shown below. Figure 1 As shown, the method includes the following: Step 100: Obtain two-dimensional projection image samples acquired by cryo-electron microscopy, and sample prior latent variables from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules.
[0026] It should be noted that this application proposes EVIA (Entropic Variational Inference Auto-encoding), a generative variational inference framework for cryo-electron microscopy image reconstruction. The core innovation lies in: introducing entropy regularization on top of the traditional Wasserstein autoencoder, extending the deterministic mapping from latent variables to observations to distribution-level optimization; and efficiently sampling from the variational posterior distribution using stochastic gradient Langevin dynamics to obtain negative latent variable samples capable of characterizing multiple conformational states of biomolecules; simultaneously, using a discriminator network to adversarially align the prior and variational posterior distributions in the latent space, and jointly optimizing the encoder and decoder. This allows the model to maintain high-fidelity reconstruction capabilities while capturing the inherent conformational heterogeneity and multimodal posterior distributions in cryo-electron microscopy data, thereby significantly improving the accuracy, diversity, and stability of 3D structure reconstruction.
[0027] Specifically, the first step is to acquire two-dimensional projection image samples of biological macromolecules (such as ribosomes, viral particles, or ion channel proteins) obtained by cryo-electron microscopy equipment. These images reflect the scattering or projection information of the samples at different angles. At the same time, prior latent variables are sampled from a pre-defined prior distribution (such as a standard Gaussian distribution or an isotropic Gaussian mixture model). These prior latent variables are low-dimensional vectors used to characterize the three-dimensional structural information of biological macromolecules, such as the overall orientation of the molecule, the relative positions of each structural domain, or the feature encoding of different conformational states.
[0028] Step 200: For each two-dimensional projected image sample, sample from the current variational posterior distribution using stochastic gradient Langevin dynamics to obtain multiple negative latent variable samples corresponding to the two-dimensional projected image sample; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule.
[0029] Specifically, for each two-dimensional projected image sample, stochastic gradient Langevin dynamics (SGLD) is used to iteratively sample from the current variational posterior distribution: starting from the initially guessed latent variable particles, the gradient of the target energy function, which is composed of the discriminator output, the prior log probability, the distance penalty of the encoder mean, and the decoder reconstruction loss, is calculated. While updating the particles in the gradient direction, an appropriate amount of Gaussian noise is added. After multiple iterations, the sample converges to multiple negative latent variable samples. These negative latent variable samples represent different conformational states that biomolecules may exhibit, such as open and closed states, and conformational changes before and after binding ligands.
[0030] Step 300: Optimize the discriminator network based on the prior latent variables and the negative latent variable samples; wherein the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution.
[0031] Specifically, the discriminator network is optimized using the prior latent variables and negative latent variable samples obtained from sampling. The goal of the discriminator network is to learn to distinguish between latent variables from the prior distribution and negative latent variable samples from the variational posterior. By maximizing the response to the prior latent variables and minimizing the response to the negative latent variable samples, the discriminator guides the variational posterior to gradually approximate the prior distribution.
[0032] Step 400: Based on the negative latent variable samples, jointly update the parameters of the encoder network and the decoder network to optimize the three-dimensional structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the two-dimensional projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a two-dimensional projection image.
[0033] Specifically, based on the negative latent variable samples obtained from sampling, the encoder network and decoder network are jointly updated: the encoder network maps the input two-dimensional projection image to the mean of the latent variables, which represents the most likely three-dimensional structure encoding of the current image; the decoder network reconstructs the latent variables (including the mean output by the encoder and the negative latent variable samples obtained by SGLD sampling) into a two-dimensional projection image; by minimizing the reconstruction error and the mean square distance between the encoder mean and the negative latent variable samples, the encoder and decoder work together to continuously improve the mapping accuracy from two-dimensional projection to three-dimensional structure and back to two-dimensional projection, thereby ultimately optimizing the three-dimensional structure reconstruction quality of cryo-electron microscopy, making the reconstructed three-dimensional density map of biomacromolecules clearer and the conformational distribution more accurate.
[0034] The original objective function of EVIA proposed in this application integrates adversarial divergence and entropy regularization for optimal transport: in, For variational posterior marginal distribution, As a prior distribution, For data distribution p x and variational posterior q z For the joint coupling set at the edge, π For the transmission plan, The expected cost of reconstruction The KL divergence is the distance between the joint coupling and the reference joint distribution.
[0035] Through dual transformation, the original objective described above can be equivalently transformed into the following semi-dual form: in, w For the discriminator network, For the discriminator function class, For data distribution px The dual functional, Let be the expectation of the entropy regularization conditional functional under the data distribution.
[0036] The above describes the steps of the cryo-electron microscopy image reconstruction method provided in the embodiments of this application. As can be seen from the above description, the cryo-electron microscopy image reconstruction method provided in the embodiments of this application acquires two-dimensional projection image samples from a cryo-electron microscope and samples prior latent variables from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules; for each two-dimensional projection image sample, multiple negative latent variable samples corresponding to the two-dimensional projection image sample are obtained by sampling from the current variational posterior distribution through stochastic gradient Langevin dynamics; wherein, the negative latent variable samples are used to simulate different conformational states of the biological macromolecules; based on the prior latent variables and the negative latent variable samples, the discriminator network is optimized; wherein, the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; based on the negative latent variable samples, the parameters of the encoder network and the decoder network are jointly updated to optimize the three-dimensional structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the two-dimensional projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a two-dimensional projection image. Therefore, this embodiment of the application, by sampling prior latent variables from the prior distribution and using stochastic gradient Langevin dynamics to sample multiple negative latent variable samples from the current variational posterior distribution, can effectively simulate the distribution of biomolecules in different conformational states, avoiding the limitation of the posterior distribution being simplified to a single Gaussian distribution in traditional methods. Furthermore, the discriminator network is optimized based on the prior latent variables and negative latent variable samples, enabling the discriminator to more accurately distinguish between the prior distribution and the variational posterior distribution, thereby guiding the variational posterior to converge towards the prior. Simultaneously, the introduction of negative latent variable samples when jointly updating the encoder and decoder networks enhances the structural representativeness of the encoder's output latent variable mean and improves the decoder's ability to reconstruct multiple conformations. This significantly improves the conformational diversity, posterior fitting accuracy, and final reconstruction quality of cryo-electron microscopy 3D structure reconstruction without relying on other additional constraints.
[0037] Based on the above embodiments, in this embodiment, step 200, for each two-dimensional projected image sample, samples from the current variational posterior distribution using stochastic gradient Langevin dynamics to obtain multiple negative latent variable samples corresponding to the two-dimensional projected image sample, including: Step 210: For each two-dimensional projected image sample, initialize multiple latent variable particles; wherein each of the multiple latent variable particles represents a candidate three-dimensional structural conformation.
[0038] Step 220: For each latent variable particle, iteratively perform the following update operation: calculate the gradient of the target energy function corresponding to the latent variable particle, and update the latent variable particle based on the gradient, the preset step size, and the noise term; the target energy function consists of at least one of the following: the output of the discriminator network to the latent variable particle, the log probability of the prior distribution, the distance penalty between the latent variable mean output by the encoder network and the latent variable particle, and the reconstruction loss between the reconstructed projection image generated by the decoder network based on the latent variable particle and the two-dimensional projection image sample.
[0039] Step 230: The latent variable particles after the iteration are used as the negative latent variable samples to characterize the posterior conformational distribution of the biomacromolecules in the cryo-electron microscopy data.
[0040] Specifically, for each two-dimensional projection image sample acquired by cryo-electron microscopy, multiple latent variable particles are initialized. Each latent variable particle is a low-dimensional vector (e.g., 32-dimensional or 128-dimensional) representing a possible three-dimensional structural conformation of the biomacromolecule (such as the open state, closed state, or intermediate transition state of the channel). The initial values of these particles can be obtained by superimposing a small amount of Gaussian noise near the mean of the latent variables output by the encoder.
[0041] Subsequently, in step 220, a multi-step iterative update is performed on each latent variable particle. At each iteration, the gradient of the target energy function corresponding to the particle is calculated. This target energy function typically consists of four terms: the output value of the discriminator network for the current latent variable particle, the log probability of the prior distribution, the Euclidean distance penalty between the latent variable mean output by the encoder network and the current particle, and the reconstruction loss between the projected image reconstructed by the decoder network based on the current particle and the original 2D projected image sample. Based on the calculated gradient, the particle is updated according to a preset step size (e.g., η=0.005), and a noise term following a normal distribution is added simultaneously. This noise term is a key feature of Langevin dynamics, enabling the particle to randomly explore the energy landscape, avoiding getting trapped in local optima, and thus effectively sampling the posterior distribution. After a preset number of iterations (e.g., T=4 steps or T=8 steps), step 230 uses the latent variable particles after the iteration as negative latent variable samples. These negative latent variable samples are no longer single-point estimates, but represent multiple representative samples in the posterior conformational distribution of the biomacromolecules corresponding to the two-dimensional projection image. They can characterize the conformational heterogeneity of molecules in cryo-electron microscopy data, such as the different conformational states of the same protein before and after binding to ligands.
[0042] Using an isotropic Gaussian reference distribution and setting temperature parameters gamma =2 / lambda When the entropy regularization potential function simplifies to the following logarithmic-summation-exponential form: in, rho This is the precision parameter (reciprocal of the variance) of the Gaussian reference distribution. z ˉ represents the mean of the hidden variable particles in the previous iteration. The three terms in the integral internal exponent term correspond to the discriminator output, reconstruction cost, and distance penalty between the hidden variable and the center, respectively.
[0043] The cryo-electron microscopy image reconstruction method provided in this embodiment initializes multiple latent variable particles and uses stochastic gradient Langevin dynamics for iterative updates. This enables efficient sampling of negative latent variable samples representing multiple candidate three-dimensional conformations from the variational posterior distribution, thereby effectively capturing the conformational heterogeneity and multimodal posterior distribution characteristics of biomacromolecules in cryo-electron microscopy data.
[0044] Based on the above embodiments, in this embodiment, step 300 optimizes the discriminator network based on the prior latent variables and the negative latent variable samples, including: Maximize the output of the discriminator network for the prior latent variable and minimize the output of the discriminator network for the negative latent variable sample; The discriminator network satisfies a preset Lipschitz constraint to stabilize adversarial training during cryo-electron microscopy image reconstruction.
[0045] Specifically, the discriminator network is a parameterized neural network (typically using a multilayer perceptron structure). Its input is a latent variable, and its output is a scalar value used to distinguish whether the latent variable comes from a prior distribution (representing a "true" or "reasonable" structural prior) or from a variational posterior distribution (representing the currently inferred structural posterior). The optimization objective is to maximize the discriminator network's output on the prior latent variable while minimizing its output on negative latent variable samples; this is the core idea of adversarial training. To prevent the discriminator network from becoming too powerful during training, leading to vanishing gradients or training instability, the discriminator network needs to satisfy a pre-defined Lipschitz constraint, which requires that the derivative of the discriminator function has an upper bound, preventing its output from changing too drastically. This constraint can be achieved in various ways, such as using gradient penalty or spectral normalization (directly normalizing the network weights so that the maximum singular value does not exceed 1).
[0046] To define the adversarial divergence upon which the discriminator network is based, this application adopts the following variational dual form: in, P and QThese represent two probability distributions (comparing the prior distribution and the variational posterior distribution). w Let W be the discriminator network function, and W be the set of discriminator functions. Indicates from distribution P Mid-sampled latent variables z The expected value output by the time discriminator. For distribution-dependent Q and discriminator w The dual functional.
[0047] for f - Divergence, whose Fenchel dual representation can be written as: in, f For generating functions, f * for f convex conjugate function, and They represent the distributions respectively. P and Q The expectation of the discriminator output and its conjugate function is given below.
[0048] The Γ-divergence (i.e., the integral probability measure) is defined as follows: in, This is a predefined class of discriminator functions (e.g., 1-Lipschitz function). For the discriminator belonging to this function class, and They represent the distributions respectively. P and Q The expected output of the discriminator.
[0049] Unified dual functionals It is given by the following formula: Among them, the first formula corresponds to f - Divergence, where f * is a convex conjugate function; the second equation corresponds to the Γ-divergence, where the expectation is directly taken; pz This is the prior distribution.
[0050] When Wasserstein-1 distance is used as the adversarial divergence, the optimization objective of the discriminator network is: in, w ψ For parameterized discriminator networks, This represents the expected output (with a negative sign) of the discriminator under variational a posteriori. Let the potential function be the expectation of the data distribution. This is a Lipschitz regularization term (e.g., gradient penalty or spectral normalization).
[0051] The cryo-electron microscopy image reconstruction method provided in this embodiment can effectively stabilize adversarial training by introducing a discriminator that satisfies the Lipshitz constraint during the cryo-electron microscopy image reconstruction process. This avoids the sharp fluctuations in the discriminator output that make it difficult for the encoder and decoder to converge, thereby enabling the variational posterior distribution to smoothly and accurately approximate the true posterior distribution.
[0052] Based on the above embodiments, in this embodiment, step 400, which involves jointly updating the parameters of the encoder network and the decoder network based on the negative latent variable samples, includes: Minimize the first reconstruction error between the first reconstructed projection image and the two-dimensional projection image sample; wherein, the first reconstructed projection image is generated by the decoder network based on the mean of the latent variables output by the encoder network; Minimize the mean distance between the latent variable mean output by the encoder network and the negative latent variable sample; Minimize the second reconstruction error between the second reconstructed projection image and the two-dimensional projection image sample; wherein the second reconstructed projection image is generated by the decoder network based on the negative latent variable sample.
[0053] Specifically, the encoder network is responsible for mapping the input two-dimensional projected image sample (such as a protein particle image taken by cryo-electron microscopy) to a latent variable mean, which represents the most likely three-dimensional structure encoding corresponding to the current image; the decoder network is responsible for reconstructing any latent variable into a two-dimensional projected image.
[0054] The specific optimization includes three synergistic loss terms: First, minimizing the first reconstruction error between the first reconstructed projected image and the original 2D projected image samples. The first reconstructed projected image is generated by the decoder based on the latent variable mean from the encoder output, ensuring that the end-to-end autoencoder path formed by the encoder and decoder faithfully reconstructs the input image and preserves key structural information. Second, minimizing the mean square distance between the latent variable mean output by the encoder network and the negative latent variable samples. This ensures that the latent variable mean predicted by the encoder for the input image is as close as possible to the high-quality negative latent variable samples sampled from the posterior distribution using SGLD, thereby distilling the conformational diversity information captured by SGLD sampling into the encoder. This allows the encoder to quickly output representative latent variable codes without requiring time-consuming iterative sampling each time. Third, minimizing the second reconstruction error between the second reconstructed projected image and the 2D projected image samples. The second reconstructed projected image is generated by the decoder based on the negative latent variable samples, ensuring that the decoder can not only correctly reconstruct the projection from the encoder mean but also correctly project various candidate conformational samples obtained by SGLD sampling back into the observation space, thus guaranteeing that the decoder has good reconstruction capabilities for all possible conformational states.
[0055] The optimization objective of the encoder network is to minimize the mean of its output latent variables and the mean square distance between the negative latent variable samples. in, The mean of the latent variables output by the encoder network. z To obtain from variational posterior q ( z | x The negative latent variable samples were sampled from the data. The distance is the squared Euclidean distance.
[0056] The optimization objective of the decoder network is to minimize the reconstruction error between the reconstructed projected image based on negative latent variable samples and the original 2D projected image. in, p θ ( z () is a decoder network based on latent variables z The generated reconstructed projection image, x This is a sample of the original two-dimensional projected image. The distance is the squared Euclidean distance.
[0057] To achieve end-to-end joint optimization of the encoder and decoder, this application integrates the reconstruction loss, encoder alignment loss, and decoder reconstruction loss into a unified objective: The first term is the reconstruction error of the encoder mean after passing through the decoder, L phi and L theta These represent the encoder alignment loss and the decoder reconstruction loss, respectively.
[0058] When both the encoder and decoder use parameterized networks, the entropy regularization potential function can be further written as: in, q θ ( z ) represents the decoder network. q φ ( x ) represents the encoder network; this form directly links the encoder and decoder for calculating sampling gradients during joint training.
[0059] Figure 2 This is an analysis diagram of the latent space and observation space under the six-modal Gaussian mixture model provided in the embodiments of this application, such as... Figure 2As shown, the analysis results of the EVIA method proposed in this application in the latent space and observation space are presented under the 6-mode Gaussian mixture prior. The figure presents two implementations: EVIA-SGLD (i.e., the version using stochastic gradient Langevin dynamics for sampling) and EVIA-Amortized (i.e., the version using an amortized encoder). The left subfigure ((a)init Gaussian) shows the initialization process of latent variable particles: multiple latent variable particles (each particle representing a candidate three-dimensional structure conformation) corresponding to each 2D projection image sample (referring to the projection of biomolecular particles acquired by cryo-electron microscopy) are initialized from a Gaussian distribution centered on the latent mean (representing the most likely three-dimensional structure encoding of the current image) output by the encoder network. The middle subplot ((b) latent samples) shows the latent space distribution after sampling: the colored contour lines represent the preset prior distribution (e.g., a Gaussian mixture model with 10 modalities, used to constrain latent variables to conform to the reasonable three-dimensional structure prior of biomacromolecules), the scatter points represent negative latent variable samples sampled from the current variational posterior distribution (representing the posterior probability distribution of latent variables under a given observation image) through stochastic gradient Langevin dynamics, and the larger dots represent the latent variable centers (i.e., the mean of multiple negative latent variable samples). It can be seen that the negative latent variable samples are closely surrounding the various modalities of the prior distribution, indicating that the sampled negative latent variable samples can effectively cover the different conformational states of biomacromolecules. The right subplot ((c) outputs) shows the reconstruction results of the observation space: the left side is the real observation sample (i.e., the original two-dimensional projection image sample acquired by cryo-electron microscopy), the middle is the projection image generated by the decoder network based on the negative latent variable samples, and the right side is the projection image A(zˉ)A( z The high consistency among the three indicates that this application, by jointly updating the encoder and decoder networks and introducing the entropy regularization utility function and adversarial training of the discriminator network, can reconstruct high-quality three-dimensional structures from cryo-electron microscopy data that are both faithful to the original observations and can characterize the diversity of molecular conformations.
[0060] The cryo-electron microscopy image reconstruction method provided in this embodiment achieves high-quality 3D structure reconstruction capability from cryo-electron microscopy data by jointly optimizing the three loss terms, with the encoder and decoder working together and progressing together. This enables the model to be faithful to the observed image and capture conformational heterogeneity.
[0061] Based on the above embodiments, in this embodiment, the method further includes: With the discriminator network fixed, the variational posterior distribution is obtained by soft maximization optimization of the two-dimensional projected image samples and the entropy regularization utility function constructed by the discriminator network; The entropy regularization utility function includes the output term of the discriminator network and the reconstruction cost term based on the decoder network.
[0062] Specifically, with the discriminator network parameters fixed, the optimal variational posterior distribution is not obtained through direct analytical solution, but rather through soft-maximization optimization of an entropy regularization utility function.
[0063] Specifically, for each 2D projected image sample, an entropy-regularized utility function is first constructed. This function consists of two terms: the first term is the output value of the discriminator network for the latent variable, representing the "realism" score of the latent variable from the discriminator's perspective, guiding the posterior distribution to concentrate in the region that the discriminator deems reasonable; the second term is the reconstruction cost term based on the decoder network, typically using the reconstruction error (such as mean square error) between the projected image reconstructed from the latent variable by the decoder and the original 2D projected image, ensuring that the latent variable carries sufficient information to faithfully reconstruct the observed image. Based on this, the variational posterior distribution is obtained by soft maximization of this utility function (i.e., maximization with entropy regularization, equivalent to minimizing the variational problem under KL divergence). Its closed-form solution is a Gibbs distribution, whose probability density is proportional to the exponential form of the utility function divided by the temperature parameter.
[0064] This embodiment constructs the following entropy regularization utility function to fuse the discriminator output and reconstruction cost: in, w ( z For the discriminator network, the latent variables are... z The output, lambda To balance the regularization coefficient of reconstruction cost, A( z ) represents the decoder network. To reconstruct the squared Euclidean distance between the projected image and the original two-dimensional projected image sample.
[0065] To ensure the existence of the entropy-regularized posterior distribution, the following integrability condition must be satisfied: in, kappa ( z | x ) is the reference conditional distribution (usually a Gaussian distribution). gamma Let Z be the temperature parameter (controlling the strength of entropy regularization), Z be the space of latent variables, and the integral represents the expression for all latent variables. z Integrate the points.
[0066] Based on the Donsker-Varadhan variational representation, the entropy-regularized conditional variational functional is defined as: in, For variational posterior distribution, Let the utility function be the expectation of the variational posterior. Let KL be the KL divergence between the variational posterior and the reference distribution. The solution of this equation gives the closed form of the optimal variational posterior.
[0067] The cryo-electron microscopy image reconstruction method provided in this embodiment introduces entropy regularization, so the variational posterior distribution is no longer a single Dirac point or a simple Gaussian distribution, but a distribution with smoothness and multimodal characteristics. It can naturally capture the posterior uncertainty caused by molecular flexibility or orientation uncertainty in cryo-electron microscopy data. At the same time, the output term of the discriminator network, as a learnable energy function, can adaptively shape the energy landscape of the posterior distribution according to the data, so that the sampled latent variables satisfy the prior constraints and produce high-quality reconstructed images, thus providing a good target distribution basis for subsequent SGLD sampling.
[0068] Based on the above embodiments, in this embodiment, the method further includes: In each training round, the discriminator network optimization steps are performed multiple times first, followed by a joint update step of the encoder network and the decoder network. In the optimization step of the discriminator network, the parameters of the encoder network and the decoder network are frozen.
[0069] Specifically, in each training epoch, the parameters of all networks are not updated simultaneously. Instead, an alternating pattern of "multi-step discriminator update and single-step generator update" is adopted: First, multiple optimization steps of the discriminator network are performed. In these steps, the parameters of the encoder and decoder networks are completely frozen. The discriminator network is optimized only based on the negative latent variable samples generated by the currently fixed encoder and decoder, as well as the prior latent variables sampled from the prior distribution. Its goal is to maximize the output on the prior latent variables and minimize the output on the negative latent variable samples, while maintaining the Lipshitz constraint through gradient penalty or spectral normalization. After performing multiple discriminator updates, a joint update step of the encoder and decoder networks is performed again. At this time, the parameters of the discriminator network are frozen, and only the encoder and decoder are updated to minimize the reconstruction error and the mean square distance with the negative latent variable samples. The reason for this alternating training strategy is that the discriminator network needs to have a strong enough discriminative ability to provide meaningful gradient signals to the encoder and decoder. If the discriminator is updated only once and the generator is updated immediately, the discriminator has not yet converged to a good discriminative state, which can easily lead to gradient instability or mode collapse. On the contrary, by updating the discriminator multiple times to make it "ahead" of the generator, it can be ensured that the adversarial signals received by the encoder and decoder are accurate and stable.
[0070] Figure 3 This is a schematic diagram comparing the optimization behavior of WAE and EVIA under a fixed objective function, as provided in the embodiments of this application. Figure 3 As shown, the behavior differences between traditional WAE and the proposed EVIA under a fixed objective function optimization are compared. The left side shows the optimization trajectory of WAE: WAE seeks a single latent variable point to minimize the objective function, eventually converging to a sharp local minimum. This indicates that WAE can only provide a single 3D structural conformation estimate and is difficult to capture the conformational heterogeneity of biomacromolecules. The right side shows the optimization behavior of EVIA: EVIA introduces entropy regularization and stochastic gradient Langevin dynamics sampling during the optimization process. Its goal is no longer to find a single point, but to optimize a conditional distribution, that is, to sample multiple negative latent variable samples from the variational posterior distribution, each negative latent variable sample representing a candidate 3D structural conformation. Since entropy regularization encourages the distribution to diffuse towards flat regions, EVIA eventually tends to converge to a flat optimum, allowing the sampled latent variable particles to cross energy barriers and cover a wider conformational space. This characteristic is consistent with the technical solution of this application, which uses SGLD to sample multiple negative latent variable samples from the variational posterior distribution and guides the posterior distribution to approximate the prior distribution through a discriminator network, thus providing richer conformational diversity and a more stable optimization path for cryo-electron microscopy image reconstruction.
[0071] The cryo-electron microscopy image reconstruction method provided in this embodiment effectively balances the competitive relationship between the discriminator and the generator through an alternating training mechanism, stabilizes the adversarial training process in cryo-electron microscopy image reconstruction, avoids training failure caused by one side being too strong or too weak, and ultimately enables the quality of the reconstructed three-dimensional structure to continuously and steadily improve during the iteration process.
[0072] The cryo-electron microscopy image reconstruction apparatus provided in the embodiments of this application is described below. The cryo-electron microscopy image reconstruction apparatus described below can be referred to in correspondence with the cryo-electron microscopy image reconstruction method described above.
[0073] Figure 4 This is a schematic diagram of the cryo-electron microscopy image reconstruction apparatus provided in the embodiments of this application, as shown below. Figure 4 As shown, the cryo-electron microscopy image reconstruction apparatus provided in this application includes: The first sampling module 401 is used to acquire two-dimensional projection image samples obtained by cryo-electron microscopy and to sample prior latent variables from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules. The second sampling module 402 is used to sample from the current variational posterior distribution for each two-dimensional projection image sample using stochastic gradient Langevin dynamics to obtain multiple negative latent variable samples corresponding to the two-dimensional projection image sample; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule. The optimization module 403 is used to optimize the discriminator network based on the prior latent variables and the negative latent variable samples; wherein the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; The reconstruction module 404 is used to jointly update the parameters of the encoder network and the decoder network based on the negative latent variable samples in order to optimize the three-dimensional structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the two-dimensional projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a two-dimensional projection image.
[0074] The cryo-electron microscopy image reconstruction apparatus provided in this application acquires two-dimensional projection image samples obtained by cryo-electron microscopy and samples prior latent variables from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules; for each two-dimensional projection image sample, multiple negative latent variable samples are obtained by sampling from the current variational posterior distribution through stochastic gradient Langevin dynamics; wherein, the negative latent variable samples are used to simulate different conformational states of the biological macromolecules; based on the prior latent variables and the negative latent variable samples, the discriminator network is optimized; wherein, the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; based on the negative latent variable samples, the parameters of the encoder network and the decoder network are jointly updated to optimize the three-dimensional structure reconstruction quality of the cryo-electron microscopy; wherein, the encoder network is used to map the two-dimensional projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into two-dimensional projection images. Therefore, this embodiment of the application, by sampling prior latent variables from the prior distribution and using stochastic gradient Langevin dynamics to sample multiple negative latent variable samples from the current variational posterior distribution, can effectively simulate the distribution of biomolecules in different conformational states, avoiding the limitation of the posterior distribution being simplified to a single Gaussian distribution in traditional methods. Furthermore, the discriminator network is optimized based on the prior latent variables and negative latent variable samples, enabling the discriminator to more accurately distinguish between the prior distribution and the variational posterior distribution, thereby guiding the variational posterior to converge towards the prior. Simultaneously, the introduction of negative latent variable samples when jointly updating the encoder and decoder networks enhances the structural representativeness of the encoder's output latent variable mean and improves the decoder's ability to reconstruct multiple conformations. This significantly improves the conformational diversity, posterior fitting accuracy, and final reconstruction quality of cryo-electron microscopy 3D structure reconstruction without relying on other additional constraints.
[0075] Based on the above embodiments, in this embodiment, the second sampling module 402 is specifically used for: For each two-dimensional projected image sample, multiple latent variable particles are initialized; wherein each of the multiple latent variable particles represents a candidate three-dimensional structural conformation. For each hidden variable particle, the following update operation is performed iteratively: calculate the gradient of the target energy function corresponding to the hidden variable particle, and update the hidden variable particle based on the gradient, the preset step size, and the noise term; The latent variable particles after the iteration are used as negative latent variable samples to characterize the posterior conformational distribution of the biomacromolecules in the cryo-electron microscopy data.
[0076] Based on the above embodiments, in this embodiment, the target energy function is composed of at least one of the following: The discriminator network outputs to hidden variable particles; The logarithmic probability of the prior distribution; The distance penalty between the latent variable mean output by the encoder network and the latent variable particles; And the reconstruction loss between the reconstructed projection image generated by the decoder network based on hidden variable particles and the two-dimensional projection image sample.
[0077] Based on the above embodiments, in this embodiment, the optimization module 403 is specifically used for: Maximize the output of the discriminator network for the prior latent variable and minimize the output of the discriminator network for the negative latent variable sample; The discriminator network satisfies a preset Lipschitz constraint to stabilize adversarial training during cryo-electron microscopy image reconstruction.
[0078] Based on the above embodiments, in this embodiment, the device further includes a joint update module, specifically used for: Minimize the first reconstruction error between the first reconstructed projection image and the two-dimensional projection image sample; wherein, the first reconstructed projection image is generated by the decoder network based on the mean of the latent variables output by the encoder network; Minimize the mean distance between the latent variable mean output by the encoder network and the negative latent variable sample; Minimize the second reconstruction error between the second reconstructed projection image and the two-dimensional projection image sample; wherein the second reconstructed projection image is generated by the decoder network based on the negative latent variable sample.
[0079] Based on the above embodiments, in this embodiment... With the discriminator network fixed, the variational posterior distribution is obtained by soft maximization optimization of the two-dimensional projected image samples and the entropy regularization utility function constructed by the discriminator network; The entropy regularization utility function includes the output term of the discriminator network and the reconstruction cost term based on the decoder network.
[0080] Based on the above embodiments, in this embodiment... In each training round, the discriminator network optimization steps are performed multiple times first, followed by a joint update step of the encoder network and the decoder network. In the optimization step of the discriminator network, the parameters of the encoder network and the decoder network are frozen.
[0081] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device can be a robot or other electronic device. This electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 550. The processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions from the memory 530 to execute a cryo-electron microscopy image reconstruction method, including: Two-dimensional projection image samples acquired by cryo-electron microscopy are obtained, and prior latent variables are sampled from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules; For each two-dimensional projected image sample, multiple negative latent variable samples corresponding to the two-dimensional projected image sample are obtained by sampling from the current variational posterior distribution through stochastic gradient Langevin dynamics; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule. Based on the prior latent variables and the negative latent variable samples, the discriminator network is optimized; wherein, the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; Based on the negative latent variable samples, the parameters of the encoder network and the decoder network are jointly updated to optimize the 3D structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the 2D projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a 2D projection image.
[0082] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application embodiment, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in at least one embodiment of this application embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0083] On the other hand, embodiments of this application also provide a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to perform the cryo-electron microscopy image reconstruction methods provided by the above methods, including: Two-dimensional projection image samples acquired by cryo-electron microscopy are obtained, and prior latent variables are sampled from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules; For each two-dimensional projected image sample, multiple negative latent variable samples corresponding to the two-dimensional projected image sample are obtained by sampling from the current variational posterior distribution through stochastic gradient Langevin dynamics; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule. Based on the prior latent variables and the negative latent variable samples, the discriminator network is optimized; wherein, the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; Based on the negative latent variable samples, the parameters of the encoder network and the decoder network are jointly updated to optimize the 3D structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the 2D projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a 2D projection image.
[0084] In another aspect, embodiments of this application also provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the cryo-electron microscopy image reconstruction methods provided by the methods described above, including: Two-dimensional projection image samples acquired by cryo-electron microscopy are obtained, and prior latent variables are sampled from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules; For each two-dimensional projected image sample, multiple negative latent variable samples corresponding to the two-dimensional projected image sample are obtained by sampling from the current variational posterior distribution through stochastic gradient Langevin dynamics; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule. Based on the prior latent variables and the negative latent variable samples, the discriminator network is optimized; wherein, the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; Based on the negative latent variable samples, the parameters of the encoder network and decoder network are jointly updated to optimize the 3D structure reconstruction quality of the cryo-electron microscope. The encoder network maps 2D projected image samples to the latent variable mean, and the decoder network reconstructs the latent variables into 2D projected images. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0085] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of this application, and are not intended to limit them; although the embodiments of this application have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for reconstructing cryo-electron microscopy images, characterized in that, include: Two-dimensional projection image samples acquired by cryo-electron microscopy are obtained, and prior latent variables are sampled from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules; For each two-dimensional projected image sample, multiple negative latent variable samples corresponding to the two-dimensional projected image sample are obtained by sampling from the current variational posterior distribution through stochastic gradient Langevin dynamics; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule. Based on the prior latent variables and the negative latent variable samples, the discriminator network is optimized; wherein, the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; Based on the negative latent variable samples, the parameters of the encoder network and the decoder network are jointly updated to optimize the 3D structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the 2D projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a 2D projection image.
2. The cryo-electron microscopy image reconstruction method according to claim 1, characterized in that, For each two-dimensional projected image sample, multiple negative latent variable samples corresponding to the two-dimensional projected image sample are obtained by sampling from the current variational posterior distribution using stochastic gradient Langevin dynamics, including: For each two-dimensional projected image sample, multiple latent variable particles are initialized; wherein each of the multiple latent variable particles represents a candidate three-dimensional structural conformation. For each hidden variable particle, the following update operation is performed iteratively: calculate the gradient of the target energy function corresponding to the hidden variable particle, and update the hidden variable particle based on the gradient, the preset step size, and the noise term; The latent variable particles after the iteration are used as negative latent variable samples to characterize the posterior conformational distribution of the biomacromolecules in the cryo-electron microscopy data.
3. The cryo-electron microscopy image reconstruction method according to claim 2, characterized in that, The target energy function consists of at least one of the following: The discriminator network outputs to hidden variable particles; The logarithmic probability of the prior distribution; The distance penalty between the latent variable mean output by the encoder network and the latent variable particles; And the reconstruction loss between the reconstructed projection image generated by the decoder network based on hidden variable particles and the two-dimensional projection image sample.
4. The cryo-electron microscopy image reconstruction method according to claim 1, characterized in that, The optimization of the discriminator network based on the prior latent variables and the negative latent variable samples includes: Maximize the output of the discriminator network for the prior latent variable and minimize the output of the discriminator network for the negative latent variable sample; The discriminator network satisfies a preset Lipschitz constraint to stabilize adversarial training during cryo-electron microscopy image reconstruction.
5. The cryo-electron microscopy image reconstruction method according to claim 1, characterized in that, The joint update of the encoder network and decoder network parameters based on the negative latent variable samples includes: Minimize the first reconstruction error between the first reconstructed projection image and the two-dimensional projection image sample; wherein, the first reconstructed projection image is generated by the decoder network based on the mean of the latent variables output by the encoder network; Minimize the mean distance between the latent variable mean output by the encoder network and the negative latent variable sample; Minimize the second reconstruction error between the second reconstructed projection image and the two-dimensional projection image sample; wherein the second reconstructed projection image is generated by the decoder network based on the negative latent variable sample.
6. The cryo-electron microscopy image reconstruction method according to any one of claims 1-5, characterized in that, The method further includes: With the discriminator network fixed, the variational posterior distribution is obtained by soft maximization optimization of the two-dimensional projected image samples and the entropy regularization utility function constructed by the discriminator network; The entropy regularization utility function includes the output term of the discriminator network and the reconstruction cost term based on the decoder network.
7. The cryo-electron microscopy image reconstruction method according to any one of claims 1-5, characterized in that, The method further includes: In each training round, the discriminator network optimization steps are performed multiple times first, followed by a joint update step of the encoder network and the decoder network. In the optimization step of the discriminator network, the parameters of the encoder network and the decoder network are frozen.
8. A cryo-electron microscopy image reconstruction apparatus, characterized in that, include: The first sampling module is used to acquire two-dimensional projection image samples obtained by cryo-electron microscopy and to sample prior latent variables from a preset prior distribution; wherein, the prior latent variables are used to characterize the three-dimensional structural information of biological macromolecules. The second sampling module is used to sample from the current variational posterior distribution for each two-dimensional projected image sample using stochastic gradient Langevin dynamics to obtain multiple negative latent variable samples corresponding to the two-dimensional projected image sample; wherein, the negative latent variable samples are used to simulate different conformational states of the biomacromolecule. An optimization module is used to optimize the discriminator network based on the prior latent variables and the negative latent variable samples; wherein the discriminator network is used to distinguish between the prior distribution and the variational posterior distribution; The reconstruction module is used to jointly update the parameters of the encoder network and the decoder network based on the negative latent variable samples in order to optimize the three-dimensional structure reconstruction quality of the cryo-electron microscope; wherein, the encoder network is used to map the two-dimensional projection image samples to the latent variable mean, and the decoder network is used to reconstruct the latent variables into a two-dimensional projection image.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the cryo-electron microscopy image reconstruction method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the cryo-electron microscopy image reconstruction method as described in any one of claims 1 to 7.