Skip to content
AI.info

Research

Efficient Resource-Constrained Training of Transformers via Subspace Optimization

Overview Research area: Efficient machine learning / on-device learning — specifically low-rank subspace training of transformer models under memory and compute constraints. Technical level: Intermedi

arXiv
2510.09160
Published
2025-10-10
Authors
Le-Trung Nguyen, Enzo Tartaglione, Van-Tam Nguyen

AI summary

Overview

Research area: Efficient machine learning / on-device learning — specifically low-rank subspace training of transformer models under memory and compute constraints.

Technical level: Intermediate. The paper is readable with a working knowledge of transformers and matrix decomposition, but the method sections rely on singular value decomposition, Tucker decomposition, and subspace iteration.

Scope: The paper proposes and evaluates WASI (Weight-Activation Subspace Iteration), a method that fine-tunes transformer models entirely in a low-rank representation to reduce training and inference memory and FLOPs on resource-constrained devices.

What This Paper Is About

On-device learning — training or fine-tuning models directly on edge hardware — saves energy and protects data privacy, but modern transformer models are too large to train under tight memory budgets because backpropagation must store large weight and activation tensors. Prior work on efficient on-device learning has mostly targeted compact convolutional networks. This paper asks whether transformer models can be fine-tuned and run inside a fixed low-rank subspace, so that both model weights and activation maps are compressed while information loss is kept under control.

Key Contributions

  1. A stability hypothesis for weight subspaces. The authors formulate the idea that a model's essential parameter information resides in a low-dimensional subspace that stays stable across fine-tuning iterations, and they verify this empirically (Sec. 3.3, Sec. 4.2).

  2. A weight compression method (WSI). Weight Subspace Iteration computes a truncated SVD once at the start to find the essential subspace, then reuses that subspace with cheaper subspace iteration in later iterations instead of recomputing full SVDs.

  3. WASI, a unified compression-aware training framework. WSI is combined with an improved Activation Subspace Iteration (ASI) — adding a dynamic-programming strategy that determines activation ranks by minimizing memory under a target pre-tuning perplexity (reducing search cost from exponential to linear), plus an extension to 3D and 4D activation tensors — so weights and activations are jointly compressed under a controlled information-loss constraint.

  4. Extensive evaluation across tasks and hardware. Experiments cover ViT, SwinT, and TinyLlama on CIFAR-10/100, CUB, Flowers, Pets, and BoolQ, including real deployment on a Raspberry Pi 5.

Main Findings

  • Memory and FLOP savings. WASI reduces memory usage by up to 62x and computational cost (FLOPs) by up to 2x compared to vanilla training, while maintaining accuracy comparable to vanilla training.

  • On-device speed. On a Raspberry Pi 5, WASI achieves roughly 1.4x faster training and inference than vanilla training; even at the least aggressive compression setting tested (ε = 0.9), it remains approximately 1.4x faster.

  • Weight subspace stability holds. When fine-tuning ViT on Pets with ε = 0.8, layer ranks of weights in the MLP linear layers stayed remarkably stable across epochs, supporting the hypothesis that the essential subspace can be reused.

  • WSI beats repeated full SVD. Across ε ∈ {0.4, 0.5, 0.6, 0.7, 0.8, 0.9} on ViT/Pets, WSI required 1.36x fewer FLOPs than full SVD to reach the same accuracy, and at equal FLOPs WSI outperformed SVD by approximately 35% in accuracy.

  • Activation maps are highly compressible. The explained variance of activation maps is concentrated in the first few singular values across all modes.

  • ViT on CIFAR-10. WASI achieved up to 100x higher memory efficiency than SVD-LLM at similar accuracy, which the authors attribute to avoiding LoRA adapters. At the lowest compression rates (the last two markers in the plot), SVD-LLM consumed more memory than vanilla training because of the overhead of storing sub-layer activations. LoRA adapters let SVD-LLM reach the lowest FLOPs, followed by WASI; ASI, which only compresses activations, had higher computational cost and at ε = 0.9 even exceeded vanilla training.

  • SwinT across datasets. At ε = 0.9, WASI matched vanilla accuracy while cutting memory by up to 62x and FLOPs by 1.5x, and even surpassed vanilla on CUB.

  • TinyLlama on BoolQ. Fine-tuning the last 5 layers with ε = 0.1, activation and weight memory dropped by up to 953.86x and 30.12x respectively, while training and inference FLOPs fell by 13.11x and 30.27x, all without accuracy loss.

Methodology in Plain English

The researchers start from the observation that backpropagation is expensive mainly because it has to keep both the layer weights and the intermediate activation tensors in memory. Their approach is to never store or compute with the full-size tensors at all.

For weights, they argue that because fine-tuning uses a small learning rate, each update moves the weights only slightly. So the "essential subspace" of a weight matrix — the directions holding most of its variance — should barely change from one training step to the next. They therefore run a full singular value decomposition once at the start, choose how many components to keep based on how much explained variance they want to preserve (a threshold called ε), and afterwards use cheap subspace iteration to refresh that factorization rather than recomputing it. This is WSI.

For activations, they reuse an existing technique (ASI) that compresses activation tensors into a Tucker decomposition — a small core tensor plus factor matrices for each mode — and they improve it in two ways: a dynamic-programming procedure that picks the per-layer ranks by minimizing memory subject to a pre-tuning perplexity target (linear rather than exponential search), and support for activation tensors with three or four dimensions (needed for SwinT).

Putting WSI and ASI together gives WASI: forward and backward passes are rewritten to operate on the low-rank factors, so the model is fine-tuned and executed directly in compressed form. The ε threshold is the single knob trading accuracy against compression. The authors also derive complexity expressions predicting memory compression and speedup ratios as a function of rank, then test the method with PyTorch 1.13.1 on an NVIDIA Quadro RTX A4500 (20 GB VRAM) for simulations and on a Raspberry Pi 5 (Cortex-A76 CPU, 8 GB RAM) for on-device measurements. Models (ViT, SwinT pretrained on ImageNet-1K) are fine-tuned on downstream datasets and compared against ASI, SVD-LLM, and vanilla training, focusing on linear layers in MLP blocks for fair comparison with prior methods.

Why This Matters

This work extends efficient on-device learning from convolutional networks, where it has mostly lived, to transformer models — the dominant architecture in modern AI. If a transformer can be fine-tuned and executed directly in a compressed low-rank form, then privacy-sensitive personalization can happen on the device rather than in the cloud, and inference benefits from the compression too, not just training.

Real-world applications (as implied or supported by the paper's setup):

  • Personalized image classification on phones, cameras, or other edge hardware that fine-tunes a pretrained ViT or SwinT on locally collected photos.
  • Privacy-preserving text tasks on constrained devices, demonstrated through TinyLlama fine-tuning on the BoolQ question-answering dataset without sending data off-device.
  • Low-power inference deployments where the compressed architecture runs faster than the original model, not just during training.
  • Research platforms and educational or field devices (such as a Raspberry Pi 5) where energy and memory budgets are hard constraints.

Industry relevance: The method targets the practical bottleneck that blocks on-device learning for transformers — backpropagation memory — and it produces a compressed model that stays compressed at inference, unlike adapter-based approaches such as LoRA that merge back and lose the computational advantage. That combination is directly relevant to companies building edge AI, personalization features, and privacy-preserving products.

Future Directions

  • Broadening the model coverage. The paper notes that its vision experiments center on ViT and SwinT with TinyLlama as a generality check; extending the evaluation to more transformer families and to larger decoder-only models is a natural next step.

  • Extending beyond transformers. The authors state that the underlying principles apply broadly to any neural network trained with backpropagation, which invites testing on architectures outside the transformer family.

  • Refining rank and threshold selection. The single ε threshold controls the accuracy-compression trade-off; adaptive or per-layer policies beyond the current perplexity-targeted dynamic programming could further improve the trade-off.

  • Wider deployment studies. On-device results are reported for ViT on CIFAR-10 on a Raspberry Pi 5 (batch size 128); broader hardware and task coverage would clarify how the speedups and memory savings generalize.

Target Audience

Researchers and engineers working on efficient training, on-device learning, edge AI, and parameter-efficient fine-tuning, particularly those interested in transformers rather than convolutional models. It is also relevant to practitioners who need to fine-tune or deploy transformer models under hard memory and compute budgets. Readers without a background in matrix decomposition will need to consult the appendices and cited prior work for the underlying linear algebra.

Authors’ abstract

As AI increasingly shapes daily life, energy consumption and data privacy have become pressing concerns. On-device learning trains models directly on edge devices, cutting energy consumption and safeguarding data privacy. However, the expanding scale of modern neural networks creates a major obstacle for on-device training. Although prior work has concentrated on compact convolutional architectures, we instead apply subspace-based training to transformer models. Motivated by the idea that a model's essential information lies in a fixed subspace, we introduce Weight-Activation Subspace Iteration (WASI), a method that mitigates the memory bottleneck of backpropagation and boosts inference efficiency in transformer models by restricting training to this subspace. Our results demonstrate that WASI maintains accuracy comparable to vanilla training while reducing memory usage by up to $62\times$ and computational cost (FLOPs) by up to $2\times$. On a Raspberry Pi 5, WASI achieves roughly $1.4\times$ faster training and inference than vanilla training. The code is available at https://github.com/Le-TrungNguyen/ICLR2026-WASI.git.

Read the original paper