cutout
**Cutout** is a **regularization technique for image classification that randomly masks out (occludes) square patches of the input image during training** — forcing the model to make predictions based on partial information rather than relying on a single discriminative region (like always looking at the cat's face), which acts as spatial dropout at the input level and consistently improves generalization by teaching the model to use all available visual features rather than overfitting to the most dominant one.
**What Is Cutout?**
- **Definition**: During training, a square patch of random position is filled with zeros (or the mean pixel value) in the input image — the model must still correctly classify the image despite the missing information.
- **Intuition**: "If I cover the cat's face, can you still tell it's a cat?" The model must learn to recognize cats from their ears, body shape, fur texture, tail, and paws — not just the face. This redundancy in learned features makes the model more robust.
- **At Test Time**: No patches are masked — the model sees the full image and benefits from all the features it learned to use during training.
**How Cutout Works**
| Step | Process |
|------|---------|
| 1. Sample a random center point (cx, cy) | Uniform over the image |
| 2. Create a square patch of size S×S | Typically 16×16 or 32×32 pixels |
| 3. Fill the patch with zeros (or mean) | The "cutout" region |
| 4. Feed to model, label stays the same | The image is still a "cat" even with part hidden |
**Hyperparameters**
| Parameter | Typical Value | Effect |
|-----------|--------------|--------|
| **Patch size** | 16×16 for CIFAR-10, 64×64 for ImageNet | Larger = harder task, more regularization |
| **Number of patches** | 1 (original paper) | Multiple patches increase difficulty |
| **Fill value** | 0 (black) or dataset mean | Minimal difference in practice |
**Cutout vs Related Techniques**
| Technique | What Is Masked | Label Handling | Key Difference |
|-----------|---------------|---------------|---------------|
| **Cutout** | Random patch → black/zero | Original label unchanged | Simplest, pure regularization |
| **Dropout** | Random neurons (hidden layers) | N/A (applied to features) | Feature-level, not input-level |
| **CutMix** | Random patch → replaced with another image's patch | Proportional soft label | More informative — uses the patch for another class |
| **Random Erasing** | Random rectangle, variable aspect ratio | Original label unchanged | More flexible shape than Cutout |
| **GridMask** | Regular grid pattern of squares | Original label unchanged | Structured occlusion |
**Why Cutout Works**
- **Redundancy**: Forces the model to develop multiple pathways for recognizing each class — if one region is occluded, other regions provide sufficient evidence.
- **Context Learning**: The model learns to use surrounding context (background, scene composition) in addition to the object itself.
- **Spatial Dropout**: Similar to dropout but applied at the input level — randomly removing spatial information rather than feature activations.
**Results**
| Dataset | Model | Without Cutout | With Cutout | Improvement |
|---------|-------|---------------|-------------|------------|
| CIFAR-10 | ResNet-18 | 4.72% error | 3.99% error | -0.73% |
| CIFAR-100 | ResNet-18 | 22.46% error | 21.96% error | -0.50% |
| STL-10 | WRN | 14.47% error | 12.74% error | -1.73% |
**Cutout is the simplest effective spatial regularization technique for image classification** — requiring only a single hyperparameter (patch size), adding negligible computational cost, and consistently improving generalization by forcing models to learn from the entire image rather than overfitting to the single most discriminative region.