TransMask: A Compact and Fast Speech Separation Model Based on Transformer

Zining Zhang, Bingsheng He, Zhenjie Zhang

Abstract

TransMask is a novel, highly efficient speech separation model that combines the local processing strengths of Recurrent Neural Networks (RNNs) with the global context capabilities of Transformers. By replacing sequential inter-chunk processing with parallel self-attention, TransMask achieves state-of-the-art separation quality while being up to 60% smaller and over 2x faster than existing models like DPRNN and Conv-TasNet.

Introduction

The "cocktail party problem" remains a central challenge in neural speech separation: isolating clean speech tracks from a mixed audio recording of multiple speakers. Historically, solutions have relied on Convolutional Neural Networks (CNNs) or Recurrent Neural Networks (RNNs). While CNNs like Conv-TasNet are fast, they often fail to capture long-term dependencies. Conversely, RNN-based models like DPRNN are accurate but suffer from sequential processing bottlenecks, leading to inference times that scale linearly ($O(N)$) with audio length.

Pure Transformer models offer parallelizability and a global receptive field but often lack the ability to capture short-term local dependencies effectively. Furthermore, they are typically computationally expensive and massive in size. TransMask bridges this gap by designing a compact, fast model that captures both short- and long-term dependencies efficiently.

Methods

The core of TransMask is the STRNN (Strided-Transformer with RNN) architecture. The model splits audio into overlapping chunks and employs a bidirectional LSTM to process local context within each chunk. A Transformer then processes the global context across these chunks. This hybrid approach aligns the strengths of each architecture with the multi-scale nature of audio data.

Overall architecture of the TransMask speech separation system, featuring the STRNN separator.

Additional innovations include:

  • Sandwich-Norm Transformer Layer: A specific normalization structure (Pre-norm + an extra Layer Normalization) that stabilizes training and removes the need for learning rate warm-up periods.
  • Dual-Temporal Convolutional Encoding: A 2D convolutional network used to inject trainable, order-aware positional information, compensating for the Transformer's inherent lack of sequence order awareness.

Key Insights

  • Hybrid Architectures for Audio: Delegating local processing to RNNs and global processing to Transformers optimizes the model for audio physics.
  • Constant-Time Inference: Since the sequential RNN component is restricted to fixed-size local chunks, the sequential bottleneck is capped. This allows for near $O(1)$ scaling on parallel hardware.
  • Structural Stability: The "Sandwich-Norm" layer demonstrates that architectural design can replace complex training heuristics like warm-ups.

Key Results

TransMask was evaluated on the LibriMix (Libri2Mix) dataset, a rigorous benchmark featuring 1,172 speakers. The results demonstrate significant improvements in both quality and efficiency.

Comparison of model size and separation performance (SDR) on the LibriMix benchmark.
  • Superior Audio Quality: The 6-layer variant, TransMask-6, achieved a Signal-to-Distortion Ratio (SDR) of 16.3, surpassing DPRNN (15.6) and Conv-TasNet (13.5).
  • Efficiency and Speed: TransMask-6 contains only 1.62M parameters—roughly 40% smaller than DPRNN. On a standard CPU, it achieved a Real-Time Factor (RTF) of 0.56. Due to its $O(1)$ scaling, it became 4 times faster than DPRNN when processing audio clips four times the original length.

Limitations and Future Work

The $O(1)$ scaling advantage is bounded by hardware parallelization limits. In CPU tests, inference time began to rise again once audio lengths reached 8 times the baseline, indicating that the hardware's parallel compute cores had become saturated. Future work may involve applying the STRNN block to other real-time sequence tasks like speech translation.

Summary updated

BibTeX
@inproceedings{zhang2021transmask,
  author = {Zining Zhang and Bingsheng He and Zhenjie Zhang},
  title = {{TransMask: A Compact and Fast Speech Separation Model Based on Transformer}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  doi = {10.1109/icassp39728.2021.9413670},
}
Figure