Elamur Research

Shake-Shake regularization

Paper · 2017 · Xavier Gastaldi

Summary

A network can learn its training examples closely without becoming equally good at recognizing new ones. Shake-Shake regularization addresses this problem of overfitting by changing how parallel branches inside a network cooperate during training. Instead of always adding their outputs with fixed weights, it gives the branches randomly changing shares of the computation. The method adds another disturbance during learning: the coefficients used to send information forward can differ from those used to propagate the training signal backward. The paper studies whether this deliberately unstable cooperation produces a network that generalizes better.

The main setting is a residual network with an identity path and parallel residual branches. The identity path carries the block’s input onward, while the residual branches compute transformations of that input. Shake-Shake randomly blends the transformed outputs before adding them to the identity path. During testing, the randomness disappears and the residual branches receive equal coefficients. The motivation is to bring something resembling data augmentation inside the network: rather than perturb only an input image, perturb the intermediate representations through which the network learns.

The strongest reported CIFAR-10 result is a test error of 2.86%, averaged across 5 runs, from a network with 26.2M parameters. On CIFAR-100, the paper reports 15.85% test error, averaged across 3 runs. These results improve on the published single-shot results discussed by the authors. The evidence also shows that the details matter. Reusing forward coefficients during back-propagation has a relatively weak effect. Resampling them can be more effective, and choosing coefficients separately for each image generally strengthens regularization. The preferred procedure changes with the architecture, its capacity, and the mini-batch size.

The paper goes beyond reporting final errors. It compares different forward and backward procedures, measures similarity between residual branches, and removes architectural components to test where the method still works. The branch measurements suggest that Shake-Shake encourages the parallel computations to become less alike, although they do not establish a complete explanation. Experiments without skip connections are encouraging under some conditions. Experiments without Batch Normalization require gentler perturbations and show a risk of divergence. The resulting contribution is both a useful regularizer and an empirical investigation of its boundaries: changing cooperation between branches can help, but the strength and location of that change cannot be chosen independently of the network being trained.

Interesting ideas

Perturb an internal agreement. The method targets the point where parallel computations are combined. That point is useful because the branches already produce compatible tensors, so their relative contributions can change without changing the surrounding interface. The broader design idea is to look for places where a system has several plausible contributions to the same representation. Randomizing their cooperation may expose dependencies that remain hidden when their proportions are fixed. This is a candidate strategy for other trainable systems with compatible parallel paths, although the paper’s evidence comes from image classification.

Treat forward computation and backward learning separately. Shake-Shake does more than make the forward result noisy. Its defining experiments vary how a branch contributes to a prediction and how it receives the resulting learning signal. This distinction makes a reusable experimental question: is an apparent benefit caused by the examples a network sees internally, by the updates it receives, or by the relationship between them? The paper’s comparisons show why these possibilities deserve separate controls. A perturbation can have little effect when the backward procedure follows it faithfully, yet become a strong regularizer when that correspondence changes.

Choose randomness at the level that matters. A coefficient shared by an entire mini-batch makes every image experience the same branch balance at a given block. A coefficient sampled separately for each image creates different balances within that batch. These choices use the same general mechanism but impose different training conditions. The image-level results show that the scope of randomization belongs among the substantive design decisions. In another application, the corresponding question would be which unit should receive an independent perturbation, rather than merely which random distribution to use.

Match regularization to capacity and existing noise. The strongest disturbance is not automatically the best choice. In some experiments, Shake-Shake suppresses learning too much; a gentler forward-only disturbance works better. On CIFAR-100, reducing the mini-batch size also changes which procedure is preferred. The transferable lesson is to assess a new regularizer together with the system’s other sources of variation. Capacity, batch construction, normalization, and the update procedure all affect how much additional disturbance training can tolerate.

Measure branch behavior, not just the final score. The paper asks whether the parallel branches become less correlated after regularization. It also checks whether corresponding positions in the branches appear sufficiently aligned for that comparison to make sense. This is a useful pattern for interpretability: an explanation should make a measurable prediction about internal behavior, and the measurement itself should face a validity check. The results remain suggestive rather than conclusive, but they give the proposed explanation more substance than a final error rate alone could provide.

Use architectural simplifications as probes. Removing skip connections, shortening each branch, and removing Batch Normalization help distinguish the central mechanism from the architecture around it. These are valuable experiments even when performance worsens. A successful simplified variant can show that a component is not indispensable; a failed variant can reveal an interaction that the original design concealed. For other systems, the same approach means changing a structural assumption while preserving enough of the surrounding setup to interpret the outcome.

Deep dive: Shake-Shake regularization

Shake-Shake regularization blends parallel network branches to reduce overfitting, with CIFAR results and tests of how and when it works. · about 33 minutes to read

How Mova uses it

For Mova, a small transparent language system written in Rust, the defensible connection is a possible research direction. There is no established implementation of Shake-Shake in Mova described here. The paper also does not test a language system. Its results therefore do not establish that this regularizer would improve Mova, nor that the mechanism can be transferred without architectural changes.

The closest potential use would require a trainable part of Mova with parallel branches that produce compatible representations. The compatibility requirement is concrete. Shake-Shake mixes tensors representing alternative transformations at the same point in a network. A proposed adaptation would need branches whose outputs can meaningfully be combined in that way. Merely having several components, several linguistic signals, or several stages of processing would not be enough. Components that produce different kinds of objects cannot inherit the method simply by receiving random weights.

If a suitable trainable component existed, the paper suggests a controlled comparison between fixed branch weights and randomly changing ones. The important extension would be to separate the forward mixing rule from the backward rule. A conventional implementation that samples a coefficient and then differentiates through that same coefficient corresponds to one of the paper’s weaker procedures. Reproducing the central idea would require explicit control over how branch gradients are scaled. Whether Mova has the training machinery needed for that experiment is not established.

Transparency would make the experimental distinction especially important. A useful adaptation would record which branches exist, what each branch computes, where their outputs are combined, and which random coefficients affect each training pass. The deterministic testing rule would also need to be explicit. In the paper, testing uses equal residual-branch coefficients rather than fresh random draws. Carrying that separation into a possible Mova experiment would make it easier to distinguish the behavior of the trained system from the disturbances used to obtain it.

There is also a conceptual use that does not require implementing Shake-Shake. The paper warns against assuming that parallel components learn different things merely because they occupy different paths. Its correlation analysis asks whether the branches actually produce less similar representations. For a transparent language system, an analogous research question would be whether apparently distinct learned contributions are redundant. The relevant measurements would have to match Mova’s own representations; the paper’s flattened convolutional tensors are not a ready-made linguistic diagnostic.

The experiments without Batch Normalization provide a reason to investigate transfer cautiously. The authors explicitly raise applications beyond their usual computer-vision setting, including NLP, when discussing why removing normalization matters. Their modified network can benefit from a softer procedure, but stronger perturbations can prevent training from remaining stable. This supports considering an adaptation where the required architecture exists. It does not support treating the absence of Batch Normalization as a solved obstacle.

A useful Mova takeaway is therefore experimental discipline instead of a claim of adoption. Any attempt should preserve a fixed baseline, distinguish changes to the forward computation from changes to learning, and inspect both training behavior and performance on held-out material. It should also examine whether the branches remain interpretable after their cooperation is randomized. The paper supplies reasons to ask these questions and an example of how architectural controls can answer them. It supplies no evidence that Mova already benefits from the method.

The problem and its context

Why a powerful network can still need regularization

The paper begins from a practical difficulty: residual networks can overfit small datasets. Their ability to fit examples does not ensure that what they learn will carry over to unseen inputs. In machine learning, regularization addresses that gap by constraining or disturbing learning in ways intended to improve generalization.

The authors place this concern against the rapid development of residual architectures. They describe the success of deep residual networks in the ILSVRC and COCO competitions, followed by efforts to improve performance through depth, width, and cardinality. In this context, depth concerns how many layers a network has, width concerns the size of its representations, and cardinality concerns the parallel transformations available within the architecture. Shake-Shake concentrates on the last of these structural opportunities: a network with branches offers places to vary how separate computations contribute.

This framing matters because the paper does not present overfitting as a problem that architecture growth alone resolves. More layers, more channels, or more parallel paths may provide useful capacity, but capacity can still fit the training set too closely. The question is how to make that capacity useful on new examples. The proposed intervention changes the conditions under which the branches learn to work together.

The earlier remedies named by the authors include weight decay, stopping training early, and dropout. These approaches act in different ways, but they share the purpose of limiting harmful dependence on the training data. The paper does not compare all of them under a common experimental protocol. They establish the background against which a regularizer designed specifically for branched networks becomes a reasonable proposal.

Noise was already part of learning

The introduction also treats randomness as an existing feature of effective training. Batch Normalization computes statistics from mini-batches, so those statistics vary with the examples present in a batch. Though introduced for another purpose, it can therefore have a regularizing effect. The paper similarly describes stochastic gradient descent as an update process containing noise relative to full gradient descent.

This perspective helps explain why the authors focus on the placement and structure of noise. Training is already stochastic. A new random disturbance must interact with the variation produced by mini-batch selection, normalization, and optimization. Its contribution cannot be understood simply as adding randomness to an otherwise deterministic process.

The paper connects this issue to batch size. The amount and character of training variation can change when a mini-batch changes. Later, the CIFAR-100 experiments make that connection concrete: the batch-size setting affects both baseline competitiveness and which Shake-Shake procedure works best. What first appears as background motivation becomes part of the experimental interpretation.

The authors also describe a change in the usefulness of dropout after Batch Normalization became common in computer-vision classification. They cite earlier work in which dropout had been important, while noting reports of reduced effectiveness in the presence of normalization. Their account motivates a search for regularizers that exploit newer architectural structures rather than assuming that an established technique will retain the same value everywhere.

Multi-branch networks offer another intervention point

The immediate predecessors are methods that sometimes remove computational paths during training. The paper discusses stochastic depth and FractalNet in this connection. Under appropriate conditions, a network can continue learning even when some information routes are temporarily unavailable.

Shake-Shake keeps the architectural focus but changes the disturbance. Instead of making a residual path completely absent, it typically gives that path a smaller contribution while giving another a larger one. The branches remain available, but their balance keeps changing. The authors describe this as related to drop-path, with continuous scaling taking the place of an on-or-off decision.

They also compare the proposal with shakeout and whiteout, which introduce other forms of multiplicative noise. The distinction emphasized here is the unit being scaled. Those methods use noise at the level of tensor elements. Shake-Shake gives a whole image’s branch tensor a scalar coefficient at a particular block. That makes the disturbance coordinated across the tensor rather than independently scattered through its entries.

The motivation is internal augmentation. Ordinary image augmentation changes the inputs presented to training. The authors ask whether intermediate representations can also be varied usefully. Parallel branches provide compatible candidate tensors that can be blended, allowing a different internal representation to be presented to the following computation.

This does not mean the paper establishes that every such blend is equivalent to a plausible new input image. Its argument is operational: intermediate representations can be perturbed, and the resulting training procedure can be evaluated. The experiments test whether that perturbation improves generalization, rather than proving that the mixed representation has a particular semantic interpretation.

Why the backward pass becomes central

The paper’s final contextual connection is to work on adding noise to gradients. Earlier studies cited by the authors found that noisy training signals could help difficult networks learn and generalize. Shake-Shake draws on that possibility while making the noise depend on branch structure.

A prediction is produced by sending information forward. Learning then sends a signal backward through the computation to determine parameter updates. If both directions use the same branch coefficients, the learning signal follows the mixture that generated the prediction. Shake-Shake tests what happens when the backward balance is changed independently.

This is the key step beyond ordinary internal blending. It makes the relation between a branch’s contribution and its update stochastic. The authors call this a form of gradient augmentation, distinguishing the structured manipulation of branch signals from simply adding an arbitrary noise tensor to a gradient. The rest of the paper examines whether that distinction matters empirically.

The method, step by step

Begin with compatible residual branches

Consider a residual block: a component that receives a tensor, computes transformations of it, and combines those transformations with a path carrying the input onward. A tensor is the multidimensional array holding the current representation. In the image experiments, its dimensions include the images in a mini-batch, their channels, and their spatial positions.

The main architecture contains an identity route and parallel residual routes. This explains the paper’s description of a network with 3 branches: the identity route is counted alongside the 2 learned residual branches. Random mixing applies to the residual outputs. The identity route is not given the complementary random coefficients used for those outputs.

The paper first writes the ordinary addition rule:

xᵢ₊₁ = xᵢ + F(xᵢ, Wᵢ⁽¹⁾) + F(xᵢ, Wᵢ⁽²⁾)

Here, xᵢ is the input tensor at residual block i, and xᵢ₊₁ is that block’s output. F is the residual transformation. Wᵢ⁽¹⁾ and Wᵢ⁽²⁾ are the learned weights for the respective residual branches. The superscripts distinguish the branches; they are not powers. The first term carries the input forward, while the other terms add learned transformations.

The function F can contain a stack of convolutional layers and associated operations. A convolution transforms local regions of a representation using learned filters. Because the residual outputs are added, they must have compatible dimensions at the combination point. Shake-Shake uses that same compatibility to replace fixed addition with a changing blend.

Randomize the residual mixture

During training, the proposed forward computation is:

xᵢ₊₁ = xᵢ + αᵢF(xᵢ, Wᵢ⁽¹⁾) + (1 − αᵢ)F(xᵢ, Wᵢ⁽²⁾)

The tensors xᵢ and xᵢ₊₁, transformation F, and weight sets Wᵢ⁽¹⁾ and Wᵢ⁽²⁾ retain their meanings. The new symbol αᵢ is a coefficient drawn uniformly between 0 and 1 for block i. The other branch receives the complementary coefficient, written as 1 − αᵢ.

A larger coefficient gives the corresponding branch more influence on the residual mixture. Because the coefficients are complementary, increasing one reduces the other. The intervention changes relative participation rather than independently amplifying every branch.

There is a distinction between the ordinary residual equation and the fixed control used in many experiments. The ordinary equation adds both residual outputs directly. The experimental “Even” setting instead assigns each residual branch a coefficient of 0.5. As a result, comparisons between an Even control and a Shake procedure examine random mixing against fixed equal mixing. They should not be read as comparisons against the unscaled sum in the opening equation.

The authors’ image-level procedure extends the coefficient notation to identify individual images. A coefficient then belongs to both a block and an image within the mini-batch. The mechanism remains a scalar multiplication of the whole branch tensor for that image. It does not introduce a separate draw for every channel or spatial position.

Refresh the backward coefficients

Before a forward pass, the training procedure refreshes its scaling coefficients. The crucial additional operation is another refresh before the backward pass. This makes the branch proportions in the learning signal different from the proportions used to generate the forward result.

The distinction requires care. If a training system simply samples a forward coefficient and uses ordinary differentiation through the resulting multiplication, that coefficient will also scale the corresponding backward contribution. The paper calls that behavior “Keep.” Its central Shake-Shake procedure instead intervenes in backward scaling.

This means the backward rule is part of the method, instead of an incidental implementation detail. A branch can have relatively little influence on a particular forward mixture while receiving a differently weighted learning signal afterward. The resulting disturbance is structured by the branches and their shared position in the network.

The paper tests several choices rather than assuming that independent resampling must be best. “Even” uses equal coefficients. “Shake” draws new random coefficients. “Keep,” when used for the backward pass, retains the forward coefficients. Naming the forward and backward choices makes it possible to isolate which part of the procedure contributes.

Training and testing with Shake-Shake

The steps in order.

Training and testing with Shake-ShakeStep 1: Compute parallel residual transformations1. Compute parallel residual transformationsStep 2: Sample forward mixing coefficients2. Sample forward mixing coefficientsStep 3: Blend branches and retain the identity path3. Blend branches and retain the identity pathStep 4: Refresh coefficients for backward propagation4. Refresh coefficients for backward propagationStep 5: Update weights through the altered backward flow5. Update weights through the altered backward flowStep 6: Use equal branch weights during testing6. Use equal branch weights during testing

The diagram separates training-time randomness from testing-time computation. The method aims to obtain a better trained network, while removing coefficient sampling from the final evaluation procedure.

Choose the scope of each coefficient

The paper compares mini-batch-level and image-level coefficients. Under the batch-level rule, a residual block uses the same coefficient for all images currently being processed together. Under the image-level rule, images in that batch receive separate coefficients at that block.

The image-level example starts with an input tensor of dimensions 128x3x32x32. The leading dimension indexes the images, and the remaining dimensions describe each image. Inside the second stage of the 26 2x32d network, the tensor has dimensions 128x64x16x16. Each image’s corresponding slice has dimensions 64x16x16.

Applying an image-level coefficient means multiplying that whole slice by its scalar. The coefficient does not vary within the slice. Different images can therefore encounter different branch balances while retaining coherent scaling across each branch representation.

This distinction is useful when interpreting the results. Image-level regularization is not a different residual function, a change in network depth, or a different kind of convolution. It changes how independently the mixture is sampled across examples. The paper finds that this choice can alter both the strength and usefulness of the regularization.

Remove the randomness for testing

At test time, the paper uses the expected coefficient:

αᵢ = 0.5

Here, αᵢ is the mixing coefficient for residual block i, now fixed rather than sampled. Each residual branch receives an equal coefficient, so the evaluation uses a stable branch combination.

The paper motivates this rule by analogy with dropout. It does not establish that the deterministic prediction exactly reproduces an average over all possible stochastic training computations. The practical point is that testing does not require selecting a fresh branch mixture for each evaluation.

That separation also makes the reported error rates easier to interpret. Their variation across repeated runs reflects different training outcomes, while the coefficient rule during each test evaluation is fixed. The headline results are not reported as a search over random test-time mixtures.

Build the CIFAR-10 network

The CIFAR-10 implementation starts from fb.resnet.torch. The authors also provide their own Shake-Shake code. These named implementations anchor the experimental setup, while the paper describes the architecture and principal settings needed to understand the comparisons.

The initial operation is a 3x3 convolution with 16 filters. After it come 3 stages, each containing 4 residual blocks. Spatial feature-map sizes are 32, 16 and 8 across these stages. When spatial resolution decreases, the width increases. The network finishes with 8x8 average pooling and a fully connected output layer, giving a depth of 26 layers.

Within a residual branch, a ReLU activation precedes a convolution, followed by Batch Normalization. That pattern is repeated before the final multiplication by the branch coefficient. ReLU is the activation operation in the branch; Batch Normalization adjusts activations using batch-derived statistics during training. Their positions matter because the later architectural experiments change how much processing occurs before branches are recombined.

Most skip connections simply pass the input through unchanged. At downsampling points, the authors use a customized arrangement with parallel flows. Each flow contains 1x1 average pooling at step 2 and then a 1x1 convolution. One flow receives an input shifted by 1 pixel horizontally and vertically. Concatenating their outputs increases the width while drawing on different sampled positions.

The notation 26 2x32d identifies the base network used in many comparisons. The depth is 26, the number of residual branches is 2, and the first residual block has width 32. Wider versions change that initial block width while preserving the broad arrangement. Keeping this notation explicit helps distinguish experiments on the regularization procedure from experiments that also increase capacity.

Train on the stated image data

For CIFAR-10, training uses the 50k training set, and evaluation uses the 10k test set. The input images have dimensions 32x32. Standard translation and horizontal flipping augment the training inputs. Shake-Shake therefore supplements ordinary input augmentation; it is not evaluated as a replacement for it.

The CIFAR-10 networks are trained for 1800 epochs. The authors connect this long schedule to the stochasticity introduced by the method. Training starts with a learning rate of 0.2, which then follows cosine annealing without restarts. The setup uses 2 GPUs and mini-batches of 128.

These conditions are part of the reported result. A reader should not treat the final errors as evidence for a short-training benefit or a benefit under arbitrary schedules. The paper shows what the regularizer achieves in a setting that gives the stochastic procedure substantial training time.

The CIFAR-100 experiment changes the architecture to a ResNeXt without pre-activation, which the authors found slightly better suited to that dataset than the CIFAR-10 architecture. Its described configuration is ResNeXt-29 2x4x64d: it contains 2 residual branches, each with 4 grouped convolutions and 64 channels per group. The parameter count is 34.4M.

For this experiment, the authors retain the referenced ResNeXt hyper-parameters except for cosine learning-rate annealing and training for 1800 epochs. Batch size is an important additional condition. With 2 GPUs, the paper reports that reducing it from 128 to 32 is necessary for a competitive equal-weight baseline. The preferred Shake procedure is interpreted in the context of that stronger existing regularization.

Experiments and results

What the main scores measure

The reported outcome is classification test error, expressed as a percentage. A lower value means fewer test examples are classified incorrectly. The paper’s headline claims concern single-shot results, and it compares them with the published systems named in its discussion.

The repeated-run averages matter because training is stochastic. For the CIFAR-10 results table, the authors report averages over 3 runs except for the 96d configurations, which use 5. The headline CIFAR-100 Shake-Even result is averaged over 3 runs. These are averages across trained networks, instead of an assertion that every run reaches the reported mean.

The main numerical comparisons should also be separated from the paper’s extensive procedural comparisons. The text describes many settings qualitatively, but it does not state a numerical error for every one of them. Those qualitative findings help explain the method without supplying a complete ranking of every tested configuration.

CIFAR-10: the strongest reported result

The paper’s best CIFAR-10 result comes from a 26 2x96d network using Shake-Shake at image level. It has 26.2M parameters and reaches a mean test error of 2.86% across 5 runs. The median is 2.87%, with a minimum of 2.72% and a maximum of 2.95%.

Those statistics convey different aspects of the result. The mean is the headline score. The median describes the middle reported outcome. The minimum and maximum show that separate training runs do not end at exactly the same test error. The paper does not present the minimum as though it were the repeated-run average.

For published comparisons, the authors identify DenseNet-BC k=40 at 3.46% test error with 25.6M parameters, and ResNeXt-29, 16x64d at 3.58% with 68.1M parameters. The following chart uses the stated error rates without turning them into newly calculated improvements.

Published systems and Shake-Shake on CIFAR-10 test error

The wider Shake-Shake network has the lowest reported error among these systems.

Published systems and Shake-Shake on CIFAR-10 test errorDenseNet-BC k=40: 3.46DenseNet-BC k=403.46ResNeXt-29, 16x64d: 3.58ResNeXt-29, 16x64d3.58Shake-Shake-Image, 26 2x96d (this paper): 2.86Shake-Shake-Image, 26 2x96d (this paper)2.86
The numbers
System or settingtest error %
DenseNet-BC k=403.46
ResNeXt-29, 16x64d3.58
Shake-Shake-Image, 26 2x96d (this paper)2.86

The paper also emphasizes a smaller network. A 26 2x32d configuration using Shake-Even at image level has 2.9M parameters and achieves approximately the same error level as the published leading systems discussed in that comparison. The text does not attach an exact error to that statement, so it supports a qualitative efficiency comparison rather than another precise chart entry.

Parameter count and test error answer different questions. The larger Shake-Shake network establishes the strongest reported error. The smaller configuration illustrates that useful performance is possible with fewer parameters. Neither observation on its own establishes training speed, energy use, or total computational efficiency.

CIFAR-100: improvement over a strengthened baseline

The CIFAR-100 discussion first identifies a strong baseline obtained through changes to a standard ResNeXt-29 8x64d setup. The changes include batch size, removal of pre-activation, longer training, and cosine annealing. With these adjustments, the reported test error is 16.34%.

Adding Shake-Even regularization gives a mean test error of 15.85%. The paper reports a median of 15.85%, a minimum of 15.66%, and a maximum of 16.04% across 3 runs. This is the main CIFAR-100 result.

Baseline and Shake-Even on CIFAR-100 test error

Shake-Even improves the reported error after the baseline training setup has been strengthened.

Baseline and Shake-Even on CIFAR-100 test errorAdjusted ResNeXt baseline: 16.34Adjusted ResNeXt baseline16.34ResNeXt with Shake-Even (this paper): 15.85ResNeXt with Shake-Even (this paper)15.85
The numbers
System or settingtest error %
Adjusted ResNeXt baseline16.34
ResNeXt with Shake-Even (this paper)15.85

This comparison is important because it avoids attributing all of the final performance to random branch mixing. The paper explicitly acknowledges that the baseline already benefits from architectural and training choices. Shake-Even is then assessed as an additional intervention.

The CIFAR-100 investigation is also less extensive than the CIFAR-10 one. The authors attribute the smaller number of tests to the combination of a larger network and long training. The result supports the usefulness of Shake-Even in that setting, but it does not imply an equally detailed exploration of every competing procedure.

How to read the performance claims

The paper’s state-of-the-art language is tied to the published single-shot results available to the authors. It is a statement about the comparisons they discuss, under the reported conditions. It is not evidence that random branch mixing will outperform every alternative regularizer or architecture.

The training recipe is substantial. The CIFAR-10 outcome uses input augmentation, Batch Normalization, a particular residual design, cosine annealing, and a long schedule alongside Shake-Shake. The experiments isolate some choices within that recipe, but the headline score belongs to the complete setup.

The most informative conclusion is therefore specific. Properly chosen branch perturbations can improve the generalization of the tested networks, and a wider image-level Shake-Shake configuration obtains the paper’s strongest CIFAR-10 result. CIFAR-100 favors a somewhat different procedure after batch size is reduced. The method’s success includes this dependence on conditions rather than eliminating it.

What the ablations show

Keeping the forward coefficients weakens the effect

The forward/backward comparisons are the paper’s most direct test of what makes Shake-Shake distinctive. In Shake-Keep, the forward computation uses random branch weights, but the backward computation retains them. The authors find that this does not substantially change the error rate.

Their interpretation is that the network can accommodate the perturbation when its learning updates follow the same branch proportions that generated the forward result. Random internal mixtures alone are therefore not enough to explain the strongest outcomes.

This is an important control. Without it, a reader could attribute the benefit entirely to the variety of intermediate representations. The Keep comparison shows that changing the correspondence between forward contribution and backward update is a consequential part of the procedure.

The conclusion remains empirical. The comparison does not prove that every forward-only perturbation must be weak, or that a network literally cancels the random coefficients. It establishes that, in the tested setting, preserving the forward coefficients during learning gives a much weaker result than the more disruptive alternatives.

Forward and backward randomness have different roles

Even-Shake fixes the forward branch weights but randomizes the backward ones. The paper finds that this works only with image-level coefficients. That result makes the scope of backward variation important: randomizing gradients at batch level is not interchangeable with doing so separately for images.

Shake-Even takes the opposite arrangement. It randomizes the forward mixture and uses equal backward coefficients. Both Shake-Even and Shake-Shake perform strongly at width 32 in the CIFAR-10 investigation. When the first residual block is widened to 64d, the more favorable training behavior of Shake-Shake begins to translate into a clearer performance advantage.

These comparisons show that neither direction can be reduced to a simple rule such as “more randomness is better.” The benefit depends on where randomness enters, whether it is independent across images, and how much capacity the network has.

The naming scheme is useful because it keeps these dimensions separate. Shake-Shake-Image identifies forward resampling, backward resampling, and image-level coefficients. It does not merely label a broad family of noisy networks. The experimental distinctions are embedded in the procedure’s name.

Image-level coefficients generally strengthen regularization

The paper’s comparisons suggest that assigning coefficients separately to images increases regularization. Images within the same mini-batch then encounter different balances between the residual branches, rather than all sharing the same mixture.

The evidence does not establish a universal ordering for every dataset and architecture. In particular, Even-Shake needs image-level operation to work in the reported comparison, while other procedures have their own behavior. The general finding is that coefficient scope changes the training problem enough to affect the outcome.

This is also why the image-level mechanism should not be described as elementwise noise. Each image still receives a coherent scalar for a branch at a block. The independence is across examples, not across every entry in the representation.

Branch outputs become less correlated

The authors test their proposed explanation by measuring the correlation between the residual branches. They compare 3 equal-weight baseline networks with 3 Shake-Shake-Image networks on CIFAR-10, all using the 26 2x32d architecture.

For each residual block, the same incoming mini-batch passes through the residual branches with coefficients fixed at 0.5. The resulting output tensors are flattened into vectors. The procedure accumulates covariance and variance information as the test images pass through the network, then uses those quantities to obtain correlation.

Covariance measures how corresponding values vary together. Variance measures variation within each branch’s values. Correlation combines them into a measure of how closely the branches’ outputs move together. The paper uses online algorithms so the quantities can be accumulated over the test set.

The observed correlation is lower for the regularized networks. This is consistent with the idea that Shake-Shake encourages branches to produce different representations, reducing dependence on a fixed partnership between nearly redundant computations.

The wording “consistent with” matters. Lower correlation does not prove that the difference causes the lower test error. It also does not show that every difference between branches is useful. The measurement supplies evidence for a proposed mechanism, not a complete account of generalization.

The alignment check supports the comparison

Comparing corresponding tensor entries assumes that positions across the branches are meaningfully aligned. The authors explicitly identify this issue. If branches organized their representations in unrelated ways, a low direct correlation could reflect mismatched coordinates rather than substantively different information.

To investigate, they compare activations from different layer positions across the branches. They examine the first three layers within every residual block, considering both positions that match and pairings that do not.

Matching positions show higher correlation than the other configurations. The authors interpret that pattern as compatible with the idea that the final summation encourages alignment between the branches.

This strengthens the interpretation of the original correlation analysis, but only within the scope of the test. It does not establish a full correspondence between every internal feature. The useful contribution is that the paper checks a necessary assumption rather than leaving the correlation measure uninterpreted.

Deliberately opposing the coefficients can be too strong

The regularization-strength investigation asks what happens when the backward pass favors a branch that the forward pass downweighted. Its most direct test uses:

βᵢ,ⱼ = 1 − αᵢ,ⱼ

Here, αᵢ,ⱼ is the forward coefficient for image j at residual block i. The symbol βᵢ,ⱼ denotes the backward coefficient at the same position for that image. The rule makes the backward coefficient complementary to the forward coefficient.

This test uses CIFAR-10 with image-level coefficients in a 26 2x32d network. The resulting effect is severe: training error remains high. The disturbance can therefore exceed the network’s ability to learn effectively.

The paper also examines additional backward-coefficient rules to understand this behavior. Its reported conclusions concern the relation between the forward and backward coefficients. Greater separation tends to strengthen the regularization, and moving across 0.5 appears to introduce a more abrupt change in strength.

These observations offer a direction for controlling the method more carefully. They do not yield a universal formula for choosing the best disturbance. They show that the relative position of the coefficients matters, beyond the fact that they are random.

Removing skip connections does not always remove the benefit

Architecture A removes skip connections while preserving residual-style branches containing the longer convolutional sequence. This tests whether the identity route is indispensable to the regularizer’s effect.

The results indicate that useful regularization is possible without that route. However, Shake-Shake-Image is too strong for the tested 26 2x32d architecture and leads to underfitting. Shake-Even-Image works better because its effect is softer.

The authors suggest that greater capacity might change this preference, but that remains a possibility instead of a demonstrated result for this experiment. The architectural change and the regularization strength must be considered together.

Architecture A was tested once for each configuration. Its result is therefore best treated as evidence that the mechanism can survive the removal of skip connections under some conditions, with less repeated-run support than the main CIFAR experiments.

Shortening branches changes the behavior substantially

Architecture B also omits skip connections, but each branch has only 1 convolutional layer, and the number of blocks is doubled. The purpose is to examine whether the longer within-branch computation matters.

Here, the regularization no longer provides the same benefit. The Shake-Even-Image training and test curves coincide with those of the equal-weight baseline. The authors interpret this as evidence that forward shaking has no effect on the cost function in that configuration.

Shake-Shake-Image changes the training curve, yet its test curve remains close to the others, with lower variance. This separates a visible effect on optimization from a useful effect on generalization.

The authors infer that interaction between the convolutions within a branch may be important. That inference fits the architectural contrast, but it is not a proof of the exact mechanism. Architecture B was tested twice for each configuration, giving a small empirical investigation of this dependency.

Removing Batch Normalization exposes instability

Architecture C removes both skip connections and Batch Normalization. It retains the longer branch structure, but the network is made shallower so that the equal-weight baseline can converge. Depth changes from 26 to 14.

Training is also gentler. The initial learning rate is set to 0.05 following a warm start at 0.025 for 1 epoch. Applying the earlier Shake procedures directly causes divergence, so the authors choose Shake-Even-Image and narrow the coefficient interval from [0,1] to [0.4,0.6].

Under that softer perturbation, the paper reports a useful effect. Yet other tested settings still diverge. These configurations were tested once on CIFAR-10, so they establish a promising possibility with clear sensitivity, rather than a broadly validated recipe.

The result answers the architectural question cautiously. Batch Normalization is not an absolute prerequisite for any benefit, but removing it changes the conditions under which the method remains trainable.

Limitations

The authors leave the dynamics unresolved

The authors explicitly conclude that the exact dynamics remain uncertain. Their experiments suggest that branch decorrelation contributes to the reduction in overfitting, but the paper does not derive a theory explaining why a particular forward/backward mismatch should improve generalization.

The correlation analysis narrows the explanation without completing it. It shows a relationship between regularization and branch similarity. It does not isolate decorrelation as the sole cause of performance gains, nor demonstrate that forcing lower correlation by another means would reproduce them.

The strength experiments likewise identify patterns instead of a predictive law. Distance between forward and backward coefficients matters, and crossing the equal-weight point appears consequential. The paper does not turn these observations into a rule that chooses the best coefficient distribution before training.

These are author-stated limits in the sense that the conclusion presents mechanism and broader applicability as open questions. The method is supported by experiments even while its full explanation remains incomplete.

Broader applicability is a proposal

The authors explicitly motivate experiments beyond residual connections and Batch Normalization as steps towards a wider application range. Those experiments are encouraging in selected configurations, but they are also where sensitivity becomes clearest.

Removing skip connections does not automatically preserve the preferred Shake-Shake procedure. Removing normalization requires changes to depth, learning rate, and coefficient range. Some settings fail to remain stable.

As a result, the paper supports the possibility of broader use without establishing a general-purpose replacement for existing regularizers. A new architecture may need a different strength or a different forward/backward procedure. It may also lack the branch structure needed for the intervention.

The mention of NLP belongs to this motivation for broader applicability. There are no language-task results in the reported experiments. The discussion does not establish performance gains for language processing, symbolic systems, or Mova.

The benchmark scope is narrow

A careful-reader limit is that the experimental evidence concerns CIFAR image classification. The introductory discussion names larger recognition settings as part of the history of residual networks, but Shake-Shake is not evaluated on all those tasks in the reported study.

The strongest conclusions therefore concern the tested datasets and architectures. The paper does not establish the same behavior for detection, segmentation, or unrelated data types. Nor does it show that the same procedure remains preferable when the data scale changes substantially.

This matters because overfitting and the useful amount of regularization depend on the learning conditions. A disturbance that helps a small-image classification setup can be unnecessary or excessive elsewhere. The paper’s own capacity and batch-size comparisons give reasons to expect such dependence.

The training recipe limits causal attribution

Another careful-reader limit concerns the complete recipe behind the headline scores. Shake-Shake is trained alongside input augmentation, normalization, a particular optimizer schedule, and architecture choices. The reported results belong to that combination.

The internal comparisons establish meaningful effects of coefficient procedures. They do not imply that every element of the final recipe is interchangeable. The CIFAR-100 baseline discussion is particularly clear that longer training, batch-size changes, and other adjustments already improve performance before Shake-Even is added.

The paper also uses 1800 epochs. That supports a result under long training, but it does not answer how much benefit remains under a shorter training budget. Parameter counts alone cannot resolve this question because they do not measure the full cost of optimization.

The authors themselves note that the larger CIFAR-100 network and long schedule restrict how many experiments they can perform. That is both a practical constraint and a reason not to infer an exhaustive search over procedures.

Repetition is uneven across experiments

The main headline scores include repeated runs, but the architectural explorations have less replication. Architecture A is tested once per setting, architecture B twice, and architecture C once for the investigated settings.

A careful reader should therefore assign different evidential weight to these findings. The repeated CIFAR headline scores provide more information about training variation. The simplified architectures primarily reveal possibilities, failures, and sensitivities that deserve further investigation.

Even the reported minimum and maximum values are not confidence intervals. They describe the outcomes observed in the stated runs. The paper does not provide a broader statistical guarantee about how often an independently trained network will fall within that span.

This does not invalidate the comparisons. It limits how precisely the reader can characterize reliability, especially for exploratory configurations.

The measurements do not establish every useful property

The reported metric is classification error. It does not directly measure calibration, resistance to altered inputs, fairness, or the interpretability of individual features. Better test error should not silently become a claim about these other properties.

Similarly, less correlated branch outputs are not automatically more understandable outputs. The paper examines similarity between learned representations, not whether a human can attach stable meanings to their coordinates.

The alignment check improves confidence in the correlation comparison, but it remains a check on particular layer pairings. It does not prove that the branches form a complete set of complementary specialists.

Finally, deterministic equal-weight testing is a practical rule motivated by the training coefficients’ expectation. The paper does not establish an exact equivalence between this computation and averaging predictions over every stochastic branch mixture. Its value is demonstrated through the reported evaluations, instead of a general identity for the whole nonlinear network.

What came after

The later citation record places Shake-Shake alongside work on regularization, optimization, architecture search, data augmentation, and classification uncertainty. That breadth shows that the paper became relevant to several discussions about generalization. A citation alone, however, does not establish how a later method used its mechanism. The available descriptions identify these works and their subjects, but do not document their experiments with Shake-Shake or explain the role of each citation. The connections below therefore distinguish the subject of a later work from a demonstrated technical inheritance.

Decoupled weight decay regularization belongs to the regularization side of this record. Its named subject concerns weight decay, while Shake-Shake changes interactions between branches and their learning signals. The citation places the papers in a shared conversation about controlling learning. It does not establish that decoupled weight decay adopts stochastic branch mixing, replaces it, or produces a particular result when combined with it.

Efficient Architecture Search by Network Transformation connects the citation record to architecture design. This is a relevant neighboring question because Shake-Shake depends on the structure of the network receiving it. Its own ablations show that branch length and skip connections affect the outcome. The later title identifies a search approach based on network transformation, but the citation information does not specify whether Shake-Shake is used during search, in final training, or only as related work. No particular implementation relationship can be inferred.

DropBlock: A regularization method for convolutional networks is explicitly another regularization contribution for convolutional networks. That makes it a direct neighbor in subject matter. Shake-Shake’s distinctive intervention is a scalar mixture over branches, coupled to a potentially different backward mixture. The later work’s title establishes its setting and purpose, but does not establish that it reproduces this intervention. The defensible connection is participation in the same effort to improve generalization in convolutional architectures.

Averaging Weights Leads to Wider Optima and Better Generalization brings a different emphasis into the citation record: the relationship between learned weights, optimization outcomes, and generalization. Shake-Shake already treats the learning process as a place where structured variation can matter, instead of viewing regularization solely as a constraint on predictions. The later title points toward weight averaging, but the available citation information does not establish that it explains Shake-Shake’s behavior or uses branch resampling. These remain distinct subjects unless a more specific connection is documented.

Human Uncertainty Makes Classification More Robust concerns uncertainty in classification, as its title indicates. Its citation of Shake-Shake places the paper near a broader discussion of how training choices influence classifier behavior. It would be unwarranted to infer from that citation that the later work uses Shake-Shake’s coefficients, studies residual-branch correlation, or validates the proposed decorrelation explanation. The record establishes the citation relationship and the later work’s stated subject.

Randaugment: Practical automated data augmentation with a reduced search space returns to a theme central to Shake-Shake’s motivation: creating useful variation during training. Shake-Shake begins by asking whether augmentation-like disturbances can operate inside a network. The later work’s title concerns automated data augmentation and a smaller search space. That thematic connection is clear, but it does not show that Randaugment transfers Shake-Shake’s internal mixing rule or its altered backward procedure.

TrivialAugment: Tuning-free Yet State-of-the-Art Data Augmentation is another later citation centered on augmentation. Its title emphasizes avoiding tuning, which makes it an interesting point of comparison with Shake-Shake’s experimentally visible sensitivity to procedure and architecture. The citation record does not supply a direct comparison or demonstrate that TrivialAugment resolves those sensitivities. It identifies a later contribution to augmentation that cites the paper.

Across these later works, the supported historical claim is modest but useful: Shake-Shake became a reference in several lines of research concerned with generalization. Its own enduring experimental questions remain concrete. Where should variation enter a network? Should the backward signal preserve the forward mixture? How much disturbance can a particular architecture absorb? The paper makes those questions testable through branch-level controls, while leaving the precise mechanism and the breadth of successful transfer open.

Cite

Cite as Xavier Gastaldi. 2017. Shake-Shake regularization. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1705.07485 · arXiv 1705.07485

@misc{gastaldi2017shake,
  title = {{Shake-Shake regularization}},
  author = {Xavier Gastaldi},
  year = {2017},
  doi = {10.48550/arxiv.1705.07485},
  eprint = {1705.07485},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1705.07485}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/gastaldi-2017-shake-shake-regularization/

References

24 references, from the paper's own bibliography.

  1. Masoud Abdi and Saeid Nahavandi. Multi-residual networks. arXiv preprint arXiv:1609.05672, 2016. OpenAlex ↗ · Scholar ↗
  2. Guozhong An. The effects of adding noise during backpropagation training on a generalization performance. Neural Comput., 1996. OpenAlex ↗ · Scholar ↗
  3. Léon Bottou. Online algorithms and stochastic approximations. In Online Learning and Neural Networks. Cambridge University Press, 1998. OpenAlex ↗ · Scholar ↗
  4. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016a. our card
  5. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In ECCV, 2016b. OpenAlex ↗ · Scholar ↗
  6. Gao Huang, Zhuang Liu, and Kilian Q. Weinberger. Densely connected convolutional networks. arXiv preprint arXiv:1608.06993, 2016a. OpenAlex ↗ · Scholar ↗
  7. Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. Deep networks with stochastic depth. In ECCV, 2016b. our card
  8. Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. OpenAlex ↗ · Scholar ↗
  9. Guoliang Kang, Jun Li, and Dacheng Tao. Shakeout: A new regularized deep neural network training scheme. In AAAI Conference on Artificial Intelligence, 2016. OpenAlex ↗ · Scholar ↗
  10. Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In International Conference on Learning Representation (ICLR '17), 2017. OpenAlex ↗ · Scholar ↗
  11. Alex Krizhevsky. Learning multiple layers of features from tiny images. Tech Report, 2009. OpenAlex ↗ · Scholar ↗
  12. Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. arXiv preprint arXiv:1605.07648, 2016. OpenAlex ↗ · Scholar ↗
  13. Yixuan Li, Jason Yosinski, Jeff Clune, Hod Lipson, and John Hopcroft. Convergent learning: Do different neural networks learn the same representations? In International Conference on Learning Representation (ICLR '16), 2016. OpenAlex ↗ · Scholar ↗
  14. Tsung-Yi Lin, Michael Maire, Serge J. Belongie, Lubomir D. Bourdev, Ross B. Girshick, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C. Lawrence Zitnick. Microsoft COCO: Common objects in context. In ECCV, 2014. our card
  15. Ilya Loshchilov and Frank Hutter. Sgdr: stochastic gradient descent with restarts. arXiv preprint arXiv:1608.03983, 2016. OpenAlex ↗ · Scholar ↗
  16. Arvind Neelakantan, Luke Vilnis, Quoc V Le, Ilya Sutskever, Lukasz Kaiser, Karol Kurach, and James Martens. Adding gradient noise improves learning for very deep networks. arXiv preprint arXiv:1511.06807, 2015. our card
  17. Steven J. Nowlan and Geoffrey E. Hinton. Simplifying neural networks by soft weight-sharing. Neural Computation, 1992. OpenAlex ↗ · Scholar ↗
  18. Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015. our card
  19. Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15:0 1929–1958, 2014. our card
  20. Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In Proceedings of the 30th International Conference on International Conference on Machine Learning - Volume 28, 2013. OpenAlex ↗ · Scholar ↗
  21. Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alex A. Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. In ICLR 2016 Workshop, 2016. OpenAlex ↗ · Scholar ↗
  22. Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. arXiv preprint arXiv:1611.05431, 2016. OpenAlex ↗ · Scholar ↗
  23. Li Yinan, Xu Ruoyi, and Liu Fang. Whiteout: Gaussian adaptive regularization noise in deep neural networks. arXiv preprint arXiv:1612.01490v2, 2016. OpenAlex ↗ · Scholar ↗
  24. Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016. OpenAlex ↗ · Scholar ↗