Optimizing the inference performance of conformers
The use of a causal encoder with Attention-Performer modules in ASR models addresses latency issues by reducing memory usage, enhancing conformer inference performance for on-device applications.
Patent Information
- Application Number
- JP2024521020
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-10-05
- Filing Date
- 2022-09-29
- Publication Date
- 2024-10-23
- Estimated Expiration
- 2042-09-29
AI Technical Summary
Integrated automatic speech recognition (ASR) models with self-attention layers face increased latency due to the large number of internal states they maintain, which is not suitable for on-device applications with memory bandwidth limitations.
Implementing a causal encoder with a stack of causal encoder layers, each incorporating an Attention-Performer module of a recurrent neural network (RNN) that applies linear attention, and optionally cascading it with a non-causal encoder to reduce latency and model size, while retaining the benefits of self-attention during pre-training.
The solution reduces latency and model size, making the ASR model suitable for on-device applications by transforming queries/keys from multi-head attention to RNN's Attention-Performer module with constant memory complexity, thereby improving conformer inference performance.
Smart Images

Figure 2024538718000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to optimizing the inference performance of a conformer. [Background technology]
[0002] Automatic speech recognition (ASR) systems have evolved from multiple models, each with a dedicated purpose, to unified models where a single neural network is used to directly map an audio waveform (i.e., an input sequence) to an output sentence (i.e., an output sequence). This unification resulted in a sequence-to-sequence approach, which generates a sequence of words (or graphemes) given a sequence of audio features. Often, these unified models contain multiple self-attention layers that maintain a large number of internal states. However, devices that implement these unified models have limited memory bandwidth, and reading each of these internal states increases the latency of the ASR system. Summary of the Invention [Means for solving the problem]
[0003] One aspect of the present disclosure provides an automatic speech recognition (ASR) model including a causal encoder including a stack of causal encoder layers. The causal encoder is configured to receive as an input a sequence of acoustic frames and generate, at each of a plurality of output steps, a first higher order feature representation for a corresponding acoustic frame in the sequence of acoustic frames. The ASR model also includes a decoder configured to receive as an input the first higher order feature representation generated by the causal encoder at each of the plurality of output steps and generate, at each of the plurality of output steps, a first probability distribution over possible speech recognition hypotheses. Here, each causal encoder layer in the stack of causal encoder layers includes an Attention-Performer module of a Recurrent Neural Network (RNN) that applies linear attention.
[0004] Implementations of the present disclosure may include one or more of any of the following features. In some implementations, during pre-training, each causal encoder layer includes a first feed-forward module, a convolution module, a multi-head attention module, a second feed-forward module, and a layer normalization module. In these implementations, during fine-tune training, each causal encoder layer includes a first feed-forward module, a convolution module, an RNN attention-performer module, a second feed-forward module, and a layer normalization module. Each causal encoder layer may be pre-trained using normal conformer training on the multi-head attention module, and is fine-tuned by replacing the multi-head attention module with an RNN attention-performer module. Here, replacing the multi-head attention module with the RNN attention-performer module may include applying a trainable affine transformation to convert the query / key from the pre-trained multi-head attention module into an RNN model of constant memory complexity in linear time and sequence length.
[0005] In some examples, the causal encoder further includes a first stack of convolutional blocks without self-attention. In some implementations, the ASR model further includes a non-causal encoder configured to receive as input the first high-order feature representation generated by the causal encoder at each of the plurality of output steps and generate at each of the plurality of output steps a second high-order feature representation for the corresponding high-order feature representation. Here, the decoder is further configured to receive as input the second high-order feature representation generated by the non-causal encoder at each of the plurality of output steps and generate at each of the plurality of output steps a second probability distribution over possible speech recognition hypotheses.
[0006] In some examples, the decoder includes a prediction network configured to receive as input the sequence of non-blank symbols output by the final softmax layer and generate a dense representation at each of the multiple output steps. In these examples, the decoder also includes a combination network configured to receive as input the dense representation generated by the prediction network at each of the multiple output steps and one of a first high-level feature representation generated by a causal encoder at each of the multiple output steps when the ASR model is operating in streaming mode or a second high-level feature representation generated by a non-causal encoder at each of the multiple output steps when the ASR model is operating in non-streaming mode, and generate at each of the multiple output steps one of a first probability distribution over possible speech recognition hypotheses when the ASR is operating in streaming mode or a second probability distribution over possible speech recognition hypotheses when the ASR is operating in non-streaming mode. The prediction network may include a long short-term memory (LSTM)-based prediction network. In some examples, the prediction network includes a V2 embedded lookup table.
[0007] Another aspect of the present disclosure provides a computer-implemented method that, when executed on data processing hardware, causes the data processing hardware to perform operations for optimizing inference performance of a conformer. The operations include receiving a sequence of acoustic frames as input to an automatic speech recognition (ASR) model. The ASR model includes a causal encoder and a decoder. The operations also include generating, by the causal encoder at each of a plurality of output steps, a first high-order feature representation for a corresponding acoustic frame in the sequence of acoustic frames. The operations also include generating, by the decoder at each of a plurality of output steps, a first probability distribution over possible speech recognition hypotheses. Here, the causal encoder includes a stack of causal encoder layers, and each causal encoder layer in the stack of causal encoder layers includes an Attention-Performer module of a recurrent neural network (RNN) that applies linear attention.
[0008] Implementations of the present disclosure may include one or more of any of the following features: In some implementations, during pre-training of the ASR model, each causal encoder layer includes a first feedforward module, a convolution module, a multi-head attention module, a second feedforward module, and a layer normalization module. In these implementations, during fine-tune training, each causal encoder layer includes a first feedforward module, a convolution module, an attention-performer module of the RNN, a second feedforward module, and a layer normalization module. Here, the operation may further include pre-training each causal encoder layer using normal conformer training for the multi-head attention module, and fine-tuning each causal encoder layer by replacing the multi-head attention module with the attention-performer module of the RNN. In some examples, replacing the multi-head attention module with an RNN attention-performer module includes applying a trainable affine transformation to transform queries / keys from the pre-trained multi-head attention module into an RNN model of linear time and constant memory complexity in sequence length.
[0009] The causal encoder may further include a first stack of convolutional blocks without self-attention. In some implementations, the operations further include generating, by a non-causal encoder of the ASR model at each of the plurality of output steps, a second high-level feature representation for the corresponding first high-level feature representation generated by the causal encoder, and generating, by a decoder at each of the plurality of output steps, a second probability distribution for possible speech recognition hypotheses for the corresponding second high-level feature representation. In these implementations, the operations may further include receiving, as an input in a prediction network of the decoder, a sequence of non-blank symbols output by the final softmax layer, generating a dense representation by the prediction network, and generating, by a combination network of the decoder, one of the first probability distribution for possible speech recognition hypotheses when the ASR model is operating in streaming mode, or the second probability distribution for possible speech recognition hypotheses when the ASR model is operating in non-streaming mode. In some examples, the prediction network includes a long short-term memory (LSTM)-based prediction network. The prediction network may include a V2 embedded lookup table.
[0010] The details of one or more implementations of the disclosure are set forth in the accompanying drawings and the description below. Other aspects, features, and advantages will become apparent from the description and drawings, and from the claims. [Brief description of the drawings]
[0011] [Figure 1] 1 is a schematic diagram of an exemplary speech recognition system. [Figure 2A] FIG. 1 is a schematic diagram of an ASR model operating in streaming and non-streaming modes. [Figure 2B] FIG. 1 is a schematic diagram of an ASR model operating in streaming and non-streaming modes. [Figure 2C]FIG. 1 is a schematic diagram of an ASR model operating in streaming and non-streaming modes. [Figure 3A] FIG. 1 is a schematic diagram of an example causal encoder layer of an ASR model. [Figure 3B] FIG. 1 is a schematic diagram of an example causal encoder layer of an ASR model. [Figure 3C] FIG. 1 is a schematic diagram of an example causal encoder layer of an ASR model. [Figure 4A] FIG. 1 is a schematic diagram of an example stack of causal encoder layers for an ASR model. [Figure 4B] FIG. 1 is a schematic diagram of an example stack of causal encoder layers for an ASR model. [Figure 4C] FIG. 1 is a schematic diagram of an example stack of causal encoder layers for an ASR model. [Diagram 5] 1 is a flowchart of an exemplary arrangement of operations for a computer-implemented method for optimizing inference performance of a conformer. [Figure 6] 1 is a schematic diagram of an example computing device that may be used to implement the systems and methods described herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Like reference numbers in the various drawings indicate like elements.
[0013] End-to-end (E2E) automatic speech recognition (ASR) models are traditionally configured to operate in streaming or non-streaming modes. Typically, E2E ASR models include an encoder and a decoder as key components. Applications involving end-user interaction, such as voice search or on-device dictation, may call for models that perform recognition in a streaming manner, where words are expected to be output with as little latency as possible as they are spoken. This precludes the use of models that use future context to improve accuracy, such as bidirectional long short-term memory (LSTM). In contrast, applications such as offline video capturing do not require streaming recognition and may fully utilize any available future context to improve performance.
[0014] The encoder of E2E ASR models may include self-attention layers, such as conformer or transformer layers. The drawback of these self-attention layers is that the number of internal states they maintain is much larger than that of LSTM layers. In particular, most of these internal states correspond to the key and value tensors used for self-attention. As a result, the latency of these E2E ASR models during inference increases due to the computational cost of repeatedly loading a large number of internal states.
[0015] Accordingly, implementations herein are directed to an ASR model including a causal encoder (e.g., a first encoder) having a stack of causal encoder layers. The causal encoder is configured to receive a sequence of acoustic frames corresponding to an utterance and generate a first high-level feature representation for the corresponding acoustic frames. The ASR model also includes a decoder configured to generate a first probability distribution over possible speech recognition hypotheses for the corresponding first high-level feature representation. Here, each causal encoder layer in the stack of encoder layers includes a recurrent neural network (RNN) attention-performer module that applies linear attention during fine-tune training and inference of the ASR model. Advantageously, the causal encoder may retain the benefits gained from a self-attention layer (e.g., a conformer layer or a transformer layer) during pre-training while using the RNN attention-performer module layer during fine-tune training and inference, thereby reducing the latency and model size of the ASR model and making the ASR model suitable for on-device applications. As will become apparent, the ASR model may also include a non-causal encoder (i.e., a second encoder) cascaded to the causal encoder to further increase the accuracy of the ASR model in applications where latency is not a limiting constraint.
[0016] 1 is an exemplary system 100 in an audio environment 101. In the audio environment 101, a way in which a user 104 interacts with a computing device, such as a user device 10, may be through voice input. The user device 10 (also generally referred to as device 10) is configured to capture sounds (e.g., streaming audio data) from one or more users 104 in the audio environment 101. Here, streaming audio data may refer to verbal utterances by the user 104 that function as audible queries, commands for the user device 10, or audible communications captured by the device 10. A voice-enabled system of the user device 10 may field the queries or commands by responding to the queries and / or by executing / implementing the commands by one or more downstream applications.
[0017] The user device 10 may correspond to any computing device associated with a user 104 and capable of receiving audio data. Some examples of the user device 10 include, but are not limited to, a mobile device (e.g., a mobile phone, a tablet, a laptop, etc.), a computer, a wearable device (e.g., a smart watch), a smart appliance, an Internet of Things (IoT) device, a vehicle infotainment system, a smart display, a smart speaker, etc. The user device 10 includes a data processing hardware 12 and a memory hardware 14 in communication with the data processing hardware 12, which stores instructions that, when executed by the data processing hardware 12, cause the data processing hardware 12 to perform one or more operations. The user device 10 further includes an audio system 16 with audio capture devices (e.g., microphones) 16, 16a for capturing and converting oral utterances 106 in the audio environment 101 into electrical signals, and audio output devices (e.g., speakers) 16, 16b for communicating audible audio signals (e.g., as output audio data from the device 10). Although the user device 10 implements a single audio capture device 16a in the illustrated example, the user device 10 may implement an array of audio capture devices 16a without departing from the scope of this disclosure, and thus one or more capture devices 16a of the array may not be physically present on the user device 10 but may be in communication with the audio system 16.
[0018] The system 100 includes an automatic speech recognition (ASR) system 118 implementing an ASR model 200 on a user device 10 of a user 104 and / or on a remote computing device 60 (e.g., one or more remote servers of a distributed system running in a cloud computing environment) in communication with the user device 10 via a network 40. In some examples, the ASR model 200 includes a recurrent neural network-transducer (RNN-T) model architecture. The user device 10 and / or the remote computing device 60 also include an audio subsystem 108 configured to receive utterances 106 spoken by the user 104 and captured by the audio capture device 16a and convert the utterances 106 into a corresponding digital format associated with input acoustic frames 110 that can be processed by the ASR system 118. In the illustrated example, the user speaks each utterance 106, and the audio subsystem 108 converts the utterances 106 into corresponding audio data (e.g., a sequence of acoustic frames) 110 for input to the ASR system 118. The ASR model 200 then receives as input a sequence of acoustic frames 110 corresponding to the utterance 106, and at each output step, as the ASR model 200 receives (e.g., processes) each acoustic frame 110 in the sequence of acoustic frames 110, it generates / predicts a corresponding transcription 120 (e.g., a speech recognition result / hypothesis) of the utterance 106.
[0019] In the illustrated example, the ASR model 200 may perform streaming speech recognition to create initial speech recognition results (e.g., candidate hypotheses) 120, 120a, and generate final speech recognition results (e.g., final hypotheses) 120, 120b by improving the initial speech recognition result 120a. The initial and final speech recognition results 120a, 120b may correspond to either partial speech recognition results or entire speech recognition results. In other words, the initial and final speech recognition results 120a, 120b may correspond to either a portion of the utterance 106, or an entire portion of the utterance 106. For example, a partial speech recognition result may correspond to a portion of an oral utterance, or even a portion of an oral term. However, as will become apparent, the ASR model 200 performs additional processing on the final speech recognition result 120b, such that the final speech recognition result 120b may lag behind the initial speech recognition result 120a.
[0020] The user device 10 and / or the remote computing device 60 also execute a user interface generator 107 configured to present a representation of the transcription 120 of the utterance 106 to the user 104 of the user device 10. As described in more detail below, the user interface generator 107 may display the initial speech recognition result 120a in a streaming manner during time 1, and then display the final speech recognition result 120b in a streaming manner during time 2. In particular, the ASR model 200 outputs the final speech recognition result 120b in a streaming manner even if the final speech recognition model 120b improves the initial speech recognition result 120a. In some configurations, the transcription 120 output from the ASR system 118 is processed (e.g., by a natural language understanding (NLU) module executing on the user device 10 or the remote computing device 60) to execute the user command / query specified by the utterance 106. Additionally or alternatively, a text-to-speech system (not shown) (e.g., running on any combination of the user device 10 or the remote computing device 60) may convert the transcription 120 into synthetic speech for audible output by the user device 10 and / or another device.
[0021] In the illustrated example, a user 104 interacts with a program or application 50 (e.g., a digital assistant application 50) of the user device 10 that uses an ASR system 118. For example, FIG. 1 shows a user 104 communicating with the digital assistant application 50 and the digital assistant application 50 displaying a digital assistant interface 18 on the screen of the user device 10 to show a conversation between the user 104 and the digital assistant application 50. In this example, the user 104 is asking the digital assistant application 50, "What time is the concert tonight?" This question from the user 104 is an oral utterance 106 that is captured by an audio capture device 16a and processed by an audio system 16 of the user device 10. In this example, the audio system 16 receives the oral utterance 106 and converts it into a sequence of acoustic frames 110 for input to the ASR system 118.
[0022] Continuing with this example, as the user 104 speaks, the ASR model 200 receives a sequence of acoustic frames 110 corresponding to the utterance 106, encodes the sequence of acoustic frames 110, and then decodes the encoded sequence of acoustic frames 110 into an initial speech recognition result 120a. During time 1, the user interface generator 107 presents a representation of the initial speech recognition result 120a of the utterance 106 to the user 104 of the user device 10 via the digital assistant interface 18 in a streaming manner, with words, word fragments, and / or individual characters appearing on the screen as they are spoken. In some examples, the first look-ahead audio context is equal to zero.
[0023] During time 2, the user interface generator 107 presents a representation of the final speech recognition result 120b of the utterance 106 to the user 104 of the user device 10 via the digital assistant interface 18 in a streaming manner, with words, word fragments, and / or individual characters appearing on the screen as soon as they are generated by the ASR model 200. In some implementations, the user interface generator 107 replaces the representation of the initial speech recognition result 120a presented at time 1 with the representation of the final speech recognition result 120b presented at time 2. Here, time 1 and time 2 may include timestamps corresponding to when the user interface generator 107 presents the respective speech recognition results 120. In this example, the timestamp for time 1 indicates that the user interface generator 107 presents the initial speech recognition result 120a at an earlier time than the final speech recognition result 120b. For example, when the final speech recognition result 120b is estimated to be more accurate than the initial speech recognition result 120a, the final speech recognition result 120b, which is finally displayed as the transcription 120, may correct terms that may not have been recognized in the initial speech recognition result 120a. In this example, the streaming initial speech recognition result 120a, output by the ASR model 200 and displayed on the screen of the user device 10 at time 1, is associated with low latency and provides responsiveness to the user 104 whose query is being processed, while the final speech recognition result 120b, output by the ASR model 200 and displayed on the screen at time 2, utilizes additional speech recognition and / or language models to improve the speech recognition quality in terms of accuracy, but with increased latency. However, since the initial speech recognition result 120a is displayed as the user speaks the utterance 106, the higher latency associated with creating and finally displaying the final speech recognition result 120b is not noticeable to the user 104.
[0024] In the example shown in FIG. 1, the digital assistant application 50 may respond to questions posed by the user 104 using natural language processing. Natural language processing generally refers to the process of interpreting written language (e.g., initial speech recognition results 120a and / or final speech recognition results 120b) and determining whether the written language prompts some action. In this example, the digital assistant application 50 uses natural language processing to recognize that the question from the user 104 pertains to the user's schedule, and more specifically, to a concert on the user's schedule. By recognizing these details using natural language processing, the automated assistant returns a response 19 to the user's query, which states, "Venue doors open at 6:30 PM and concert starts at 8pm." In some configurations, the natural language processing is performed at a remote server 60 in communication with the data processing hardware 12 of the user device 10.
[0025] 2A-2C include example ASR models 200a-c operating in various combinations of streaming and non-streaming modes. In particular, each of the ASR models 200a-c includes an encoder 202 and a decoder 204. The encoder 202 may include a causal encoder (i.e., a first encoder) 210 that includes a stack of causal encoder layers 300, and a non-causal encoder (i.e., a second encoder) 220.
[0026] 3A-3C illustrate various exemplary causal encoder layers 300 of the first encoder 210. More specifically, FIG. 3A is a schematic diagram of a first exemplary causal encoder layer (e.g., a conformer layer or a transformer layer) 300, 300a that may be used to implement one or more of the causal encoder layers 300 from the stack of causal encoder layers 300 of the first encoder 210. The first exemplary causal encoder layer 300a includes a first half-feedforward layer 310, a second half-feedforward layer 340, a concatenation operator 305, and a layer normalization module 350, with a convolution module 320 and a multi-head self-attention module 330 disposed between the first and second half-feedforward layers 310, 340. The first half-feedforward layer 310 processes a sequence of acoustic frames 110 (e.g., a mel-spectrogram input sequence) by projecting the acoustic frames 110 to a larger dimension, followed by a nonlinear activation, and then another linear layer to project the features back to the original dimension. The convolutional layer 320 then subsamples the sequence of acoustic frames 110 concatenated with the output of the first half-feedforward layer 310. That is, the convolutional module 320 aggregates information from nearby contexts to capture relative offset-based local interactions. The multi-head self-attention module 330 may include a self-attention layer, such as a conformer layer or a transformer layer. The multi-head self-attention module 330 receives the output of the convolutional module 320 concatenated with the output of the first half-feedforward layer 310. Intuitively, the role of the multi-head self-attention module 330 is to summarize the noise context separately for each input frame to be enhanced. The multi-head self-attention module 330 looks back L previous frames and converts the output into a fixed-length vector, thereby capturing more global patterns. The multi-head self-attention module 330 maintains a number of internal states.A significant portion of these internal states correspond to self-attention key and value tensors, incurring increased latency due to repeatedly loading each of these internal states (e.g., quadratic computational costs).
[0027] The second half-feedforward layer 340 then receives the concatenation of the output of the multi-head self-attention module 330 and the output of the convolution module 320. The layer normalization module 350 processes the concatenation of the output from the second half-feedforward layer 340 and the output of the multi-head self-attention module 330. That is, the first exemplary causal encoder layer 300a transforms each acoustic frame 110 in the sequence of acoustic frames 110 (e.g., input feature x) using the modulation feature m to generate an output 355 for the corresponding acoustic frame 110 in the sequence of acoustic frames 110 at each output step. More specifically, the first exemplary causal encoder layer 300a may generate the output 355 by:
number
[0028] An output 355 of the first exemplary causal encoder layer 300a is passed to the next causal encoder layer 300 in the stack of causal encoder layers 300 of the first encoder 210. The last causal encoder layer 300 in the stack of causal encoder layers 300 generates a first high-level feature representation 212 for the corresponding acoustic frame 110 in the sequence of acoustic frames 110.
[0029] 3B is a schematic diagram of a second exemplary causal encoder layer 300, 300b that may be used to implement one or more of the causal encoder layers 300 from the stack of causal encoder layers 300. The second exemplary causal encoder layer 300b includes a first half-feedforward layer 310, a second half-feedforward layer 340, a concatenation operator 305, and a layer normalization module 350, with a convolution module 320 and a recurrent neural network (RNN) attention-performer module 360 disposed between the first and second half-feedforward layers 310, 340. That is, the second exemplary causal encoder layer 300b replaces the multi-head self-attention module 330 from the first exemplary causal encoder layer 300a (FIG. 3A) with the RNN attention-performer module 360. Advantageously, the RNN Attention-Performer module 360 replaces the quadratic attention of the Multi-head Self-Attention module 330 with a more manageable linear attention and leverages a low-rank decomposition of the attention tensor.
[0030] The RNN Attention-Performer 360 includes a unidirectional performer that performs prefix sum determination, which emulates the causal attention of the multi-head self-attention module. More specifically, the RNN Attention-Performer module 360 determines a matrix by summing the cross products of kernel features and value vectors corresponding to the key. At each iteration of prefix sum determination, the kernel feature vector corresponding to the query is multiplied with the previous prefix sum to generate a new embedding. Here, the RNN Attention-Performer module 360 obtains the previous prefix sum by summing all cross products corresponding to the preceding tokens. Furthermore, the RNN Attention-Performer module 360 obtains the features by applying normalized linear unit element-wise activation to the affine transformed query / key.
[0031] The first half-feedforward layer 310 processes a sequence of acoustic frames 110 (e.g., a mel-spectrogram input sequence). The convolutional layer 320 then subsamples the sequence of acoustic frames 110 concatenated with the output of the first feedforward layer 310. The RNN Attention-Performer module 360 receives the output of the convolutional module 320 concatenated with the output of the first half-feedforward layer 310 and applies linear attention to generate an output. The second half-feedforward layer 340 then receives the concatenation of the output of the RNN Attention-Performer module 360 and the output of the convolutional module 320. The layer normalization module 350 processes the output from the second half-feedforward layer 340 and the output of the multi-head self-attention module 330 to generate an output 355. An output 355 of the second exemplary causal encoder layer (i.e., RNN Performer layer) 300b is passed to the next causal encoder layer 300 in the stack of causal encoder layers 300 of the first encoder 210. The last causal encoder layer 300 in the stack of causal encoder layers 300 generates a first high-level feature representation 212 for the corresponding acoustic frame 110 in the sequence of acoustic frames 110.
[0032] 3C is a schematic diagram of a third exemplary causal encoder layer 300, 300c that may be used to implement one or more of the causal encoder layers 300 from the stack of causal encoder layers 300. The third exemplary causal encoder layer (i.e., convolution block) 300c includes a first half-feedforward layer 310, a convolution module 320, and a concatenation operator 305. In particular, the third exemplary causal encoder layer 300c does not include a self-attention module (e.g., a multi-head self-attention module 330 and an RNN attention-performer module 360), thereby reducing the model size and computational resources of the ASR model 200. As will become apparent, the first encoder layer 300 of the stack of causal encoder layers 300 may include the third exemplary causal encoder layer 300c. The first half-feedforward layer 310 processes a sequence of acoustic frames 110 (e.g., a mel-spectrogram input sequence). The convolutional layer 320 then subsamples the sequence of acoustic frames 110 concatenated with the output of the first half-feedforward layer 310 to generate an output 325. The output 325 of the third exemplary causal encoder layer 300c is passed to the next causal encoder layer 300 in the stack of causal encoder layers 300 of the first encoder 210. The last causal encoder layer 300 in the stack of causal encoder layers 300 (e.g., the first or second exemplary causal encoder layer 300a, 300b) generates a first high-level feature representation 212 for the corresponding acoustic frame 110 in the sequence of acoustic frames 110.
[0033] 4A-4C include an example configuration 400 of the first encoder 210 having various stacks of causal encoder layers 300. The example configuration 400 shown in FIGS. 4A-4C merely illustrates a stack of causal encoder layers 300 having five (5) causal encoder layers 300 for clarity, and it will be understood that the stack of causal encoder layers 300 may include any number of causal encoder layers 300. FIG. 4A illustrates a first configuration 400, 400a of stacks of causal encoder layers 300 for the first encoder 210 during a pre-training phase of the ASR model 200. Here, each causal encoder layer 300 in the stack of causal encoder layers 300 of the first encoder 210 includes a first example causal encoder layer (e.g., conformer layer) 300a1-a5. Thus, each causal encoder layer 300 in the stack of causal encoder layers 300 of the first configuration 400a includes a multi-head self-attention module 330 that performs regular self-attention. Because each causal encoder layer 300 in the stack of causal encoder layers of the first configuration 400a includes a conformer layer, the first configuration 400a represents a conformer or encoder, whereby each first exemplary causal encoder layer (e.g., conformer layer) uses regular conformer training during the pre-training phase.
[0034] FIG. 4B illustrates a second configuration 400, 400b of a stack of causal encoder layers 300 for the first encoder 210 used during fine-tune training, and subsequently inference, of the ASR model 200. Here, each causal encoder layer 300 in the stack of causal encoder layers 300 of the first encoder 210 includes a second exemplary causal encoder layer 300b1-b5. In other words, during fine-tune training, the second configuration 400b replaces each of the first exemplary causal encoder layers 300a (FIG. 3A) with a second exemplary causal encoder layer 300b (FIG. 3B). Thus, each causal encoder layer 300 in the stack of causal encoder layers of the second configuration 400b includes an Attention-Performer module 360 of an RNN that performs linear attention. Thus, during fine-tune training and inference, the first encoder 210 retains the benefits learned during pre-training with the multi-head self-attention module 330 while also having the advantages of lower latency and smaller model size of the RNN Attention-Performer module 360 of the second exemplary causal encoder layer 300b (FIG. 3B).
[0035] 4C illustrates a third configuration 400, 400c of the first encoder 210 used during fine-tune training and inference of the ASR model 200. Here, a first causal encoder layer 300 in the stack of causal encoder layers 300 of the first encoder 210 includes a third exemplary causal encoder layer 300c, and a subsequent causal encoder layer 300 in the stack of causal encoder layers 300 of the first encoder 210 includes a second exemplary causal encoder layer 300b. In other words, during fine-tune training, the third configuration 400c replaces each of the first exemplary causal encoder layers 300a (FIG. 3A) of the first causal encoder layer 300 with the third exemplary causal encoder layer 300c, and replaces each of the first exemplary causal encoder layers 300a (FIG. 3A) of the subsequent causal encoder layers 300 with the second exemplary causal encoder layer 300b. In particular, the only difference between the first exemplary causal encoder layer 300a and the second exemplary causal encoder layer 300b is that the second exemplary causal encoder layer includes an RNN Attention-Performer module 360 instead of a multi-head self-attention module 330. Replacing the multi-head self-attention module 330 with the RNN Attention-Performer module 360 involves applying a trainable affine transformation to convert the queries / keys from the multi-head self-attention module 320 into an RNN model (e.g., the RNN Attention-Performer module 360) of linear time and constant memory complexity in sequence length.
[0036] As shown in FIG. 4C, the first and second causal encoder layers (e.g., initial causal encoder layers) 300c1, 300c2 comprise a third exemplary causal encoder layer 300c, and the third, fourth, and fifth causal encoder layers 300b1-b3 (e.g., subsequent causal encoder layers) comprise a second exemplary causal encoder layer 300b. However, the initial causal encoder layer is not so limited, e.g., the initial causal encoder layer may comprise any number of layers from a stack of causal encoder layers. The third configuration 400c of the first encoder 210 uses a simpler initial causal encoder layer to hypothesize low-level features and subsequent causal encoder layers that perform linear attention.
[0037] Returning to FIGS. 2A-2C, in some implementations, the encoder 202 is a cascaded encoder. The cascaded encoder 202 refers to a model structure in which the encoding paths of the first encoder 210 and the second encoder 220 are cascaded such that the output of the first encoder 210 feeds the input of the second encoder 220 prior to decoding. Here, the first and second encoders 210, 220 may be cascaded regardless of the underlying architecture of each encoder. In some examples, the first and second encoders 210, 220 include a stack of multi-head (e.g., 8-head) attention layers. The stack of multi-head attention layers may include a stack of conformer layers or a stack of transformer layers. To constrain the model from using future inputs, causal convolution and left context attention layers may be used for each causal encoder layer in the stack of causal encoder layers of the first encoder 210. The cascaded encoder may include 17 causal encoder layers. Here, the first encoder 210 may include 15 causal encoder layers, and the second encoder 220 may include two causal encoder layers that encompass an additional right context (e.g., 5.04 seconds). The first encoder 210 may be referred to as a causal encoder, and the second encoder 220 may be referred to as a non-causal encoder.
[0038] Here, the first encoder 210 is a streaming encoder and the second encoder 220 is a non-streaming encoder. In the cascaded encoder 202, the second encoder 220 may receive the output of the first encoder 210 and leverage the causal encoder layer 300 of the first encoder 210 such that the second encoder includes fewer multi-head attention layers than the first encoder 210. By having fewer layers, the cascaded encoder reduces the number of more computationally expensive layers, potentially making the ASR model 200 more streamlined than simply combining a traditional streaming model with a traditional non-streaming model.
[0039] Referring now to FIG. 2A, a first encoder 210 encodes a sequence of d-dimensional feature vectors (e.g., the acoustic frame 110 shown in FIG. 1) x = (x 1 , x 2 , ..., x T ), where
number
[0040] The decoder 204 may include a recurrent neural network transducer (RNN-T) architecture having a combination network 230 and a prediction network 240. The decoder 204 receives the first and second high-level feature representations 212, 222 output by the encoder 202 at each of a number of output steps, as well as the previous prediction y r-1 The ASR model 200 uses a combining network 230 to combine the hidden representations 242 output from the prediction network 240 for (y x , y y ) to generate a decoder output. When the ASR model 200 operates in streaming mode, the combining network 230 receives only the hidden representations 242 output from the prediction network 240 and the first high-level feature representation 212 output from the first encoder 210 (e.g., the combining network 230 does not receive the second high-level feature representation 222). The decoder output is a sequence of N previous non-blank symbols (y x , y y ). i-1 ,..., y i-N ), if the input is x, the current subword unit y i With respect to the probability distribution, P (y i |y i-1 ,..., y 0 , x). Although not shown, the ASR model 200 may include a final softmax layer that receives the output of the decoder 204 and generates a sequence of non-blank symbols. In some implementations, the softmax layer is separate from the decoder 204 and processes the output from the decoder 204. The output of the softmax layer is then used to select the orthographic elements in the beam search process. In some implementations, the final softmax layer is integrated with the decoder 204 such that the output of the decoder 204 represents the output of the final softmax layer.
[0041] The decoder 204 is configured to generate a probability distribution for possible speech recognition hypotheses at each output step. When the ASR model 200 is operating in streaming mode, the decoder 204 generates a first probability distribution 232 for possible speech recognition hypotheses for the corresponding first high-level feature representation 212. Alternatively, when the ASR model 200 is operating in non-streaming mode, the decoder 204 generates a second probability distribution 234 for possible speech recognition hypotheses for the corresponding second high-level feature representation 222. In other words, the combination network 230 generates a probability distribution 232, 234 for possible speech recognition hypotheses at each output step (e.g., time step). Here, a "possible speech recognition hypothesis" corresponds to a set of output labels / symbols (also called "speech units"), each of which represents a grapheme (e.g., a symbol / character) or a word fragment in a particular natural language. For example, when the natural language is English, the set of output labels may include twenty-seven (27) symbols, e.g., one label for each of the 26 letters of the English alphabet and one label indicating white space. The combination network may therefore output a set of values indicating the likelihood that each of the predetermined set of output labels occurs. This set of values may be a vector (e.g., a one-hot vector) and may indicate a probability distribution with respect to the set of output labels. In some scenarios, the output labels are graphemes (e.g., individual characters, and potentially punctuation and other symbols), although the set of output labels is not so limited. For example, the set of output labels may include word fragments and / or complete words in addition to or instead of graphemes. The output labels may also be other types of speech units, such as phonemes or subphonemes. The output distribution of the combination network 230 may include a posterior probability value for each of the different output labels. Thus, if there are 100 different output labels representing different graphemes or other symbols, the output of combination network 230 may include 100 different probability values, one for each output label.The probability distribution can then be used to select and assign scores to candidate orthographic elements (e.g., graphemes, word fragments, and / or words) in a beam search process (e.g., by a Softmax layer) to determine the transcription 120.
[0042] Within the decoder 204, the prediction network may have two 2,048-dimensional LSTM layers, each of which is followed by a 640-dimensional projection layer, resulting in an LSTM-based prediction network with approximately 23.4 million parameters. In other configurations, the prediction network 240 may instead include a conformer layer or a transformer layer instead of an LSTM layer. In yet other configurations, the prediction network 240 includes a V2 embedding lookup table that includes an embedding prediction network. At each time step, the V2 embedding lookup table receives as input the two previous predictions (e.g., one-hot vectors) output by the combination network 230 and generates a respective embedding d for each of the two previous predictions. 1 , d 2 Determine the concatenated output [d 1 , d 2 ] may be provided to the combination network 230. By comparison, a V2 embedding lookup table may have only about two (2) million parameters, while an LSTM-based predictive network may contain about 23.4 million parameters. Finally, the combination network 230 may be a one-layer neural network with 640 hidden units.
[0043] Continuing with the example of FIG. 2A, in some implementations, the ASR model 200a operates in both streaming and non-streaming modes in parallel. When operating simultaneously in both streaming and non-streaming modes, the ASR model 200a first performs streaming speech recognition on a sequence of acoustic frames 110 using the first encoder 210 to generate a first high-level feature representation 212 for both the second encoder 220 and the decoder 204. The decoder 204 then generates a first probability distribution 232 over possible speech recognition hypotheses to output partial speech recognition results 120, 120a. The ASR model 200b also performs non-streaming speech recognition, and the second encoder 220 uses the first high-level feature representation 212 received from the first encoder 210 to generate a second high-level feature representation 222. The decoder 204 then generates a second probability distribution 234 over possible speech recognition hypotheses to output final speech recognition results 120, 120b. As indicated by time, the decoder 204 outputs partial speech recognition results 120a in a streaming manner using the output from the first encoder 210, and then operates in a non-streaming manner to generate final speech recognition results 120b using the first high-level feature representation 212. Thus, the final speech recognition results 120b for the input utterance 106 may lag behind the partial speech recognition results 120a.
[0044] Referring to FIG. 2B, in some implementations, the ASR model 200b operates only in streaming mode. This may be done, for example, when the user 104 (FIG. 1) is using an application such as voice search or on-device dictation, which requires as little latency as possible. Here, the encoder 202 operates in a non-cascaded mode such that only the first encoder 210 generates an output. More specifically, the ASR model 200b performs streaming speech recension on the sequence of acoustic frames 110 using only the first encoder 210 to generate a first high-level feature representation 212 for the decoder 204. The decoder 204 then generates a first probability distribution 232 regarding possible speech recognition results. Since the streaming mode of the ASR model 200b immediately generates partial speech recognition results 120a, the imprecision of the term "playback" is generally acceptable to users.
[0045] Referring to FIG. 2C, in some embodiments, the ASR model 200c operates only in a non-streaming mode. The non-streaming mode may occur in low-latency applications, such as when a user (FIG. 1) is viewing a transcription of a voicemail left on the user's phone. As explained above, this type of application benefits from a second encoder 220 that uses future context to improve speech recognition accuracy (e.g., word error rate (WER)) at the expense of increased processing time. Here, the ASR model 200c first uses the first encoder 210 to generate a first high-level feature representation 212 at each output step for input to the second encoder 220, but the decoder 204 does not decode any of the first high-level feature representation 212. The ASR model 200c then performs non-streaming speech recognition on the sequence of acoustic frames 110 (e.g., including additional right context), whereby the second encoder 220 uses the first high-level feature representation 212 received from the first encoder 210 to generate a second high-level feature representation 222. The decoder 204 then generates a second probability distribution 234 over the possible speech recognition hypotheses to generate the final speech recognition result 120b. In this scenario, since generating streaming speech recognition results in real time is of little value to the user and latency is not a factor, the ASR model 200c may simply operate only in a non-streaming mode to generate the final speech recognition result 120b.
[0046] 5 is a flowchart of an example configuration of operations for a method 500 of optimizing inference performance of a conformer. The method 500 may be executed on data processing hardware 610 (FIG. 6) using instructions stored in memory hardware 620 (FIG. 6). The data processing hardware 610 and memory hardware 620 may be on the user device 10 of FIG. 1 and / or a remote computing device 60 corresponding to the computing device 600 (FIG. 6).
[0047] At operation 502, the method 500 includes receiving a sequence of acoustic frames 110 as input to the ASR model 200. Here, the ASR model 200 includes a causal encoder (i.e., a first encoder) 210 and a decoder 204. At operation 504, the method 500 includes generating, at each of a plurality of output steps, a first high-level feature representation 212 for a corresponding acoustic frame 110 in the sequence of acoustic frames 110 by the causal encoder 210. At operation 506, the method 500 includes generating, at each of a plurality of output steps, a first probability distribution 232 for possible speech recognition hypotheses by the decoder 204. Here, the causal encoder 210 includes a stack of causal encoder layers 300, each including an attention-performer module 360 of an RNN that applies linear attention.
[0048] 6 is a schematic diagram of an exemplary computing device 600 that may be used to implement the systems and methods described herein. The computing device 600 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The components shown, their connections and relationships, and their functions are intended to be exemplary only and are not intended to limit the implementation of the invention described and / or claimed herein.
[0049] Computing device 600 includes a processor 610, a memory 620, a storage device 630, a high-speed interface / controller 640 connecting to memory 620 and high-speed expansion port 650, and a low-speed interface / controller 660 connecting to low-speed bus 670 and storage device 630. Each of components 610, 620, 630, 640, 650, and 660 are connected to each other using various buses and may be attached to a common motherboard or otherwise as needed. Processor 610 can process instructions for execution within computing device 600, including instructions stored in memory 620 or storage device 630 to display graphical information for a graphical user interface (GUI) on an external input / output device, such as a display 680 coupled to high-speed interface 640. In other implementations, multiple processors and / or multiple buses may be used in conjunction with multiple memories and types of memories as needed. Also, multiple computing devices 600 may be connected, with each device providing a portion of the required operations (eg, as a bank of servers, a group of blade servers, or a multi-processor system).
[0050] The memory 620 stores information non-transiently within the computing device 600. The memory 620 may be a computer-readable medium, a volatile memory unit, or a non-volatile memory unit. The non-volatile memory 620 may be a physical device used to temporarily or permanently store programs (e.g., a sequence of instructions) or data (e.g., program state information) for use by the computing device 600. Examples of non-volatile memory include, but are not limited to, flash memory and read-only memory (ROM) / programmable read-only memory (PROM) / erasable programmable read-only memory (EPROM) / electrically erasable programmable read-only memory (EEPROM) (e.g., commonly used for firmware such as boot programs). Examples of volatile memory include, but are not limited to, random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), phase change memory (PCM), as well as disks or tapes.
[0051] The storage device 630 is capable of providing mass storage to the computing device 600. In some implementations, the storage device 630 is a computer-readable medium. In various different implementations, the storage device 630 may be a floppy disk device, a hard disk device, an optical disk device, or an array of devices including a tape device, a flash memory or other similar solid-state memory device, or a storage area network or other configuration of devices. In further implementations, a computer program product is tangibly embodied in an information carrier. The computer program product includes instructions that, when executed, perform one or more methods as described above. The information carrier is a computer-readable or machine-readable medium, such as the memory 620, the storage device 630, or a memory on the processor 610.
[0052] The high-speed controller 640 manages the bandwidth-intensive operations of the computing device 600, and the low-speed controller 660 manages the lower bandwidth-intensive operations. This allocation of responsibilities is merely exemplary. In some implementations, the high-speed controller 640 is coupled to the memory 620, the display 680 (e.g., via a graphics processor or accelerator), and is also coupled to a high-speed expansion port 650 that may accept various expansion cards (not shown). In some implementations, the low-speed controller 660 is coupled to the storage device 630 and a low-speed expansion port 690. The low-speed expansion port 690 may include various communication ports (e.g., USB, Bluetooth, Ethernet, wireless Ethernet) and may be coupled to one or more input / output devices such as a keyboard, pointing device, scanner, or to a networking device such as a switch or router, for example via a network adapter.
[0053] The computing device 600 may be implemented in a number of different forms, as shown in the figure. For example, the computing device 600 may be implemented as a standard server 600a, or multiple times in a group of such servers 600a, or as a laptop computer 600b, or as part of a rack server system 600c.
[0054] Various implementations of the systems and techniques described herein may be realized in digital electronic and / or optical circuitry, integrated circuits, specially designed ASICs (application-specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementation in one or more computer programs executable and / or interpretable by a programmable system including at least one programmable processor, which may be special purpose or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0055] These computer programs (also known as programs, software, software applications, or codes) contain machine instructions for a programmable processor and can be implemented in high-level procedural and / or object-oriented programming languages and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, non-transitory computer-readable medium, apparatus and / or device (e.g., magnetic disk, optical disk, memory, programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0056] The processes and logic flows described herein can be implemented by one or more programmable processors, also referred to as data processing hardware, which execute one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be implemented by dedicated logic circuitry, such as FPGAs (field programmable gate arrays) or ASICs (application specific integrated circuits). Processors suitable for executing computer programs include, by way of example, both general purpose and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for performing instructions, and one or more memory devices for storing instructions and data. Generally, a computer will also include one or more mass storage devices, such as magnetic disks, magneto-optical disks, or optical disks, for storing data, or be operatively coupled to receive data from or transfer data to them, or both. However, a computer need not have such devices. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, by way of example, semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices, magnetic disks, such as internal hard disks or removable disks, magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and memory can be supplemented by, or incorporated in, special purpose logic circuitry.
[0057] To enable interaction with a user, one or more aspects of the present disclosure can be implemented in a computer having a display device, such as a CRT (cathode ray tube), LCD (liquid crystal display) monitor, or touch screen, for displaying information to the user, and optionally a keyboard and pointing device, such as a mouse or trackball, by which the user can provide input to the computer. Other types of devices can also be used to enable interaction with the user, for example, feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback, and input from the user can be received in any form, including acoustic input, speech input, or tactile input. In addition, the computer can interact with the user by sending documents to and receiving documents from a device used by the user, for example, by sending a web page to a web browser on the user's client device in response to a request received from the web browser.
[0058] Several implementations have been described. However, it will be understood that various modifications may be made without departing from the spirit and scope of the present disclosure. Accordingly, other implementations are within the scope of the following claims. [Explanation of symbols]
[0059] 10 User Devices 12 Data Processing Hardware 14 Memory Hardware 16 Audio Capture Devices 18 Digital Assistant Interface 19 responses 40 Network 50 Digital Assistant Applications 60 Remote Server 101 Audio environment 104 users 106 utterances 107 User Interface Generator 108 Audio Subsystem 110 Acoustic Frame 118 Automatic Speech Recognition (ASR) Systems 120 Voice Recognition Results 200 ASR Models 202 Encoder 204 Decoder 210 Causal Encoder 220 Non-causal Encoder 230 Connected Network 240 Prediction Network 300 Causal Encoder Layer 305 Concatenation Operator 310 First Half-Feedforward Layer 320 Convolution Module 330 Multi-head Self-Attention Module 340 Second Half-Feedforward Layer 350 Layer Normalization Module 360 RNN Attention-Performer Module 600 computing devices 610 Processor 620 Memory 630 Storage Devices 640 High Speed Interface / Controller 650 High Speed Expansion Port 660 Low Speed Interface / Controller 670 Slow Bus 680 Display 690 Low Speed Expansion Port
Claims
1. An automatic speech recognition (ASR) model (200), A causal encoder (210) comprising a stack of causal encoder layers (300), receiving as input a sequence of acoustic frames (110); generating, at each of a plurality of output steps, a first high-level feature representation (212) for a corresponding acoustic frame (110) in the sequence of acoustic frames (110); a causal encoder (210) configured to: A decoder (204), receiving as input the first high-level feature representation (212) generated by the causal encoder (210) at each of the plurality of output steps; generating a first probability distribution (232) for possible speech recognition hypotheses at each of the plurality of output steps; A decoder (204) configured to Equipped with each causal encoder layer (300) in the stack of causal encoder layers (300) includes a recurrent neural network (RNN) attention-performer module (360) that applies linear attention; ASR model (200).
2. During pre-training of the ASR model (200), each causal encoder layer (300) A first feedforward module (310); A convolution module (320); A multi-head attention module (330); a second feedforward module (340); A layer normalization module (350); The ASR model (200) of claim 1, comprising:
3. During fine-tune training of the ASR model (200), each causal encoder layer (300) the first feedforward module (310); The convolution module (320); The RNN Attention-Performer module (360); the second feedforward module (340); The layer normalization module (350); The ASR model (200) of claim 2, comprising:
4. 4. The ASR model of claim 3, wherein each causal encoder layer is pre-trained using regular conformer training for the multi-head attention module and is fine-tuned by replacing the multi-head attention module with the RNN's Attention-Performer module.
5. 5. The ASR model of claim 4, wherein replacing the multi-head attention module with the RNN attention-performer module comprises applying a trainable affine transformation to convert queries / keys from the pre-trained multi-head attention module into an RNN model of linear time and constant memory complexity in sequence length.
6. 6. The ASR model (200) of claim 1, wherein the causal encoder (210) further comprises an initial stack of convolutional blocks (300c) without self-attention.
7. A non-causal encoder (220), comprising: receiving as input the first high-level feature representation (212) generated by the causal encoder (210) at each of the plurality of output steps; generating a second high-level feature representation (222) for a corresponding first high-level feature representation (212) in each of the plurality of output steps; a non-causal encoder (220) configured to: Further equipped with The decoder (204) receiving as input the second higher-level feature representation (222) generated by the non-causal encoder (220) at each of the plurality of output steps; generating a second probability distribution (234) for the possible speech recognition hypotheses at each of the plurality of output steps; The ASR model (200) of any one of claims 1 to 6, further configured to:
8. The decoder (204) A prediction network (240), receiving as input the sequence of non-blank symbols output by the final softmax layer; generating a dense representation (242) at each of said plurality of output steps; A prediction network (240) configured to: A coupling network (230), As input, the dense representation (242) produced by the predictive network (240) at each of the plurality of output steps; and the first high-level feature representation (212) generated by the causal encoder (210) at each of the plurality of output steps when the ASR model (200) is operating in a streaming mode; or When the ASR model (200) is operating in a non-streaming mode, the second high-level feature representation (222) generated by the acausal encoder (220) at each of the plurality of output steps. and In each of the plurality of output steps, the first probability distribution (232) over possible speech recognition hypotheses when the ASR model (200) is operating in the streaming mode; or the second probability distribution (234) over possible speech recognition hypotheses when the ASR model (200) is operating in the non-streaming mode. and generating one of a coupling network (230) configured to 8. The ASR model (200) of claim 7, comprising:
9. 10. The ASR model of claim 8, wherein the prediction network comprises a long short-term memory (LSTM)-based prediction network.
10. 10. The ASR model of claim 8 or 9, wherein the prediction network includes a V2 embedded lookup table.
11. A computer-implemented method (500), when executed by data processing hardware (610), causing the data processing hardware (610) to: receiving a sequence of acoustic frames (110) as input to an automatic speech recognition (ASR) model (200), the ASR model (200) comprising a causal encoder (210) and a decoder (204); generating, by the causal encoder (210), at each of a plurality of output steps, a first high-level feature representation (212) for a corresponding acoustic frame (110) in the sequence of acoustic frames (110); generating, by said decoder (204), at each of said plurality of output steps, a first probability distribution (232) over possible speech recognition hypotheses; Perform an action including the causal encoder (210) includes a stack of causal encoder layers (300), each of which includes a recurrent neural network (RNN) attention-performer module (360) that applies linear attention; A computer-implemented method (500).
12. During pre-training of the ASR model (200), each causal encoder layer (300) A first feedforward module (310); A convolution module (320); A multi-head attention module (330); a second feedforward module (340); A layer normalization module (350); 12. The computer-implemented method (500) of claim 11, comprising:
13. During fine-tune training of the ASR model (200), each causal encoder layer (300) the first feedforward module (310); The convolution module (320); The RNN Attention-Performer module (360); the second feedforward module (340); The layer normalization module (350); 13. The computer-implemented method (500) of claim 12, comprising:
14. The operation, pre-training each causal encoder layer (300) using regular conformer training for the multi-head attention module (330); fine-tuning each causal encoder layer (300) by replacing the multi-head attention module (330) with an Attention-Performer module (360) of the RNN; 14. The computer-implemented method (500) of claim 13, further comprising:
15. 15. The computer-implemented method of claim 14, wherein replacing the multi-head attention module with the RNN attention-performer module comprises applying a trainable affine transformation to transform queries / keys from the pre-trained multi-head attention module into an RNN model of linear time and constant memory complexity in sequence length.
16. 16. The computer-implemented method (500) of any one of claims 11 to 15, wherein the causal encoder (210) further comprises an initial stack of convolutional blocks (300c) without self-attention.
17. The operation, generating, by a non-causal encoder (220) of the ASR model (200), a second higher-level feature representation (222) for each of the plurality of output steps for a corresponding first higher-level feature representation (212) generated by the causal encoder (210); generating, by the decoder (204), at each of the plurality of output steps, a second probability distribution (234) over possible speech recognition hypotheses for a corresponding second high-level feature representation (222); 17. The computer-implemented method (500) of any one of claims 11 to 16, further comprising:
18. The operation, receiving as input at a prediction network (240) of said decoder (204) the sequence of non-blank symbols output by the final softmax layer; generating a dense representation (242) by said predictive network (240); The combination network (230) of the decoder (204) the first probability distribution (232) over possible speech recognition hypotheses when the ASR model (200) is operating in streaming mode; or When the ASR model (200) is operating in a non-streaming mode, the second probability distribution (234) over possible speech recognition hypotheses. and generating one of 20. The computer-implemented method (500) of claim 17, further comprising:
19. 20. The computer-implemented method of claim 18, wherein the prediction network comprises a long short-term memory (LSTM)-based prediction network.
20. 20. The computer-implemented method (500) of claim 18 or 19, wherein the predictive network (240) includes a V2 embedded lookup table.
