Confidence Measure using Word Graphs the 26 is

  • Slides: 21
Download presentation
Confidence Measure using Word Graphs the 2/6 is 3/6 Sil quest a 1/6 4/6

Confidence Measure using Word Graphs the 2/6 is 3/6 Sil quest a 1/6 4/6 This this 1/6 sentence 2/6 is 3/6 the 2/6 is sentence 1/6 4/6 a a 4/6 1/6 Sil guest 1/6 2/6 1/6 sense test Sridhar Raghavan 4/6 5/6 Sil

Abstract Confidence measure using word posterior: • There is a strong need for determining

Abstract Confidence measure using word posterior: • There is a strong need for determining the confidence of a word hypothesis in a LVCSR system because conventional viterbi decoding just generates the overall one best sequence, but the performance of a speech recognition system is based on Word error rate and not sentence error rate. • Word posterior probability in a hypothesis is a good estimate of the confidence. • The word posteriors can be computed from a word graph where the links correspond to the words. • A forward-backward algorithm is used to compute the link posteriors. Confidence measure using word posteriors Page 2 of 21

Foundation The equation for computing the posterior of the word is as follows [Wessel.

Foundation The equation for computing the posterior of the word is as follows [Wessel. F]: The idea here is to sum up the posterior probabilities of all those word hypothesis sequences that contain the word ‘w’ with same start and end times. Confidence measure using word posteriors Page 3 of 21

Foundation: continued… We cannot compute the above posterior directly, so we decompose it into

Foundation: continued… We cannot compute the above posterior directly, so we decompose it into likelihood and priors using Baye’s rule. The value in the numerator can be computed using the well known forward backward algorithm. The denominator term is simply the sum of the numerator for all words ‘w’ occuring in the same time instant ta to te. Confidence measure using word posteriors Page 4 of 21

What is exactly a word posterior from a word graph? A word posterior is

What is exactly a word posterior from a word graph? A word posterior is a probability that is computed by considering a word’s acoustic score, language model score and its presence is a particular path through the word graph. An example of a word graph is given below, note that the nodes are the startstop times and the links are the words. The goal is to determine the link posterior probabilities. Every link holds an acoustic score and a language model probability. the 2/6 is 3/6 Sil a 1/6 the 2/6 is a 4/6 1/6 Sil 1/6 sentence 1/6 4/6 Confidence measure using word posteriors 1/6 sense 2/6 is 3/6 this 1/6 guest 1/6 2/6 4/6 This quest 5/6 Sil 4/6 test Page 5 of 21

Example Let us consider an example as shown below: the 2/6 is 3/6 Sil

Example Let us consider an example as shown below: the 2/6 is 3/6 Sil quest a 1/6 guest 1/6 2/6 4/6 This the 2/6 is 1/6 sentence 1/6 4/6 a a 4/6 1/6 Sil 2/6 is 3/6 this 1/6 sense 5/6 Sil 4/6 test The values on the links are the likelihoods. Confidence measure using word posteriors Page 6 of 21

Forward-backward algorithm Using forward-backward algorithm for determining the link probability. The equations used to

Forward-backward algorithm Using forward-backward algorithm for determining the link probability. The equations used to compute the alphas and betas for an HMM are as follows: Computing alphas: Step 1: Initialization: In a conventional HMM forward-backward algorithm we would perform the following – We need to use a slightly modified version of the above equation for processing a word graph. The emission probability will be the acoustic score and the initial probability is taken as 1 since we always begin with a silence. Confidence measure using word posteriors Page 7 of 21

Forward-backward algorithm continue… The α for the first node in the word graph is

Forward-backward algorithm continue… The α for the first node in the word graph is computed as follows: Step 2: Induction This step is the main reason we use forward-backward algorithm for computing such probabilities. The alpha values computed in the previous step is used to compute the alphas for the succeeding nodes. Note: Unlike in HMMs where we move from left to right at fixed intervals of time, over here we move from one start time of a word to the next closest word’s start time. Confidence measure using word posteriors Page 8 of 21

Forward-backward algorithm continue… Let us see the computation of the alphas from node 2,

Forward-backward algorithm continue… Let us see the computation of the alphas from node 2, the alpha for node 1 was computed in the previous step during initialization. Node 2: α=1. 675 E-03 α =0. 5025 is Node 3: α =1 3/6 Sil 2/6 1 3 3/6 Sil 4 4/6 3/6 this Node 4: 2 α =0. 5 The alpha calculation continues in this manner for all the remaining nodes The forward backward calculation on word-graphs is similar to the calculations used on HMMs, but in word graphs the transition matrix is populated by the language model probabilities and the emission probability corresponds to the acoustic score. Confidence measure using word posteriors Page 9 of 21

Forward-backward algorithm continue… Once we compute the alphas using the forward algorithm we begin

Forward-backward algorithm continue… Once we compute the alphas using the forward algorithm we begin the beta computation using the backward algorithm. The backward algorithm is similar to the forward algorithm, but we start from the last node and proceed from right to left. Step 1 : Initialization Step 2: Induction Confidence measure using word posteriors Page 10 of 21

Forward-backward algorithm continue… Let us see the computation of the beta values from node

Forward-backward algorithm continue… Let us see the computation of the beta values from node 14 and backwards. Node 14: β=1. 66 E-3 sense β=0. 1667 1/6 14 1/6 Sil 11 Node 13: 1/6 sentence 5/6 13 4/6 sentence β=0. 833 Sil 15 β=1 12 Node 12: Confidence measure using word posteriors β=5. 55 E-3 Page 11 of 21

Forward-backward algorithm continue… Node 11: In a similar manner we obtain the beta values

Forward-backward algorithm continue… Node 11: In a similar manner we obtain the beta values for all the nodes till node 1. We can compute the probabilities on the links (between two nodes) as follows: Let us call this link probability as Γ. Therefore Γ(t-1, t) is computed as the product of α(t-1)*ß(t)*aij. These values give the un-normalized posterior probabilities of the word on the link considering all possible paths through the link. Confidence measure using word posteriors Page 12 of 21

Word graph showing the computed alphas and betas This is the word graph with

Word graph showing the computed alphas and betas This is the word graph with every node with its corresponding alpha and beta value. α=1. 675 E-5 α=2. 79 E-8 α =0. 5025 β=5. 740 E-12 α =1 β=2. 8843 E-14 is 3/6 Sil α=1. 675 E-03 β=1. 536 E-11 4 3 3/6 this 2 β=2. 766 E-6 the 2/6 guest 1/6 6 4/6 This 2/6 is the 5 2/6 1/6 α=3. 35 E-3 is β=8. 527 E-10 α =0. 5 β=2. 87 E-14 9 α=1. 861 E-8 β=2. 766 E-6 7 4/6 α=1. 117 E-5 β=2. 512 E-7 a 4/6 α=7. 446 E-8 β=3. 7 E-5 14 1/6 Sil 11 1/6 sentence 5/6 Sil 13 4/6 sentence test 10 1/6 sense 1/6 8 1/6 α=1. 2923 E-13 β=0. 1667 α=7. 751 E-11 β=1. 66 E-3 quest a 2/6 1 3/6 Sil β=4. 61 E-9 α=3. 438 E-12 β=0. 833 15 α=2. 88 E-14 β=1 12 α=4. 964 E-10 β=5. 55 E-3 Assumption here is that the probability of occurrence of any word is 0. 01. i. e. we have 100 words in a loop grammar Confidence measure using word posteriors Page 13 of 21

Link probabilities calculated from alphas and betas The following word graph shows the links

Link probabilities calculated from alphas and betas The following word graph shows the links with their corresponding link posterior probabilities (not yet normalized). Γ=4. 649 E-13 Γ=7. 72 E-14 is Γ=5. 74 E-12 3/6 Sil 2/6 1 Γ=2. 87 E-14 3 3/6 Sil 4 3/6 Γ=4. 288 E-12 this 2 1/6 6 4/6 This Γ=2. 87 E-14 quest a the 2/6 Γ=7. 71 E-14 Γ=4. 649 E-13 8 1/6 guest 1/6 sense Γ=1. 292 E-13 11 1/6 sentence Γ=6. 45 E-13 14 1/6 Γ=1. 292 E-15 Sil 5/6 Sil 2/6 15 13 Γ=3. 08 E-13 is Γ=1. 549 E-13 9 4/6 Γ=3. 438 E-14 the 5 sentence 2/6 1/6 Γ=3. 08 E-13 is test Γ=4. 136 E-12 a 4/6 12 4/6 7 10 Γ=8. 421 E-12 Γ=4. 136 E 1 -12 Γ=4. 136 E-12 By choosing the links with the maximum posterior probability we can be certain that we have included most probable words in the final sequence. Confidence measure using word posteriors Page 14 of 21

Using it on a real application Using the algorithm on real application: * Need

Using it on a real application Using the algorithm on real application: * Need to perform word spotting without using a language model i. e. we can only use a loop grammar. * In order to spot the word of interest we will construct a loop grammar with just this one word. * Now the final one best hypothesis will consist of a sequence of the same word repeated N times. So, the challenge here is to determine which of these N words actually corresponds to the word of interest. * This is achieved by computing the link posterior probability and selecting the one with the maximum value. Confidence measure using word posteriors Page 15 of 21

1 -best output from the word spotter The recognizer puts out the following output

1 -best output from the word spotter The recognizer puts out the following output : 0000 0023 !SENT_START -1433. 434204 0023 0081 BIG -4029. 476440 0081 0176 BIG -6402. 677246 0176 0237 BIG -4080. 437500 0237 0266 !SENT_END -1861. 777344 We have to determine which of the three instances of the word actually exists. Confidence measure using word posteriors Page 16 of 21

Lattice from one of the utterances For this example we have to spot the

Lattice from one of the utterances For this example we have to spot the word “BIG” in an utterance that consists of three words (“BIG TIED GOD”). All the links in the output lattice contains the word “BIG”. The values on the links are the acoustic likelihoods in log domain. Hence a forward backward computation just involves addition of these numbers in a systematic manner. 2 -912 -1095 -1433 0 sent_start -1888 3 -1070 1 -2875 4 -4029 -1232 -1861 -6402 5 Confidence measure using word posteriors sent_end -4056 6 7 Page 17 of 21 8

Alphas and betas for the lattice The initial probability at both the nodes is

Alphas and betas for the lattice The initial probability at both the nodes is ‘ 1’. So, its logarithmic value is 0. The language model probability of the word is also ‘ 1’ since it is the only word in the loop grammar. α =-2528 β=-15533 α =0 β=-67344 2 sent_start α =-6761 β=-14621 -1095 -1433 0 -912 -1888 3 -1070 1 -2875 α =-1433 β=-65911 4 -4029 α =-12139 β=-13551 -1232 -1861 -6402 5 α =-18833 β=-12319 Confidence measure using word posteriors sent_end -4056 6 α =-25235 β=-5917 7 α =-29291 β=-1861 Page 18 of 21 8 α =-31152 β=0

Link posterior calculation It is observed that we can obtain a greater discrimination in

Link posterior calculation It is observed that we can obtain a greater discrimination in confidence levels if we also multiply the final probability with the likelihood of the link other than the corresponding alphas and betas. In this example we add the likelihood since it is in log domain. Γ=-18061 Γ=-67344 0 sent_start 2 Γ=-18061 Γ=-17942 3 Γ=-21382 1 Γ=-17859 4 Γ=-25690 Γ=-17781 Γ=-31152 5 Confidence measure using word posteriors Γ=-31152 6 sent_end 7 Page 19 of 21 8

Inference from the link posteriors Link 1 to 5 corresponds to the first word

Inference from the link posteriors Link 1 to 5 corresponds to the first word time instance while 5 to 6 and 6 to 7 correspond to the second and third word instances respectively. It is very clear from the link posterior values that the first instance of the word “BIG” has a much higher probability than the other two. Note: The part that is missing in this presentation is the normalization of these probabilities, this is needed to make comparison between various link posteriors. Confidence measure using word posteriors Page 20 of 21

References: • F. Wessel, R. Schlüter, K. Macherey, H. Ney. "Confidence Measures for Large

References: • F. Wessel, R. Schlüter, K. Macherey, H. Ney. "Confidence Measures for Large Vocabulary Continuous Speech Recognition". IEEE Trans. on Speech and Audio Processing. Vol. 9, No. 3, pp. 288 -298, March 2001 • Wessel, Macherey, and Schauter, "Using Word Probabilities as Confidence Measures, ICASSP'97 • G. Evermann and P. C. Woodland, “Large Vocabulary Decoding and Confidence Estimation using Word Posterior Probabilities in Proc. ICASSP 2000, pp. 2366 -2369, Istanbul. • X. Huang, A. Acero, and H. W. Hon, Spoken Language Processing - A Guide to Theory, Algorithm, and System Development, Prentice Hall, ISBN: 0 -13 -022616 -5, 2001 • J. Deller, et. al. , Discrete-Time Processing of Speech Signals, Mac. Millan Publishing Co. , ISBN: 07803 -5386 -2, 2000 Confidence measure using word posteriors Page 21 of 21