A transducer carries both acoustic position and emitted-label history
Follow blank and label transitions in an RNN-T lattice, combine equivalent paths, and distinguish search limits from model probabilities and streaming context guarantees.
On this page
The question for today
What you’ll understand
- Track acoustic and output positions through transducer blank and label transitions.
- Calculate a selected path probability and combine compatible path contributions.
- Explain prediction-state ownership, beam pruning, and encoder-causality contracts.
A recurrent neural network transducer conditions its next decision on both acoustic evidence and previously emitted labels. A blank advances the acoustic position, while emitting a label extends the output history without necessarily consuming another encoder step. That makes its state different from a framewise CTC path. A streaming implementation must preserve encoder caches, prediction state, and the beam's competing histories, then define which approximations or limits it introduces when the full search is too expensive.
Two coordinates do not eliminate the need to know the prefix
The encoder produces acoustic state at a time position, the prediction network represents an output prefix, and a joint network produces a distribution over labels plus blank. In a fixed-target training lattice, output position identifies the corresponding target prefix. During decoding, two hypotheses with the same output length can contain different labels and therefore different prediction states. Do not merge them merely because their integer coordinates match. Cached prediction state belongs to a compatible exact history, including the model revision and any conditioning relevant to that state.
In the conventional transducer lattice, blank moves to the next acoustic step and preserves label history; a label stays at the current acoustic position while extending that history. Several labels may therefore be emitted before a blank advances time. The original Graves transduction paper defines this sequence model and its alignment summation. Its objective does not automatically make an encoder causal: a bidirectional or unrestricted future-context encoder still needs future audio. State the permitted right context separately when calling an RNN-T system streaming.
Beam search approximates a sum over many possible histories
A path score multiplies the relevant joint probabilities, usually accumulated as log probabilities for stability. Several paths can produce the same output prefix at a compatible acoustic position; sum their contributions when the algorithm's equivalence contract permits it. Keeping only the largest path score changes that calculation. External language models, insertion bonuses, or length normalizations can improve a chosen decoding objective but make a resulting beam score different from the original normalized transducer probability. Record those additions and the exact merging rules for reproducibility.
Beam width, score thresholds, and maximum symbols per acoustic step bound work but can discard the ultimately best output. A hard emission cap can prevent an unproductive expansion loop, yet it is a search approximation rather than a theorem that the model would never emit more labels there. Wider beams also increase joint evaluations and state storage; their effect on final error is empirical under the full scoring policy. Compare latency and word error at the same model, context settings, hardware, and workload instead of assuming one beam size is universally better.
Carry state safely through chunks, revisions, and cancellation
A chunk boundary should not reset an active hypothesis's prediction network or advance the acoustic index twice for overlapping encoder context. Define which acoustic frames are new, which caches summarize history, and whether right-context frames are provisional. Hypothesis forks need independent mutable prediction state or a correct immutable sharing scheme. When a branch is pruned, release its private state without invalidating surviving hypotheses. A finalization rule also needs to distinguish a stable prefix from a provisional best path that later acoustic evidence can overturn.
The queue lab shows only the cost of excess hypothetical search work. Reset, explicitly set BOTH arrival λ=4 and service μ=3, predict q(2)=6 from initial backlog four, then Play or Step four times. Reset and re-set BOTH λ=2 and μ=3; predict q(2)=2. Edits retain t and recompute the original constant-rate trajectory. This fluid model has no labels, lattice, beam width, or neural evaluations. It illustrates a service-capacity tradeoff without predicting how any real transducer's search complexity or error changes with pruning.
Work it through
Follow one two-frame alignment and sum a second path
For a fixed target ab and two acoustic steps indexed zero and one, consider a valid path: emit a with probability 0.5, blank with 0.4, emit b with 0.25, then blank with 0.8 to reach terminal acoustic index two. A different valid path with the same output has probability 0.03.
The selected state sequence is (0,0)→(0,1)→(1,1)→(1,2)→(2,2). Label emissions extend the target prefix while blanks advance acoustic position.
Its probability is 0.5×0.4×0.25×0.8=0.04. Each number belongs to its own joint state; they are not one shared framewise distribution.
The two specified paths contribute 0.04+0.03=0.07 to P(ab). If other valid ab paths exist, their probabilities must also be added. A beam retaining only the first path has not computed the complete target probability.
Acoustic progress, output progress, and alignment probability require separate state and accounting.
The living notebook
Explore the model
Interactive lab · queue
Search work can exceed a processing budget
For EACH run Reset, set BOTH λ and μ, predict, then Play or Step four times to t=2. Initial q=4 gives q=6 for (4,3) and q=2 for (2,3). Edits retain t/recompute from the original backlog. This fluid work queue has no RNN-T lattice, token history, beam pruning, encoder context, or error-rate prediction.
- Fluid backlog
- 4
- Net rate · λ − μ
- −1 /s
- M/M/1 mean residence
- 1 s
Fluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forSearch limits trade work against approximation; a queue illustration cannot establish their recognition-quality effect.
Pause & reason
Check your understanding
Your turn
Try it yourself
A valid selected alignment has transition probabilities 0.7,0.5,0.2,0.6. Another compatible complete alignment for the same output has probability 0.01. Calculate their combined contribution. Does retaining the larger path alone compute that output's full probability?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Multiply within each path and add across compatible complete paths.
Compare with the solution
The first path contributes 0.7×0.5×0.2×0.6=0.042. Together the specified paths contribute 0.052. Keeping only 0.042 omits the other path and any further compatible alignments, so it is not the full output probability.
Keep the idea
Take it with you
- Transducer state combines acoustic progress with the actual emitted-label prefix.
- Path products and compatible-path sums differ from pruned or modified beam scores.
- Streaming, search budgets, and mutable-state ownership need explicit contracts beyond the loss function.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.