SpeechFormer: A Hierarchical Efficient Framework Incorporating the Characteristics of Speech

Weidong Chen, Xiaofen Xing, Xiangmin Xu, Jianxin Pang, Lan Du

Introduction

While Transformers have revolutionized Natural Language Processing (NLP) and Computer Vision, their application to speech signal processing often overlooks the unique "pronunciation structure" of human speech. Most models treat a speech signal as a flat, uniform sequence of frames, leading to two major drawbacks:

  1. Computational Inefficiency: Standard Transformers utilize "full self-attention," where every frame attends to every other frame. Given the length of speech signals, this results in quadratic complexity ($O(n^2)$), creating a significant computational burden.
  2. Linguistic Neglect: Speech is inherently hierarchical. Information related to emotion or cognitive disorders (such as Alzheimer’s) is not just contained in individual frames but is expressed through the timing of phonemes, the stress on words, and the overall rhythm of an utterance.
The hierarchical structure of speech signals from frames to utterances.

To bridge this gap, the authors propose SpeechFormer, a novel architecture that bakes the structural characteristics of speech directly into the model's design.

The SpeechFormer Architecture

The core innovation of SpeechFormer is its hierarchical four-stage structure, which mirrors the natural progression of speech production.

Overview of the SpeechFormer architecture, showing the progression through frame, phoneme, word, and utterance stages.

Hierarchical Stages

The model processes information through four distinct stages:

  • Frame Stage: Processes raw acoustic features at the highest temporal resolution.
  • Phoneme Stage: Groups frames to capture the smallest units of sound.
  • Word Stage: Groups phonemes to capture semantic and rhythmic units.
  • Utterance Stage: Aggregates word-level features into a global representation for final classification.

Key Components

  • Speech-MSA (Multi-Head Self-Attention): Unlike standard attention, Speech-MSA employs a sliding window ($T_w$). The window size is determined by the statistical duration of speech units (e.g., the average length of a phoneme), drastically reducing the search space and computational cost.
  • Merging Blocks: Positioned between stages, these blocks use average pooling to reduce the number of tokens (downsampling) and linear layers to increase feature dimensions, allowing the model to "zoom out" as it moves up the hierarchy.
  • Statistical Guidance: The authors leveraged linguistic corpora to set window sizes and merging scales, ensuring the model's receptive field matches the reality of human speech (e.g., 90% of words contain fewer than 5 phonemes).

Experimental Setup and Results

SpeechFormer was evaluated on four diverse datasets within the field of Cognitive Speech Signal Processing (CoSSP):

  • Speech Emotion Recognition (SER): IEMOCAP and MELD.
  • Neurocognitive Disorder Detection: Pitt Corpus (Alzheimer’s) and DAIC-WOZ (Depression).

Performance and Efficiency

The results demonstrate that SpeechFormer achieves superior performance with a fraction of the computational cost:

  • Massive Speedup: The "SpeechFormer-S" (small) version required only 10.2% to 15.1% of the FLOPs of a vanilla Transformer baseline.
  • State-of-the-Art Results: On IEMOCAP, it achieved a Weighted Accuracy (WA) of 0.629. On DAIC-WOZ, it achieved a Macro F1 of 0.694, a +3.4% improvement over existing systems. On the Pitt Corpus, it reached 0.757 WA, outperforming specialized models.

Conclusion

SpeechFormer proves that for speech processing, less is more. By incorporating structural inductive biases, the model ignores irrelevant long-range frame dependencies in early stages, leading to better feature learning and significantly reduced complexity. Future work will explore adaptive window sizes to accommodate varying speech rates and integrating this hierarchical approach into raw waveform processing for end-to-end modeling.

Summary updated

BibTeX
@inproceedings{chen2022speechformer,
  author = {Weidong Chen and Xiaofen Xing and Xiangmin Xu and Jianxin Pang and Lan Du},
  title = {{SpeechFormer: A Hierarchical Efficient Framework Incorporating the Characteristics of Speech}},
  booktitle = {Interspeech},
  year = {2022},
  doi = {10.21437/interspeech.2022-74},
}
Figure