Summary
Mixup blends paired inputs and class targets with the same coefficient; CutMix replaces a region and uses realized-area target weights. The constructions impose training conventions on synthetic inputs, not a guarantee that semantic evidence is proportional to those coefficients. Quality, calibration, and robustness effects require evaluation under the actual task and recipe.
Mechanism
Mixup
For paired same-shaped numeric inputs and class-probability targets, choose :
With , , labels A/B, and , the input becomes . The target is , a nonnegative distribution summing to one. At illustrative mixed-input prediction , soft-target cross-entropy is:
The weighted class losses must use this same mixed-input prediction, not predictions on the two original inputs. For a batch, preserve the example permutation and align every input/target coefficient; declare per-batch or per-example sampling.
CutMix
Let binary M equal one on retained A pixels and zero on the pasted B region:
Broadcast the spatial mask across image channels. The pictured four-cell patch in a grid gives and the same target as above. The actual synthetic input differs: pasted regions are not pixelwise blends.
Learning objective
The realized patch area determines the mixed target weights
Derivation
Should the target use the sampled 42 pixels or the realized 30?
Change the Interpolation Coefficient
New task: Set lambda to one-half for the same paired vectors.
Picture and change: Change both input and target: and .
Check: Holding the illustrative prediction at gives loss . The actual model’s new prediction can differ; retaining the old target would mismatch the specified construction.
Use when: The sampled coefficient changes; alpha controls its distribution, not a deterministic mixing result.
Clip a Boundary-Crossing Rectangle
New task: A requested patch leaves only inside the image.
Picture and change: Use half-open coordinates, clip ordered rectangle bounds to the image, and count actual replaced pixels. For and , clipped width is one and height two.
Check: Two inserted cells give and target , not .
Use when: Boundaries or integer rounding change realized area. An area-weighted target is still a convention: that small patch could remove the only visible A object.
Choosing
For with positive alpha, the mean is one-half and variance is . Small alpha favors endpoints; large alpha concentrates near one-half. The original Mixup and CutMix papers report recipe-specific experiments, not universal improvement magnitudes.
Why it works (intuition)
Vicinal risk minimization motivates training on chosen neighborhoods around examples. Those neighborhoods encode assumptions; synthetic points need not belong to the deployment distribution or preserve its correct labels.
Common pitfalls
- Label-only mixing: it is not the stated paired-input augmentation, whatever separate objective it implements.
- Wrong target unit: image classification, segmentation, boxes, and sequences require task-specific target handling.
- Evaluation contamination: disable random training mixing for ordinary clean-example evaluation.
- Recipe interactions: augmentation and target smoothing can jointly overregularize; evaluate matched ablations.
Related
- Label smoothing. Another way to soften targets.
- Dropout. Stochastic activation regularization.
- Regularization. Overview.