NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Shake-Shake regularization of 3-branch residual networks

Xavier GastaldiWorkshops @ ICLR 2017

Introduction

Deep Residual Networks (ResNets) revolutionized computer vision, but they remain prone to overfitting. While techniques like Dropout were once the gold standard for regularization, their effectiveness diminished with the introduction of Batch Normalization. Researchers have previously tried to regularize ResNets by randomly dropping entire paths (Stochastic Depth) or adding noise to weights.

This paper explores a "softer" approach called Shake-Shake regularization. The author proposes that intermediate tensors in a network should be treated like images. Just as we augment input images by flipping or cropping them to improve generalization, we can "augment" the internal representations of the network to make it more robust. By replacing standard branch summation with a stochastic affine combination, the model performs a form of internal data augmentation that led to a then-state-of-the-art 2.86% error rate on CIFAR-10.

Methods

The paper introduces Shake-Shake regularization specifically for 3-branch residual blocks, which consist of one identity skip connection and two residual branches.

Shake-Shake forward, backward, and test passes
  1. The Architecture: Instead of the standard ResNet formula where branches are simply added together, Shake-Shake uses a weighted sum: $$x_{i+1} = x_i + \alpha_i \mathcal{F}(x_i, W_i^{(1)}) + (1 - \alpha_i) \mathcal{F}(x_i, W_i^{(2)})$$
  2. The "Shake" (Training): During the forward pass, $\alpha_i$ is a random variable chosen from a uniform distribution between 0 and 1. Crucially, for the backward pass (gradient calculation), a new random coefficient $\beta_i$ is chosen. This mismatch between the forward and backward weights "shakes" the gradients, forcing the network to learn features that are robust to noise.
  3. The "Even" (Testing): At test time, the stochasticity is removed. Both branches are multiplied by the expected value of 0.5, ensuring a stable, deterministic output.
  4. Granularity: The author tested applying the same random coefficient to an entire batch ("Batch" level) versus applying a unique coefficient to every individual image in a batch ("Image" level).

Key Insights and Results

The method was evaluated on CIFAR-10, a standard benchmark consisting of 60,000 32x32 color images across 10 classes, using standard data augmentation (translation and flipping) as a baseline.

  • Internal Tensor Augmentation: The core philosophy is that a computer doesn't distinguish between an input image and a hidden layer tensor. If blending two images creates a difficult but useful training example, blending internal feature branches should do the same.
  • Gradient Augmentation: The most effective version of the model used different random numbers for the forward and backward passes. This suggests that adding noise directly to the gradients (the "backward shake") is a powerful regularizer that prevents the model from converging on narrow, overfitted local minima.
Training error rates for various configurations
  • The "Shake-Shake" Combo: As seen in the training curves, the best configuration was "Shake-Shake-Image" (S-S-I)—using random coefficients for both forward and backward passes, calculated independently for every image. Applying the "shake" at the image level consistently outperformed batch-level regularization.
  • State-of-the-Art Performance: The largest model (26 2x96d) reached a 2.86% test error on CIFAR-10, which was the best single-shot result published at the time (Feb 2017).
  • Parameter Efficiency: Shake-Shake allows smaller models to punch far above their weight class. A small Shake-Shake model with 2.9M parameters achieved similar performance to a DenseNet with 25.6M parameters—nearly 9 times fewer parameters.

Limitations and Future Work

  • Scope of Evaluation: The paper focuses exclusively on CIFAR-10. While the results are impressive, the effectiveness of Shake-Shake on larger-scale datasets like ImageNet or different architectures (like Transformers) remains to be seen.
  • Theoretical Underpinnings: The paper is experimental and intuitive. While the "internal augmentation" analogy is compelling, a rigorous mathematical explanation for why the forward/backward coefficient mismatch works so well is not deeply explored.
  • Computational Overhead: While parameter-efficient, the 3-branch structure and the need to generate many random variables per pass add some computational complexity during training.

Summary updated

BibTeX
@inproceedings{gastaldi2017shake,
  author = {Xavier Gastaldi},
  title = {{Shake-Shake regularization of 3-branch residual networks}},
  booktitle = {Workshops @ ICLR},
  year = {2017},
}
Figure