sta s cal model training dtw em and hmm training
play

Sta$s$cal model training DTW, EM, and HMM training DTW: - PowerPoint PPT Presentation

Sta$s$cal model training DTW, EM, and HMM training DTW: no training per se each example = its own model does deal with sequences


  1. Sta$s$cal ¡model ¡training ¡

  2. DTW, ¡EM, ¡and ¡HMM ¡training ¡ • DTW: ¡no ¡training ¡per ¡se ¡ ¡ – each ¡example ¡= ¡its ¡own ¡model ¡ – does ¡deal ¡with ¡sequences ¡ • EM ¡es$mates ¡parameters ¡for ¡hidden ¡variables ¡ – itera$vely ¡weights ¡with ¡posterior ¡es$mates ¡ – as ¡described ¡so ¡far, ¡no ¡sequences ¡ • HMM ¡training ¡uses ¡EM ¡to ¡es$mate ¡parameters ¡ – itera$vely ¡weights ¡with ¡posterior ¡es$mates ¡ – applies ¡to ¡full ¡sequences ¡

  3. HMM ¡recogni$on-­‑>training ¡ • Condi$onal ¡independence ¡assump$ons ¡ – made ¡inference ¡feasible ¡ – led ¡to ¡full ¡likelihood, ¡Viterbi ¡es$mates ¡ • Assump$on: ¡separate ¡acous$c/language ¡models ¡ – permiKed ¡Bayes ¡rule ¡combina$on ¡ – need ¡to ¡es$mate ¡associated ¡parameters ¡ • EM ¡needed ¡for ¡sequences ¡ – goal ¡is ¡to ¡maximize ¡likelihood ¡for ¡en$re ¡sequence ¡ – op$mize ¡over ¡all ¡possible ¡state ¡sequences ¡ – don ’ t ¡know ¡where ¡speech ¡classes ¡start/stop ¡

  4. HMM ¡training(1) ¡ • Start ¡with ¡EM ¡auxiliary ¡func$on ¡ – states ¡are ¡the ¡hidden ¡variables ¡ – maximizing ¡Aux ¡also ¡maximizes ¡likelihood ¡ Aux = N N , Q | " )] ! P ( Q | X 1 , " old )log[ P ( X 1 Q N | Q , " ) P ( Q | " )] N ! P ( Q | X 1 , " old )log[ P ( X 1 = Q • Aux ¡= ¡E(log ¡joint ¡prob ¡of ¡observed, ¡hidden) ¡ – observed ¡= ¡sequence ¡of ¡feature ¡vectors ¡ – hidden=sequence ¡of ¡states ¡ – maximize ¡for ¡each ¡model ¡M ¡by ¡adjus$ng ¡θ ¡ ¡ – iterate ¡

  5. HMM ¡training(2) ¡ • Use ¡condi$onal ¡independence ¡assump$ons ¡ – Replace ¡P(data|states) ¡by ¡framewise ¡product ¡ of ¡emission ¡probs ¡ – Replace ¡P(state ¡sequence) ¡by ¡framewise ¡product ¡of ¡ transi$on ¡probs ¡(and ¡first ¡frame ¡prior) ¡ N L Aux = ! ! n N , " old )log P ( x n | q k n , " ) P ( q k | X 1 n = 1 k = 1 L 1 | " ) ! 1 N , " old )log P ( q k P ( q k | X 1 + k = 1 N L L n # 1 | X 1 n | q k ! ! ! n N , " old )log P ( q l n # 1 , " ) P ( q l , q k + n = 2 k = 1 l = 1

  6. HMM ¡training(3) ¡ • Op$mize ¡terms ¡separately ¡(separate ¡parameters) ¡ – First ¡term: ¡take ¡par$al ¡deriva$ve, ¡set ¡to ¡zero, ¡ solve ¡equa$ons, ¡get ¡local ¡maximum ¡ – Other ¡terms: ¡need ¡to ¡use ¡Lagrangian ¡constraint ¡ • State ¡priors ¡sum ¡to ¡1 ¡for ¡all ¡possible ¡classes ¡ • State ¡transi$on ¡probs ¡sum ¡to ¡1 ¡for ¡all ¡possible ¡transi$ons ¡ • For ¡mixture ¡Gaussian ¡case, ¡all ¡weights ¡sum ¡to ¡1 ¡ • In ¡all ¡cases, ¡take ¡par$al ¡deriva$ves ¡including ¡the ¡constraint ¡ term, ¡set ¡to ¡zero, ¡solve ¡

  7. HMM ¡training(4)-­‑ ¡summary ¡ (1) ¡Choose ¡form ¡for ¡local ¡prob ¡es$mators ¡for ¡state ¡ emission ¡densi$es ¡(e.g., ¡Gaussian) ¡ (2) ¡Choose ¡ini$aliza$on ¡for ¡parameters ¡ (3) ¡Given ¡the ¡parameters, ¡compute ¡ ¡ n | X 1 N , ! old ) P ( q j for ¡each ¡state ¡and ¡$me, ¡and ¡ n ! 1 | X 1 n , q i N , " old ) P ( q j for ¡each ¡state ¡transi$on ¡and ¡$me ¡ (4) ¡Given ¡these ¡probabili$es, ¡re-­‑es$mate ¡ parameters ¡to ¡maximize ¡ ¡ Aux (5) ¡Assess ¡and ¡return ¡to ¡(3) ¡if ¡not ¡good ¡enough ¡

  8. But ¡wait, ¡there ’ s ¡more ¡ • Each ¡parameter ¡es$mator ¡needs ¡posterior ¡ es$mate ¡(e.g., ¡prob ¡of ¡a ¡state ¡at ¡a ¡par$cular ¡$me ¡ given ¡the ¡feature ¡vector ¡sequence) ¡ • This ¡requires ¡recursion ¡to ¡es$mate ¡these ¡values ¡ • This ¡recursion ¡is ¡called ¡the ¡forward-­‑backward ¡ method, ¡or ¡Baum-­‑Welch ¡training ¡

  9. Forward ¡and ¡backward ¡recursions ¡ • Forward ¡recursion ¡was ¡defined ¡before: ¡ L n | q k n | M ) = n ) ! n ( l | M ) = P ( X 1 ! n " 1 ( k | M ) # n , q l P ( q l n " 1 ) P ( x n | q l k = 1 • Backward ¡recursion ¡defined ¡so ¡that ¡product ¡is ¡ joint ¡probability ¡of ¡observed ¡sequence ¡and ¡a ¡ par$cular ¡state ¡at ¡$me ¡n: ¡ L n + 1 | q l N | q l n + 1 ) # ! n ( l | M ) = P ( X n + 1 n , X 1 n , M ) = ! n " 1 ( k | M ) P ( q k n ) P ( x n + 1 | q k k = 1

  10. State ¡probability ¡at ¡$me ¡n ¡ n | M ) n | M ) N , q k N , q k n | X 1 N , M ) = P ( X 1 P ( X 1 P ( q k = N | M ) n | M ) N , q l ! ( X 1 P ( X 1 P l = " n ( k | M ) # n ( k | M ) ! " n ( l | M ) # n ( l | M ) l • This ¡can ¡be ¡used ¡to ¡update ¡parameter ¡values ¡for ¡ emission ¡densi$es ¡(e.g., ¡means ¡and ¡variances) ¡ • The ¡new ¡density ¡es$mators ¡can ¡then ¡be ¡used ¡ to ¡do ¡new ¡forward ¡and ¡backward ¡recurrences ¡ • Etc., ¡etc. ¡

  11. Transi$on ¡probabili$es ¡at ¡$me ¡n ¡ n ! 1 | M ) n ! 1 | M ) n , q k n , q k n | q k n ! 1 , M ) = P ( q l P ( q l P ( q l = n ! 1 | M ) n ! 1 | M ) " ( q l n , q k P ( q k P l N n | q k " n ) P ( q l n ! 1 ) $ n ! 1 ( k | M ) ( l | M ) P ( x n | q l # n n = 2 = L ( M ) N n | q k " " n ) P ( q l n ! 1 ) $ n ! 1 ( k | M ) ( l | M ) P ( x n | q l # n l = 1 n = 2 Gets ¡es$mate ¡of ¡total ¡probability ¡for ¡all ¡paths ¡ that ¡contain ¡this ¡transi$on ¡ • Like ¡emission ¡density ¡es$mate, ¡this ¡one ¡can ¡be ¡ iterated ¡for ¡improved ¡es$mates ¡ • Prac$cal ¡point: ¡for ¡most ¡systems, ¡transi$on ¡ probabili$es ¡have ¡liKle ¡effect ¡

  12. Transi$on ¡probabili$es ¡at ¡$me ¡n ¡ p ( x n q ) l P ( q q k , M ) l q q k l n- 1 ( k M ) n ( M ) " ! ! l

  13. Assump$ons ¡required ¡for ¡ transi$on ¡probability ¡es$mator ¡ • No ¡dependence ¡on ¡previous ¡state ¡for ¡ observa$ons ¡in ¡current ¡and ¡later ¡frames ¡ • No ¡dependence ¡on ¡past ¡observa$ons ¡for ¡current ¡ state ¡and ¡observa$on, ¡given ¡previous ¡state ¡ • That ¡being ¡said, ¡the ¡posterior ¡is ¡derived ¡from ¡ acous$c ¡probabili$es ¡over ¡the ¡en$re ¡uKerance ¡

  14. Gaussian ¡example ¡ • Best ¡es$mator ¡for ¡mean ¡is ¡ N n | X 1 " N , ! old , M ) x n P ( q j µ j = n = 1 N n | X 1 N , ! old , M ) " P ( q j n = 1 • Subs$tu$ng ¡recursion ¡values ¡for ¡posterior ¡ N # ! n ( j | M ) " n ( j | M ) x n n = 1 = N # ! n ( j | M ) " n ( j | M ) n = 1

  15. Viterbi ¡training ¡ • Previously: ¡full ¡likelihood ¡ASR ¡≈ ¡best ¡path ¡ASR ¡ (Viterbi ¡approxima$on) ¡ • Prob ¡sum ¡-­‑> ¡max ¡(or ¡min ¡of ¡–log ¡P) ¡ • Can ¡also ¡approximate ¡for ¡training ¡ • Assume ¡state ¡sequence ¡es$mate ¡is ¡ground ¡truth ¡ for ¡each ¡itera$on ¡-­‑> ¡posterior ¡probs ¡are ¡either ¡ zero ¡or ¡one ¡ • At ¡training ¡$me, ¡choice ¡of ¡model ¡is ¡known ¡(i.e., ¡ you ¡know ¡what ¡the ¡word ¡is) ¡

  16. Viterbi ¡training ¡steps ¡ (1) ¡Choose ¡form ¡for ¡local ¡prob ¡es$mators ¡for ¡state ¡ emission ¡densi$es ¡(e.g., ¡Gaussian) ¡ (2) ¡Choose ¡ini$aliza$on ¡for ¡parameters ¡ (3) ¡Find ¡most ¡likely ¡state ¡sequence ¡for ¡each ¡model ¡ (4) ¡Given ¡this ¡sequence, ¡re-­‑es$mate ¡parameters ¡ (5) ¡Assess ¡and ¡return ¡to ¡(3) ¡if ¡not ¡good ¡enough ¡ Note: ¡Step ¡(3) ¡is ¡called ¡forced ¡(or ¡Viterbi) ¡ alignment. ¡

  17. Viterbi ¡alignment ¡uses ¡DP ¡ • DTW-­‑like ¡local ¡distance ¡is ¡ ¡ n ) ! log P ( x n | q l n | q k • Transi$on ¡cost ¡is ¡ ¡ n ! 1 ) ! log P ( q l • Only ¡consider ¡models ¡for ¡transcribed ¡words ¡ • Backtracking ¡straighforward ¡ • Next ¡slide, ¡alignment ¡cartoon ¡

  18. Viterbi ¡(forced) ¡alignment ¡ M j q 3 q 2 q 1 X j

  19. Viterbi ¡training ¡minus/plus ¡ • Adds ¡another ¡approxima$on ¡ • Best ¡path ¡might ¡not ¡be ¡the ¡best ¡choice ¡to ¡ represent ¡model ¡against ¡other ¡models ¡ But: ¡ • Recogni$on ¡ogen ¡done ¡with ¡Viterbi, ¡so ¡it ’ s ¡a ¡ good ¡match, ¡since ¡best ¡path ¡gets ¡reinforced ¡ • Transi$on ¡probabili$es ¡par$cularly ¡simple: ¡ just ¡count ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend