Abstract
Accurate sequence-to-sequence (seq2seq) alignment is critical for applications like medical speech analysis and language learning tools relying on automatic speech recognition (ASR). State-of-the-art end-to-end (E2E) ASR systems, such as the Connectionist Temporal Classification (CTC) and transducer-based models, suffer from peaky behavior and alignment inaccuracies. In this paper, we propose a novel differentiable alignment framework based on one-dimensional optimal transport, enabling the model to learn a single alignment and perform ASR in an E2E manner. We introduce a pseudo-metric, called Sequence Optimal Transport Distance (SOTD), over the sequence space and discuss its theoretical properties. Based on the SOTD, we propose Optimal Temporal Transport Classification (OTTC) loss for ASR and contrast its behavior with CTC. Experimental results on the TIMIT, AMI, and LibriSpeech datasets show that our method considerably improves alignment performance compared to CTC and the more recently proposed Consistency-Regularized CTC, though with a trade-off in ASR performance. We believe this work opens new avenues for seq2seq alignment research, providing a solid foundation for further exploration and development within the community.
Introduction
In Automatic Speech Recognition (ASR), the objective is often dual: determining what was said and when it was said. Precise alignment—the mapping of specific audio frames to specific characters or words—is essential for downstream tasks such as automated subtitling, speech disorder diagnosis, and language learning feedback.
Traditional industry standards like Connectionist Temporal Classification (CTC) suffer from "peaky behavior." By marginalizing over all possible alignment paths, these models tend to assign the majority of audio frames to a "blank" symbol, producing sharp, sudden spikes for characters. This results in jittery, inaccurate timing information. This paper addresses this limitation by proposing a framework that learns a single, optimal alignment path.
The OTTC Framework
We propose a shift from marginalization to optimization. Our framework, Optimal Temporal Transport Classification (OTTC), leverages the efficiency of one-dimensional Optimal Transport (OT) to find the most mathematically optimal alignment between sequences.
Sequence Optimal Transport Distance (SOTD)
We introduce SOTD as a pseudo-metric to compare sequences of varying lengths. Because speech is monotonic (moving forward in time), 1D OT can be computed with linear time and space complexity ($O(n+m)$). This is significantly more efficient than the quadratic complexity of traditional methods like Dynamic Time Warping (DTW).
OTTC Loss
The OTTC loss is a differentiable function that jointly trains an encoder to predict label probabilities and an alignment network to predict "OT weights" ($\alpha$). These weights determine which audio frames are significant and which can be ignored, effectively replacing the need for a "blank" token.
Unlike CTC, OTTC does not rely on a dedicated blank label to fill gaps. Instead, it assigns near-zero weight to silence or noise, pruning the sequence naturally. By constraining the model to a monotonic path, we prevent the temporal "collapsing" common in other differentiable alignment methods.
Experimental Evaluation
We evaluated the framework on three major benchmarks:
- TIMIT: Used for phoneme-level alignment due to its exact human-annotated transcriptions.
- AMI: An 80-hour corpus of spontaneous meeting speech for word-level testing in conversational scenarios.
- LibriSpeech: The standard for large-scale ASR, using splits up to 960 hours of read speech.
Results and Discussion
Our findings reveal a significant improvement in alignment precision, albeit with a slight trade-off in transcription accuracy.
- Alignment Quality: OTTC drastically reduces peaky behavior. On TIMIT, the percentage of frames assigned to non-alphabet symbols dropped from 53.5% (CTC) to 0.76%. Furthermore, the Intersection Duration Ratio (IDR)—measuring overlap with ground truth—reached 76.7% for OTTC, compared to 26.9% for CTC.
- ASR Performance: There is a minor "accuracy tax." On TIMIT, the Word Error Rate (WER) increased from 8.38% (CTC) to 8.76% (OTTC). On LibriSpeech 960h, the gap was 2.20% vs 2.52%.
Conclusion
OTTC provides a robust foundation for high-precision seq2seq alignment. While a small gap in WER remains compared to CTC, the superior timing accuracy makes it ideal for specialized speech applications. Future work will focus on learning label weights ($\beta$) dynamically and extending this 1D OT framework to other domains like video-to-text alignment.
Summary updated