{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,2]],"date-time":"2026-10-02T07:47:13Z","timestamp":1790927233967,"version":"4.1.0"},"reference-count":50,"publisher":"Association for Computing Machinery (ACM)","issue":"2","license":[{"start":{"date-parts":[[2024,6,28]],"date-time":"2024-06-28T00:00:00Z","timestamp":1719532800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Math. Softw."],"published-print":{"date-parts":[[2024,6,30]]},"abstract":"<jats:p>Training in Feed Forward Deep Neural Networks is a memory-intensive operation which is usually performed on GPUs with limited memory capacities. This may force data scientists to limit the depth of the models or the resolution of the input data if data does not fit in the GPU memory. The re-materialization technique, whose idea comes from the checkpointing strategies developed in the Automatic Differentiation literature, allows data scientists to limit the memory requirements related to the storage of intermediate data (activations), at the cost of an increase in the computational cost.<\/jats:p>\n          <jats:p>This paper introduces a new strategy of re-materialization of activations that significantly reduces memory usage. It consists in selecting which activations are saved and which activations are deleted during the forward phase and then recomputing the deleted activations when they are needed during the backward phase.<\/jats:p>\n          <jats:p>We propose an original computation model that combines two types of activation savings: either only storing the layer inputs or recording the complete history of operations that produced the outputs. This paper focuses on the fully heterogeneous case, where the computation time and the memory requirement of each layer is different. We prove that finding the optimal solution is NP-hard and that classical techniques from Automatic Differentiation literature do not apply. Moreover, the classical assumption of memory persistence of materialized activations, used to simplify the search of optimal solutions, does not hold anymore. Thus, we propose a weak memory persistence property and provide a dynamic program to compute the optimal sequence of computations.<\/jats:p>\n          <jats:p>\n            This algorithm is made available through the\n            <jats:sc>Rotor<\/jats:sc>\n            software, a PyTorch plug-in dealing with any network consisting of a sequence of layers, each of them having an arbitrarily complex structure. Through extensive experiments, we show that our implementation consistently outperforms existing re-materialization approaches for a large class of networks, image sizes, and batch sizes.\n          <\/jats:p>","DOI":"10.1145\/3648633","type":"journal-article","created":{"date-parts":[[2024,3,5]],"date-time":"2024-03-05T21:12:57Z","timestamp":1709673177000},"page":"1-38","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":4,"title":["Optimal Re-Materialization Strategies for Heterogeneous Chains: How to Train Deep Neural Networks with Limited Memory"],"prefix":"10.1145","volume":"50","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-2741-6228","authenticated-orcid":false,"given":"Olivier","family":"Beaumont","sequence":"first","affiliation":[{"name":"Inria Center of the University of Bordeaux, Bordeaux, France and LaBRI, Bordeaux, France"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2475-3309","authenticated-orcid":false,"given":"Lionel","family":"Eyraud-Dubois","sequence":"additional","affiliation":[{"name":"Inria Center of the University of Bordeaux, Bordeaux, France and LaBRI, Bordeaux, France"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4935-2368","authenticated-orcid":false,"given":"Julien","family":"Herrmann","sequence":"additional","affiliation":[{"name":"CNRS, Paris, France and IRIT, Toulouse, France"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2161-9940","authenticated-orcid":false,"given":"Alexis","family":"Joly","sequence":"additional","affiliation":[{"name":"Inria Sophia-Antipolis M\u00e9diterran\u00e9e, Montpellier, France and University of Montpellier, Montpellier, France"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1795-8421","authenticated-orcid":false,"given":"Alena","family":"Shilova","sequence":"additional","affiliation":[{"name":"Univ. Lille, Inria, CNRS, Centrale Lille, CRIStAL, Lille, France"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2024,6,28]]},"reference":[{"key":"e_1_3_2_2_1","doi-asserted-by":"publisher","DOI":"10.1137\/15M1019222"},{"key":"e_1_3_2_3_1","volume-title":"Proceedings of the European Conference on Parallel Processing","author":"Beaumont Olivier","year":"2019","unstructured":"Olivier Beaumont, Lionel Eyraud-Dubois, and Alena Shilova. 2019a. Optimal GPU-CPU offloading strategies for deep neural network training. In Proceedings of the European Conference on Parallel Processing. Retrieved from https:\/\/hal.inria.fr\/hal-02316266"},{"key":"e_1_3_2_4_1","first-page":"23844","volume-title":"Proceedings of the Advances in Neural Information Processing Systems","author":"Beaumont Olivier","year":"2021","unstructured":"Olivier Beaumont, Lionel Eyraud-Dubois, and Alena Shilova. 2021. Efficient combination of rematerialization and offloading for training DNNs. In Proceedings of the Advances in Neural Information Processing Systems. M. Ranzato, A. Beygelzimer, Y. Dauphin, P. S. Liang, and J. Wortman Vaughan (Eds.), Vol. 34. Curran Associates, Inc., 23844\u201323857. Retrieved from https:\/\/proceedings.neurips.cc\/paper\/2021\/file\/c8461bf13fca8a2b9912ab2eb1668e4b-Paper.pdf"},{"key":"e_1_3_2_5_1","volume-title":"Optimal Memory-Aware Backpropagation of Deep Join Networks","author":"Beaumont Olivier","year":"2019","unstructured":"Olivier Beaumont, Julien Herrmann, Guillaume Pallez, and Alena Shilova. 2019b. Optimal Memory-Aware Backpropagation of Deep Join Networks. Research Report RR-9273. Inria, Le Chesnay-Rocquencourt. Retrieved from https:\/\/hal.inria.fr\/hal-02131552"},{"issue":"1","key":"e_1_3_2_6_1","doi-asserted-by":"crossref","first-page":"181","DOI":"10.1186\/s12862-017-1014-z","article-title":"Going deeper in the automated identification of Herbarium specimens","volume":"17","author":"Carranza-Rojas Jose","year":"2017","unstructured":"Jose Carranza-Rojas, Herve Goeau, Pierre Bonnet, Erick Mata-Montero, and Alexis Joly. 2017. Going deeper in the automated identification of Herbarium specimens. BMC Evolutionary Biology 17, 1 (2017), 181.","journal-title":"BMC Evolutionary Biology"},{"key":"e_1_3_2_7_1","volume-title":"Proceedings of the 32nd AAAI Conference on Artificial Intelligence","author":"Chang Bo","year":"2018","unstructured":"Bo Chang, Lili Meng, Eldad Haber, Lars Ruthotto, David Begert, and Elliot Holtham. 2018. Reversible architectures for arbitrarily deep residual neural networks. In Proceedings of the 32nd AAAI Conference on Artificial Intelligence."},{"key":"e_1_3_2_8_1","unstructured":"Tianqi Chen Bing Xu Chiyuan Zhang and Carlos Guestrin. 2016. Training deep nets with sublinear memory cost. arXiv:1604.06174. Retrieved from https:\/\/arxiv.org\/abs\/1604.06174"},{"key":"e_1_3_2_9_1","unstructured":"Dipankar Das Sasikanth Avancha Dheevatsa Mudigere Karthikeyan Vaidynathan Srinivas Sridharan Dhiraj Kalamkar Bharat Kaul and Pradeep Dubey. 2016. Distributed deep learning using synchronous stochastic gradient descent. arXiv:1602.06709. Retrieved from https:\/\/arxiv.org\/abs\/1602.06709"},{"key":"e_1_3_2_10_1","first-page":"1223","volume-title":"Proceedings of the Advances in Neural Information Processing Systems","author":"Dean Jeffrey","year":"2012","unstructured":"Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Andrew Senior, Paul Tucker, Ke Yang, and Quoc Le. 2012. Large scale distributed deep networks. In Proceedings of the Advances in Neural Information Processing Systems. 1223\u20131231."},{"key":"e_1_3_2_11_1","unstructured":"Jianwei Feng and Dong Huang. 2018. Optimal gradient checkpoint search for arbitrary computation graphs. arXiv:1808.00079. Retrieved from https:\/\/arxiv.org\/abs\/1808.00079"},{"key":"e_1_3_2_12_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2018.00035"},{"key":"e_1_3_2_13_1","doi-asserted-by":"publisher","DOI":"10.5555\/578533"},{"key":"e_1_3_2_14_1","volume-title":"Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops","author":"Ghadai Sambit","year":"2019","unstructured":"Sambit Ghadai, Xian Yeow Lee, Aditya Balu, Soumik Sarkar, and Adarsh Krishnamurthy. 2019. Multi-level 3D CNN for learning multi-scale spatial features. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops."},{"key":"e_1_3_2_15_1","first-page":"2214","volume-title":"Proceedings of the Advances in Neural Information Processing Systems","author":"Gomez Aidan N.","year":"2017","unstructured":"Aidan N. Gomez, Mengye Ren, Raquel Urtasun, and Roger B. Grosse. 2017. The reversible residual network: Backpropagation without storing activations. In Proceedings of the Advances in Neural Information Processing Systems. 2214\u20132224."},{"key":"e_1_3_2_16_1","unstructured":"Priya Goyal. 2018. PyTorch Memory Optimizations via Gradient Checkpointing. Retrieved from https:\/\/github.com\/prigoyal\/pytorch_memonger"},{"issue":"6","key":"e_1_3_2_17_1","first-page":"83","article-title":"On automatic differentiation","volume":"6","author":"Griewank Andreas","year":"1989","unstructured":"Andreas Griewank. 1989. On automatic differentiation. Mathematical Programming: Recent Developments and Applications 6, 6 (1989), 83\u2013107.","journal-title":"Mathematical Programming: Recent Developments and Applications"},{"key":"e_1_3_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/347837.347846"},{"key":"e_1_3_2_19_1","doi-asserted-by":"publisher","DOI":"10.1137\/1.9780898717761"},{"key":"e_1_3_2_20_1","first-page":"4125","article-title":"Memory-efficient backpropagation through time","author":"Gruslys Audrunas","year":"2016","unstructured":"Audrunas Gruslys, R\u00e9mi Munos, Ivo Danihelka, Marc Lanctot, and Alex Graves. 2016. Memory-efficient backpropagation through time. In Proceedings of the Advances in Neural Information Processing Systems. 4125\u20134133.","journal-title":"Proceedings of the Advances in Neural Information Processing Systems"},{"key":"e_1_3_2_21_1","unstructured":"Song Han Huizi Mao and William J. Dally. 2015. Deep compression: Compressing deep neural networks with pruning trained quantization and Huffman coding. arXiv:1510.00149. Retrieved from https:\/\/arxiv.org\/abs\/1510.00149"},{"key":"e_1_3_2_22_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2018.00685"},{"key":"e_1_3_2_23_1","first-page":"630","volume-title":"Proceedings of the Computer Vision \u2013 ECCV 2016","author":"He Kaiming","year":"2016","unstructured":"Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Identity mappings in deep residual networks. In Proceedings of the Computer Vision \u2013 ECCV 2016. Springer International Publishing. 630\u2013645. Retrieved from https:\/\/arxiv.org\/tb\/1603.05027"},{"key":"e_1_3_2_24_1","unstructured":"HiePACS team. 2019. Rotor. Retrieved from https:\/\/gitlab.inria.fr\/hiepacs\/rotor"},{"key":"e_1_3_2_25_1","unstructured":"Andrew G. Howard Menglong Zhu Bo Chen Dmitry Kalenichenko Weijun Wang Tobias Weyand Marco Andreetto and Hartwig Adam. 2017. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv:1704.04861. Retrieved from https:\/\/arxiv.org\/abs\/1704.04861"},{"key":"e_1_3_2_26_1","first-page":"103","article-title":"Gpipe: Efficient training of giant neural networks using pipeline parallelism","author":"Huang Yanping","year":"2019","unstructured":"Yanping Huang, Youlong Cheng, Ankur Bapna, Orhan Firat, Dehao Chen, Mia Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V Le, Yonghui Wu. 2019. Gpipe: Efficient training of giant neural networks using pipeline parallelism. In Proceedings of the Advances in Neural Information Processing Systems. 103\u2013112.","journal-title":"Proceedings of the Advances in Neural Information Processing Systems"},{"key":"e_1_3_2_27_1","doi-asserted-by":"publisher","DOI":"10.5555\/3122009.3242044"},{"key":"e_1_3_2_28_1","unstructured":"Sergey Ioffe and Christian Szegedy. 2015. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv:1502.03167. Retrieved from https:\/\/arxiv.org\/abs\/1502.03167"},{"key":"e_1_3_2_29_1","unstructured":"Paras Jain Ajay Jain Aniruddha Nrusimha Amir Gholami Pieter Abbeel Kurt Keutzer Ion Stoica and Joseph E. Gonzalez. 2019. Checkmate: Breaking the memory wall with optimal tensor rematerialization. arXiv:1910.02653. Retrieved from https:\/\/arxiv.org\/abs\/1910.02653"},{"key":"e_1_3_2_30_1","unstructured":"Marisa Kirisame Steven Lyubomirsky Altan Haan Jennifer Brennan Mike He Jared Roesch Tianqi Chen and Zachary Tatlock. 2020. Dynamic tensor rematerialization. arXiv:2006.09616. Retrieved from https:\/\/arxiv.org\/abs\/2006.09616"},{"key":"e_1_3_2_31_1","first-page":"15146","article-title":"Efficient rematerialization for deep networks","author":"Kumar Ravi","year":"2019","unstructured":"Ravi Kumar, Manish Purohit, Zoya Svitkina, Erik Vee, and Joshua Wang. 2019. Efficient rematerialization for deep networks. In Proceedings of the Advances in Neural Information Processing Systems. 15146\u201315155.","journal-title":"Proceedings of the Advances in Neural Information Processing Systems"},{"key":"e_1_3_2_32_1","unstructured":"Mitsuru Kusumoto Takuya Inoue Gentaro Watanabe Takuya Akiba and Masanori Koyama. 2019. A graph theoretic framework of recomputation algorithms for memory-efficient backpropagation. arXiv:1905.11722. Retrieved from https:\/\/arxiv.org\/abs\/1905.11722"},{"key":"e_1_3_2_33_1","doi-asserted-by":"publisher","DOI":"10.1038\/nature14539"},{"key":"e_1_3_2_34_1","first-page":"83","volume-title":"Proceedings of the 7th SIAM Workshop on Combinatorial Scientific Computing","author":"Lotz Johannes","year":"2016","unstructured":"Johannes Lotz, Uwe Naumann, and Sumit Mitra. 2016. Mixed integer programming for call tree reversal. In Proceedings of the 7th SIAM Workshop on Combinatorial Scientific Computing. SIAM, 83\u201391."},{"key":"e_1_3_2_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3341301.3359646"},{"key":"e_1_3_2_36_1","doi-asserted-by":"crossref","first-page":"13","DOI":"10.1007\/978-3-540-68942-3_2","volume-title":"Proceedings of the Advances in Automatic Differentiation","author":"Naumann Uwe","year":"2008","unstructured":"Uwe Naumann. 2008. Call tree reversal is NP-complete. In Proceedings of the Advances in Automatic Differentiation. Christian H. Bischof, H. Martin B\u00fccker, Paul Hovland, Uwe Naumann, and Jean Utke (Eds.), Springer, Berlin, 13\u201322."},{"key":"e_1_3_2_37_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jda.2008.09.008"},{"key":"e_1_3_2_38_1","unstructured":"Geoff Pleiss Danlu Chen Gao Huang Tongcheng Li Laurens van der Maaten and Kilian Q. Weinberger. 2017. Memory-efficient implementation of DenseNets. arXiv:1707.06990. Retrieved from https:\/\/arxiv.org\/abs\/1707.06990"},{"key":"e_1_3_2_39_1","unstructured":"Pytorch Contributors. 2018. Periodic Checkpointing in PyTorch. Retrieved from https:\/\/pytorch.org\/docs\/stable\/checkpoint.html"},{"key":"e_1_3_2_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/3394486.3406703"},{"key":"e_1_3_2_41_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-46493-0_32"},{"key":"e_1_3_2_42_1","first-page":"1","volume-title":"Proceedings of the 49th Annual IEEE\/ACM International Symposium on Microarchitecture","author":"Rhu Minsoo","year":"2016","unstructured":"Minsoo Rhu, Natalia Gimelshein, Jason Clemons, Arslan Zulfiqar, and Stephen W. Keckler. 2016. vDNN: Virtualized deep neural networks for scalable, memory-efficient neural network design. In Proceedings of the 49th Annual IEEE\/ACM International Symposium on Microarchitecture, Vol. 18. IEEE Press, 1\u201313."},{"key":"e_1_3_2_43_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2018.00591"},{"key":"e_1_3_2_44_1","volume-title":"Proceedings of the IEEE International Parallel and Distributed Processing Symposium (IPDPS)","author":"Shriram S. B.","year":"2019","unstructured":"S. B. Shriram, Anshuj Garg, and Purushottam Kulkarni. 2019. Dynamic memory management for GPU-based training of deep neural networks. In Proceedings of the IEEE International Parallel and Distributed Processing Symposium (IPDPS). IEEE Press."},{"key":"e_1_3_2_45_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2017.155"},{"key":"e_1_3_2_46_1","doi-asserted-by":"publisher","DOI":"10.1080\/10556788.2018.1459621"},{"key":"e_1_3_2_47_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICCV.2015.114"},{"key":"e_1_3_2_48_1","unstructured":"Hugo Touvron Thibaut Lavril Gautier Izacard Xavier Martinet Marie-Anne Lachaux Timoth\u00e9e Lacroix Baptiste Roziere Naman Goyal Eric Hambro Faisal Azhar Aurelien Rodriguez Armand Joulin Edouard Grave and Guillaume Lample. 2023. LLaMA: Open and efficient foundation language models. arXiv:2302.13971. Retrieved from https:\/\/arxiv.org\/abs\/2302.13971"},{"key":"e_1_3_2_49_1","doi-asserted-by":"publisher","DOI":"10.1109\/MSSC.2017.2745818"},{"key":"e_1_3_2_50_1","doi-asserted-by":"crossref","first-page":"834","DOI":"10.1007\/978-3-642-18775-9_82","volume-title":"Proceedings of the Numerical Mathematics and Advanced Applications","author":"Walther Andrea","year":"2004","unstructured":"Andrea Walther and Andreas Griewank. 2004. Advantages of binomial checkpointing for memory-reduced adjoint calculations. In Proceedings of the Numerical Mathematics and Advanced Applications. Springer, 834\u2013843."},{"key":"e_1_3_2_51_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2018.00716"}],"container-title":["ACM Transactions on Mathematical Software"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3648633","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3648633","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T22:50:20Z","timestamp":1750287020000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3648633"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,6,28]]},"references-count":50,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2024,6,30]]}},"alternative-id":["10.1145\/3648633"],"URL":"https:\/\/doi.org\/10.1145\/3648633","relation":{},"ISSN":["0098-3500","1557-7295"],"issn-type":[{"value":"0098-3500","type":"print"},{"value":"1557-7295","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,6,28]]},"assertion":[{"value":"2020-11-14","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-02-02","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-06-28","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}