LearnQuestion bank

Compare CTC, attention encoder–decoder and transducer (RNN-T) models for ASR. How do you trade latency against accuracy in streaming?

ML engineeringTechnicalHard

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • CTC: alignment-free, conditional independence, blank token (frames can emit nothing; repeats collapsed then blanks removed), greedy or beam decoding with an LM; fast but weaker context modelling.
  • Attention encoder-decoder: strong accuracy, but full-context decoding is awkward to stream.
  • Transducer/RNN-T: streams naturally with incremental, monotonic alignment.
  • Streaming trade-off: chunked or limited look-ahead attention; partial vs final results; max-delay setting; endpointing delay counts towards latency.
  • Metrics: WER on consistently normalised text plus latency percentiles, not averages only.
  • Low-resource: self-supervised pre-training helps, but latency is still set by look-ahead and chunking.

In full

The core trade-off is that CTC is simple and alignment-free but assumes outputs are conditionally independent given the audio, and it uses a blank token so a frame can emit nothing and genuine repeated characters can be kept apart (decoding collapses repeats, then removes blanks); it is usually decoded greedily or with beam search plus an LM, so it is fast but often weaker on context-heavy speech. Attention encoder-decoder models are typically stronger on accuracy, but their full-context encoder-decoder structure is awkward to stream without chunking or limited look-ahead. Transducers/RNN-T fit streaming better because they emit tokens incrementally as audio arrives, which makes them a natural default when latency matters. In production I would expose a max-delay or look-ahead setting, return partial results for responsiveness, and finalise words once the delay budget or an endpoint is reached, counting endpointing delay in the latency budget, rather than pretending a single model gives both best accuracy and lowest latency. I would evaluate with WER on consistently normalised text alongside latency percentiles, and for low-resource languages use self-supervised pre-training to improve robustness while keeping the streaming budget explicit.

Corrected by an independent AI reviewer.

What a strong answer covers

  • CTC: conditional independence, a blank token, alignment-free, greedy or beam decoding with an LM.
  • Attention models are strong but awkward to stream. Transducers stream naturally.
  • Streaming: chunked or limited look-ahead attention; partial vs final results; a max-delay setting that trades latency against accuracy.
  • Metrics: WER and latency percentiles; self-supervised pre-training for low-resource languages.

Common mistakes

  • reporting WER on normalised vs raw text inconsistently
  • ignoring endpointing latency.