Diffusion Algorithms in AI

Sujatha Ratnala
2 min readMay 16, 2024

Some Intuition

In today’s world of AI powered Image Generation and DallE et al, the behind-the-scenes algorithm of ‘Diffusion’.

I was learning about Diffusion Algorithm from a chatbot and trying to get a feel. How is it different from what existed? How does it work?

JPEG and Imaging filters of yesteryears ruled the world. By “exploiting” and leveraging predictable recipes of image processing, the output was generated, but not very creative.

Diffusion algorithms on the other hand have “exploration” and “exploitation” in its “creative” journey.

Think of master sculptors crafting stunning images with ease! They leverage prior knowledge from large datasets and pre-trained models, just like a sculptor draws experience and observation of various sculptures, textures, strokes, and patterns.

The “diffusion” process is an exploration-exploitation journey, where the algorithm iteratively refines and updates the image.

It starts with a rough outline, like a coarsely sculpted marble block, and then pours in a “dye of noise” to explore the created contours and refine the shape. This “dye” is like a radar or bat’s means of sensing the image’s patterns and relationships, even in the absence of visual cues!

As the algorithm refines the image, it creates multiple checkpoints, each representing a stage of refinement. At each checkpoint, it exploits the knowledge gained from previous checkpoints, and prior training data to add finer details and refine the image. It’s like a sculptor chiseling away, revealing the hidden beauty within the marble!

Through this iterative process, diffusion algorithms generate stunning images, edit existing ones, and even create new textures and patterns.

Possibly I’m hallucinating a bit as I have not worked hands on. Will edit it as and when I understand.

Microsoft DallE

--

--

Sujatha Ratnala

I write.. I weave.. I walk.. कवयामि.. वयामि.. यामि.. Musings on Patterns, Science, Linguistics, Sanskrit et al..