NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Residualtransformer: Residual Low-Rank Learning With Weight-Sharing For Transformer Layers

Yiming Wang, Jinyu Li

TL;DR

ResidualTransformer is a novel architecture that slashes the memory footprint of Transformer encoders by roughly 3x with minimal performance loss. By combining cross-layer weight sharing with unique, low-rank "residual" matrices for each layer, it allows large-scale speech models to fit onto memory-constrained "always-on" devices like smartphones and wearables.

What Problem Does This Paper Address?

Modern AI thrives on "bigger is better," but your smartwatch doesn't have the RAM of an A100 GPU. When deploying speech recognition (ASR) or translation (ST) models to edge devices, developers face a brutal trade-off: use a tiny, low-performing model that fits in memory, or use a large model and suffer from high latency and power drain as the device constantly swaps model "chunks" in and out of its limited RAM.

The authors tackle this by asking: Can we share the bulk of a model's knowledge across layers while still allowing each layer to retain its unique functional identity?

Methods

The authors introduce ResidualTransformer, which restructures how weight matrices are stored and calculated.

Standard Transformers have unique weight matrices ($W$) for every layer. ResidualTransformer changes this in two key ways:

  1. Weight Sharing: It groups $K$ consecutive layers together. All layers in a group share a single, full-rank "base" weight matrix ($W_{shared}$). This provides the massive memory savings.
  2. Residual Learning: To prevent the performance drop usually seen with weight sharing, they add a layer-specific "residual" matrix ($\Delta W$). Inspired by ResNet and LoRA, this $\Delta W$ is composed of:
  3. Low-Rank Components ($A$ and $B$): Two small matrices that, when multiplied, approximate a larger one.
  4. A Diagonal Matrix ($D$): A simple vector-like matrix that adds full-rank capacity with almost zero extra parameters.

The final operation for a layer becomes: $y = (W_{shared}^\top + A^\top B + D^\top)x + b$. During training, both the shared base and the unique residuals are updated simultaneously.

Datasets

The researchers evaluated their approach on large-scale, real-world tasks:

  • Training: 10,000 hours of in-house anonymized English audio.
  • ASR Evaluation: A 1.8-million-word test set covering scenarios like Cortana, far-field speech, and call centers.
  • Speech Translation (EN-ZH): Evaluated on CoVoST 2, MSLT v1.1, and internal datasets covering meetings and dictation.

Key Insights and Ideas

  • Adjacent Layers are "Close Enough": The core intuition is that weights in consecutive Transformer layers don't actually differ that much. Sharing a base matrix captures the commonalities, while the low-rank residual captures the subtle refinements needed at different depths.
  • Sharing is Better than Shrinking: The paper shows that a 18-layer model with weight sharing (where $K=3$, effectively 6 unique layers' worth of parameters) significantly outperforms a standard 6-layer model of the same total size. Repeatedly applying the same function with slight variations is more powerful than one pass through a unique function.
  • The Power of the Diagonal: Adding a simple diagonal matrix ($D$) makes the residual component "full-rank" without the memory cost of a full matrix. This proved particularly helpful when the rank of the $A$ and $B$ matrices was very low (e.g., $R=2$).
  • Not Just for Adaptation: Unlike LoRA, which is typically used to adapt a frozen pre-trained model to a new task, ResidualTransformer uses this structure to train a compressed model from scratch (or initialized from a weight-sharing baseline).

Key Results

  • 3x Compression: The Transformer encoder size was reduced by approximately 3x.
  • Minimal Accuracy Hit:
    • For ASR, the Word Error Rate (WER) only increased from 13.28% (baseline) to 13.53% (compressed with $K=3, R=2$).
  • For Speech Translation, the BLEU score gap was negligible (e.g., a drop of only 0.3–1.0 points depending on the test set).
  • Efficiency: Using residual weights was found to be more parameter-efficient than simply making specific layers (like the last layer) unique.

Limitations and Future Work

While highly effective for Transformer encoders, the authors note a few areas for further exploration:

  • Scope: This study focused specifically on the projection weights within Transformer layers. The authors plan to apply this "residual sharing" logic to other components like LSTMs, embeddings, and convolutional layers in the future.
  • Scaling K: As the sharing factor ($K$) increases (e.g., sharing one matrix across 18 layers), the performance gap widens significantly, even with residual matrices. There is a limit to how much "uniqueness" a low-rank matrix can restore.
  • Hardware Specifics: While the method reduces memory storage, the paper does not deeply explore the specific compute-time overhead of performing the additional low-rank matrix multiplications on various mobile hardware backends.

Summary updated

BibTeX
@inproceedings{wang2024residualtransformer,
  author = {Yiming Wang and Jinyu Li},
  title = {{Residualtransformer: Residual Low-Rank Learning With Weight-Sharing For Transformer Layers}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10446321},
}
Figure