CMU Introduction To Deep Learning 11-785, Fall 2026: Lecture 11
Overview
The CMU 11-785 lecture derives backpropagation through CNN convolution and pooling layers, connecting the chain rule to practical tensor operations. It shows how input gradients use spatially flipped filters and padding, filter gradients use input and output-gradient maps, and max/mean pooling redistribute gradients according to which inputs contributed.
Key takeaways
- A convolutional input element can affect several output positions and channels, so its gradient sums the corresponding output gradients weighted by the filter elements that connected them.
- For input gradients, spatially flip the filters and pad output-gradient maps as needed; the backward result must match the original input’s dimensions.
- For a filter weight, the local derivative is the input value paired with it in the forward pass, and its total gradient sums that value times the output gradient across all uses.
- Max-pooling backpropagation routes gradients to recorded argmax locations, while mean-pooling backpropagation divides each gradient evenly among the window’s inputs.
- Overlapping pooling windows can send multiple contributions to one input location, so backward code must accumulate gradients rather than overwrite them.
- Reverse-mode differentiation can be implemented by traversing the forward computation in reverse and applying local derivative rules for activations and products.
Chapters
- Informal pre-class conversation includes travel routes involving Pittsburgh, Los Angeles, Chicago, and Dallas.
- At 9:08, attendance polling begins; a GitHub merge/push issue briefly delays access to the lecture slides.
- CNNs address pattern-classification tasks such as identifying a cat in an image or “hello” in a recording by scanning for targets.
- The recap distinguishes 2D-or-higher-dimensional CNNs from 1D CNNs, also called time networks.
- Each convolution filter spans every input channel and a local spatial patch; a 3×3 example computes a weighted inner product plus a bias.
- Each filter produces one output channel, so the number of filters equals the number of output maps.
- An activation function is applied pointwise to the affine map, while each affine output depends on all input channels.
- Max pooling selects and records the largest value in each window; mean pooling outputs the window average.
- Downsampling by a factor of two discards every second row and column, while upsampling inserts zeros between map elements.
- Downsampling can be combined with a preceding operation through stride; zero insertion is useful when followed by convolution, sometimes described as fractional-stride convolution.
- CNN training follows the standard supervised-learning loop: compute outputs, compare them with target labels using a loss, and use gradient descent.
- For a batch, the loss and its gradient are averages over the individual training examples.
- The final convolutional maps are flattened into a vector for an MLP; backpropagating through that MLP yields gradients that can be reshaped to the map dimensions.
- The convolution layer is treated as two operations: an affine map followed by a pointwise activation.
- For each location, the gradient with respect to the affine value equals the output gradient multiplied by the activation-function derivative at that value.
- This chain-rule step supplies the affine-map gradients needed to continue backward through the convolution.
- A single input-map element can contribute to multiple positions in each output map because the filter scans across the input.
- Its gradient therefore sums contributions from every affected output position and every output channel.
- The filter channel connecting a particular input map to an output map determines the weight used in each contribution.
- With the lecture’s indexing convention, an input element at (x, y) contributes to output (x′, y′) through filter element (x−x′, y−y′).
- The derivative of that output with respect to the input element is the corresponding filter weight.
- Summing these weighted output gradients gives the gradient for each input location.
- Computing an input gradient can be visualized as convolving the output-gradient map with the filter flipped top-to-bottom and left-to-right.
- Padding the output-gradient map with zeros lets the backward operation produce a gradient with the same spatial size as the original input.
- For an input size M and filter size L in a valid convolution, the forward output has size M−L+1; padding is needed to restore size M during backpropagation.
- To compute one input channel’s gradient, take that channel from every output filter, flip the spatial filter dimensions, and combine the resulting convolutions with output-channel gradients.
- The filter’s channel and spatial indices are rearranged in the backward operation, motivating the name transpose convolution.
- The lecture emphasizes checking that the resulting gradient has the same dimensions as the input to the forward operation.
- For a chosen input channel, only the corresponding channel slices from all filters are needed to compute its gradient.
- Output-gradient maps are zero-padded before applying the flipped filters so that edge and interior input positions receive the correct contributions.
- If the forward convolution used zero padding, the backward computation must account for that padded input shape as well.
- The backward computation combines the relevant filter slices with gradients from all output maps, accumulating contributions for each input channel.
- The lecture presents convolution as the practical operation underlying this calculation, while noting that real implementations process the maps as tensors on a GPU.
- A classroom poll reviews the channel selection, filter flipping, and convolution steps before moving to filter gradients.
- A filter element affects multiple output positions because the filter is reused at every scan location.
- For output location (x, y) and filter element (i, j), the forward contribution uses the input at (x+i, y+j).
- Consequently, the derivative of that output with respect to the filter element is the corresponding input value.
- The gradient for a filter element sums over all output-map positions where that weight was used.
- Each term multiplies the output-gradient value by the input element that paired with the weight in the forward pass.
- A filter belongs to one output channel, and each of its channel slices operates on one input channel.
- To compute a filter-channel gradient, align the relevant input map with the output-gradient map and scan to form the required inner products.
- Unlike the input-gradient calculation, this filter-gradient operation does not flip the filter or require the same zero-padding step.
- The lecture notes that forward-pass zero padding must still be represented when deriving gradients for padded inputs.
- The lecture reduces backpropagation to local rules for unary activations and binary products, then applies those rules in reverse computation order.
- For an activation y=σ(z), the local rule is to multiply the incoming gradient by σ′(z); for a product, gradients use the other multiplicand.
- In the convolution loops, reverse the layer and position traversal and accumulate contributions with plus-equals wherever multiple paths reach the same variable.
- Max pooling sends the gradient only to the stored argmax location in each window; all other locations receive zero.
- Overlapping max-pooling windows require gradient accumulation, and the lecture recalls a PyTorch issue caused by failing to add overlapping contributions.
- Mean pooling distributes the output gradient uniformly across the window, multiplying each input contribution by 1 divided by the window size.
- At every backward operation, the gradient must account for every input element that influenced the output; the instructor confirms that max-pooling backward uses the argmax recorded during the forward pass.
Transcript excerpt
0:04 to do over Thanksgiving >> projects. >> It hurt somewhere. That's like very intelligent, very >> not at this for his
1:26 They're visiting. >> My aunt lives in Boston. And then my cousin Cleveland right The rock is pushing. I'm not scared of stupid. 600 to00
2:38 I'm going to the west side insane >> and there's not a single nontop >> we have to go [clears throat] sucks Washington DC, Baltimore, >> always cities that have Pittsburgh. I used to like [clears throat] >> base. You know where it is? >> It's like two and a half >> almost
3:24 >> hours norththeast of LA. Okay. [clears throat] >> Pittsburgh to LA >> to the office every flight from Pittsburgh to LA and then drive like [snorts] >> there was no direct flights which is kind of crazy. >> There might be now every [snorts] other day. I don't know. Watch them back travel. >> You had to fly cuz like the government has like >> contracts with the major >> so like none of the major carriers I
4:17 don't know if they have it now but they didn't have >> Where was the bed stop? Chicago. >> Yeah, Chicago or Dallas usually which I don't like. >> Chicago is a learning curve. It's not a good thought process, >> right? He never introduced me to >> he mentioned me but she never >> y
5:23 >> I was sitting in the corner. Yeah, very pulling the phone to the left here. Curiousing and take
6:18 Thank you. >> This covers >> like I find machines. I put it in [clears throat] divorced.
7:11 Like no, but this says they shut off. [snorts] [clears throat and cough] Same thing here. The same ones put themselves in the castle. Come here. >> Okay.
8:15 You want to get in the car?
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Carnegie Mellon University Deep Learning.