Skip to main content
Korean Journal of Radiology logoLink to Korean Journal of Radiology
editorial
. 2025 Apr 29;26(6):616–619. doi: 10.3348/kjr.2025.0073

Uncover This Tech Term: Variational Autoencoders

Advait Teli 1,
PMCID: PMC12123074  PMID: 40341889

INTRODUCTION

Rapid advancements in biomedical technologies have led to a surge in the generation of biomedical research data. Fields such as genomics, transcriptomics, proteomics, and medical imaging now produce vast datasets with complex interrelationships between variables. Analyzing and interpreting such high-dimensional data requires sophisticated computational tools. While traditional methods have been employed, variational autoencoders (VAEs), introduced by Kingma & Welling in 2013 [1], offer a powerful and versatile framework for the probabilistic modeling of data distributions.

Unlike deterministic autoencoders, VAEs learn a probability distribution over the latent space, enabling the generation of new, realistic data samples [2]. This generative capability opens up a wide range of applications in biomedical research, including the simulation of disease states, the generation of synthetic training data for machine learning models, and the discovery of novel drug candidates. By learning the underlying probability distribution of the data, VAEs help capture complex nonlinear relationships and quantify uncertainty. Although this unsupervised framework inherently provides dimensionality reduction [3], VAEs extend beyond this basic function to offer a comprehensive approach for understanding and manipulating data in a probabilistic manner.

Principles Explained Through Image Data

A VAE consists of two neural networks: an encoder q(z|x) and a decoder p(x|z). The encoder processes medical images, such as magnetic resonance imaging (MRI) or computed tomography (CT) scans (x), and maps them to a latent space (z). Rather than producing a single compressed representation, the encoder captures the inherent variations and uncertainties in medical images by representing them as a probability distribution. This distribution—typically modeled as a standard normal distribution with mean µ(x) and variance σ2(x)—reflects the range of plausible image interpretations. By modeling z as a distribution, VAEs are capable of generating new realistic medical images while accounting for data uncertainty. The decoder then maps samples from the latent space z back to the original data space, generating a reconstructed image x′ (Fig. 1).

Fig. 1. Illustration of the VAE process. An input image is processed by the encoder, which maps it to a latent space distribution characterized by mean and variance. The latent space acts as a bottleneck, forcing the model to learn a compressed representation. Subsequently, samples drawn from this latent distribution are passed to the decoder, which reconstructs the input image. This process allows the VAE to learn a probabilistic representation of the data, enabling image generation and other applications. VAE = variational autoencoder.

Fig. 1

The VAE is trained to maximize the Evidence Lower Bound (ELBO) [4]. The marginal likelihood p(x), which represents the true data distribution, is often difficult to compute directly. Therefore, the ELBO, a lower bound on p(x), is maximized as a practical surrogate for optimizing the VAE [4]. The maximization process involves the following:

• Reconstruction loss: this measures the difference between the input x and the reconstructed output x′, ensuring that the decoder can accurately reconstruct the data from the latent representation (e.g., mean squared error for continuous data and cross-entropy for discrete data).

• Latent space organization: this is measured by the Kullback–Leibler divergence, which quantifies the difference between the learned latent distribution q(z|x) and a prior distribution p(z), typically a standard normal distribution. This term acts as a regularizer, encouraging the latent space to exhibit desirable properties such as continuity and completeness [4].

By maximizing the ELBO, the VAE learns to construct a latent space that captures essential information from the images and enables the generation of new, realistic samples. This probabilistic framework is particularly valuable in radiology, where variations in patient anatomy and image quality are common. The VAE learns to identify underlying patterns in medical images, supporting tasks such as noise reduction, anomaly detection, and synthetic data generation [4]. The VAE's training, aided by the reparameterization trick, enables robust learning of medical image data through efficient gradient-based optimization of the encoder [5].

Advantages and Limitations of VAEs in Medical Imaging

VAEs offer several advantages in medical image analysis. Their probabilistic framework enables the quantification of the uncertainty inherent in medical data—a crucial factor in clinical applications, where confidence in results is essential. Furthermore, the structured latent space learned by VAEs effectively captures the complex, nonlinear variations present in medical images, facilitating tasks such as disease progression modeling and image segmentation. The ability to generate synthetic data is another key advantage, particularly when addressing rare conditions or working with limited datasets, as it can significantly enhance the training of deep learning models. However, VAEs also present certain limitations. A notable challenge is the tendency to produce blurry image reconstructions. Bredell et al. [6] addressed this problem by proposing a frequency-based approach to correct the blurriest regions of an image.

Applications in Radiology

Noise Reduction in MRI

VAEs can effectively learn the underlying structures of MRI images, enabling noise e removal while preserving critical anatomical details. This leads to improved image clarity and diagnostic accuracy. Aetesam & Maji [7] developed a deep-learning model that estimates noise levels directly from background regions, eliminating the need for separate noise estimation networks. This method effectively enhances diagnostic accuracy and efficiency.

Artifact Correction

VAEs can be trained to identify and correct artifacts in medical images, such as motion artifacts in MRI scans [8]. This results in improved image quality and reduces the need for repeated scans, thereby minimizing patient discomfort and radiation exposure.

Low-Dose CT Image Enhancement

VAEs can significantly improve the quality of low-dose CT images while reducing radiation exposure in patients [9]. This application is particularly crucial for pediatric and other radiation-sensitive populations, where minimizing radiation exposure is a clinical priority.

Synthetic Data Generation for Model Training

VAEs can be employed to generate synthetic radiologic images, such as chest X-rays, to augment datasets used for training deep learning models for detecting pneumonia, pleural effusions, and breast cancer [10]. In particular, VAEs are well suited for generating synthetic medical image data for rare diseases or conditions with limited data availability. This enables researchers to develop and train deep-learning models that would otherwise be infeasible due to data scarcity [11].

Prediction of Disease Progression

VAEs can model the progression of neurodegenerative diseases, such as Alzheimer's disease, by analyzing longitudinal medical imaging data [12,13]. They can also be used to assess tumor growth patterns and predict treatment responses, thereby supporting the development of personalized treatment strategies.

Comparison With Other Generative Models

Generative models provide diverse capabilities in medical image analysis (Table 1). Conventional autoencoders are effective for feature extraction but struggle to generate realistic images. Generative adversarial networks (GANs) produce highly realistic outputs useful for tasks such as modality translation; however, they are difficult to train, prone to artifacts, and susceptible to mode collapse [14]. Diffusion models achieve exceptional image quality and are well-suited for super-resolution applications but require substantial computational resources [15]. Radiologists must carefully weigh these tradeoffs to select the model best aligned with their specific clinical objectives.

Table 1. Comparison of key features and characteristics of generative models for medical image analysis.

Feature Conventional AEs VAEs GANs Diffusion models
Training objective Minimize reconstruction error Maximize ELBO (reconstruction + KL divergence) Adversarial training (generator vs. discriminator) Reverse a noise process
Latent space Deterministic vector Probabilistic distribution Implicit; not directly learned Not explicitly learned, but related to noise process
Image quality Can be blurry/smooth Good (improving) Excellent (but potential for artifacts) Excellent
Training stability Stable Relatively stable Often unstable, prone to mode collapse Stable
Computational cost Low Moderate Moderate to high High
Data requirements Moderate Moderate Large Moderate
Uncertainty estimation No Yes No Emerging methods

AE = autoencoder, VAE = variational autoencoder, GAN = generative adversarial network, ELBO = evidence lower bound, KL = Kullback–Leibler divergence

Ongoing Research

• The Deep Perceptual Autoencoder (DPA) is a novel approach for anomaly detection in medical images. It leverages an autoencoder trained exclusively with perceptual loss, prioritizing content dissimilarity over pixel-perfect reconstruction. By progressively growing the network and employing a weakly supervised hyperparameter tuning strategy, the DPA simplifies the training process and improves anomaly detection performance compared to traditional methods, particularly those utilizing GANs. This approach enables a more robust and flexible model to effectively capture the essential features of normal data [16].

• Sparse autoencoders learn efficient data representations by enforcing then activation of only a limited number of hidden neurons at a time. This sparsity constraint promotes the discovery of key features, improves generalization, and reduces noise, making them particularly useful for tasks such as feature extraction and anomaly detection [17,18].

• Combining VAEs and GANs aims to leverage the advantages of both models. VAEs offer a stable latent space for controlled generation, while GANs enhance the realism and fine detail of the generated samples. This hybrid approach enables the creation of diverse and high-quality data and is especially valuable in applications such as image synthesis, medical imaging, and data augmentation [19,20,21].

CONCLUSION

VAEs have emerged as powerful tools in biomedical research, particularly in medical imaging. Their probabilistic framework supports the generation of realistic synthetic data, robust noise and artifact correction, and the modeling of complex disease progression. VAEs offer a significant advantage over traditional deterministic methods by learning a latent space that captures underlying data distributions. While challenges, such as image blurring remain, ongoing research—including advancements in perceptual loss autoencoders, sparse autoencoders, and hybrid VAE–GAN models—continues to enhance their capabilities. Radiologists and researchers must carefully evaluate the tradeoffs between VAEs and other generative models, such as GANs and diffusion models, to determine the most suitable approach for specific clinical applications. Ultimately, VAEs hold significant potential to improve diagnostic accuracy, personalize treatment strategies, and accelerate the development of novel biomedical interventions.

Footnotes

Conflicts of Interest: The authors have no potential conflicts of interest to disclose.

Funding Statement: None

References

  • 1.Kingma DP, Welling M. Auto-encoding variational bayes. [accessed on March 14, 2025];arXiv [Preprint] 2013 doi: 10.48550/arXiv.1312.6114. Available at: [DOI] [Google Scholar]
  • 2.Pinheiro Cinelli L, Araújo Marins M, Barros da Silva EA, Lima Netto S. In: Variational methods for machine learning with applications to deep networks. Cinelli LP, Marins MA, Da Silva EAB, Netto SL, editors. Cham: Springer; 2021. Variational autoencoder; pp. 111–149. [Google Scholar]
  • 3.Mahmud MS, Huang JZ, Fu X. Variational autoencoder-based dimensionality reduction for high-dimensional small-sample data classification. Int J Comput Intell Appl. 2020;19:2050002 [Google Scholar]
  • 4.Odaibo S. Tutorial: deriving the standard variational autoencoder (VAE) loss function. [accessed on March 14, 2025];arXiv [Preprint] 2019 doi: 10.48550/arXiv.1907.08956. Available at: [DOI] [Google Scholar]
  • 5.Xu M, Quiroz M, Kohn R, Sisson SA. Variance reduction properties of the reparameterization trick. [accessed on March 14, 2025]. Available at: https://proceedings.mlr.press/v89/xu19a.html.
  • 6.Bredell G, Flouris K, Chaitanya K, Erdil E, Konukoglu E. Explicitly minimizing the blur error of variational autoencoders. [accessed on March 14, 2025];arXiv [Preprint] 2023 doi: 10.48550/arXiv.2304.05939. Available at: [DOI] [Google Scholar]
  • 7.Aetesam H, Maji SK. Deep variational magnetic resonance image denoising via network conditioning. Biomed Signal Process Control. 2024;95:106452 [Google Scholar]
  • 8.Chang Y, Li Z, Saju G, Mao H, Liu T. Deep learning-based rigid motion correction for magnetic resonance imaging: a survey. Meta Radiol. 2023;1:100001 [Google Scholar]
  • 9.Wei R, Mahmood A. Recent advances in variational autoencoders with representation learning for biomedical informatics: a survey. IEEE Access. 2021;9:4939–4956. [Google Scholar]
  • 10.Tschuchnig ME, Gadermayr M. In: Data science – analytics and applications. Haber P, Lampoltshammer TJ, Leopold H, Mayr M, editors. Wiesbaden: Springer Vieweg; 2021. Anomaly detection in medical imaging - a mini review; pp. 33–38. [Google Scholar]
  • 11.Rais K, Amroune M, Benmachiche A, Haouam MY. Exploring variational autoencoders for medical image generation: a comprehensive study. [accessed on March 14, 2025];arXiv [Preprint] 2024 doi: 10.48550/arXiv.2411.07348. Available at: [DOI] [Google Scholar]
  • 12.Basu S, Wagstyl K, Zandifar A, Collins L, Romero A, Precup D. In: Medical image computing and computer assisted intervention – MICCAI 2019. Shen D, Liu T, Peters TM, Staib LH, Essert C, Zhou S, et al., editors. Cham: Springer; 2019. Early prediction of Alzheimer’s disease rogression using variational autoencoders; pp. 205–213. [Google Scholar]
  • 13.Martí-Juan G, Lorenzi M, Piella G. MC-RVAE: multi-channel recurrent variational autoencoder for multimodal Alzheimer’s disease progression modelling. Neuroimage. 2023;268:119892. doi: 10.1016/j.neuroimage.2023.119892. [DOI] [PubMed] [Google Scholar]
  • 14.Ahmed HS. Uncover this tech term: generative adversarial networks. Korean J Radiol. 2024;25:493–498. doi: 10.3348/kjr.2023.1306. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Yang L, Zhang Z, Song Y, Hong S, Xu R, Zhao Y, et al. Diffusion models: a comprehensive survey of methods and applications. ACM Comput Surv. 2023;56:1–39. [Google Scholar]
  • 16.Shvetsova N, Bakker B, Fedulova I, Schulz H, Dylov DV. Anomaly detection in medical imaging with deep perceptual autoencoders. IEEE Access. 2021;9:118571–118583. [Google Scholar]
  • 17.Yousefi B, Akbari H, Hershman M, Kawakita S, Fernandes HC, Ibarra-Castanedo C, et al. SPAER: sparse deep convolutional autoencoder model to extract low dimensional imaging biomarkers for early detection of breast cancer using dynamic thermography. Appl Sci. 2021;11:3248 [Google Scholar]
  • 18.Freiman M, Manjeshwar R, Goshen L. Unsupervised abnormality detection through mixed structure regularization (MSR) in deep sparse autoencoders. Med Phys. 2019;46:2223–2231. doi: 10.1002/mp.13464. [DOI] [PubMed] [Google Scholar]
  • 19.Cackowski S, Barbier EL, Dojat M, Christen T. ImUnity: a generalizable VAE-GAN solution for multicenter MR image harmonization. Med Image Anal. 2023;88:102799. doi: 10.1016/j.media.2023.102799. [DOI] [PubMed] [Google Scholar]
  • 20.Mostapha M, Prieto J, Murphy V, Girault J, Foster M, Rumple A. In: Medical image computing and computer assisted intervention – MICCAI 2019. Shen D, Liu T, Peters TM, Staib LH, Essert C, Zhou S, editors. Cham: Springer; 2019. Semi-supervised VAE-GAN for out-of-sample detection applied to MRI quality control; pp. 127–136. [Google Scholar]
  • 21.Liu X, Xing F, Prince JL, Carass A, Stone M, Fakhri GE, et al. Dual-cycle constrained bijective vae-gan for tagged-to-cine magnetic resonance image synthesis. Proc IEEE Int Symp Biomed Imaging. 2021;2021:1448–1452. doi: 10.1109/isbi48211.2021.9433852. [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from Korean Journal of Radiology are provided here courtesy of Korean Society of Radiology

RESOURCES