Improving compute efficacy frontiers with SliceOut

Pascal Notin, Aidan N. Gomez, Joanna Yoo, Yarin Gal · DOI

Abstract

Pushing forward the compute efficacy frontier in deep learning is critical for tasks that require frequent model re-training or workloads that entail training a large number of models. We introduce SliceOut -- a dropout-inspired scheme designed to take advantage of GPU memory layout to train deep learning models faster without impacting final test accuracy. By dropping contiguous sets of units at random, our method realises training speedups through (1) fast memory access and matrix multiplication of smaller tensors, and (2) memory savings by avoiding allocating memory to zero units in weight gradients and activations. At test time, turning off SliceOut performs an implicit ensembling across a linear number of architectures that preserves test accuracy. We demonstrate 10-40% speedups and memory reduction with Wide ResNets, EfficientNets, and Transformer models, with minimal to no loss in accuracy. This leads to faster processing of large computational workloads overall, and significantly reduce the resulting energy consumption and CO2 emissions.

Introduction: The Compute Efficacy Frontier

Deep learning has a massive appetite for compute. While techniques like quantization and pruning have made inference significantly more efficient, optimizing the training phase remains a stubborn challenge. Standard dropout—the ubiquitous regularization technique—zeros out random neurons to prevent overfitting. However, because GPUs are optimized for dense matrix operations, zeroing out individual values doesn't actually reduce the number of floating-point operations (FLOPs) or the memory footprint; the GPU still processes the full-sized "sparse" tensor.

SliceOut aims to push the compute efficacy frontier: the trade-off curve between a model's accuracy and the computational resources (time, memory, energy) required to train it.

Methods: Hardware-Aware Regularization

The core innovation is SliceOut. Instead of applying a random sparse mask, SliceOut selects a contiguous "slice" of neurons to keep during a training step. By aligning the dropout pattern with how GPUs actually access memory (contiguous blocks), the framework can point to a sub-section of the memory buffer, allowing the GPU to perform matrix multiplications on physically smaller tensors.

Comparison of dropout schemes

Memory Savings and Normalization

By not allocating memory for the "dropped" units in weight gradients and activations, SliceOut significantly reduces the training-time memory bottleneck. To ensure the model behaves correctly when the full network is used at test time, the authors introduce two normalization schemes—Flow and Probabilistic—to preserve the first and second moments (mean and variance) of the layer outputs.

Architecture-Specific Variants

SliceOut is adaptable across architectures. For CNNs, Channel-SliceOut drops contiguous sets of channels, while Patch-SliceOut drops contiguous 2D spatial chunks. In Transformers, it slices query and key vectors in attention layers and adjusts softmax temperature to account for reduced dimensionality.

Key Results

The authors validated SliceOut across a diverse range of tasks, including vision (ImageNet, CIFAR) and language modeling (LM1B).

Performance frontiers on ImageNet and CIFAR100
  • Wide ResNets (CIFAR): Achieved up to 35% speedups and 25% memory reduction with no loss in accuracy. In some cases, SliceOut allowed training a larger model (e.g., 46x12) in the same time it would take to train a smaller baseline (40x10), resulting in a net accuracy gain for the same time budget.
  • EfficientNets (ImageNet): Demonstrated 20% speedups while maintaining state-of-the-art performance.
  • Transformers (LM1B): Realized gains of ~10% in speed and memory. The gains are lower here because Transformers spend significant time on non-matrix operations like embedding lookups.

Discussion and Environmental Impact

SliceOut provides "regularization for free" by leveraging hardware efficiency. It also offers a "milder" ensembling effect; while standard dropout samples from an exponential number of sub-architectures, SliceOut samples from a linear or quadratic number. This often proves more stable, allowing for higher dropout rates without performance collapse. Furthermore, the 10-40% reduction in training time directly translates to a similar reduction in energy consumption and CO2 emissions.

Limitations and Future Work

At extreme dropout rates (p >= 0.9), SliceOut can underperform standard dropout because the resulting sub-networks become "under-capacitated." Future directions include exploring automated ways to determine optimal "slice width" dynamically and combining SliceOut with other efficiency techniques like mixed-precision training.

Summary updated

BibTeX
@misc{notin2020improving,
  author = {Pascal Notin and Aidan N. Gomez and Joanna Yoo and Yarin Gal},
  title = {{Improving compute efficacy frontiers with SliceOut}},
  year = {2020},
  eprint = {2007.10909},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.10909},
}
Figure