{'fraction_non_alphanumeric': 0.03383325040869998, 'fraction_numerical': 0.00852939085933613, 'mean_word_length': 4.843023255813954, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Improving Spoken Language Understanding By Exploiting ASR N-best Hypotheses

In a modern spoken language understanding (SLU) system, the natural language understanding (NLU) module takes interpretations of a speech from the automatic speech recognition (ASR) module as the input. The NLU module usually uses the first best interpretation of a given speech in downstream tasks such as domain and intent classification. However, the ASR module might misrecognize some speeches and the first best interpretation could be erroneous and noisy. Solely relying on the first best interpretation could make the performance of downstream tasks non-optimal. To address this issue, we introduce a series of simple yet efficient models for improving the understanding of semantics of the input speeches by collectively exploiting the n-best speech interpretations from the ASR module.


INTRODUCTION
Currently, voice-controlled smart devices are widely used in multiple areas to fulfill various tasks, e.g. playing music, acquiring weather information and booking tickets. The SLU system employs several modules to enable the understanding of the semantics of the input speeches. When there is an incoming speech, the ASR module picks it up and attempts to transcribe the speech. An ASR model could generate multiple interpretations for most speeches, which can be ranked by their associated confidence scores. Among the n-best hypotheses, the top-1 hypothesis is usually transformed to the NLU module for downstream tasks such as domain classification, intent classification and named entity recognition (slot tagging). Multi-domain NLU modules are usually designed hierarchically [1]. For one incoming utterance, NLU modules will firstly classify the utterance as one of many possible domains and the further analysis on intent classification and slot tagging will be domain-specific.
In spite of impressive development on the current SLU pipeline, the interpretation of speech could still contain errors. ‡ This work was done while the first author was an intern at Amazon. Sometimes the top-1 recognition hypothesis of ASR module is ungrammatical or implausible and far from the ground-truth transcription [2,3]. Among those cases, we find one interpretation exact matching with or more similar to transcription can be included in the remaining hypotheses (2 nd − n th ).
To illustrate the value of the 2 nd − n th hypotheses, we count the frequency of exact matching and more similar (smaller edit distance compared to the 1 st hypothesis) to transcription for different positions of the n-best hypotheses list. Table 1 exhibits the results. For the explored dataset, we only collect the top 5 interpretations for each utterance (n = 5). Notably, when the correct recognition exists among the 5 best hypotheses, 50% of the time (sum of the first row's percentages) it occurs among the 2 nd − 5 th positions. Moreover, as shown by the second row in Table 1, compared to the top recognition hypothesis, the other hypotheses can sometimes be more similar to the transcription. Over the past few years, we have observed the success of reranking the n-best hypotheses [2,4,5,6,7,8,9,10,11] before feeding the best interpretation to the NLU module. These approaches propose the reranking framework by involving morphological, lexical or syntactic features [9,10,11], speech recognition features like confidence score [2,5], and other features like number of tokens, rank position [2]. They are effective to select the best from the hypotheses list and reduce the word error rate (WER) [12] of speech recognition.
Those reranking models could benefit the first two cases in Table 2 when there is an utterance matching with transcription. However, in other cases like the third row, it is hard to integrate the fragmented information in multiple hypotheses.
This paper proposes various methods integrating n-best hypotheses to tackle the problem. To the best of our knowledge, this is the first study that attempts to collectively exploit the n-best speech interpretations in the SLU system. This paper serves as the basis of our n-best-hypotheses-based SLU system, focusing on the methods of integration for the hypotheses. Since further improvements of the integration framework require considerable setup and descriptions, where jointly optimized tasks (e.g. transcription reconstruction) trained with multiple ways (multitask [13], multistage learning [14]) and more features (confidence score, rank position, etc.) are involved, we leave those to a subsequent article. This paper is organized as follows. Section 2 introduces the Baseline, Oracle and Direct models. Section 3 describes proposed ways to integrate n-best hypotheses during training. The experimental setup and results are described in Section 4. Section 5 contains conclusions and future work.

Baseline and Oracle
The preliminary architecture is shown in Fig. 1. For a given transcribed utterance, it is firstly encoded with Byte Pair Encoding (BPE) [15], a compression algorithm splitting words to fundamental subword units (pairs of bytes or BPs) and reducing the embedded vocabulary size. Then we use a BiL-STM [16] encoder and the output state of the BiLSTM is regarded as a vector representation for this utterance. Finally, a fully connected Feed-forward Neural Network (FNN) followed by a softmax layer, labeled as a multilayer perceptron (MLP) module, is used to perform the domain/intent classification task based on the vector. For convenience, we simplify the whole process in Fig.1 as a mapping BM (Baseline Mapping) from the input utterance S to an estimated tag's probability p(t), where p(t) ← BM (S). The Baseline is trained on transcription and evaluated on ASR 1 st best hypothesis (S = ASR 1 st best). The Oracle is trained on transcription and evaluated on transcription (S = Transcription). We name it Oracle simply because we assume that hypotheses are noisy versions of transcription.

Direct Models
Besides the Baseline and Oracle, where only ASR 1-best 1 hypothesis is considered, we also perform experiments to utilize ASR n-best hypotheses during evaluation. The models evaluating with n-bests and a BM (pre-trained on transcription) are called Direct Models (in Fig. 2 • Majority Vote. We apply the BM model on each hypothesis independently and combine the predictions by picking the majority predicted label, i.e. Music.
• Sort by Score. After parallel evaluation on all hypotheses, sort the prediction by the corresponding confidence score and choose the one with the highest score, i.e. Video.
• Rerank (Oracle). Since the current rerank models (e.g., [2,4,5]) attempt to select the hypothesis most similar to transcription, we propose the Rerank (Oracle), which picks the hypothesis with the smallest edit distance to transcription (assume it is the a-th best) during evaluation and uses its corresponding prediction.

INTEGRATION OF N-BEST HYPOTHESES
All the above mentioned models apply the BM trained on one interpretation (transcription). Their abilities to take advantage of multiple interpretations are actually not trained. As a further step, we propose multiple ways to integrate the n-best hypotheses during training. The explored methods can be divided into two groups as shown in Fig. 3. Let H 1 , H 2 , ..., H n denote all the hypotheses from ASR and bp H k ,i ∈ BP s denotes the i-th pair of bytes (BP) in the k th best hypothesis. The model parameters associated with the two possible ways both contain: embedding e bp for pairs of bytes, BiLSTM parameters θ and MLP parameters W, b.

Hypothesized Text Concatenation
The basic integration method (Combined Sentence) concatenates the n-best hypothesized text. We separate hypotheses with a special delimiter (<SEP>). We assume BPE totally produces m BPs (delimiters are not split during encoding). Suppose the n th hypothesis has j pairs. The entire model can be formulated as: (h1, ..., hm) ← BiLST M θ (bpH 1 ,1, ..., bp<sep>, ..., bpH n ,j ) (1) In Eqn. 1, the connected hypotheses and separators are encoded via BiLSTM to a sequence of hidden state vectors. Each hidden state vector, e.g. h 1 , is the concatenation of forward h 1f and backward h 1b states. The concatenation of the

Hypothesis Embedding Concatenation
The concatenation of hypothesized text leverages the n-best list by transferring information among hypotheses in an embedding framework, BiLSTM. However, since all the layers have access to both the preceding and subsequent information, the embedding among n-bests will influence each other, which confuses the embedding and makes the whole framework sensitive to the noise in hypotheses.
As the second group of integration approaches, we develop models, PoolingAvg/Max, on the concatenation of hypothesis embedding, which isolate the embedding process among hypotheses and summarize the features by a pooling layer. For each hypothesis (e.g., i th best in Eqn. 3 with j pairs of bytes), we could get a sequence of hidden states from BiLSTM and obtain its final output state by concatenating the first and last hidden state (h outputi in Eqn. 4). Then, we stack all the output states vertically as shown in Eqn. 5. Note that in the real data, we will not always have a fixed size of hypotheses list. For a list with r (< n) interpretations, we get the embedding for each of them and pad with the embedding of the first best hypothesis until a fixed size n. When r ≥ n, we only stack the top n embeddings. We employ h output1 for padding to enhance the influence of the top 1 hypothesis, which is more reliable. Finally, one unified representation could be achieved via Pooling (Max/Avg pooling with n by 1 sliding window and stride 1) on the concatenation and one score could be produced per possible tag for the given task.

Dataset
We conduct our experiments on ∼ 8.7M annotated anonymised user utterances. They are annotated and derived from requests across 23 domains. Table 3 shows the relative error reduction (RErr) 2 of Baseline, Oracle and our proposed models on the entire test set (∼ 300K utterances) for multi-class domain classification. We can see among all the direct methods, predicting based on the hypothesis most similar to the transcription (Rerank (Oracle)) is the best. As for the other models attempting to integrate the n-bests during training, PoolingAvg gets the highest relative improvement, 14.29%. It as well turns out that all the integration methods outperform direct models drastically. This shows that having access to n-best hypotheses during training is crucial for the quality of the predicted semantics. To further detect the reason for improvements, we split the test set into two parts based on whether ASR first best agrees with transcription and evaluate separately. Comparing Table 4 and Table 5, obviously the benefits of using multiple hypotheses are mainly gained when ASR 1 st best disagrees with the transcription. When ASR 1 st best agrees with transcription, the proposed integration models can also keep the performance. Under that condition, we can still improve a little (3.56%) because, by introducing multiple ASR hypotheses, we could have more information and when the transcription/ASR 1 st best does not appear in the training set's transcriptions, its n-bests list may have similar hypotheses included in the training set's n-bests. Then, our integration model trained on n-best hypotheses as well has clue to predict. The series of comparisons reveal that our approaches integrating the hypotheses are robust to the ASR errors and whenever the ASR model makes mistakes, we can outperform more significantly.

Improvements on Different Domains and Different Numbers of Hypotheses
Among all the 23 domains, we choose 8 popular domains for further comparisons between the Baseline and the best model of Table 3, PoolingAvg. Fig. 4 exhibits the results. We could find the PoolingAvg consistently improves the accuracy for all 8 domains.
In the previous experiments, the number of utilized hypotheses for each utterance during evaluation is five, which means we use the top 5 interpretations when the size of ASR recognition list is not smaller than 5 and use all the interpretations otherwise. Changing the number of hypotheses while evaluation, Fig. 5 shows a monotonic increase with the access to more hypotheses for the PoolingAvg and PoolingMax (Sort by Score is shown because it is the best achievable direct model while the Rerank (Oracle) is not realistic). The growth becomes gentle after four hypotheses are leveraged.   Since another downstream task, intent classification, is similar to domain classification, we just show the best model in domain classification, PoolingAvg, on domain-specific intent classification for three popular domains due to space limit. As Table 6 shows, the margins of using multiple hypotheses with PoolingAvg are significant as well.

CONCLUSIONS AND FUTURE WORK
This paper improves the SLU system robustness to ASR errors by integrating n-best hypotheses in different ways, e.g. the aggregation of predictions from hypotheses or the concatenation of hypothesis text or embedding. We can achieve significant classification accuracy improvements over production-quality baselines on domain and intent classifications, 14% to 25% relative gains. The improvement is more significant for a subset of testing data where ASR first best is different from transcription. We also observe that with more hypotheses utilized, the performance can be further improved. In the future, we aim to employ additional features (e.g. confidence scores for hypotheses or tokens) to integrate n-bests more efficiently, where we can train a function f to obtain a weight for each hypothesis embedding before pooling. Another direction is using deep learning framework to embed the word lattice [17] or confusion network [18,19], which can provide a compact representation of multiple hypotheses and more information like times, in the SLU system.

ACKNOWLEDGEMENTS
We would like to thank Junghoo (John) Cho for proofreading.