RAND: Robustness Aware Norm Decay For Quantized Seq2seq Models

David Qiu, David Rim, Shaojin Ding, Oleg Rybakov, Yanzhang HearXiv 2023 · DOI

Introduction

As neural networks grow in complexity, deploying them on edge devices like smartphones and smart speakers necessitates significant model compression. Quantization—the process of reducing weight precision from 32-bit floats to 4-bit or 8-bit integers—is a primary strategy for achieving this. However, aggressive 4-bit quantization often incurs a substantial penalty in model accuracy.

Existing Quantization Aware Training (QAT) techniques attempt to mitigate these errors during the training phase but struggle with sequence-to-sequence (seq2seq) tasks such as speech recognition. Two major issues persist:

  1. Weight Oscillation: The non-differentiable nature of rounding functions often requires a "Straight-Through Estimator" (STE), which can cause weights to oscillate and hinder convergence.
  2. Scale Sensitivity: Methods like Learnable Scale and Clip (LSC) that attempt to optimize the clipping range often suffer from unstable gradients, particularly when training on massive, diverse datasets.

The RAND Method

To address these challenges, researchers at Google developed RAND (Robustness Aware Norm Decay). This method shifts the focus from optimizing an independent scale parameter to managing the norm of weight tensors directly.

Core Components

  • Norm-Based Scaling: Instead of treating the quantization scale as a separate learnable parameter, RAND defines it as a function of the weight's $L_p$ norm (specifically the infinity norm for 4-bit QAT).
  • Pseudo-Quantization Noise (PQN): To maintain differentiability, RAND replaces discrete rounding with uniform noise during training. This avoids the "dead zones" of zero gradients associated with rounding.
  • Active Norm Decay: By allowing gradients to flow back into the weight norm, the training process naturally penalizes outliers. If a weight is too large and causes excessive quantization noise, RAND "decays" or shrinks that weight, pulling it back into a representable range.

Key Insights: Finding Flat Minima

A critical advantage of RAND is its ability to find "flat minima" in the loss landscape. By introducing noise during training, the model is forced to converge on regions where small perturbations in weights—such as those caused by final quantization—do not significantly impact performance.

RAND encourages the model to find flatter minima, which are more robust to the perturbations introduced by quantization.

This regularization effect not only improves quantization robustness but also enhances general model generalization, particularly for challenging long-form audio tasks.

Experimental Results

The authors evaluated RAND across several benchmarks, ranging from the standard 960-hour LibriSpeech dataset to a massive 1-million-hour production dataset.

Performance on LibriSpeech

On the LibriSpeech "Test-other" benchmark, RAND achieved a Word Error Rate (WER) of 6.30% at 4-bit precision. This outperforms both standard STE-based QAT and more complex learnable scale methods.

Performance comparison on LibriSpeech: RAND (Norm + PQN) achieves the lowest Word Error Rate (WER) among 4-bit quantization methods.

Stability and Scale

One of RAND's most significant strengths is its stability. While alternative methods like LSC often failed to converge on the 5,000-hour SpeechStew dataset, RAND remained stable. On a 1-million-hour production dataset, RAND improved long-form speech recognition WER from 17.2% to 15.4%. Furthermore, the method proved effective for machine translation, improving BLEU scores on the WMT En-Fr task.

Conclusion

RAND provides a robust framework for 4-bit quantization in seq2seq models. By tying quantization scales to weight norms and utilizing noise-based regularization, it achieves a balance of stability, accuracy, and generalization. While challenges remain in extremely low-bit regimes (e.g., 2-bit), RAND represents a significant step forward in making high-performance AI models deployable on resource-constrained devices.

Summary updated

BibTeX
@misc{qiu2023rand,
  author = {David Qiu and David Rim and Shaojin Ding and Oleg Rybakov and Yanzhang He},
  title = {{RAND: Robustness Aware Norm Decay For Quantized Seq2seq Models}},
  year = {2023},
  eprint = {2305.15536},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.15536},
}
Figure