Overview
Weight-Activation Subspace Iteration (WASI) is a novel framework designed to enable the training of large Transformer models on resource-constrained edge devices. By compressing both weights and activations into stable, low-rank subspaces, WASI mitigates the severe memory bottlenecks typically associated with backpropagation. The result is a reduction in memory usage by up to $62\times$ and computational costs by $2\times$, achieving a $1.4\times$ speedup on hardware like a Raspberry Pi 5 without a significant loss in accuracy.
The Challenge of On-Device Learning
On-device learning—training or fine-tuning models directly on edge hardware—is crucial for preserving data privacy and reducing energy consumption. However, Transformers are notoriously resource-hungry. While parameter-efficient fine-tuning techniques like LoRA (Low-Rank Adaptation) successfully reduce the number of trainable parameters, they fail to address the primary memory bottleneck: storing activation maps for backpropagation.
Furthermore, most existing compression methods focus on either weights or activations independently, rarely tackling both simultaneously. Many also lack a theoretical link between compression levels and model performance, or they struggle to handle the 4D activation tensors common in Vision Transformers (like SwinT). WASI bridges this gap, making it feasible to fine-tune state-of-the-art Transformers on modest edge hardware.
The WASI Methodology
The authors introduce Weight-Activation Subspace Iteration (WASI), a joint optimization approach that combines two key components:
- Weight Subspace Iteration (WSI): Empirical observations show that model weights reside in a stable, low-dimensional subspace during fine-tuning. Instead of repeatedly computing expensive Singular Value Decompositions (SVD), WSI performs SVD only once at initialization. In subsequent iterations, it uses computationally cheap subspace iteration (via Gram-Schmidt orthogonalization) to maintain this low-rank representation ($W \approx LR$).
- Activation Subspace Iteration (ASI): To compress activation tensors, WASI utilizes Tucker decomposition. The authors improve upon prior ASI work by implementing a dynamic programming strategy for rank selection. Rather than relying on a fixed memory budget, it optimizes ranks based on a target "perplexity" (information loss threshold), reducing the search complexity from exponential to linear.
- Joint Optimization: By applying WSI and ASI simultaneously, WASI restricts both weights and activations to their essential subspaces. Consequently, the forward and backward passes are computed entirely in a low-rank space, drastically reducing both FLOPs and memory footprint.
Experimental Setup
WASI was evaluated across a diverse set of tasks and architectures:
- Vision Tasks: Fine-tuning ViT and SwinT (pretrained on ImageNet-1K) on CIFAR-10/100, CUB, Flowers, and Pets.
- Language Tasks: Fine-tuning TinyLlama on the BoolQ dataset to demonstrate generality beyond computer vision.
- Baselines: The framework was compared against vanilla training, standard ASI, and SVD-LLM.
Key Insights and Results
A major insight of the paper is the empirical verification of subspace stability. The intrinsic subspace of a model's weights remains remarkably stable during fine-tuning, allowing the reuse of initial SVD directions and significantly lowering overhead. Furthermore, by using an "explained variance" threshold, users can precisely control the memory-accuracy trade-off, as most "energy" in activation maps is concentrated in just a few principal components.
The framework yields several impressive results:
- Memory Efficiency: WASI achieved up to a $62\times$ reduction in total training memory for SwinT and a staggering $953\times$ reduction in activation memory for TinyLlama.
- Computational Speedup: Computational costs (FLOPs) were reduced by up to $2\times$. On a Raspberry Pi 5, this translated to roughly $1.4\times$ faster training and inference compared to vanilla PyTorch implementations.
- Accuracy Preservation: On the CUB dataset, WASI actually surpassed vanilla training accuracy at certain compression levels, likely due to the regularizing effect of low-rank constraints.
- WSI vs. Full SVD: As shown in the performance comparisons, WSI required $1.36\times$ fewer FLOPs than reapplying SVD every iteration to achieve the same accuracy, validating the efficiency of the subspace iteration approach.
Limitations and Future Directions
While highly effective for fine-tuning pretrained models, it remains unclear if WASI would be as effective for training from scratch, where subspaces are likely much more volatile. Additionally, hardware limitations prevented testing on massive LLMs (e.g., 7B+ parameters) directly on edge devices. Future work could explore more complex tasks like object detection or long-form text generation, as well as further optimization of the self-attention mechanism itself, building upon the linear layer optimizations presented in this study.
Summary updated