How Diffusion Models Are Promising Tools for Anomaly Detection in Medical Imaging.

It’s well-known that machine learning models are good at detecting patterns, making decisions, and making other discriminative decisions based on previously learned training data.

But a newer type of machine learning (ML) model is being used to tackle a growing range of use cases. We’re talking about generative models

Generative models differ from discriminative models, which include decision trees, random forests, and logistic regressions. As the name implies, discriminative models discriminate between various data instances and, in most cases, make a relatively simple yes/no decision based on that data

Generative models use more data points to generate net new data from the same training data set. 

So instead of simply spotting the difference between a tree and another object, generative models can figure out more complex relationships. These might include correlations such as “trees will likely appear in scenes of nature” or “Trees are over ten feet tall, while shrubs are smaller.”

Although generative models have plenty of promising applications, they also have a notable downside: They’re the technology behind so-called “deepfake” image and video content.

But what does this have to do with detecting brain tumors? We’ll explain below.

Types of generative models

One of the first types of generative models was the generative adversarial network (GAN). Developed in 2014 by researchers at the University of Montreal, GANs consist of a pair of dueling neural networks – hence the “adversarial” in the name – that fight it out in the name of creating new, synthetic data. 

GANs are exceptionally well-suited for synthetic voice, video, or image generation applications. Although GANs have enjoyed a notable boom period and are particularly well suited for multiple applications, they’ve begun to plateau. That’s largely because they’re often difficult to train, are prone to mode collapse, and often suffer from a lack of output diversity.

Other types of generative models include variational autoencoders (VAE), flow-based models, and autoregressive transformers. The latter, in particular, have shown excellent performance around medical image anomaly detection but suffer from significant inference times and can only be used with one-dimensional (1D) images. 

But one of the most exciting new types of generative models are diffusion models. 

What are diffusion models?

Diffusion models originate from probabilistic likelihood estimation methods. Inspired by the physical diffusion of gas molecules from high-density to low-density areas – similar to the concept of “heat death” – diffusion models collect random noise from input data while steadily removing that noise until a coherent image emerges.

 “The key concept in diffusion modeling is that if we could build a learning model which can learn the systematic decay of information due to noise,” says AI/ML researcher J. Rafid Saddiqui, “then it should be possible to reverse the process and, therefore, recover the information back from the noise.”

 Lilian Weng, a researcher at OpenAI, adds that diffusion models “define a Markov chain of diffusion steps” to add random noise to data, with the models able to then reverse this process to create the desired data sample.   

 Diffusion models – along with other generative models such as VAEs and sequence-to-sequence models – have begun to be employed by IBM’s AI researchers in its open-source Generative Toolkit for Scientific Discovery (GT4SD). The goal is to tackle applications such as materials design and discovery to find new molecules, drugs, and other materials. 

 Diffusion models have proven effective in semi-supervised, fully supervised, and reinforcement learning applications.

How do diffusion models help detect brain tumors?

Although diffusion models aren’t yet used in clinical settings, several recent studies have demonstrated their effectiveness in facilitating unsupervised brain anomaly detection and removing the need for manual labeling of medical images.

  • Pinaya Et al. (2022): Researchers deployed diffusion models on two-dimensional (2D) CT and MRI images of pathological lesions. The experiments showed that diffusion models can achieve “competitive performance” compared to autoregressive models with significantly reduced inference times. According to the researchers, the experiments proved diffusion models are clinically viable.
  • Wolleb Et al. (2022): Researchers presented a new, weakly supervised anomaly detection method underpinned by “denoising” diffusion models and evaluated on the BRATS2020 brain tumor detection dataset and the CheXpert dataset for pleural effusions. The authors state that their method “generates very detailed anomaly maps without the need for a complex training procedure.

Industry experts also see diffusion and other generative AI models as excellent candidates for industrial and robotic product development, next-generation content creation (such as non-fungible tokens, or NFTs), and other diagnostics applications.

Contact us today for a technical discussion with one of CapeStart’s machine-learning experts on how generative AI models of all kinds could help scale your medical or scientific research team.

Contact Us.