Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 416 Artificial Intelligence Lecture 19 Reasoning over Time Chapter 15 Lecture 19 Reasoning over Time Chapter 15.

Similar presentations


Presentation on theme: "CS 416 Artificial Intelligence Lecture 19 Reasoning over Time Chapter 15 Lecture 19 Reasoning over Time Chapter 15."— Presentation transcript:

1 CS 416 Artificial Intelligence Lecture 19 Reasoning over Time Chapter 15 Lecture 19 Reasoning over Time Chapter 15

2 Hidden Markov Models (HMMs) Represent the state of the world with a single discrete variable If your state has multiple variables, form one variable whose value takes on all possible tuples of multiple variablesIf your state has multiple variables, form one variable whose value takes on all possible tuples of multiple variables –A two-variable system (heads/tails and red/green/blue) becomes  A single-variable system with six values (heads/red, tails/red, …) Represent the state of the world with a single discrete variable If your state has multiple variables, form one variable whose value takes on all possible tuples of multiple variablesIf your state has multiple variables, form one variable whose value takes on all possible tuples of multiple variables –A two-variable system (heads/tails and red/green/blue) becomes  A single-variable system with six values (heads/red, tails/red, …)

3 HMMs Let number of states be SLet number of states be S –Transition model T is an SxS matrix filled by P( X t | X t-1 )  Probability of transitioning from any state to another –Consider obtaining evidence e t at each timestep  Construct an SxS matrix O consisting of P( e t | X t = i ) along the diagonal and zero elsewhere Let number of states be SLet number of states be S –Transition model T is an SxS matrix filled by P( X t | X t-1 )  Probability of transitioning from any state to another –Consider obtaining evidence e t at each timestep  Construct an SxS matrix O consisting of P( e t | X t = i ) along the diagonal and zero elsewhere

4 HMMs Rewriting the FORWARD algorithm Constructing the predicted sequence of states from 0  t+1 given e 0  e t+1Constructing the predicted sequence of states from 0  t+1 given e 0  e t+1 –f 1:t+1 =  FORWARD (f 1:t, e t+1 ) Rewriting the FORWARD algorithm Constructing the predicted sequence of states from 0  t+1 given e 0  e t+1Constructing the predicted sequence of states from 0  t+1 given e 0  e t+1 –f 1:t+1 =  FORWARD (f 1:t, e t+1 )

5 HMMs Optimizations FORWARD and BACKWARD can be written in matrix formFORWARD and BACKWARD can be written in matrix form Matrix forms permit reinspection for speedupsMatrix forms permit reinspection for speedups –Consult book if interested in these for assignment Optimizations FORWARD and BACKWARD can be written in matrix formFORWARD and BACKWARD can be written in matrix form Matrix forms permit reinspection for speedupsMatrix forms permit reinspection for speedups –Consult book if interested in these for assignment

6 Speech recognition vs. Speech understanding Recognition Convert acoustic signal into wordsConvert acoustic signal into words –P (words | signal) =  P (signal | words) P (words) Understanding Recognizing the context and semantics of the wordsRecognizing the context and semantics of the wordsRecognition Convert acoustic signal into wordsConvert acoustic signal into words –P (words | signal) =  P (signal | words) P (words) Understanding Recognizing the context and semantics of the wordsRecognizing the context and semantics of the words We have a model of this We have a model of this too

7 Applications NaturallySpeaking (interesting story from Wired), Viavoice…NaturallySpeaking (interesting story from Wired), Viavoice… –90% hit rate is 10% error rate –want 98% or 99% success rate DictationDictation –Cheaper to play doctor’s audio tapes into telephone so someone in India can type the text and email it back User-control of devicesUser-control of devices –“Call home” NaturallySpeaking (interesting story from Wired), Viavoice…NaturallySpeaking (interesting story from Wired), Viavoice… –90% hit rate is 10% error rate –want 98% or 99% success rate DictationDictation –Cheaper to play doctor’s audio tapes into telephone so someone in India can type the text and email it back User-control of devicesUser-control of devices –“Call home”

8 Spectrum of choices Constrained Domain Unconstrained Domain Speaker Dependent Voice tags (e.g. cell phone) Trained Dictation (Viavoice) Speaker Independent Customer Service (say “one”) What everyone wants

9 Waveform to phonemes 40 – 50 phones (sounds) in all human languages40 – 50 phones (sounds) in all human languages 48 phonemes (distinguishable unts) in English (according to ARPAbet)48 phonemes (distinguishable unts) in English (according to ARPAbet) –Ceiling = [s iy l ih ng] [s iy l ix ng] [s iy l en]  Nothing is precise here, so HMM with state variable X t corresponding to the phone uttered at time t P (E t | X t ): given phoneme, what is its waveformP (E t | X t ): given phoneme, what is its waveform –Must have models that adjust for pitch, speed, volume… 40 – 50 phones (sounds) in all human languages40 – 50 phones (sounds) in all human languages 48 phonemes (distinguishable unts) in English (according to ARPAbet)48 phonemes (distinguishable unts) in English (according to ARPAbet) –Ceiling = [s iy l ih ng] [s iy l ix ng] [s iy l en]  Nothing is precise here, so HMM with state variable X t corresponding to the phone uttered at time t P (E t | X t ): given phoneme, what is its waveformP (E t | X t ): given phoneme, what is its waveform –Must have models that adjust for pitch, speed, volume…

10 Analog to digital (A to D) Diaphragm of microphone is displaced by movement of airDiaphragm of microphone is displaced by movement of air Analog to digital converter samples the signal at discrete time intervals (8 – 16 kHz, 8-bit for speech)Analog to digital converter samples the signal at discrete time intervals (8 – 16 kHz, 8-bit for speech) Diaphragm of microphone is displaced by movement of airDiaphragm of microphone is displaced by movement of air Analog to digital converter samples the signal at discrete time intervals (8 – 16 kHz, 8-bit for speech)Analog to digital converter samples the signal at discrete time intervals (8 – 16 kHz, 8-bit for speech)

11 Data compression 8kHz at 8 bits is 0.5 MB for one minute of speech8kHz at 8 bits is 0.5 MB for one minute of speech –Too much information for constructing P(X t+1 | X t ) tables –Reduce signal to overlapping frames (10 msecs) –frames have features that are evaluated based on signal 8kHz at 8 bits is 0.5 MB for one minute of speech8kHz at 8 bits is 0.5 MB for one minute of speech –Too much information for constructing P(X t+1 | X t ) tables –Reduce signal to overlapping frames (10 msecs) –frames have features that are evaluated based on signal

12 More data compression Features are still too big Consider n features with 256 values eachConsider n features with 256 values each –256 n possible frames A table of P (features | phones) would be too largeA table of P (features | phones) would be too large Cluster!Cluster! –Reduce number of options from 256 n to something manageable Features are still too big Consider n features with 256 values eachConsider n features with 256 values each –256 n possible frames A table of P (features | phones) would be too largeA table of P (features | phones) would be too large Cluster!Cluster! –Reduce number of options from 256 n to something manageable

13 Phone subdivision Phones last 5-10 frames Possible to subdivide a phone into three partsPossible to subdivide a phone into three parts –Onset, mid, end –[t] = [silent beginning, small explosion, hissing end] The sound of a phone changes based on surrounding phonesThe sound of a phone changes based on surrounding phones –Brain coordinates ending of one phone and beginning of upcoming ones (coarticulation) –Sweet vs. stop State space is increased, but improved accuracyState space is increased, but improved accuracy Phones last 5-10 frames Possible to subdivide a phone into three partsPossible to subdivide a phone into three parts –Onset, mid, end –[t] = [silent beginning, small explosion, hissing end] The sound of a phone changes based on surrounding phonesThe sound of a phone changes based on surrounding phones –Brain coordinates ending of one phone and beginning of upcoming ones (coarticulation) –Sweet vs. stop State space is increased, but improved accuracyState space is increased, but improved accuracy

14 Words You say [t ow m ey t ow] P (t ow m ey t ow | “tomato”)P (t ow m ey t ow | “tomato”) I say [t ow m aa t ow] You say [t ow m ey t ow] P (t ow m ey t ow | “tomato”)P (t ow m ey t ow | “tomato”) I say [t ow m aa t ow]

15 Words - coarticulation The first syllable changes based on dialect There are four ways to say “tomato” and we would store P( [pronunciation] | “tomato”) for each Remember diagram would have three stages per phoneRemember diagram would have three stages per phone The first syllable changes based on dialect There are four ways to say “tomato” and we would store P( [pronunciation] | “tomato”) for each Remember diagram would have three stages per phoneRemember diagram would have three stages per phone

16 Words - segmentation “Hearing” words in sentences seems easy to us Waveforms are fuzzyWaveforms are fuzzy There are no clear gaps to designate word boundariesThere are no clear gaps to designate word boundaries One must work the probabilities to decide if current word is continuing with another syllable or if it seems likely that another word is startingOne must work the probabilities to decide if current word is continuing with another syllable or if it seems likely that another word is starting “Hearing” words in sentences seems easy to us Waveforms are fuzzyWaveforms are fuzzy There are no clear gaps to designate word boundariesThere are no clear gaps to designate word boundaries One must work the probabilities to decide if current word is continuing with another syllable or if it seems likely that another word is startingOne must work the probabilities to decide if current word is continuing with another syllable or if it seems likely that another word is starting

17 Sentences Bigram Model P (w i | w 1:i-1 ) has a lot of values to determineP (w i | w 1:i-1 ) has a lot of values to determine P (w i | w i-1 ) is much more manageableP (w i | w i-1 ) is much more manageable –We make a first-order Markov assumption about word sequences –Easy to train this through text files Much more complicated models are possible that take syntax and semantics into accountMuch more complicated models are possible that take syntax and semantics into account Bigram Model P (w i | w 1:i-1 ) has a lot of values to determineP (w i | w 1:i-1 ) has a lot of values to determine P (w i | w i-1 ) is much more manageableP (w i | w i-1 ) is much more manageable –We make a first-order Markov assumption about word sequences –Easy to train this through text files Much more complicated models are possible that take syntax and semantics into accountMuch more complicated models are possible that take syntax and semantics into account

18 Bringing it together Each transformation is pretty inaccurate Lots of choicesLots of choices User “error” – stutters, bad grammarUser “error” – stutters, bad grammar Subsequent steps can rule out choices from previous stepsSubsequent steps can rule out choices from previous steps –Disambiguation Each transformation is pretty inaccurate Lots of choicesLots of choices User “error” – stutters, bad grammarUser “error” – stutters, bad grammar Subsequent steps can rule out choices from previous stepsSubsequent steps can rule out choices from previous steps –Disambiguation

19 Bringing it together Continuous speech Words composed of p 3-state phonesWords composed of p 3-state phones W words in vocabularyW words in vocabulary 3pW states in HMM3pW states in HMM –10 words, 4 phones each, 3 states per phone = 120 states Compute likelihood of all words in sequenceCompute likelihood of all words in sequence –Viterbi algorithm from 15.2 Continuous speech Words composed of p 3-state phonesWords composed of p 3-state phones W words in vocabularyW words in vocabulary 3pW states in HMM3pW states in HMM –10 words, 4 phones each, 3 states per phone = 120 states Compute likelihood of all words in sequenceCompute likelihood of all words in sequence –Viterbi algorithm from 15.2

20 A final note Where do all the transition tables come from? Word probabilities from text analysisWord probabilities from text analysis Pronunciation models have been manually constructed for many hours of speakingPronunciation models have been manually constructed for many hours of speaking –Some have multiple-state phones identified Because this annotation is so expensive to perform, can we annotate or label the waveforms automatically?Because this annotation is so expensive to perform, can we annotate or label the waveforms automatically? Where do all the transition tables come from? Word probabilities from text analysisWord probabilities from text analysis Pronunciation models have been manually constructed for many hours of speakingPronunciation models have been manually constructed for many hours of speaking –Some have multiple-state phones identified Because this annotation is so expensive to perform, can we annotate or label the waveforms automatically?Because this annotation is so expensive to perform, can we annotate or label the waveforms automatically?

21 Expectation Maximization (EM) Learn HMM transition and sensor models sans labeled data Initialize models with hand-labeled dataInitialize models with hand-labeled data Use these models to predict states at multiple times tUse these models to predict states at multiple times t Use these predictions as if they were “fact” and update HMM transition table and sensor modelsUse these predictions as if they were “fact” and update HMM transition table and sensor models RepeatRepeat Learn HMM transition and sensor models sans labeled data Initialize models with hand-labeled dataInitialize models with hand-labeled data Use these models to predict states at multiple times tUse these models to predict states at multiple times t Use these predictions as if they were “fact” and update HMM transition table and sensor modelsUse these predictions as if they were “fact” and update HMM transition table and sensor models RepeatRepeat


Download ppt "CS 416 Artificial Intelligence Lecture 19 Reasoning over Time Chapter 15 Lecture 19 Reasoning over Time Chapter 15."

Similar presentations


Ads by Google