One Backward from Ten Forward, Subsampling for Large-Scale Deep Learning

Chaosheng Dong, Xiaojie Jin, Weihao Gao, Yijia Wang, Hongyi Zhang, Xiang Wu, Jianchao Yang, Xiaobing LiuarXiv 2021

TL;DR

This paper tackles the challenge of training massive deep learning models on continuously streaming data by proposing a novel subsampling strategy. Instead of random sampling, they leverage the information already gathered during the model's forward passes (inference) to intelligently select data points for training, leading to improved performance and efficiency.

What Problem Does This Paper Address?

Training deep neural networks (DNNs) on large-scale datasets, especially those that are continuously updated (streaming data), is a significant computational bottleneck. The sheer volume of data makes it impractical to use all of it for training at every step. The standard practice is to use ad-hoc sampling, which often means random selection. However, this approach doesn't fully utilize the computational effort already expended by these systems. During inference, DNNs perform forward passes on data instances. This paper observes that this process generates valuable information that can be used to make more informed sampling decisions, rather than relying on random chance. The challenge is to effectively leverage this existing information to select a subset of data that maximizes training efficiency and performance.

Methods

The core contribution is a novel subsampling framework called "One Backward from Ten Forward" (OBFTF). The key insight is to utilize information from the forward passes of data instances during inference. Instead of random sampling, OBFTF proposes to record a constant amount of information per instance from these forward passes. This extra information is then used to improve the selection of which data instances should participate in both forward and backward passes during training.

The paper introduces a general optimization framework to formalize this problem, aiming to minimize the discrepancy between the empirical risk on the entire dataset and the empirical risk on the sampled data. However, directly solving this optimization problem is NP-hard. To address this, they propose an efficient approximation algorithm within the Mini-batch Gradient Descent (Mini-batch GD) framework. This algorithm involves a two-step relaxation of the original optimization problem. Specifically, they convert the problem of subsampling from the entire dataset into subsampling from each batch. Within each batch, they formulate a sparse subset approximation problem (Equation 6) which is then solved to select the data points for training. The paper also provides an implementation of OBFTF and its approximated version, along with other competing methods.

Datasets

The paper evaluates their proposed method on the following datasets:

  • Synthetic dataset for linear regression: Used to demonstrate the method's effectiveness in a controlled environment.
  • MNIST: A standard dataset for image classification, containing 70,000 grayscale images of handwritten digits.
  • ImageNet 2012: A large-scale dataset for image classification, featuring 1.2 million training images across 1000 classes.

No new benchmarks were introduced; standard datasets were used for evaluation.

Key Insights and Ideas

  • Leveraging Inference Information: The most significant insight is that the information gathered during the forward passes of DNNs (inference) is underutilized for training. This information can be used to intelligently select data for training, rather than relying on random sampling.
  • Balancing Robustness and Convergence: The proposed method aims to strike a better balance between the robustness of sampling strategies and their convergence speed, outperforming existing methods that might be biased towards high-loss or low-loss samples.
  • Efficiency at Small Sampling Rates: OBFTF demonstrates that it can achieve comparable or even better performance than other methods with significantly smaller sampling rates, indicating a substantial speedup in training.
  • Generalizability: The framework is designed to be general and applicable to various machine learning tasks, not just deep learning.

Key Results

  • Linear Regression: For data without outliers, OBFTF performs best when the sampling rate is between 0.1 and 0.15. For data with outliers, OBFTF is stable across a range of sampling rates and outperforms other methods when the sampling rate is between 0.15 and 0.5.
  • MNIST Classification: OBFTF achieves higher accuracy than Uniform, Selective-Backprop, and Min-k Loss SGD when the sampling rate is small (0.1 to 0.25). Notably, OBFTF with a 0.25 sampling rate achieved higher accuracy than other methods with a 0.5 sampling rate.
  • ImageNet Classification: On both ResNet50 and MobileNetV2 models, OBFTF achieves higher accuracy than uniform sampling, especially at smaller sampling rates (0.10 to 0.25). This highlights its effectiveness in accelerating training on large-scale datasets.

Limitations and Future Work

  • Computational Cost of Optimization: While the proposed optimization framework is general, solving the exact formulation (Equation 5) is NP-hard. The paper uses an efficient approximation algorithm for Mini-batch GD, but acknowledges that solving the sparse subset approximation problem (Equation 6) to optimality can still be time-consuming.
  • Future Work: The authors suggest developing faster and more accurate algorithms to solve the sparse subset approximation problem in the future. They also mention that their work is complementary to Bayesian coresets literature and could be extended to those areas.

Summary updated

BibTeX
@misc{dong2021one,
  author = {Chaosheng Dong and Xiaojie Jin and Weihao Gao and Yijia Wang and Hongyi Zhang and Xiang Wu and Jianchao Yang and Xiaobing Liu},
  title = {{One Backward from Ten Forward, Subsampling for Large-Scale Deep Learning}},
  year = {2021},
  eprint = {2104.13114},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.13114},
}
Figure