---
abstract: 'We propose a variation to the commonly used Word Error Rate (WER) metric for speech recognition evaluation which incorporates the alignment of phonemes, in the absence of time boundary information. After computing the Levenshtein alignment on words in the reference and hypothesis transcripts, spans of adjacent errors are converted into phonemes with word and syllable boundaries and a phonetic Levenshtein alignment is performed. The phoneme alignment information is used to correct the word alignment labels in each error region. We demonstrate that our Phonetically-Oriented Word Error Rate (POWER) yields similar scores to WER with the added advantages of better word alignments and the ability to capture one-to-many alignments corresponding to homophonic errors in speech recognition hypotheses. These improved alignments allow us to better trace the impact of Levenshtein error types in speech recognition on downstream tasks such as speech translation.'
address: |
    Fondazione Bruno Kessler\
    Trento, Italy
bibliography:
- 'paper.bib'
title: |
    Phonetically-Oriented Word Error Alignment for\
    Speech Recognition Error Analysis in Speech Translation
---

automatic speech recognition, speech translation, mixed-effects models, error analysis

Introduction {#sec:intro}
============

Spoken language translation (SLT) systems are comprised by, at minimum, two components: an automatic speech recognition (ASR) system which provides audio transcripts of source language utterances, and a machine translation (MT) system that translates the transcripts. While there have been a number of efforts to construct tightly-coupled ASR and MT systems that are jointly trained and optimized, the majority of SLT systems employ a cascading approach in which ASR systems are trained and evaluated independently from the MT system [@Matusov:06; @Bertoldi:07; @Casacuberta:08]. In such a training paradigm, it is not clear how the introduction of ASR errors will affect translation quality. While there is a high correlation between ASR errors and translation quality, the impact of various ASR error types is still an open research problem.

ASR performance is typically evaluated using the Word Error Rate (WER) metric, which labels errors as word-level substitutions, deletions, or insertions, based on the Levenshtein word alignment between a reference transcript and an ASR hypothesis. Since the Levenshtein aligner often must decide between several “optimal” labeling sequences according to its objective function, it may select an alignment sequence that does not adhere to phonetic or linguistic relationships between the word types. Although some evaluation toolkits use timestamp information to guide the alignment process, the problem persists. For example, the mapping of *a$\rightarrow$doctor* in Fig. \[fig:wer-alignment\] has the side-effects of aligning *Dr.$\rightarrow$brahmin* and deleting *Stanford*, thereby misaligning three content words. Additionally, WER is not capable of identifying homophonic errors across word spans, such as *anatomy$\rightarrow$and that to me*[^1].

These weaknesses in the word-level Levenshtein alignments used by WER inhibit the use of linguistically annotated ASR errors in assessing the quality of downstream speech-centric tasks, such as speech translation. In response, we introduce an additional step in the alignment process, which computes phonetically-oriented word alignments across adjacent word errors that were predicted by WER. We employ the text analysis component of a text-to-speech (TTS) engine, which dictactes written text based on a pronunciation dictionary, letter-to-sound rules, and context-dependent pronunciation rules for numbers, ordinals, and acronyms.

In this paper, we describe the application of phonetically-oriented word alignment on spans of adjacent errors and show that these corrected alignments significantly alter the distribution of ASR word error types. We demonstrate its utility in text normalization as a pre-ASR evaluation step and additionally apply the re-aligned error types to a SLT error analysis experiment that measures the impact of speech recognition errors on SLT quality.

Phonetically-Oriented Word Alignment
====================================

The ambiguity in the word-level Levenshtein aligner is centered around the placement of substitution errors in an alignment sequence. As shown in Fig. \[fig:wer-alignment\], the error spans contain at least one substitution error and a number of insertion or deletion errors.

Our phonetically-oriented word alignment algorithm is divided into two stages. First, we capture error spans whose error labels are likely to be ambiguous. The reference and hypothesis words in each span are transcribed into phonemes by a TTS analyzer. Each phoneme is treated as an independent token and word and syllable boundary tokens are introduced. The reference and hypothesis tokens are aligned using a variant of the Levenshtein alignment algorithm that introduces the following constraints:

1.  Boundary tokens may not be substituted.

2.  Vowel phonemes can only be aligned to other vowels (including r-colored vowels, but not semivowels).

3.  Consonant phonemes can only be aligned to other consonants (including semivowels).

The boundary tokens provide an implicit distance constraint, penalizing adjacent phonemes within the same syllable when they are aligned far from one another.

In the second stage, we recombine the phonetic alignments into word alignments by performing a left-to-right scan of the alignment sequence. Substitution alignments are identified by considering the words covered by the aligned phonemes contained between two “correct”-aligned word boundary markers in the reference and hypothesis. Single word substitutions (S) are distinguished from substitution spans (SS) containing multiple words in the reference or the hypothesis. If a sequence of reference phonemes are terminated with a word boundary, but no hypothesis words have been scanned, the reference word is marked as a deletion (D). Likewise, a hypothesis word with no aligned reference word is marked as an insertion (I).

Returning to Fig. \[fig:wer-alignment\], the Levenshtein aligner used in WER could have alternatively aligned the reference word *anatomy* to any one of the hypothesis words currently marked as insertion errors. However, *anatomy* is pronounced similarly to the entire sequence of the four hypothesis words in the error span. The phonetically-oriented alignment in Fig. \[fig:phoneme-alignment\] captures this phenomenon by aligning the smallest word boundary closure across the entire span of reference and hypothesis words, thereby identifying *anatomy$\rightarrow$and that to me* as a substitution span and provides the alignment on the right-hand side of Fig. \[fig:wer-alignment\]. Likewise, while WER may have considered slightly better word alignments like *Brown$\rightarrow$brahmin* and *Stanford$\rightarrow$or*, it is incapable of capturing relationships such as *Stanford$\rightarrow$ stamp or*.

   $\|$ \# ax n \# ae t \# ax m \# iy $\|$ // $\|$ \# ae n d $\|$ \# dh ae t $\|$ \# t ax $\|$ \# m iy $\|$ // S I I I I I D I I //
  ----------------------------------------------------------------------------------------------------------------------------------

Word alignment heuristics
-------------------------

While the phonetically-oriented alignments provide better phonetically-grounded alignments, its underlying Levenshtein alignment algorithm must also decide between multiple equally-weighted best paths.

In particular, for alignments with large differences in the number of reference and hypothesis syllables, our implementation tends to align the first and last word boundaries close to the beginning and end of the alignment sequence. For example, Fig. \[fig:power-misalign\] shows three candidate alignments for the error span *all at*$\rightarrow$*or* that minimize the edit distance. Two out of three alignments attempt to align *or* to the entire two-syllable reference. However, only *all* should align to *or* as a substitution, and *at* should be considered a deletion error. We resolve ambiguities like these by finding the alignment that minimizes the number of alignment gaps between the first and last word boundaries in both the reference and hypothesis. In practice, we do this by encoding the best paths in the Levenshtein backtrack matrix into an edge-weighted graph and use Dijkstra’s algorithm to find the best path. Since there still remains some noise in the phonetic alignments, we introduce a couple of heuristics to prevent the aligner from overzealously marking single-syllable words as members of a substitution span, when in reality they do not have a phonetic correspondence on the other side. When annotating a substitution span, we keep a record of the number of reference and hypothesis syllables. If there is an extra syllable in the reference or hypothesis, we check if it is the first syllable of a new word. If so, we mark this word as a deletion or insertion error, respectively.

Scoring
-------

Our Phonetically-Oriented Word Error Rate (POWER) score is defined nearly identically to WER as: $$\begin{aligned}
\textrm{POWER} = \frac{S+D+I+SS}{L}, \nonumber \\
SS = \sum_{span} \textrm{max}(\left\vert{span_{ref}}\right\vert, \left\vert{span_{hyp}}\right\vert),
\label{eq:power}\end{aligned}$$ where $L$ is the length of the reference and $S$, $D$, and $I$ are the number of word-level substitution, deletion, and insertion labels, respectively. $SS$ is the count of substitution spans, weighted by the maximum number of words in each span. These one-to-many or many-to-many word alignments indicate phonetic confusability as the cause of the error.

Experiments
===========

Following the experimental framework of [@Ruiz:14:AMTA], we perform our experiments on an intersection of the ASR and MT results of the IWSLT 2013 evaluation campaign [@Cettolo:2013:IWSLT], which focused on the translation of TED talks. These 580 utterances map a subset of the ASR hypotheses provided by 8 ASR systems to the corresponding MT inputs in the English-French MT track. The unpunctuated MT input serves as the ASR reference data. Eight French human post-edited references serve as the MT references in the SLT analysis.

In order to minimize the effects of formatting issues on our experimental results, the ASR hypotheses are evaluated, normalized, recased, and punctuated according to the MT input and are translated by a baseline English-French Moses SMT system, corresponding to the $^3$ data from 2014 [@Cettolo:2014:IWSLT]. Since we desire to keep the ASR reference intact, we apply oracle-based text normalization and punctuation insertion techniques similar to that of [@Ruiz:14:AMTA], instead of applying a general .glm normalization file to the both the ASR reference and hypothesis. We use POWER to align and normalize hypothesis words with respect to the reference. POWER uses the Festival TTS system with the CMU English pronunciation dictionary [@Festival] to convert words into phonemes. Prior to other normalization steps, we use the <span style="font-variant:small-caps;">varcon</span> tool from SCOWL[^2] to convert British English words in the ASR hypotheses to American English. We also use libraries from NLTK [@Bird:2009:NLP] to annotate ASR errors with part-of-speech and word class information, as well as lemmatization for morphological analysis.

We conduct two sets of experiments. First, we analyze the ASR error annotations given by the WER and POWER alignments to measure the effects of Levenshtein alignment heuristics on the reported results. In the second set of experiments, we construct several mixed-effects models [@Searle:1974:mixed] that measure the contribution of various ASR error types on MT errors. Table \[tbl:word-stats\] provides summary statistics on the words in each ASR hypothesis, the WER scores before and after text normalization for each ASR output, and scores from two translation metrics. In particular, the POWER-driven text normalization reduces each system’s WER scores by 5%.

ASR Error Analysis {#sec:asr-eval}
==================

In this set of experiments, we observe the contribution of particular error types to the global WER and POWER scores for each ASR system. We outline the shortcomings of WER’s statistics due to the erratic behavior of Levenshtein aligners.

![Distribution of error types for WER (left) and POWER (right) for each IWSLT 2013 ASR evaluation participant.[]{data-label="fig:asrErrorSummaryPlot"}](figure/asrErrorSummaryPlot-1){width="\maxwidth"}

Basic Levenshtein error types {#sec:asr-eval:basic}
-----------------------------

We begin by looking at the basic ASR error types (S, D, I, and SS), which implicitly contain no linguistic information. Fig. \[fig:asrErrorSummaryPlot\] shows the contribution of the basic Levenshtein error types toward the error rate score for each ASR system. According to WER, substitutions intuitively make up the majority of error types ($62.3\% \pm 0.7\%$). Across all ASR systems, WER suggests that the number of deletions are slightly lower than the number of insertion errors ($17.9\% \pm 0.7\%$ deletions and $19.8\% \pm 0.5\%$ insertions).

However, POWER suggests that roughly half of these alleged insertion errors ($10.0\% \pm 0.3\%$) are instances where a larger reference word is being hypothesized as a homophonic sequence of shorter words. Likewise, a portion of “deletion” errors are instances where multiple reference words were hypothesized as a longer homophonic word ($4.1\% \pm 0.5\%$). Since these substitution span errors are typically cases of one-to-many alignments, the number of reported word-level substitution errors are reduced. As such, POWER claims that $30.0\%$ $(\pm 0.7\%)$ of the errors are substitution spans involving homophony, leaving $13.8\% (\pm 0.8\%)$ of the remaining errors as deletions and only $9.8\% (\pm 0.3\%)$ as insertions whose pronunciations do not align to any words – both measures are substantially lower than those reported by WER. The remaining $46.4\% (\pm 0.5\%)$ are word-level substitutions.

We can corroborate this by observing in Table \[tbl:span-stats\] that, across all ASR systems, $70.4\% (\pm 2.5\%)$ of the substitution spans involve multiple hypothesis words, while only $34.8\% (\pm 2.8\%)$ contain multiple reference words. The first figure may be explained by the presence of out-of-vocabulary words in the ASR reference, as well as the effects of domain variation in the evaluation data. The alignment of multiple reference words to a single hypothesis word may be indicative of mispronunciations and/or underarticulation by the speaker. These hypotheses should be explored in future work.

Word classes and morphology {#sec:asr-wc}
---------------------------

Given the inconsistent error labeling in WER, which types of errors are actually being skewed by false alignments? To answer this question, we annotate the reference and hypothesis words by their word class and observe their alignment statistics. We additionally apply lemmatization to distinguish morphological errors from other substitution types. According to the word statistics in Table \[tbl:word-stats\], the ratio of open to closed class words remains the same across each ASR hypothesis and the reference (gold). The proportion of errors associated with each ASR error type is shown in Table \[tbl:propErrorsTable1\].

**Word-level substitution errors.** Both WER and POWER report that the majority of substitution errors are within the same word class. While the proportion of closed-closed class substitutions remain the same, POWER reports 8% fewer open-open class substitution errors, which are often instances of substitution error spans containing a word-level substitution error and one or more short function words (e.g. *Brown in*$\rightarrow$ *brahmin* from Fig. \[fig:power-misalign\]). Of the open-open class substitution errors, 5.4% are morphological errors. POWER likewise reports 7% fewer cross-class substitution errors, many of which are attributed to the correction of misalignments. **Deletions and Insertions.** According to WER, deletion and insertion errors account for $37.7\% (\pm 0.7\%)$ of all errors. WER marks nearly as many open class insertions as closed class insertions, but suggests that closed class deletions are more prominent than open class ones ($6.7\% \pm 0.4\%$ open versus $11.2\% \pm 0.5\%$ closed class deletions). However, with POWER, deletion and insertion errors only account for $23.6\%$ $(\pm 0.8\%)$ of all errors, with the majority of the reduction attributed to fewer open class insertion errors ($3.3\% \pm 0.1\%$). An example of a corrected open class “deletion” is *Stanford*$\rightarrow$ *stamp or* from Fig. \[fig:power-misalign\].

**Substitution spans.** The majority of substitution spans have a single open class reference word ($18.6\% \pm 0.7\%$), such as *anatomy*$\rightarrow$*and that to me* in Fig. \[fig:power-misalign\]; these represent the second most common POWER error type. Likewise, the presence of a substitution span in the ASR reference indicates that the hypothesis word is likely to be a content word ($6.9\% \pm 0.8\%$). Closed class function words are unlikely to be aligned to substitution spans ($2.9\% \pm 0.3\%$), since most have few syllables that cannot easily be mistaken for multiple words. Instead, as shown in Table \[tbl:propErrorsTable1\], closed class words are more likely to be deletion or insertion errors.

  -------------- ------------ -------------- -----------------
                                             
  Reference      Hypothesis   Reference      Hypothesis
  a              today        a day          today
  ascending      and          ascending      and sending
  anesthetize    and          anesthetize    and decent size
  butchering     the          butchering     maturing
  centigrade     cents        centigrade     cents a great
  crude          crudely      crude leaf     crudely
  cyclones       soy          cyclones       soy clones
  face-to-face   face         face-to-face   face to face
  of             obama        of anatomic    obama panic
  -------------- ------------ -------------- -----------------

  : Confusion pair examples using WER and POWER.[]{data-label="tbl:conf-pairs"}

Table \[tbl:conf-pairs\] provides confusion pair examples from FBK’s ASR system output that demonstrate the utility of POWER. Word confusion pairs such as *a*$\rightarrow$*today* are likely errors induced by an ASR language model that biases the acoustic model to artificially recognize non-existant phonemes. Likewise, POWER is able to provide insight that *crude*$\rightarrow$*crudely* is not a morphological error, but rather another language model-induced bias that considers *leaf* an unlikely successor to *crude*. Other confusion pairs include word normalizations, affix errors, and phonetic confusions.

SLT Error Analysis {#sec:slt-eval}
==================

Given that POWER yields a significantly different distribution of error types, how can it be leveraged to understand the impact of ASR errors on downstream natural language processing tasks? We turn our attention to the translation of TED talks from English to French. Similar to [@Ruiz:14:AMTA], we measure the impact of utterance-level ASR errors on their associated translation score by measuring the increase in translation error rate ($\Delta\textrm{TER}$) [@Snover:06] against a gold standard translation which contains no ASR errors. We use linear mixed-effects regression models to measure the importance of each ASR error type, taking into consideration random effects caused by an ASR system and the particular features of each ASR utterance. We use the R [@R:2013] implementation of mixed-effects models in the *lme4* library [@R:lme4]. All of our models are fit using maximum likelihood and incorporate random intercepts for each ASR utterance (labeled as *UttID*) and ASR system (labeled as *SysID*), as well as a random slope by the WER score. We use the repeated observations of our 580 speech utterances by eight ASR systems, yielding a total of 4,640 observations. As fixed effects, we normalize the counts of each ASR error type by the length of the ASR reference for each utterance in order to consider its contribution toward the utterance-level WER score. In each model, *SysID* was not significant, with a standard deviation near zero.

[@lD[.]{}[.]{}[-3]{} D[.]{}[.]{}[-3]{} D[.]{}[.]{}[-3]{} ]{}\
\
& & &\
\
& & &\
\
WER & 0.630\^[\*\*\*]{} & &\
& & &\
WER.D & & 0.564\^[\*\*\*]{} & 0.615\^[\*\*\*]{}\
& & &\
WER.I & & 0.707\^[\*\*\*]{} & 0.829\^[\*\*\*]{}\
& & &\
WER.S & & 0.624\^[\*\*\*]{} & 0.649\^[\*\*\*]{}\
& & &\
WER.SS & & & 0.535\^[\*\*\*]{}\
& & &\
Constant & 0.001 & 0.001 & -0.0001\
& & &\
\
Observations & & &\
Log Likelihood & & &\
Akaike Inf. Crit. & & &\
Bayesian Inf. Crit. & & &\
\
*Note:* &\

WER versus POWER features
-------------------------

Our first experiments consider the ASR error labels provided by WER and POWER. Our baseline considers a single error feature, corresponding to the WER score for each utterance. We compare it to two mixed-effects models and report their coefficients in Table \[tbl:lmerSideBySide\]. *WER.basic* is trained with WER’s basic substitution (WER.S), deletion (WER.D), and insertion (WER.I) labels; *POWER.basic* is trained additionally with POWER’s substitution span labels (WER.SS). Both sets of features are normalized by the reference length in order to be a decomposition of the WER metric. As in [@Ruiz:14:AMTA], we observe a significant difference between *WER.basic* and the baseline, rejecting the null hypothesis that each basic ASR error type contibutes equally to translation quality, in terms of $\Delta\textrm{TER}$ ($\chi^2(2)=16.922, p < 2.12 \times 10^{-4}$). We additionally observe a significant difference between the standard WER-aligned error types (*WER.basic*) and the POWER-aligned error types (*POWER.basic*) that include substitution spans ($\chi^2(1)=27.314, p=1.73 \times 10^{-7}$), indicating that substitution spans are a significant predictor of translation quality. As shown in Table \[tbl:lmerSideBySide\], while the impact of substitution errors remains in principle the same, the impact of insertions increase sharply, both due to the higher quality of the error labels and their lower frequency. *POWER.basic* indicates that an utterance with a WER (or equivalently, POWER) score of $10\%$ as insertion errors would expect an increase in TER by $0.1 \times 0.829 - 0.0001 = 8.3\%$, while $10\%$ in substitution errors would correspond to a TER increase of $0.1 \times 0.649 - 0.0001 = 6.49\%$.

Frequency-weighted ASR errors
-----------------------------

While the coefficients in Table \[tbl:lmerSideBySide\] show the expected increase in TER for each percentage of WER associated with a particular error type, an error type with a high coefficient but a low frequency may not be important from an error correction standpoint. Ideally, we wish to measure which ASR errors are particularly problematic for a given SLT task.

We construct an additional mixed-effects model using the word class-annotated error types from Section \[sec:asr-wc\]. We compute frequency-weighted scores for each error type, based on the observations in our data set. Considering the fixed and random effect scores on each utterance, we measure the average weighted contribution of each ASR error type toward the $\Delta\textrm{TER}$ measure. In other words, if we observe one ASR error of a particular type, how much is it expected to degrade the translation quality? By doing so, we seek to rank the importance of each error type. Table \[tbl:interpretCoefficients\_wordclass\] reports the mean and standard error for each weighted error type, using the word class-annotated error types provided by POWER. We observe that, similar to the ASR-only experiments, within-class substitution errors have the highest frequency-weighted contribution toward $\Delta\textrm{TER}$. While substitution spans containing open class reference words have a high weighted score, substitution spans with open class hypothesis words have a substantially lower weighted score.

Discussion
==========

Based on the error statistics provided above and recorded in Table \[tbl:propErrorsTable1\], we identify the following error types as interesting to focus on when constructing models to cope with ASR errors. $16.2\% (\pm 0.6\%)$ of the ASR errors are either insertions or deletions on closed class words. These types are also ranked highly in our SLT experiments. While a recovery model to insert or delete hypothesis words is non-trivial, we consider closed class words to be low-hanging fruit, since the number of alternative words are small and a language model would likely have statistics that support their inclusion or removal. While closed class words can be under-articulated, they receive the majority of their support from the language model due to the large amount of observations. The advantage of using POWER to model errors is that we have more confidence that the words we mark as deletions or insertions during training/development are really unaligned words.

Likewise, it is useful to consider the effects of substitution spans, as they are among the most frequent errors caused by ASR systems. By identifying substitution error spans, we are able to capture a consecutive string of words that can significantly alter the meaning of a sentence. However, oftentimes they are due to homophonic errors where an ASR system may have reasonable confidence in the phonemes detected, but due to the interaction between the acoustic and language models, a shorter sequence of similar-sounding words was selected. It would be worthwhile to identify common phonetic error patterns to either rescore ASR hypotheses or carry forward the ambiguity of a span of words in the hypothesis to allow the downstream process to decide which similar-sounding alternative makes the most sense.

Related Work
============

Mixed-effects models were first used in ASR error analysis in [@Goldwater:10] to analyze the effects of lexical, prosodic, contextual, and disfluency features of individual words on WER. They show that of the various disfluency types, word fragments, non-final repetitions, and words preceding fragments have a significant impact on WER. Our work proposes a phonetically-oriented word alignment process that is more successful in aligning words of the same word class. Such an alignment process would alter the individual WER measure proposed in [@Goldwater:10], which could provide more reliable results.

A related area of work is ASR confidence estimation, which seeks to label erroneous words in an ASR hypothesis. [@White:10] uses the comparison of phones in a strong ASR system and a weak ASR system without a language model as features for error detection. Regions where the difference is large indicate a higher likelihood of errors. Other approaches include using ASR consnsus votes as well as recurrent neural networks to capture longer contexts [@DBLP:conf/icassp/TamLZW14].

On downstream tasks such as speech translation, [@Tsvetkov:14; @Ruiz:15:Interspeech] propose ASR channel modeling techniques that rely on the concept of phonetic confusability to convert error-free source language phrases into ASR-like outputs in order to model ASR errors during machine translation model training. Phonetically-oriented alignments could be used in either approach to identify error regions during training to focus the channel model on confusable words. Our use of a TTS analyzer to generate pronunciation sequences on ASR references and hypotheses is based on [@Ruiz:15:Interspeech].

Conclusion
==========

We have developed a phonetically-oriented word alignment pipeline as an extension to Word Error Rate’s Levenshtein aligner. Spans of adjacent Levenshtein errors containing minimally one substitution error are converted into phonemes with word and syllable boundaries. A second Levenshtein alignment process on phonemes is carried out and the alignment information is used to guide the word alignment process. We demonstrate that our phonetically-oriented word alignments generate virtually the same error rate score as WER, with the added benefit of more reliable substitution error tags, and a reduction of erroneous deletion and insertion error labels on open class words. We demonstrate that the use of phonetically-oriented error labels significantly alters the statistics gathered from error analyses on ASR outputs. Additionally, for speech translation error analysis tasks, we demonstrate that our phonetically-oriented word error alignments result in better error models in mixed-effects modeling. We demonstrate that homophonic error spans comprise a significant portion of ASR errors with a large impact on speech translation quality and deserve to be considered as an additional substitution error type in error recovery efforts. Our POWER software is available as open source software for the research community at .

[^1]: We use the term “homophonic” to indicate groups of word sequences that are phonetically similar, but not necessarily identical, to one another.

[^2]: https://github.com/kevina/wordlist
