Abstract
As deep neural networks (DNNs) scale to billions of parameters, training processes increasingly span thousands of GPUs over several weeks, making hardware failures an operational certainty. Traditional recovery mechanisms, such as periodic checkpointing or memory-intensive snapshotting, impose significant performance and memory overheads. This paper introduces SWIFT, a novel failure recovery framework that eliminates the need for expensive model snapshots. By exploiting the mathematical invertibility of common optimizers and utilizing idle "bubble time" in pipeline schedules for asynchronous logging, SWIFT significantly reduces recovery overhead. Experimental results demonstrate that SWIFT can reduce recovery time by up to 98.9% and improve total training throughput by up to 1.16x without sacrificing model accuracy.
1. Introduction
Training state-of-the-art models like GPT-3 or large-scale Vision Transformers (ViT) is a resource-intensive marathon. In these high-performance computing environments, the Mean Time Between Failures (MTBF) decreases as the cluster size increases. Consequently, the ability to recover quickly from a node failure is critical to the overall efficiency of the training pipeline.
Historically, the industry has relied on checkpoint-restart protocols, where the entire model state is saved to persistent storage at regular intervals. However, the sheer size of modern models makes frequent checkpointing prohibitively slow, while infrequent checkpointing risks losing hours of computational progress. Newer "snapshotting" techniques attempt to mitigate this by storing state in GPU memory, but this competes with the model itself for limited memory resources, often leading to performance bottlenecks. SWIFT addresses these challenges by moving away from state-copying entirely, favoring mathematical reconstruction and opportunistic logging.
2. Methodology
SWIFT employs a multi-pronged strategy tailored to the specific parallelization strategy used during training.
2.1 Update-Undo (Replication-based Recovery)
In data-parallel training, every worker maintains a replica of the model parameters. When a single worker fails, the surviving workers may have already committed the latest gradient updates, leading to a state divergence between the survivors and the replacement worker.
SWIFT introduces the Update-Undo mechanism, based on the observation that most widely used optimizers—such as Stochastic Gradient Descent (SGD) and Adam—are mathematically invertible. Instead of rolling back to a saved snapshot, surviving workers perform an inverse operation of the last update to revert their parameters to a consistent state. This allows the system to synchronize the replacement worker using the current (reverted) state of the survivors, bypassing the need for frequent disk or memory saves.
2.2 Logging-based Recovery for Pipeline Parallelism
Pipeline parallelism, which partitions model layers across different machines, presents a different challenge because replicas are not readily available. To handle this, SWIFT implements a logging-based approach with two key innovations:
- Asynchronous "Bubble" Logging: Pipeline schedules naturally contain "bubbles"—idle periods where a processor waits for data from the previous or next stage. SWIFT utilizes these idle cycles to log intermediate data (activations and gradients) in the background, ensuring that logging does not interfere with the critical path of the training computation.
- Selective Logging: To manage storage requirements, SWIFT utilizes a grouping algorithm. Rather than logging every intermediate state, it logs data only at the boundaries of defined machine groups. This creates a tunable trade-off between the amount of data stored and the time required to re-compute missing states during recovery.
2.3 Parallelized Re-computation
When a replacement machine is integrated into the cluster, SWIFT does not force the new node to catch up in isolation. Instead, the re-computation of lost iterations is distributed across all surviving workers in a data-parallel fashion. This collaborative approach ensures that the cluster returns to the active training state as quickly as possible.
3. Experimental Evaluation
The researchers evaluated SWIFT across a variety of architectures and datasets, including Wide-ResNet-50 on ImageNet, ViT-128/32 on CIFAR-100, and BERT-128 on the Wikipedia corpus. The models were scaled to simulate the demands of large-scale production environments.
3.1 Recovery Performance
SWIFT demonstrated dramatic improvements in recovery speed:
- Replication-based setups: For Wide-ResNet-50, SWIFT reduced recovery time by 98.9% compared to traditional global checkpointing and by approximately 98% compared to state-of-the-art snapshotting methods.
- Pipeline-based setups: For BERT and ViT models, the logging-based recovery was 57.3% to 76.3% faster than global checkpointing.
3.2 Total Training Efficiency and Accuracy
In environments simulated to reflect realistic failure rates, SWIFT achieved a 1.16x speedup in total training time. Crucially, the mathematical "undoing" of updates did not introduce significant numerical instability; the final model accuracy across all tests remained identical to the baseline training results.
4. Discussion and Limitations
While SWIFT offers a significant leap in efficiency, it is subject to certain constraints. The Update-Undo method requires the optimizer to be invertible. Optimizers like AMSGrad, which utilize a non-invertible "max" operator, are currently incompatible with this specific feature. Additionally, logging-based recovery assumes deterministic computation. While SWIFT provides workarounds for common non-deterministic GPU operations (such as those in cuDNN), extreme cases of hardware-level non-determinism could lead to state drift during re-computation.
5. Conclusion
SWIFT represents a paradigm shift in DNN failure recovery, moving from passive state-saving to active mathematical reconstruction and opportunistic logging. By eliminating the overhead of snapshots and utilizing inherent pipeline inefficiencies, SWIFT provides a scalable, high-performance solution for the next generation of massive-scale model training.
Summary updated