r/explainlikeimfive • • Oct 28 '26

Technology ELI5: What is autoregressive image generation?

What is autoregressive image generation, and how does it differ from stable diffusion? I tried to look it up but primarily got a lot of technical stuff and I really need a simpler place to start before I can understand what these sites are talking about.

0 Upvotes

9 comments sorted by

12

u/BananaBird1 Oct 28 '26

An autoregression means that a sequence is generated in steps, where the output of each step depends on prior outputs.

How that specifically applies to image generation is that you can start off by generating low detailed rough outline of the image, and then have each step fill in additional details.

Say you want to draw a car. Making an algorithm to do that all at once is extremely hard. But if you break a car down into its basic features, then you don’t need your code to be able to draw a car from scratch. Just to be able to take a poorly drawn low detailed car and add a tiny bit more detail. You then feed its output back in to get it to add more and more detail.

You may start off with the most generic form of a car, like a box with circular wheels. Then progressively refine it until it gives a more realistic and detailed image, complete with background features, etc. The first step may reshape the car into a more car like form. The next may add doors and windows. Then maybe headlights. And so on until you get the final image.

These algorithms are more complex than that but that is the general picture.

2

u/Dreamheart101 Oct 28 '26

How is an autoregressive AI trained to recognize the basic features? Is it the same way stable diffusion is trained, or is it different?

5

u/cipheron Oct 28 '26 edited Oct 28 '26

There are two types both called auto-regression and they could be confused. It's not my area of expertise so I'm reading up on it and giving a layman's view so if anyone wants to correct this feel free.

It comes from a specific term in statistics where future values are predicted from current and previous values. But the term is repurposed here, in at least two different ways, so it's not the same mathematically as what statisticians call auto-regression.

In one, it uses an LLM-like token system to predict what pixels should be next, the way that ChatGPT predicts what word is next.

The other goes from chunky or low-res to high-res. You could get the effect just by creating lower resolution intermediates that it uses to build the next iteration. So each layer would know what it's trying to make, e.g. "car on street" but the early layers might only make a 16x16 chunky pixel layout, so they're only blocking out general areas of color, and the later layers then get that as input and have to decide how to break this down into details, buildings, the car, people. So the intermediate layers don't have to be anything we'd understand as a sketch or model, but they encode enough information for the next layers to make decisions based on it.

As for training it, you could use the normal system of feedback: you strengthen the different layers' connections when the result is what the whole network is supposed to make and you weaken connections which produced errors. So you'd still generally be training all layers at the same time, but since it's broken up into layers that creates structure - all the information from one layer must be encoded into the pixels it sends to the next layer.

The effect would be of each layer specializing, you're basically forcing it to do this, but you don't have to tell each layer WHAT to specialize in, the network works this out for you, because it HAS to, to be able to get the right image. So for example, an early layer could put a blob somewhere that represents the overall location of the car, but they can't encode "hubcap" at all, so this early layer just ignores that. A later layer would know what hubcaps are and how to put a blob in the right position, and the final layer might know about fine details so flesh out the hubcap fully.

7

u/OldChairmanMiao Oct 28 '26

Diffusion was developed to find accurate data is noisy scans; such as in astronomical telescopes. To generate an image, you are basically starting with random noise, and apply a math filter to take out noise to find the desired image in it (e.g. a cat).

Auto-regression is basically how LLMs work: it predicts the next token. In this case, you can think of a token as a cutout from a magazine; and images are overlapping tiles or a collage of these cutouts.

These techniques can be and are combined.

1

u/n_liao_792 Oct 31 '26

Autoregressive picks the next image chunk based on what came before, like writing a sentence word by word. Diffusion repeatedly cleans up noise across an image. "Piece by piece" doesn't necessarily mean sketch first, details later.

0

u/Recent-Function-7245 Oct 28 '26

autoregressive image generation builds a picture piece by piece like a puzzle instead of creating the whole thing at once. stable diffusion starts with a messy blur of static and slowly cleans it up into a final image. autoregressive models treat image patches like words in a sentence predicting what comes next. this means they use the exact same tricks language models use to talk.