Blend inputs and labels along the same line.

Mixup creates virtual training examples between observed pairs. Adjust λ and α to see how interpolation softens labels and discourages sharp decision boundaries between samples.

Mix two examples

Two points, one virtual example

x̃ = 0.50xA + 0.50xB · ỹ = [0.50, 0.50]
Class A target50%

Soft-label mass for example A.

Class B target50%

Soft-label mass for example B.

Distance from A50%

Input interpolation follows the same λ.

Boundary penalty0.70

Pressure against an abrupt transition.

Mixup defines behavior between observations.

Inputs and targets move together

The same λ blends both examples and labels. Mixing only one side breaks the training contract.

Alpha shapes the sampling

Small α favors mixes near an endpoint; larger α concentrates samples toward the middle.

Validation still decides

Measure clean accuracy, calibration, robustness, rare classes, and compatibility with augmentation or distillation.

Primary reading

mixup: Beyond Empirical Risk Minimization Zhang et al.Manifold Mixup Verma et al.How to use CutMix and MixUp Torchvision