On Exact Bit-level Reversible Transformers Without Changing Architecture
Guoqiang Zhang, J. P. Lewis, W. Bastiaan Kleijn
Abstract
Various reversible deep neural networks (DNN) models have been proposed to reduce memory consumption in the training process. However, almost all existing reversible DNNs either require special non-standard architectures or are constructed by modifying existing DNN architectures considerably to enable reversibility. In this work we present the BDIA-transformer, which is an exact bit-level reversible transformer 1 that uses an unchanged standard architecture for inference. The basic idea is to first treat each transformer block as the Euler integration approximation for solving an ordinary differential equation (ODE) and then incorporate the technique of bidirectional integration approximation (BDIA) (originally designed for diffusion inversion) into the neural architecture, together with activation quantization to make it exactly bit-level reversible. In the training process, we let a hyper-parameter γ in BDIA-transformer randomly take one of the two values 0.5, -0.5 per training sample per transformer block for averaging every two consecutive integration approximations. As a result, BDIA-transformer can be viewed as training an ensemble of ODE solvers parameterized by a set of binary random variables, which regularizes the model and results in improved validation accuracy. Lightweight side information per transformer block is required to be stored in the forward process to account for binary quantization loss to enable exact bit-level reversibility. In the inference procedure, the expectation E(γ) = 0 is taken to make the resulting architectures of BDIA-transformer identical to transformers up to activation quantization. Our experiments in both image classification and language translation show that BDIA-transformers outperform their conventional counterparts significantly in terms of validation performance due to the regularization effect of the set of γ random variables while also requiring considerably less training memory. Preprint. Under review.
Ask Lune
Ask anything. The answer quotes the paper.
Lune reads all of it and the papers around it, then shows you the passages behind every answer.
Builds on5
- Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
- Elucidating the Design Space of Diffusion-Based Generative ModelsTero Karras, Miika Aittala, Timo Aila, Samuli LaineNeurIPS 2022 · 3,959 citations
- End-to-End Diffusion Latent Optimization Improves Classifier GuidanceBram Wallace, Akash Gokul, Stefano Ermon, Nikhil NaikICCV 2023 · 118 citations
- Momentum Residual Neural NetworksMichael E. Sander, Pierre Ablin, Mathieu Blondel, Gabriel PeyréICML 2021 · 67 citations
- Reversible Vision TransformersKarttikeya Mangalam, Haoqi Fan, Yanghao Li, Chao-Yuan Wu et al.CVPR 2022 · 52 citations
Related papers
- High-Performance Temporal Reversible Spiking Neural Networks with O(L) Training Memory and O(1) Inference CostJiakui Hu, Man Yao, Xuerui Qiu, Yuhong Chou et al.ICML 2024 · 24 citations
- Memory-Efficient Reversible Spiking Neural NetworksHong Zhang, Yu ZhangAAAI 2024 · 13 citations
- DIVISION: Memory Efficient Training via Dual Activation PrecisionGuanchu Wang, Zirui Liu, Zhimeng Jiang, Ninghao Liu et al.ICML 2023 · 4 citations
- Memory-Efficient Differentiable Transformer Architecture SearchYuekai Zhao, Li Dong, Yelong Shen, Zhihua Zhang et al.ACL Findings 2021 · 11 citations
- RobuQ: Pushing DiTs to W1.58A2 via Robust Activation QuantizationKaicheng Yang, Xun Zhang, Haotong Qin, Yucheng Lin et al.ICML 2026 · 5 citations
