randaugment
**RandAugment** is a **dramatically simplified data augmentation strategy that achieves state-of-the-art results by randomly selecting N transformations from a pool and applying each with a fixed magnitude M** — replacing AutoAugment's expensive 5,000-GPU-hour search with just two tunable hyperparameters that can be optimized with a simple grid search, making automated augmentation accessible to any practitioner without massive computational resources.
**What Is RandAugment?**
- **Definition**: An augmentation strategy that randomly selects N transformations from a fixed pool of 14 operations and applies each with the same magnitude M — requiring no dataset-specific search, no reinforcement learning, and no proxy task, while matching or exceeding the performance of learned augmentation policies.
- **The Insight**: AutoAugment's expensive search finds optimal per-operation magnitudes (rotate at magnitude 7, shear at magnitude 5). RandAugment shows that using the same magnitude M for all operations works nearly as well — reducing the search space from thousands of parameters to just 2.
- **Philosophy**: "Simple baselines are often underrated" — sometimes the optimal solution is not the most complex one.
**How RandAugment Works**
| Step | Process | Example |
|------|---------|---------|
| 1. Define pool of K transforms | 14 standard transforms | Rotate, Shear, Translate, Brightness, etc. |
| 2. For each training image | Randomly select N transforms from the pool | N=2: select Rotate and Contrast |
| 3. Apply each with magnitude M | Same M for all selected transforms | M=9: moderate-to-strong transforms |
| 4. Feed augmented image to model | Standard training pipeline | Model trains on varied augmentations |
**The Transform Pool (14 Operations)**
| Operation | Description | Magnitude Example (M=9) |
|-----------|-------------|------------------------|
| Identity | No change | — |
| Rotate | Rotate by angle | ±13.5° |
| ShearX/Y | Shear horizontally/vertically | 0.3 shear factor |
| TranslateX/Y | Shift pixels | 14 pixels |
| AutoContrast | Maximize contrast | — (binary) |
| Equalize | Histogram equalization | — (binary) |
| Solarize | Invert pixels above threshold | Threshold 178 |
| Posterize | Reduce bits per color channel | 5 bits |
| Brightness | Adjust brightness | Factor 1.9 |
| Contrast | Adjust contrast | Factor 1.9 |
| Color | Adjust saturation | Factor 1.9 |
| Sharpness | Adjust sharpness | Factor 1.9 |
**Hyperparameter Tuning**
| Hyperparameter | Typical Values | Effect |
|---------------|---------------|--------|
| **N** (number of ops) | 1-3 | More ops = stronger augmentation |
| **M** (magnitude) | 5-15 (out of 30) | Higher = more distortion |
Typical grid: N ∈ {1, 2, 3} × M ∈ {5, 7, 9, 11, 13, 15} = 18 experiments.
**RandAugment vs Alternatives**
| Method | Search Cost | Hyperparameters | Key Advantage |
|--------|-----------|-----------------|-------------|
| **Hand-designed** | Human time | Many per-transform params | Domain knowledge |
| **AutoAugment** | 5,000 GPU hours | Policy per dataset | Optimal (but expensive) |
| **RandAugment** | ~18 grid search runs | Just N and M | Simple, effective, practical |
| **TrivialAugment** | 0 | Zero hyperparameters | Even simpler (1 random op) |
**Results**
| Dataset | Model | Without Aug | RandAugment | AutoAugment |
|---------|-------|------------|-------------|-------------|
| CIFAR-10 | WRN-28-10 | 3.87% | 2.70% | 2.68% |
| ImageNet | ResNet-50 | 23.7% | 22.4% | 22.4% |
| SVHN | WRN-28-2 | 1.88% | 1.36% | 1.30% |
RandAugment matches AutoAugment within ~0.1% on all benchmarks — at a fraction of the computational cost.
**RandAugment is the practical standard for automated data augmentation** — proving that randomly selecting N operations at a fixed magnitude M rivals expensive learned policies, making strong augmentation accessible to any practitioner through a simple 2-parameter grid search instead of thousands of GPU hours.