Skip to content

Research Articles

Memory-Aware Training of Deep Networks: Cold Versus Warm Runs

Farah Bellwarden (Machine Learning Laboratory, Ravenmere Technical University), Lina Thornmere (Machine Learning Laboratory, Ivermere University), Rowan Oakhurst (Machine Learning Laboratory, Eastmarsh Institute for Applied Computing), Devon Havenford (Machine Learning Laboratory, Ravenmere Technical University), Mara Kestrelby (Machine Learning Laboratory, Pinewick School of Engineering)

Vol. 3 No. 1 (2019) · pp. 141–153 · Published 7 October 2019

Abstract

We ask whether recomputing selected activations according to their memory and compute costs performs better than uniform activation checkpointing by layer count in a mix of fresh-start and steady-state trials. The evaluation is synthetic. Each configuration is evaluated on the same 144 cases. In the 36 stress cases, one unusually wide intermediate layer must dominate memory; initialization cost is kept in the comparison instead of discarding the first completed trial. A case counts as a pass only if it meets this criterion: an update must fit the memory budget without exceeding the step-time limit. The comparison holds the training and selection splits fixed across alternatives; evaluation cases are not reused for tuning. Compute or memory assigned to an alternative counts toward its budget even if training does not finish. The comparator passes 103 of 144 cases and the alternative passes 105. For the 36 stress cases alone, the counts are 18 and 21, respectively. The aggregate count does not establish that the alternative is preferable at every operating point. The practical trade-off is that additional recomputation can erase any throughput gained from larger batches. The result describes the chosen case mix. Before applying the finding, a follow-up benchmark would need to vary the share of difficult cases without relaxing the acceptance criteria.

Keywords: activation checkpointing, memory, training, cold versus warm runs, synthetic evaluation

References

  1. Bengio, Y., Lamblin, P., Popovici, D., & Larochelle, H. (2007). Greedy layer-wise training of deep networks. Advances in Neural Information Processing Systems, 19, 153–160.
  2. Chen, B., et al. (2018). Detecting backdoor attacks on deep neural networks by activation clustering. arXiv:1811.03728.
  3. Chen, T., Xu, B., Zhang, C., & Guestrin, C. (2016). Training deep nets with sublinear memory cost. arXiv:1604.06174.
  4. Courbariaux, M., Bengio, Y., & David, J.-P. (2015). BinaryConnect: Training deep neural networks with binary weights during propagations. Advances in Neural Information Processing Systems, 28, 3123–3131.
  5. Courbariaux, M., Hubara, I., Soudry, D., El-Yaniv, R., & Bengio, Y. (2016). Binarized neural networks: Training deep neural networks with weights and activations constrained to +1 or −1. arXiv:1602.02830.
  6. Ghoshal, A., Swietojanski, P., & Renals, S. (2013). Multilingual training of deep neural networks. Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing, 7319–7323.
  7. Glorot, X., & Bengio, Y. (2010). Understanding the difficulty of training deep feedforward neural networks. Proceedings of the 13th International Conference on Artificial Intelligence and Statistics, 249–256.
  8. Han, B., et al. (2018). Co-teaching: Robust training of deep neural networks with extremely noisy labels. Advances in Neural Information Processing Systems, 31, 8527–8537.
  9. Hoffer, E., Hubara, I., & Soudry, D. (2017). Train longer, generalize better: Closing the generalization gap in large batch training of neural networks. Advances in Neural Information Processing Systems, 30, 1731–1741.
  10. Huang, Y., Cheng, Y., Chen, D., Lee, H., Ngiam, J., Le, Q. V., & Chen, Z. (2018). GPipe: Efficient training of giant neural networks using pipeline parallelism. arXiv:1811.06965v1. Preprint
  11. Johnson, R., & Zhang, T. (2017). Deep pyramid convolutional neural networks for text categorization. Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, 562–570.
  12. Larochelle, H., Bengio, Y., Louradour, J., & Lamblin, P. (2009). Exploring strategies for training deep neural networks. Journal of Machine Learning Research, 10, 1–40.
  13. Lin, X., et al. (2018). All-optical machine learning using diffractive deep neural networks. Science, 361(6406), 1004–1008. DOI
  14. Masters, D., & Luschi, C. (2018). Revisiting small batch training for deep neural networks. arXiv:1804.07612.
  15. Rhu, M., Gimelshein, N., Clemons, J., Zulfiqar, A., & Keckler, S. W. (2016). vDNN: Virtualized deep neural networks for scalable, memory-efficient neural network design. Proceedings of the 49th Annual IEEE/ACM International Symposium on Microarchitecture, Article 18.
  16. Salimans, T., & Kingma, D. P. (2016). Weight normalization: A simple reparameterization to accelerate training of deep neural networks. Advances in Neural Information Processing Systems, 29, 901–909.
  17. Tremblay, J., et al. (2018). Training deep networks with synthetic data: Bridging the reality gap by domain randomization. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 969–977.