Modeladvanced
RNN transducer
Also called RNN-T, neural transducer.
A streaming end-to-end model joining an acoustic encoder and a label predictor network, trained by summing over alignments in a lattice.
The RNN transducer (RNN-T) is an end-to-end speech recognizer that maps acoustic frames to a label sequence of any length, with no frame alignment in the training data. It has three parts: an encoder that reads the audio, a prediction network that reads the labels emitted so far, and a joint network that combines one encoder frame and one prediction state into a distribution over the labels and a blank. A blank means "go to the next frame", and a label means "emit it and stay on this frame". Each way of interleaving blanks with the labels is an alignment, and the probability of is the sum over all alignments. A forward-backward recursion on a lattice computes this sum and its gradient. Unlike CTC, each output depends on the previous labels, and a frame can emit several labels. With a unidirectional encoder the model can emit text while the audio arrives, so it is the usual choice for streaming recognition on devices.
The machine
The input is , the labels come from an alphabet , and is the blank. The model has three networks.
Encoder (the transcription network of Graves 2012). It maps to vectors . Graves used a bidirectional LSTM; a streaming model uses a unidirectional LSTM or a Conformer with limited look-ahead.
Prediction network. It reads the labels emitted so far, after a start symbol, and outputs a vector for . It is a recurrent network that sees no audio, so it works like a language model over labels.
Joint network. For each lattice node , it combines and into a distribution over . Graves (2012) adds the two vectors and applies a softmax, . Later systems put a small feedforward layer between the sum and the softmax. Write and .
The lattice. An alignment starts at node . At node , a blank moves to , and the label moves to . The alignment ends with the blank at . So it has exactly blanks and labels, the last symbol is a blank, and the number of alignments is . The probability of an alignment is the product of the probabilities of its steps.
Forward and backward variables (Graves 2012, Section 2). With ,
where a term with an index outside the lattice is 0, and
The backward variable starts at and satisfies . For every node, is the probability of the alignments that pass through .
Training. The loss is . Its derivatives with respect to the outputs of the joint network are
with for the final blank, and the derivative is 0 for the other symbols. The chain rule through the softmax and the three networks gives the rest. All three networks are trained together.
Decoding. Graves (2012, Algorithm 1) gives a beam search over output prefixes. The prediction state depends on the whole prefix, so prefixes are not merged as freely as in CTC prefix beam search, and the search must allow several labels per frame. Greedy decoding emits the most probable symbol at each node until it is a blank, then moves to the next frame.
Example. Let , (), and let the joint network give , , , , and . There are alignments: "a ∅ ∅" (emit a at frame 1) and "∅ a ∅" (emit a at frame 2). The forward variables are , , and . So , which is . From the end, , , and , the same value.
What it counts
The model gives , a normalized probability of the whole label sequence, and a decoder searches for the with the largest value, possibly with an external language model.
The cost is set by the joint network. Training evaluates it at all nodes, each with an output of size , so time and memory are for the joint outputs, plus the cost of the encoder on frames and of the prediction network on prefixes. The forward and backward recursions take time once the outputs are known. With thousands of word pieces and long utterances, the tensor is the memory limit of training; a frame rate reduction in the encoder makes smaller.
Relation to other models
- CTC. CTC also sums over alignments with a blank, but each frame emits exactly one symbol, the outputs are independent given the audio, and the output can be at most as long as the input. The transducer drops these three limits by the prediction network and the move "emit and stay on this frame".
- Listen, attend and spell and other attention models. They also condition each label on the previous labels, but they attend over the whole utterance and have no monotonic alignment, so they do not stream without changes. The transducer is monotonic by construction.
- Hybrid DNN-HMM. A hybrid model needs a lexicon, tied states and a separate language model. The transducer learns the mapping from audio to characters or word pieces directly, and the prediction network takes the role of an internal language model.
- Joint CTC-attention. Another way to get a monotonic alignment into an end-to-end model, by an extra CTC loss.
- Encoders. The transducer fixes only the loss and the decoding rule. LSTM, Transformer and Conformer encoders are all used with it; Gulati et al. (2020) used a Conformer encoder with a one-layer LSTM prediction network.
Known results in the model
- The forward recursion is exact. It sums the probabilities of all alignments in operations, because every alignment that reaches arrives from by a blank or from by a label, never both (a theorem, by induction on ).
- The number of alignments. An alignment is a sequence of blanks and labels in any order, followed by the final blank, so there are of them (a theorem). For and that is about .
- TIMIT. Graves (2012) measured a phone error rate of 23.2% for the transducer against 25.5% for a CTC network on TIMIT (measurements).
- LibriSpeech. With a Conformer encoder, Gulati et al. (2020) measured word error rates of 2.1% on test-clean and 4.3% on test-other without a language model, and 1.9% and 3.9% with one (measurements).
References
- The transducer, its output lattice, the forward-backward recursions, the gradient and the beam search, Section 2 (eqs. 12 to 22, the output lattice and the forward and backward variables), Section 2.6 (Algorithm 1, beam search) and Section 4 (TIMIT)
- Anmol Gulati, James Qin, Chung-Cheng Chiu, Niki Parmar, Yu Zhang, Jiahui Yu, Wei Han, Shibo Wang, Zhengdong Zhang, Yonghui Wu and Ruoming Pang, Conformer: convolution-augmented transformer for speech recognition, Interspeech 2020, pages 5036 to 5040, the sections on the model architecture (a Conformer encoder with a one-layer LSTM decoder) and the LibriSpeech results
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 7N44VZ Edit this page History Report an error Markdown