Week 04 · lesson
Investigation: From Local Responses to Reused Features
system flow
From Local Calculation to a Tested Transfer Claim
Image Patch
Select one local 3-by-3 neighborhood from the represented image.
Shared Kernel
Apply the same nine weights at every valid spatial position.
Feature Map
Store each signed local response at its corresponding output position.
Pretrained Backbone
Reuse learned feature-producing parameters as a starting representation.
Changed-Domain Test
Vary background or domain while holding the intended category fixed.
Bounded Claim
Separate a traced filter response from evidence about transferred accuracy.
Read this concept flow as plain text
- Image Patch. Select one local 3-by-3 neighborhood from the represented image. PATCH: 3 × 3.
- Shared Kernel. Apply the same nine weights at every valid spatial position. PARAMETERS: 9 SHARED.
- Feature Map. Store each signed local response at its corresponding output position. OUTPUT: 4 × 4 MAP.
- Pretrained Backbone. Reuse learned feature-producing parameters as a starting representation. CHOICE: FREEZE OR FINE-TUNE.
- Changed-Domain Test. Vary background or domain while holding the intended category fixed. RISK: SHORTCUT FEATURE.
- Bounded Claim. Separate a traced filter response from evidence about transferred accuracy. DECISION: TEST BEFORE CLAIM.
A convolution filter examines one local neighborhood at a time. At each position, matching image and kernel values are multiplied and added. Sliding the same kernel across the image produces a feature map.
patch × kernel → nine products → sum → one feature-map value
The calculation is spatially shared: the same weights are used at every valid position. That makes convolution different from giving every pixel a separate connection to every unit.
Completed local calculation
For this patch and vertical-edge kernel:
patch kernel
0 0 1 -1 0 1
0 0 1 × -1 0 1
0 0 1 -1 0 1
The nine products are 0, 0, 1, 0, 0, 1, 0, 0, 1. Their sum is 3, so the
feature map stores response 3 at that output position. The number supports a
local vertical-change claim. It does not name the whole object.
Feature hierarchy and transfer
Early CNN layers often respond to local changes, textures, or color patterns. Later layers combine earlier feature maps over larger receptive fields. In transfer learning, a pretrained backbone can provide these reused features for a new task.
Three choices must stay distinct:
- feature extraction: freeze the backbone and train a new output head;
- fine-tuning: allow selected pretrained weights to change; and
- training from scratch: initialize the full model without pretrained weights.
Reusing parameters does not guarantee that the source features fit the new domain. Medical images, satellite data, classroom objects, and artwork can differ sharply from the source dataset.
Failure analysis: the shortcut still transfers
Suppose every training bottle appears on a white desk and every backpack on a black desk. A pretrained feature extractor may make desk texture easy to use. High validation accuracy on similarly staged images can preserve that shortcut.
Changed test: place the bottle on a black desk while holding the object category fixed. A label change exposes background dependence. The convolution calculated correctly; the evidence used by the fitted system was unreliable.
Investigation
- Predict where a vertical kernel should respond most strongly on a supplied cross image.
- Trace one 3 × 3 patch using all nine signed products.
- Explain why changing only the kernel is a controlled feature comparison.
- Define a changed-background test for a transferred classifier.
- Write one claim supported by local feature evidence and one claim that would require labeled held-out data.
Vocabulary lab
Flip the idea, not just the card
Explain the term before you reveal the back. Then compare your explanation with the definition, example, and warning.
Read all terms without animation
- kernel
- A small matrix of weights applied to local input patches. Example: A 3-by-3 vertical-edge kernel slides across the image. Do not confuse it with: A kernel is not a whole CNN or an object label.
- feature map
- A grid of responses produced by applying one kernel across valid input positions. Example: A 6-by-6 image with a 3-by-3 kernel and no padding produces a 4-by-4 map. Do not confuse it with: A feature map is intermediate evidence, not guaranteed human-readable meaning.
- weight sharing
- Using the same kernel parameters at each spatial position. Example: The vertical filter tests every 3-by-3 patch with the same nine values. Do not confuse it with: It does not mean every image location has identical content.
- transfer learning
- Reusing parameters learned for one task or dataset as a starting point for another. Example: A pretrained vision backbone supplies features for a new classifier head. Do not confuse it with: Transfer does not guarantee domain fit or accuracy.
- shortcut feature
- A pattern that predicts training labels but is unreliable for the intended task. Example: Desk color standing in for object category. Do not confuse it with: It can be learned even when the network implementation is correct.