Proceedings of the ACM on Programming Languages· 2026Q1
Bonsai: Efficient and Optimal Automatic Tensor Rematerialization for Memory-Constrained DNN Training
- 0citations
- Q1SCImago
- 2026year
Short summary
Bonsai, a new framework, uses operator segmentation to enable efficient and optimal automatic tensor rematerialization for deep neural network training, reducing solver cost by up to 10.13x compared to state-of-the-art ILP solvers.
AI-generated from the title and abstract; the full text is not read.
Key points
- Bonsai introduces operator segmentation to break computation graphs into flexible units for tensor rematerialization.
- This novel abstraction enables a scalable segment-based ILP formulation, reducing decision variables by orders of magnitude.
- Bonsai scales to real-world DNN models, achieving up to 10.13x lower solver cost than existing ILP solvers.
- The framework delivers up to 11% memory reduction for DNN training.
AI-generated from the title and abstract; the full text is not read.
Abstract
GPU memory is increasingly the primary bottleneck in scaling deep neural network (DNN) training, where the activation tensors footprint of a model may exceed the memory capacity. Tensor recomputation is a powerful technique that trades additional computation for reduced peak memory usage. However, existing approaches face a fundamental tension between performance optimality and computational scalability. On the one hand, solvers leverage Integer Linear Programming (ILP) to provide mathematically optimal solutions but suffer from the combinatorial explosion of the search space and thus become intractable for modern DNN models. On the other hand, heuristics-based approaches achieve scalability but sacrifice optimality altogether, resulting in suboptimal execution schedules. The root cause of these inefficiencies in the state of the art is the mismatch in abstraction. This paper introduces Bonsai, a framework that tackles this scalability-granularity tension. At the heart of Bonsai is a novel abstraction of operator segmentation that breaks the computation graph into flexible, variable-sized units to enable a lightweight yet effective segment-based ILP formulation. By having segments, Bonsai collapses the search space and prunes redundant solutions that stall existing solvers. This abstraction enables Bonsai to maintain a holistic view of the entire model, ensuring that no optimization opportunity is lost while reducing the number of decision variables by orders of magnitude. The evaluation across a diverse set of DNN architectures and models demonstrates that Bonsai scales to real-world models, is up to 10.13× lower solver cost than state-of-the-art ILP solvers, and delivers up to 11
The authors' abstract, as published at the source. Proceedings of the ACM on Programming Languages, 2026 · DOI ↗
Continue with a free account
Ask the paper: 3 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.
Continue free on the webSign in with Google or Apple; no card needed. You come back to this paper.
On your phone:
Field: Computational Mathematics
Computational MathematicsMathematics