Abstract
To break the three lockings during the backpropagation (BP) process for neural network training, multiple decoupled learning methods have been investigated recently. These methods either lead to a significant drop in accuracy performance or suffer from a dramatic increase in memory usage. In this paper, a new form of decoupled learning, named decoupled neural network training scheme with re-computation and weight prediction (DTRP), is proposed. In DTRP, a re-computation scheme is adopted to solve the memory explosion problem, and a weight prediction scheme is proposed to deal with the weight delay caused by re-computation. Additionally, a batch compensation scheme is developed, allowing the proposed DTRP to run faster. Theoretical analysis shows that DTRP is guaranteed to converge to critical points under certain conditions. Experiments conducted by training various convolutional neural networks on several classification datasets show comparable or better results than state-of-the-art methods and BP. These experiments also reveal that by adopting the proposed method, the memory explosion problem is effectively solved, and significant acceleration is achieved.
Introduction: The Backpropagation Bottleneck
Training deep neural networks is traditionally a sequential process governed by Backpropagation (BP). This creates three distinct "lockings" that hinder parallelization:
- Forward Locking: Layer $i$ cannot start until layer $i-1$ finishes.
- Backward Locking: Layer $i$ cannot calculate gradients until it receives them from layer $i+1$.
- Update Locking: Parameters cannot be updated until the entire forward and backward pass is complete.
Because of these lockings, most expensive hardware resources (GPUs) sit idle while waiting for a single layer to finish its work. While "decoupled" learning attempts to solve this by splitting the network into modules that run asynchronously, it usually introduces a trade-off: either a loss in accuracy due to "stale" weights or "memory explosion" from storing massive amounts of intermediate data for every module.
The DTRP Framework
The proposed DTRP (Decoupled Training with Re-computation and Weight Prediction) scheme addresses these challenges through three core pillars: Decoupled Training, Re-computation, and Weight Prediction.
Decoupled Training Pipeline
DTRP splits the network into $K$ modules, each assigned to a different GPU. This allows different modules to process different batches of data simultaneously, effectively breaking the forward and backward lockings.
As shown in the figure above, while GPU3 is processing the forward pass of batch 1, GPU2 can begin processing batch 2, and GPU1 can start batch 3. This pipeline significantly increases hardware utilization. The diagram also highlights the "Second forward pass," which represents the re-computation step used to save memory.
Re-computation and Weight Prediction
To solve the memory explosion problem, DTRP adopts a re-computation scheme. Instead of storing every activation for every module, DTRP re-runs a local forward pass during the backward stage. This "trading FLOPs for bytes" approach allows the system to scale to more modules without exceeding memory limits.
However, asynchronous modules often use "stale" weights (parameters from previous iterations). DTRP uses an EMA-Adam predictor to forecast future weight states. By training on these predicted weights, the model mitigates the delay and maintains high accuracy.
The figure above illustrates how updates are managed across modules. The weight prediction mechanism treats weight updates as a time-series problem, using moving averages to "guess" the next weight state, bridging the gap between asynchronous modules that are at different iteration stages.
Batch Compensation
In heterogeneous or unbalanced environments, one GPU might be slower than others (the "barrel effect"). DTRP introduces a batch compensation scheme that identifies the slowest module and drops a small percentage of "easy" samples (those with low loss) from its workload. This "strategic laziness" allows the bottleneck module to catch up with negligible impact on final accuracy.
Experimental Evaluation
The researchers evaluated DTRP on standard computer vision benchmarks: CIFAR-10, CIFAR-100, and ImageNet, using architectures like ResNet-18, ResNet-50, ResNet-110, and Wide ResNet (WRN-28-10).
Key Results
- Speedup: DTRP achieved a 1.69x speedup with two modules ($K=2$) and up to 2.17x with three modules ($K=3$) compared to standard BP.
- Memory Efficiency: Unlike previous methods like FDG, DTRP’s memory footprint remained nearly flat and manageable as more modules were added.
- Accuracy: DTRP consistently matched or exceeded standard BP. For example, on CIFAR-10 with ResNet-110, DTRP achieved a 5.17% error rate, outperforming standard BP (5.79%) and other state-of-the-art decoupled methods like FR (5.76%) and DGL (6.26%).
Conclusion
DTRP represents a significant step forward in breaking the sequential constraints of neural network training. By combining re-computation to save memory, weight prediction to maintain accuracy, and batch compensation to balance hardware load, it achieves substantial speedups without the typical drawbacks of decoupled learning. Future work will explore more sophisticated weight prediction algorithms and testing on non-convolutional architectures like Transformers.
Summary updated