XConv: Low-memory stochastic backpropagation for convolutional layers

Anirudh Thatipelli, Jeffrey Sam, Mathias Louboutin, Ali Siahkoohi, Rongrong Wang +1 more
6/13/2021
cs.LGmath.NA

Official code: slimgroup/XConv (8 stars, Python, MIT, PyTorch, last commit 2026-10-24).

Abstract

Training convolutional neural networks at scale demands substantial memory, largely because intermediate activations must be stored for backpropagation. Existing remedies (checkpointing, invertible architectures, or gradient-approximation methods such as randomized automatic differentiation) either add significant computation, impose architectural constraints, or require non-trivial code changes.

Show full abstract

We propose XConv, a near-drop-in replacement for standard 2D and 3D convolutional layers that addresses all three: it preserves standard backpropagation, imposes no architectural constraints, and integrates into existing codebases with minimal changes. XConv exploits the algebraic structure of convolutional weight gradients, storing highly compressed projections of the activations rather than the full tensors and approximating the gradients via multi-channel randomized trace estimation. The number of probing vectors sets a memory-accuracy tradeoff and recovers the exact gradient in the limit. We establish convergence guarantees and error bounds for the estimator, showing that its gradient-error variance is comparable to that of stochastic gradient descent. Empirically, XConv matches exact-gradient methods across classification, generative modeling, super-resolution, inpainting, and segmentation, with gaps that narrow as the number of probing vectors grows, while reducing activation memory by a factor of two or more when convolutional activations dominate, and remaining computationally competitive with optimized convolution kernels at larger batch sizes. At half precision the gradient-approximation error falls to the rounding floor, so XConv adds essentially no error beyond that of low-precision arithmetic. The savings matter most where activation memory rather than compute is the binding constraint, such as high-resolution and volumetric training and on-device finetuning.

View on arXivView PDF

Code Implementations(1)

slimgroup/XConvOfficial100%
PyTorchMIT

Code to reproduce the results in "XConv: Low-memory stochastic backpropagation for convolutional layers"; TMLR 2026

83Python, JuliaMar 10, 20211 months agoMIT
convolutional-layersconvolutional-neural-networksjulia-languageprobingpytorch+1 more

Similar Papers

Cite this paper

@article{thatipelli2021xconv,
  title  = {XConv: Low-memory stochastic backpropagation for convolutional layers},
  author = {Anirudh Thatipelli and Jeffrey Sam and Mathias Louboutin and Ali Siahkoohi and Rongrong Wang and Felix J. Herrmann},
  year   = {2021},
  eprint = {2106.06998},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.06998}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.06998.svg)](https://codeofpaper.com/paper/2106.06998)

Discussion