TL;DR
Training deep learning models on massive datasets is computationally expensive. InfoBatch offers a novel approach to speed up training by intelligently pruning less informative data samples and dynamically rescaling the remaining ones, achieving significant cost savings without sacrificing performance. This method is plug-and-play, architecture-agnostic, and demonstrably effective across various computer vision tasks and even language model fine-tuning.
What Problem Does This Paper Address?
The ever-increasing size of datasets used for training state-of-the-art deep learning models presents a significant computational bottleneck. While data pruning techniques aim to reduce training costs by removing less informative samples, they often introduce a "gradient expectation bias." This bias arises because simply discarding samples can alter the overall gradient direction, leading to a drop in performance compared to training on the full dataset. Existing methods either require multiple trials to estimate sample importance (static pruning) or incur non-negligible overhead for dynamic pruning. The challenge is to achieve substantial training acceleration through data pruning without compromising model accuracy.
Methods
InfoBatch tackles the problem of gradient bias in data pruning with a two-pronged approach:
- Unbiased Dynamic Data Pruning: Instead of hard-pruning samples, InfoBatch employs "soft pruning." This means samples with low loss values (indicating they are likely well-learned) are not entirely discarded but rather have their gradients rescaled. This dynamic approach allows for continuous adaptation during training.
- Expectation Rescaling: The core innovation is rescaling the gradients of the remaining samples. Specifically, if a certain percentage of samples are pruned, the gradients of the remaining samples are scaled up by a factor to approximate the original gradient expectation of the full dataset. This ensures that the overall learning direction remains consistent.
- Annealing: To further mitigate potential minor differences and improve stability, InfoBatch trains on the full dataset for the last few epochs. This "annealing" phase helps to fine-tune the model and reduce performance variance.
The method is designed to be architecture-agnostic and can be integrated as a plug-in module.
Datasets
The authors evaluated InfoBatch on a variety of standard datasets:
- Image Classification: CIFAR-10, CIFAR-100, ImageNet-1K, Tiny-ImageNet.
- Semantic Segmentation: ADE20K.
- Vision Pertaining: FFHQ (for diffusion model training).
- Language Model Fine-tuning: LLaMA-7B (with Alpaca dataset).
Key Insights and Ideas
- Soft Pruning is Key: Simply removing low-loss samples (hard pruning) introduces bias. InfoBatch's "soft pruning" combined with rescaling is crucial for maintaining lossless performance.
- Gradient Rescaling Compensates for Pruning: The mathematical formulation shows that by appropriately scaling the gradients of the remaining samples, the expected gradient update can be made to approximate that of the full dataset.
- Dynamic Pruning is More Efficient: Unlike static methods that require pre-computation, InfoBatch's dynamic approach integrates pruning into the training loop with minimal overhead.
- Architecture and Task Agnostic: The framework's effectiveness across diverse architectures (CNNs, Transformers) and tasks (classification, segmentation, generation, NLP) highlights its broad applicability.
- Synergy with Large-Batch Training: InfoBatch can further accelerate existing large-batch training methods, suggesting potential for combined efficiency gains.
Key Results
InfoBatch consistently achieves lossless training performance across various tasks and datasets while significantly reducing training costs:
- CIFAR-10/100: Saves 40% and 33% of overall cost, respectively, with lossless accuracy.
- ImageNet-1K: Achieves lossless performance with 26% cost savings.
- Tiny-ImageNet: Achieves lossless performance with 41.3% cost savings.
- ADE20K (Semantic Segmentation): Achieves lossless mIoU with 20% cost savings.
- Diffusion Models (FFHQ): Saves 27% of training cost with comparable image quality.
- LLaMA-7B (Instruction Fine-tuning): Achieves significant speedups, compatible with dataset compression.
- Efficiency: InfoBatch incurs minimal overhead, often reducing extra time costs by an order of magnitude compared to prior dynamic pruning methods.
Limitations and Future Work
- Multi-Epoch Training Dependency: The current version of InfoBatch relies on multi-epoch training schemes. The authors note that for models like GPT-3 or ViT-22B, which are often trained with limited epochs, further adaptation of InfoBatch might be necessary. They plan to explore new strategies for such scenarios.
- Hyperparameter Sensitivity: While generally robust, the paper mentions that increasing the pruning ratio too high (r ≥ 0.6) can lead to degraded performance, likely due to increased variance and reduced training steps. The optimal range for
ris explored, withr=0.5being a default choice. - Potential for Further Optimization: The paper suggests that the analysis of rescaling limits could inform future designs of dynamic pruning methods, particularly regarding the condition
Erescaled G^2/(1 - Pt(z)) ≤ Ed[G^2].
Summary updated