Introduction
Mask CTC is a non-autoregressive (NAR) speech recognition framework designed to achieve the high speed of parallel generation without sacrificing the accuracy typical of traditional autoregressive models. Most state-of-the-art Automatic Speech Recognition (ASR) models are autoregressive (AR), generating text one token at a time. While accurate, this process is computationally expensive and slow for long utterances because the decoding time scales linearly with the output length.
Non-autoregressive models aim to generate all tokens simultaneously. However, they traditionally struggle with two major hurdles: the independence assumption, where simple models like CTC assume output tokens are independent (leading to linguistic inconsistencies), and length prediction, as it is difficult to predict the exact number of characters in a spoken sentence before decoding.
Methods
The authors propose Mask CTC, which combines the strengths of Connectionist Temporal Classification (CTC) and Masked Language Modeling (CMLM) within a Transformer encoder-decoder architecture.
- Joint Training: The model is trained with a dual objective: a CTC loss on the encoder and a mask-predict loss on the decoder.
- CTC Initialization: During inference, the model first performs a "greedy" CTC decoding. This provides a high-quality initial sequence and solves the length prediction problem by using CTC's inherent alignment.
- Confidence-Based Masking: The model calculates a confidence score for each token in the CTC output. Tokens with low confidence (or those identified as likely errors) are replaced with a
<MASK>symbol. - Iterative Refinement: The decoder predicts the masked tokens by attending to both the high-confidence "anchor" tokens and the original audio features. This allows the model to "fill in the blanks" while considering the full bidirectional linguistic context.
Datasets
The researchers evaluated Mask CTC across three languages with varying amounts of data:
- Wall Street Journal (WSJ): 81 hours of English news speech.
- Corpus of Spontaneous Japanese (CSJ): 581 hours of Japanese speech.
- Voxforge: 16 hours of Italian speech, representing a low-resource scenario.
Key Results
Mask CTC demonstrates a significant improvement in both accuracy and decoding speed compared to standard CTC and traditional autoregressive models.
- Accuracy: On the WSJ dataset, Mask CTC improved the Word Error Rate (WER) from 17.9% (standard CTC) to 12.1%. This performance is remarkably close to heavy AR models (11.3% WER).
- Speed: The model achieved a Real Time Factor (RTF) as low as 0.04 to 0.07, making it roughly 116 times faster than the AR model using beam search (RTF 4.62).
- Language Versatility: The model performed exceptionally well on Japanese (CSJ), where it matched or slightly outperformed the AR baseline in character error rates, suggesting robustness for logographic and syllabic scripts.
Discussion and Limitations
The "aha moment" of this research is using CTC as a structural anchor. While CTC may make substitution errors, it is excellent at determining the correct sequence length. By using CTC to set the sequence length, the authors bypassed the most fragile part of previous NAR models. Furthermore, unlike AR models that only look at the past, Mask CTC's refinement step utilizes bidirectional context to correct errors.
However, because the sequence length is fixed by the initial CTC output, Mask CTC cannot easily fix "deletion" errors (missed sounds) or "insertion" errors (extra characters). It is primarily optimized for fixing "substitution" errors. Future work may involve exploring Byte Pair Encoding (BPE) to handle different token granularities and integrating external pre-trained language models like BERT to further improve the refinement process.
Summary updated