Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Drop whole feature maps
In an image, a pixel looks almost like its neighbours, and the same is true of the feature maps inside a convolutional network. If dropout removes scattered single values, the next layer, which looks at small neighbourhoods, can guess the missing values from the ones around them, so very little is lost. Spatial dropout removes entire channels instead: a whole feature map vanishes, and nothing nearby can stand in for it. DropBlock removes contiguous patches, a middle ground.
Image, audio, radar and time-series networks are mostly convolutional, and plain dropout is weak in their convolutional layers. Spatial dropout (Dropout2d, SpatialDropout2D) and DropBlock give the same kind of regularisation that dropout gives fully connected layers.
- 1. Spatial dropout drops…
- 2. Element-wise dropout is weak in conv layers because…
- 3. DropBlock drops…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Spatial dropout on a map H of shape (C, height, width): draw one mask per channel, mₖ ~ Bernoulli(1 − p), and output mₖHₖ/(1 − p). Example: three channels of ones, mask (1, 0, 1), p = 0.5 gives channels of 2, 0, 2.
- Random draws: C per example instead of C × height × width: 64 against 65 536 for 64 channels of 32 × 32.
- Expected channels kept: C(1 − p): 48 of 64 at p = 0.25.
- DropBlock: choose block centres with probability γ and zero a b × b square around each. To drop a fraction p of a map of side s on average, γ = (p/b²)·s²/(s − b + 1)². It is usually scheduled from 0 up to its final value during training.
- Neighbour correlation: a smooth map has correlation near 1 between neighbouring positions; white noise has about 0.
- 1. Spatial dropout draws per example…
- 2. Channels kept of 64 at p = 0.25:
- 3. Neighbour correlation of white noise is about…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Spatial dropout in code
Exercise 1. On 16 smooth maps of length 200, values removed by element-wise dropout (p = 0.3) were rebuilt from kept neighbours within two positions with a relative error of 0.18. Dropped channels could not be rebuilt at all (error 1). On uncorrelated maps the element-wise error was 1.14: there, element dropout really removes information.
Practice.
- Use
nn.Dropout2d(orDropout1d,Dropout3d) after convolution blocks, typically p = 0.1–0.3. - DropBlock with block size 7 and drop rate about 0.1 on the last stages of a ResNet was the original recipe, with the rate increased linearly during training.
- In segmentation and detection networks, channel dropout is often placed before the prediction head.
block = torch.nn.Sequential(torch.nn.Conv2d(64, 64, 3, padding=1), torch.nn.BatchNorm2d(64), torch.nn.ReLU(), torch.nn.Dropout2d(0.2))- 1. In exercise 1, element-dropped values on smooth maps were rebuilt with error about…
- 2. PyTorch's channel dropout for images is…
- 3. DropBlock's rate is usually…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Why correlation matters. Dropout regularises by removing information the network might otherwise rely on. If a dropped activation is nearly a linear combination of kept neighbours, the next convolution can reconstruct it, and the effective noise is small. Tompson et al. (2015) observed this when training pose-estimation networks and proposed dropping whole channels.
Spatial dropout as dropout on features. A channel is one feature detector applied everywhere. Dropping it is dropout at the level of features, the analogue of dropping a hidden unit in a fully connected layer. Each feature must be useful without the others.
DropBlock’s middle ground (Ghiasi et al., 2018). Dropping a contiguous region removes a part of an object from a feature map, which forces the network to use other parts. This is like Cutout (E4-9), but applied inside the network.
Interaction with batch normalisation. As with ordinary dropout, the variance seen by a following BN layer changes between training and test. Placing channel dropout after the last BN, or before the head, limits the effect.
- 1. Spatial dropout was proposed for…
- 2. Dropping a channel is the analogue of dropping…
- 3. DropBlock is like Cutout but…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.Element or channel dropout on correlated signals?
History.
- J. Tompson, R. Goroshin, A. Jain, Y. LeCun and C. Bregler (2015) introduced spatial dropout.
- G. Ghiasi, T.-Y. Lin and Q. Le (2018) introduced DropBlock.
- Keras and PyTorch added SpatialDropout and Dropout2d layers.
Exercise 2. Signals of length 48 whose class is a rising or falling ramp at a random position, on noise smoothed over 5 samples. A network of convolution (1 → 8 channels, width 5), ReLU, dropout (p = 0.3), convolution (8 → 8), ReLU, global average pooling and a linear layer, trained with Adam for 400 full-batch steps on 80 signals. Means of three seeds:
| dropout after the first convolution | test accuracy | test cross-entropy |
|---|---|---|
| none | 0.903 | 0.327 |
| element-wise | 0.870 | 0.330 |
| spatial (channels) | 0.914 | 0.207 |
- Element-wise dropout did not help: accuracy fell by 3 points and the loss did not improve.
- Channel dropout helped: accuracy rose by 1 point and the cross-entropy fell by more than a third.
- Caveat: a tiny network, one rate and three seeds; the accuracy differences are small, the loss difference clearer.
Spatial dropout in AI, robotics and aerospace
- Visual perception networks for robots and drones use channel dropout or DropBlock in their convolutional backbones and heads.
- Radar, sonar and vibration signals processed by 1-D or 2-D convolutions share the correlation that defeats element-wise dropout.
- Robustness to sensor channel loss: dropping whole input channels during training teaches a model to cope when one sensor stream fails.
References
- J. Tompson, R. Goroshin, A. Jain, Y. LeCun, C. Bregler (2015). “Efficient object localization using convolutional networks.” Proc. CVPR.
- G. Ghiasi, T.-Y. Lin, Q. V. Le (2018). “DropBlock: a regularization method for convolutional networks.” Advances in NeurIPS.
- N. Srivastava et al. (2014). “Dropout: a simple way to prevent neural networks from overfitting.” JMLR 15.