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

ResidualTransformer: Residual Low-rank Learning with Weight-sharing for Transformer Layers

Yiming Wang, Jinyu Li · DOI

Abstract

ResidualTransformer is a novel architecture designed to reduce the memory footprint of Transformer encoders by approximately 3x with minimal performance degradation. By integrating cross-layer weight sharing with unique, low-rank "residual" matrices for each layer, the model enables large-scale speech recognition and translation models to operate on memory-constrained edge devices like smartphones and wearables.

Introduction

Modern speech recognition (ASR) and speech translation (ST) models rely on large-scale Transformer architectures that often exceed the memory capacity of edge devices. Deploying these models typically requires a trade-off between performance and resource consumption. ResidualTransformer addresses this challenge 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?

The core intuition is that weights in consecutive Transformer layers are often similar. By sharing a base matrix to capture commonalities and using low-rank residuals for subtle refinements, the model achieves significant compression without the drastic accuracy drops seen in standard weight-sharing approaches.

Methodology

Standard Transformers utilize unique weight matrices ($W$) for every layer. ResidualTransformer restructures this by grouping $K$ consecutive layers to share a single, full-rank "base" weight matrix ($W_{shared}$).

To prevent performance loss, the authors introduce Residual Learning. Each layer is assigned a unique, low-rank residual matrix ($\Delta W$), composed of:

  1. Low-Rank Components ($A$ and $B$): Two small matrices that approximate a larger one through multiplication ($A^\top B$).
  2. A Diagonal Matrix ($D$): A vector-like matrix that adds full-rank capacity with minimal parameter overhead.

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

The ResidualTransformer architecture combines a shared base matrix with layer-specific low-rank and diagonal residual components.

Experimental Setup

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

  • ASR: Trained on 10,000 hours of English audio and evaluated on a 1.8-million-word test set covering various acoustic environments.
  • Speech Translation (EN-ZH): Evaluated on CoVoST 2, MSLT v1.1, and internal datasets.

Key Results

ResidualTransformer achieves approximately 3x compression of the Transformer encoder with minimal impact on accuracy. For ASR, the Word Error Rate (WER) increased only slightly from 13.28% (baseline) to 13.53% (compressed with $K=3, R=2$). In speech translation, the BLEU score gap remained negligible.

As shown in the table below, adding residual weights significantly narrows the performance gap compared to simple weight sharing, especially as the sharing factor $K$ increases. For $K=3$, the residual approach recovers nearly all the performance of the full-parameter baseline while using less than half the parameters.

Comparison of parameter counts and BLEU scores for weight sharing versus weight sharing with residual weights across different sharing factors K.

Discussion and Insights

  • Sharing vs. Shrinking: An 18-layer model with weight sharing ($K=3$) outperforms a standard 6-layer model of the same total size, suggesting that repeated application of a shared function with slight variations is more powerful than a single pass through unique, smaller functions.
  • The Power of the Diagonal: The diagonal matrix $D$ proved essential for maintaining performance when the rank $R$ of the $A$ and $B$ matrices was very low, providing full-rank capacity at almost zero memory cost.
  • Limitations: While effective for encoders, performance gaps widen as $K$ increases (e.g., $K=18$). Future work will explore applying this logic to other components like LSTMs and embeddings, as well as optimizing for specific hardware compute-time overheads.

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