This page is a self-test. Each problem states cleanly what to find; the full worked solution hides inside a collapsible[!recall]- callout so you can try first, then reveal. Problems climb from recognition to mastery. After each level, a [!mistake] callout steel-mans the trap most people fall into there.
A transformation is label-preserving when a human still reads the same digit afterward.
(a) Horizontal flip — NO. A flipped 2 looks like a mirror 2 (not a real digit); a 3 becomes a backwards shape. Mirror-symmetry is not respected by digits.
(b) Rotation +8° — YES. A slightly tilted 5 is still a 5. Small tilts occur naturally in handwriting.
(c) Rotation 180° — NO. A 6 rotated 180° becomes a 9. The label changes, so this breaks the constraint.
(d) Brightness +20 — YES. A brighter 7 is still a 7; intensity does not carry digit identity.
Answer: label-preserving = (b), (d); not = (a), (c).
Recall Solution 1.2
(i) = Cutout / Random Erasing — masks a rectangle to zero.
(ii) = MixUp — x~=λxi+(1−λ)xj, and crucially the label mixes too.
Use the parent formula x′=W−x−1,y′=y.
x′=32−5−1=26,y′=10.
The pixel moves to column 26, row 10 — the same distance from the right edge (5 from left → 5 from right, and 31−5=26). The figure shows the original dot and its mirror partner reflected across the vertical centre line.
Answer:(26,10).
Recall Solution 2.2
p′=1.2×100+(−30)=120−30=90.90 is inside [0,255], so no clipping needed. Answer:p′=90.
Note the two effects fight: contrast pushed it up to 120 (it was below the mid-grey 127.5, so α>1 actually darkens dark pixels only if β shifts them — here the net move is down because β dominated).
Recall Solution 2.3
H′=(350+40)mod360=390mod360=30°.Why modulo? Hue is a circle: 0° and 360° are the same red. Adding 40° to 350° walks past the top of the wheel and lands at 30°. Without the wrap we'd get an illegal 390°.
Answer:H′=30°.
At θ=90°: cos90°=0,sin90°=1.
x′=3(0)−0(1)=0,y′=3(1)+0(0)=3.
So (3,0)↦(0,3) — the point on the +x axis swings up to the +y axis. Look at the blue quarter-turn arc in the figure.
At θ=180°: cos=−1,sin=0.
x′=3(−1)−0=−3,y′=3(0)+0(−1)=0.
So (3,0)↦(−3,0) ✓ — a half-turn flips the point to the opposite side. Answers:(0,3) then (−3,0).
Recall Solution 3.2
Aorig=256×256=65536 pixels².
Smallest area: 0.08×65536=5242.88 → side =5242.88≈72.41 px.
Largest area: 1.0×65536=65536 → side =256 px.
So crops range from about 72×72 up to 256×256, all then resized to the network's fixed input. The smallest crop occupies only 8% of the image, forcing scale invariance: the model must recognise an object even when it fills a large fraction of a zoomed-in view.
Answers: min side ≈72.4 px, max side =256 px.
Recall Solution 3.3
y~=λyi+(1−λ)yj=0.7[1,0,0]+0.3[0,1,0]=[0.7,0.3,0].
The target is a soft label: 70% cat, 30% dog. This is exactly the "smoother decision boundary" idea — the network is asked for a graded, calibrated answer instead of a hard 0/1. Answer:[0.7,0.3,0].
(a) Each epoch shows all N images once, each freshly augmented: N views per epoch. Over E epochs:
N×E=10,000×50=500,000 augmented views.
(b) Here K (distinct views per image) =E=50, one per epoch. It is called potentially infinite because the transforms draw continuous parameters — a rotation angle θ, a crop area A, a brightness β from continuous ranges — so there is no finite catalogue of augmentations; each epoch samples new real-valued parameters and (almost surely) never exactly repeats.
Answers: (a) 500,000; (b) K=50 realised, unbounded in principle.
Recall Solution 4.2
Step 1 — flip.x1=32−5−1=26,y1=10. New point (26,10).
Step 2 — rotate 90°. With cos90°=0,sin90°=1:
x2=x1cosθ−y1sinθ=26(0)−10(1)=−10,y2=x1sinθ+y1cosθ=26(1)+10(0)=26.Answer:(−10,26).
What it means: augmentations compose — the order matters. Flipping first then rotating is generally not the same as rotating first then flipping (matrix multiplication is not commutative), which is why augmentation pipelines fix a definite order.
Recall Solution 4.3
Horizontal flip — RISKY. Anatomy is left–right asymmetric (heart on the left, liver on the right); flipping can create anatomically impossible images and mislead a model that has learned true side-specific cues. Use only with caution.
Vertical flip — NO. An upside-down chest never occurs; not realistic.
180° rotation — NO. Same reason; degenerate, unrealistic.
Small rotation ±5° — YES. Patient positioning varies slightly; realistic and label-preserving.
MixUp — CAUTIOUS YES. Blending can improve calibration, but blended X-rays are non-physical; used, but often with small λ effect.
Key principle: medical imaging tightens the "could this occur naturally?" test far more than natural photos.
The inner expectation is the average loss over the augmentations:
Et∼T[ℓ]=21(0.8)+21(0.4)=0.4+0.2=0.6.
Gradient descent minimises this averaged loss, not the loss on any one view. The effect: the model can't drive one view's loss to zero by memorising its exact pixels — it must lower the loss across all transformed versions simultaneously, which pushes it toward features invariant to T. That invariance is the source of the generalization gain (link to 6.14-Generalization-in-ML).
Answer:0.6.
Recall Solution 5.2
α=0.2: Var=4(2(0.2)+1)1=4(1.4)1=5.61≈0.1786.
α=4: Var=4(2(4)+1)1=4(9)1=361≈0.0278.Interpretation. Both distributions are symmetric about mean 21. The larger variance at α=0.2 means λ is pushed toward the extremes 0 or 1 — i.e. little actual mixing (one image dominates, gentle augmentation). The small variance at α=4 means λ clusters near 0.5 — heavy, near-uniform mixing (both images contribute almost equally). This is exactly why the parent recommends small α∈[0.2,0.4]: enough blending to smooth boundaries, not so much that inputs become mush.
Answers:≈0.1786 and ≈0.0278.
Recall Solution 5.3
Independent per-pixel noise leaves every region partly visible, so a model can still lean on its single favourite discriminative patch. A contiguous rectangular mask removes an entire region's information at once, mimicking a real-world occluder (a tree in front of a car, a hand over a face). To keep the loss low when any region might vanish, the network must spread its evidence across multiple distributed features — precisely the robustness Cutout targets. So contiguity, not mere randomness, is the mechanism: it reproduces the structure of real occlusion.
This is regularization in the same family as 3.4.8-Dropout-in-neural-networks (drop information to prevent over-reliance on any one path).
Recall Self-test checklist (reveal to grade yourself)
Can you flip a pixel with the correct −1? ::: Yes — x′=W−1−x.
Can you rotate (3,0) by 90° from the matrix? ::: Yes — (0,3).
Can you write a MixUp soft label at λ=0.7? ::: [0.7,0.3,0] for cat/dog.
Do you know why the augmented objective uses an expectation, not a minimum? ::: Because we want invariance across all views, not the easiest one.