M6 · Software DevelopmentM6-0123 min read
Lesson 41 of 51 · Module 7 of 7 · Week 6
Threads:The generative pipeline threadThe compute-efficiency thread
U-Net Architecture: Encoder-Decoder Structure and Skip Connections Explained
A U-Net is a convolutional encoder-decoder network shaped like the letter U, where the encoder (contracting path) downsamples an input into hierarchical features and the decoder (expanding path) upsamples back to full resolution — and skip connections that carry encoder features straight across to their matching decoder layers are what actually preserve fine spatial detail, because a plain encoder-decoder with no skip connections still runs end to end and still produces an output, it just produces a blurrier one.
By the end you can
- 01Name the two halves of a U-Net — the contracting encoder and the expanding decoder — and state what each one does to the input's spatial resolution.
- 02Explain what a skip connection carries across the architecture and why removing it degrades output quality without breaking the network.
- 03Distinguish a U-Net from a plain encoder-decoder and from a residual connection, two architectures it is commonly confused with.
- 04Recognize a U-Net described as an autoencoder or as a diffusion denoising backbone, ahead of this module's next two lessons.
What a U-Net is: the encoder-decoder identity statement
Identity statement: a U-Net is a convolutional neural network shaped like the letter U — an encoder (contracting path) that progressively downsamples an input while extracting increasingly abstract features, connected to a decoder (expanding path) that progressively upsamples those features back to the input's original spatial resolution, with skip connections linking each encoder stage to the decoder stage at the matching resolution.
When it matters: any time a scenario describes pixel-wise image output — segmentation, reconstruction, or the noise-prediction step inside a diffusion model — rather than a single label or class score.
Two structural halves, and the shape between them, are the whole architecture:
| Path | Direction | What happens | What it's good at |
|---|---|---|---|
| Encoder (contracting path) | Full resolution → compressed bottleneck | Convolutions plus downsampling (pooling or strided convolution) repeatedly halve spatial resolution while increasing the number of feature channels | Building an increasingly abstract, increasingly global summary of the input |
| Bottleneck | The narrowest point | The lowest-resolution, most compressed representation the network produces | Capturing global context — "what is roughly in this image," not "where exactly" |
| Decoder (expanding path) | Compressed bottleneck → full resolution | Upsampling (transposed convolution or interpolation) plus convolutions repeatedly double spatial resolution back toward the original size | Turning a compressed summary back into a full-resolution, pixel-wise output |
| Skip connections | Encoder stage → matching decoder stage, bypassing the bottleneck | Feature maps computed early in the encoder are concatenated (or added) directly into the decoder stage at the same resolution | Restoring fine spatial detail the bottleneck alone cannot reconstruct |
Read the table left to right and the "U" shape becomes literal: resolution goes down the left side of the U, bottoms out at the bottleneck, and comes back up the right side. Skip connections are the horizontal rungs connecting the two sides at each resolution level, which is exactly why architecture diagrams for this network are drawn as a U with cross-bars rather than as a straight line.
Why the output is pixel-wise, not a single label
A U-Net's decoder ends at the same spatial resolution the encoder started at, producing one output value (or vector of values) per input pixel — a full image, a per-pixel segmentation mask, or a per-pixel noise estimate, depending on the task. This is a structurally different goal from a classifier, whose network narrows down to a single vector of class scores and never expands back out. A U-Net is built specifically for tasks where the answer has to be exactly as large and exactly as spatially precise as the input, not compressed into a handful of numbers.
Skip connections: what they carry and why removing them degrades quality
L1 — Intuition
Picture the encoder as someone reading a detailed photograph and writing an increasingly compressed summary of it: first a paragraph, then a sentence, then a single word capturing the gist. The decoder's job is to reconstruct a detailed photograph starting from just that one word. Working from the word alone, the decoder can plausibly reconstruct roughly what kind of photograph it was — a beach scene, a portrait, a cityscape — but it has no way to recover exactly where the sharp edges were, exactly which pixel a boundary fell on, or exactly what fine texture looked like. Skip connections are the fix: hand the decoder not just the one-word summary but also the original paragraph, and the sentence, at each stage where it is reconstructing at that same level of detail. The decoder no longer has to invent fine detail from a compressed memory; it can copy detail directly from a version of the input that still had it.
L2 — Mechanism
Mechanically, a skip connection takes the feature map produced by an encoder stage — before that stage's output is downsampled further — and routes a copy of it directly to the decoder stage operating at the matching spatial resolution, later in the network. The most common implementation concatenates the skipped encoder features with the decoder's own upsampled features along the channel dimension, so the decoder's next convolution sees both signals side by side and learns how to combine them; some U-Net variants instead add the two feature maps element-wise, the same operation a residual connection uses, though the surrounding architecture and the reason it exists — carrying spatial detail across the bottleneck, not easing gradient flow in a deep stack — are different. Because a skip connection is typically a spatial concatenation (or add) rather than a set of newly trained parameters, it is largely free in terms of extra weights, and it exists because the bottleneck's compression is lossy by design — that lossiness is what makes the bottleneck a useful global-context summary in the first place, and skip connections are how the architecture pays back the specific kind of loss (spatial precision) that global summarization causes.
L3 — The exam-relevant edge case: it still runs without them
The single most tested subtlety about skip connections is what happens if you remove them: the network does not break, error out, or fail to produce an output. A plain encoder-decoder with no skip connections is architecturally valid and trains and runs end to end — it is simply a worse encoder-decoder for pixel-precise tasks, because the decoder is now forced to reconstruct every detail from the bottleneck's compressed representation alone. [GROUND TRUTH] (Sources/nca-genm/domain-6-software-development.md) states this directly: skip connections carry fine spatial detail from encoder layers to matching decoder layers, and removing them degrades output quality. "Degrades" is the precise word the exam wants — not "prevents," not "breaks," but a measurable drop in output sharpness and spatial precision, most visible at object boundaries and fine textures where the bottleneck's compression lost the most information. A scenario that describes a "blurry" or "spatially imprecise" output from an otherwise-functioning encoder-decoder network is describing exactly this failure mode, and the fix it is pointing you toward is adding (or restoring) skip connections, not redesigning the encoder or decoder halves.
⭐ THE EARNED INSIGHT A U-Net without skip connections is not a broken U-Net — it is a working, ordinary encoder-decoder, and the entire reason the U-Net variant exists is that "working" and "spatially precise" are not the same property. Skip connections are the one part of the architecture whose sole job is closing that specific gap, which is exactly why an exam question about spatial detail loss is really a question about whether skip connections are present.
U-Net versus a plain encoder-decoder versus a residual connection
Three architectures share enough vocabulary that a scenario question can blur them together on purpose. Distinguishing them cleanly is worth doing once, explicitly, rather than relying on the word "connection" to sort itself out.
| U-Net | Plain encoder-decoder | Residual (skip) connection alone | |
|---|---|---|---|
| Shape | Encoder + decoder + cross-connections at every matching resolution | Encoder + decoder, bottleneck only, no cross-connections | A single layer's input added to its own output, y = F(x) + x |
| What crosses the bottleneck | Full multi-resolution feature maps, at every stage | Nothing — only the compressed bottleneck representation reaches the decoder | Nothing spatial — this is a within-layer identity path, not an encoder-to-decoder bridge |
| Primary purpose | Preserve fine spatial detail for a pixel-wise output | Compress input to a global summary, then reconstruct or transform from that summary alone | Ease gradient flow through very deep stacks, mitigating vanishing gradients |
| Output resolution | Matches input resolution, pixel-wise | Matches input resolution, but with less spatial precision without skip connections | Not architecture-specific — used inside encoders, decoders, transformers, and U-Nets alike |
| Typical use | Image segmentation, image reconstruction, diffusion denoising | Any encoder-decoder task where global summarization is the entire point (e.g., some autoencoders) | Any sufficiently deep network, including inside a U-Net's own encoder or decoder blocks |
| Common confusion | Assumed to be "just" a deeper encoder-decoder | Assumed to already have skip connections because it "looks like" a U-Net diagram | Assumed to be the same mechanism as a U-Net's skip connection because both are called "skip connections" |
The last row is worth calling out directly, because NVIDIA's own materials use "skip connection" for both the ResNet-style within-layer identity add and the U-Net-style encoder-to-decoder bridge, and an exam question can lean on that shared name. [GROUND TRUTH] (Sources/nca-genm/domain-1-core-ml-ai.md) describes the ResNet residual connection as adding "a layer's input to its output" to mitigate vanishing gradients, and separately notes that "skip links carry fine spatial detail from encoder to decoder" inside the U-Net — two different jobs, sharing the word "skip," attached to two different structural locations in a network. A U-Net can (and typically does) use both: residual connections inside its encoder and decoder blocks for trainability at depth, and encoder-to-decoder skip connections for spatial detail. Neither one is a substitute for the other.
Worked example: tracing a single image through a small U-Net
Treat the following as a constructed scenario with illustrative dimensions, not measurements from a specific trained model, meant to make the resolution arithmetic concrete.
Input image: 256 x 256 pixels, 3 channels (RGB)
ENCODER (contracting path):
Stage E1: conv block -> 256x256, 64 channels [skip S1 saved here]
downsample (stride-2 or pool) -> 128x128, 64 channels
Stage E2: conv block -> 128x128, 128 channels [skip S2 saved here]
downsample -> 64x64, 128 channels
Stage E3: conv block -> 64x64, 256 channels [skip S3 saved here]
downsample -> 32x32, 256 channels
BOTTLENECK:
conv block -> 32x32, 512 channels (most compressed, most abstract representation)
DECODER (expanding path):
Stage D3: upsample -> 64x64, 256 channels
concatenate with S3 (64x64, 256 channels) -> 64x64, 512 channels
conv block -> 64x64, 256 channels
Stage D2: upsample -> 128x128, 128 channels
concatenate with S2 (128x128, 128 channels) -> 128x128, 256 channels
conv block -> 128x128, 128 channels
Stage D1: upsample -> 256x256, 64 channels
concatenate with S1 (256x256, 64 channels) -> 256x256, 128 channels
conv block -> 256x256, 64 channels
Output layer: 256x256, target channels (e.g., 3 for an RGB reconstruction, 1 for a noise
estimate, or however many classes for a segmentation mask)
Follow the resolution column down the encoder and back up the decoder and the "U" is exactly this: 256 → 128 → 64 → 32 at the bottleneck, then 32 → 64 → 128 → 256 climbing back out, with S1, S2, and S3 each crossing directly from their encoder stage into the decoder stage running at the identical resolution. Delete the three concatenation steps and the decoder still runs — D3, D2, and D1 would simply upsample and convolve using only what survived into the 512-channel bottleneck, producing a plausible but less spatially precise 256x256 output. That is the concrete shape of "the network still runs, output quality degrades" from section 2 made literal in this diagram: nothing about the forward pass breaks when you remove the concatenation, the arithmetic just has strictly less spatial information available to it at each decoder stage.
Worked example: what a missing skip connection costs, in one comparison
Extend the same constructed scenario to make the consequence of a missing skip connection concrete rather than abstract, still illustrative rather than measured.
Task: reconstruct a photograph containing a thin object (e.g., a wire fence) against
a plain background.
WITH skip connections:
- Stage E1 (256x256, before downsampling) captures the fence's exact pixel
boundaries at full resolution.
- That feature map is concatenated directly into Stage D1, which also operates
at 256x256 — the fence's boundary information never had to survive compression
down to 32x32 and back.
- Output: fence edges reconstructed sharply, close to the original.
WITHOUT skip connections:
- The fence's fine boundary detail must survive encoding all the way down to the
32x32, 512-channel bottleneck, then be reconstructed by the decoder using only
that compressed representation.
- A single-pixel-wide fence is exactly the kind of fine, high-frequency detail a
32x32 bottleneck (an 8x reduction in each spatial dimension from the original)
is least equipped to preserve.
- Output: fence edges present but blurred, sometimes broken or partially merged
with the background — the decoder is inferring roughly where a thin object
was, not copying its exact boundary.
This is the shape of "degrades output quality" the source material names, applied to a case — thin, high-frequency structure — chosen specifically because it is where the cost of losing skip connections shows up most visibly. A scenario question that describes blurry or missing fine detail in an otherwise functioning generative or reconstruction network is pointing at exactly this comparison.
Common misconceptions about U-Net architecture
| Misconception | What it gets wrong | Correct framing |
|---|---|---|
| "A U-Net is just a deep encoder-decoder." | Ignores skip connections entirely, which is the feature that distinguishes it | A U-Net is specifically an encoder-decoder plus skip connections at every matching resolution level |
| "Removing skip connections breaks the network." | Confuses "runs" with "runs well" | The network still executes end to end; only spatial precision in the output degrades |
| "Skip connections and residual connections are the same mechanism." | Both are called "skip connections" in casual usage, but they solve different problems in different locations | Residual connections ease gradient flow within a deep stack; U-Net skip connections carry spatial detail across the bottleneck between encoder and decoder |
| "The bottleneck is a design flaw to be minimized." | Treats compression as pure loss | The bottleneck's compression is what produces a useful global-context summary; skip connections exist specifically to compensate for the detail that summary discards, not to eliminate the need for it |
| "A U-Net only works for image segmentation." | Undersells the architecture's generality | The same encoder-decoder-plus-skip-connections shape underlies image reconstruction, autoencoding, and diffusion denoising, covered in the next lesson |
| "More downsampling stages always improve results." | Ignores the tradeoff | More stages capture more global context but put more spatial detail at risk of being lost if skip connections at each stage are not also present |
Why U-Net architecture is on the NCA-GENM exam
Software Development carries 15% of the NCA-GENM exam, and objective 6.4 names the U-Net directly: build a U-Net to generate images from pure noise and as a type of autoencoder. [GROUND TRUTH] (Sources/nca-genm/domain-6-software-development.md) frames the whole domain around building multimodal generative systems, with U-Nets named first among the architectures you are expected to recognize. This lesson stays at the foundational altitude the domain's own scope note sets: understand the architecture and how its pieces fit together, not derive the convolution mathematics or design a production segmentation network from scratch.
The question tends to arrive in a small number of recognizable shapes.
- Structure-identification items. "What are the two main components of a U-Net?" The keyed answer names the encoder (contracting path) and decoder (expanding path); distractors offer components from unrelated architectures — a discriminator, an attention head, a tokenizer.
- Skip-connection consequence items. "What happens if skip connections are removed from a U-Net?" The keyed answer is degraded output quality (loss of fine spatial detail); the classic wrong answer claims the network fails to run or produces no output at all.
- Terminology-precision items. A question describes a residual connection inside a deep stack and asks whether it is "the same as" a U-Net's skip connection. The keyed answer distinguishes the two by location and purpose.
- Purpose-of-component items. "What does the bottleneck of a U-Net represent?" The keyed answer names the most compressed, most abstract feature representation; distractors offer "the final output" or "the input layer," confusing bottleneck with either endpoint.
What the distractors typically look like
The reliable distractor families here are: claiming skip connections are optional for correctness rather than for quality (borrowing the "network still runs" fact and drawing the wrong conclusion from it); conflating U-Net skip connections with ResNet-style residual connections because both share the word "skip"; and describing the encoder or decoder in isolation as if either half alone constituted "the U-Net," when the architecture's identity depends on both halves plus the cross-connections between them.
How many encoder-decoder stages does a U-Net need?
There is no single fixed number of stages this exam expects you to recall, and treating "four stages" or "five stages" as a memorizable fact would be manufacturing a specificity the source material does not assert — the number of downsampling/upsampling stages is a design choice traded against the input resolution and the task, not a defined property of "a U-Net" in general. What is worth reasoning about instead is the shape of the tradeoff, because a scenario question is more likely to describe the tradeoff than to ask for a specific stage count.
| Design choice | What increasing it buys | What increasing it costs |
|---|---|---|
| More encoder-decoder stages (deeper U) | A more compressed, more global bottleneck summary; the network can capture larger-scale patterns relative to the input | More resolution levels for spatial detail to be lost at if a skip connection at that level is missing or weak; more compute and memory per forward pass |
| Wider feature channels at each stage | More capacity to represent distinct features at a given resolution | More parameters and memory, without changing how many resolution levels exist |
| More skip connections (one per stage vs. only at the bottleneck) | Progressively better preservation of detail at every resolution level, not just the coarsest one | Slightly more memory to hold each stage's feature map until the matching decoder stage consumes it |
The practical reading for exam purposes: a U-Net is not "more stages is always better" or "fewer stages is always better." A task dominated by fine, high-frequency detail (segmenting thin structures, denoising an image at full resolution) benefits from skip connections at every resolution level, because losing any one level's detail shows up in the output. A task where only a coarse, global judgment matters would tolerate fewer skip connections or a shallower network more gracefully — but that is precisely the kind of task a U-Net's own strength (pixel-wise precision) is not usually built for in the first place, which is part of why U-Nets standardly ship with a skip connection at every level rather than a partial set.
Why does a U-Net use convolutions instead of fully-connected layers throughout?
A U-Net is built from convolutional layers, not fully-connected ones, because the task is inherently spatial: [GROUND TRUTH] (Sources/nca-genm/domain-1-core-ml-ai.md) describes convolutions as sliding learnable filters over grid-like data to extract local, translation-invariant features, and calls convolutions a key building block inside U-Nets specifically. A fully-connected layer treats every input position as an independent, unrelated number, discarding the fact that a pixel's meaning depends heavily on its neighbors — an edge, a texture, or an object boundary is defined by local spatial relationships, not by an arbitrary flattened vector of pixel values. Convolutions preserve that local structure at every stage of the encoder and decoder, and because the same filter slides across the whole image, a feature the network learns to detect (an edge, a corner, a particular texture) is recognized wherever it appears in the frame — translation invariance — rather than only in one fixed location. This is also why downsampling and upsampling, not flattening, are the operations U-Net stages use to change resolution: they change how coarsely space is represented, without ever discarding the fact that the representation is spatial.
Does a U-Net need skip connections to function at all?
No — a U-Net-shaped encoder-decoder without skip connections still trains and still produces a full-resolution output; what it loses is fine spatial detail, because the decoder is then forced to reconstruct everything from the compressed bottleneck representation alone. This is the single most tested fact about skip connections on this exam: the failure mode is degraded quality, specifically blurred or imprecise fine detail such as sharp edges and thin structures, not a broken or non-functional network. Any answer choice claiming the network "cannot run" or "produces no output" without skip connections is describing a different, more catastrophic failure than what actually happens.
What is the difference between a U-Net's bottleneck and its skip connections?
The bottleneck is the single narrowest point in the network — the most spatially compressed, most abstract feature representation, sitting between the end of the encoder and the start of the decoder — and it is where the network's global-context summary lives. Skip connections are a separate mechanism entirely: direct pathways that carry feature maps from each encoder stage to the matching decoder stage, bypassing the bottleneck rather than passing through it. The bottleneck answers "what is this image roughly about"; skip connections answer "where exactly did the fine detail go," and a U-Net needs both working together — one for global context, the other for spatial precision — to produce a sharp, accurate output.
Glossary recap: U-Net terms this lesson introduced
| Term | One-line definition |
|---|---|
| U-Net | A convolutional encoder-decoder network with skip connections linking each encoder stage to its matching decoder stage |
| Encoder (contracting path) | The half of a U-Net that downsamples an input while extracting increasingly abstract features |
| Decoder (expanding path) | The half of a U-Net that upsamples compressed features back to the input's original resolution |
| Bottleneck | The most spatially compressed, most abstract representation, sitting between encoder and decoder |
| Skip connection (U-Net) | A direct pathway carrying an encoder stage's feature map to its matching decoder stage, bypassing the bottleneck |
| Residual connection (ResNet-style) | A within-layer identity path adding a layer's input to its output, easing gradient flow — a distinct mechanism from a U-Net's skip connection despite the shared name |
| Pixel-wise output | An output with one value (or vector of values) per input pixel, as opposed to a single class label or score |
| Concatenation (skip-connection implementation) | Combining skipped encoder features with decoder features along the channel dimension, the most common way a skip connection is implemented |
Key takeaways on U-Net architecture
- A U-Net is an encoder-decoder network with skip connections — the encoder downsamples toward a compressed bottleneck, the decoder upsamples back to full resolution, and skip connections bridge each matching resolution level directly.
- Skip connections carry fine spatial detail from encoder layers to decoder layers, and removing them degrades output quality — it does not break the network, which still runs end to end and still produces an output.
- A plain encoder-decoder without skip connections is architecturally valid but loses spatial precision, most visibly at edges and fine, thin structures.
- U-Net skip connections are a different mechanism from ResNet-style residual connections, despite sharing the "skip" vocabulary — one bridges encoder to decoder for spatial detail, the other eases gradient flow within a deep stack.
- The bottleneck is the network's most compressed, most abstract representation, and it is what a decoder without skip connections is forced to reconstruct everything from.
- U-Nets are used for image segmentation, image reconstruction, and — as the next two lessons cover — as an autoencoder and as the denoising backbone inside a diffusion model.
Closing quiz: U-Net architecture
Work through each item before checking the answer key. Every option is a real claim about some architecture somewhere — the task is matching it to the described scenario, not spotting an obviously fabricated distractor.
- What are the two main structural halves of a U-Net?
- A. A generator and a discriminator.
- B. An encoder (contracting path) and a decoder (expanding path).
- C. A tokenizer and a detokenizer.
- D. An attention block and a feed-forward block.
- What happens to a U-Net's spatial resolution moving through the encoder?
- A. It increases at every stage.
- B. It stays constant throughout.
- C. It decreases (downsamples) at every stage, reaching its lowest point at the bottleneck.
- D. It oscillates unpredictably.
- A team removes all skip connections from an otherwise complete U-Net and runs it. What is the most accurate description of the result?
- A. The network fails to execute.
- B. The network runs and produces an output, but with degraded spatial detail.
- C. The network's bottleneck disappears.
- D. The network becomes a GAN.
- What does a skip connection in a U-Net carry, and where does it go?
- A. A gradient signal, from the loss back to the input layer.
- B. A class label, from the output back to the encoder.
- C. An encoder stage's feature map, directly to the matching decoder stage at the same resolution.
- D. A random noise sample, from the bottleneck to the output layer.
- How does a U-Net's skip connection differ from a ResNet-style residual connection?
- A. They are the same mechanism under two different names.
- B. A residual connection eases gradient flow within a layer; a U-Net skip connection bridges encoder and decoder across the bottleneck for spatial detail.
- C. A skip connection only exists in transformers, never in convolutional networks.
- D. A residual connection is only used at inference time, never during training.
- What is the bottleneck of a U-Net?
- A. The final output layer.
- B. The input layer, before any convolutions are applied.
- C. The most spatially compressed, most abstract feature representation, between encoder and decoder.
- D. A regularization technique applied during training.
- Why are convolutions, rather than fully-connected layers, the primary building block of a U-Net?
- A. Convolutions are always faster to compute regardless of input size.
- B. Convolutions preserve local spatial structure and are translation-invariant, which fully-connected layers discard.
- C. Fully-connected layers cannot be trained with backpropagation.
- D. Convolutions eliminate the need for a decoder.
- A U-Net trained for image reconstruction produces a sharp, high-fidelity output. A near-identical architecture on the same task produces a noticeably blurrier output with softened edges. What is the most likely architectural difference?
- A. The blurrier model has more encoder stages.
- B. The blurrier model is missing skip connections (or has fewer of them).
- C. The blurrier model uses a larger bottleneck.
- D. The blurrier model was trained for more epochs.
Answers
- B. The encoder (contracting path) and the decoder (expanding path) are the U-Net's two structural halves; A, C, and D name components from unrelated architectures (GANs, tokenization pipelines, transformers).
- C. The encoder progressively downsamples, reaching its lowest spatial resolution at the bottleneck — this is the "contracting" half of the U shape.
- B. Removing skip connections degrades output quality (loss of fine spatial detail) without breaking execution; the network still runs and still produces a full-resolution output, just a less spatially precise one.
- C. A skip connection routes an encoder stage's feature map directly to the decoder stage operating at the same resolution, bypassing the bottleneck — not a gradient, a label, or a noise sample.
- B. The two mechanisms share the word "skip" but serve different structural purposes: gradient flow within a stack versus spatial-detail preservation across an encoder-decoder bottleneck.
- C. The bottleneck is the narrowest, most compressed, most abstract representation the network produces, sitting between the encoder's end and the decoder's start — not the input or output layer, and not a regularization method.
- B. Convolutions extract local, translation-invariant features by design, matching the inherently spatial nature of image data; a fully-connected layer treats every position as unrelated, discarding exactly the local structure a U-Net's task depends on.
- B. A blurrier, softened-edge output from an otherwise similar architecture on the same task is the signature symptom of missing or reduced skip connections — the decoder is reconstructing detail from a more compressed representation than it should have access to.
This lesson has built the U-Net as a standalone architecture: what its two halves do, and why skip connections are the piece that keeps its output sharp. What it has not yet shown is what that architecture is actually for in a generative system — the same network reconstructing an image as an autoencoder, and, doing something that looks structurally identical but serves a very different purpose, running repeatedly inside a diffusion model's reverse process to turn pure noise into a coherent image. Next: M6-02 covers the U-Net as both a diffusion denoising backbone and an autoencoder — the same architecture from this lesson, put to two different generative jobs.