If you pay peanuts, you get monkey.
Computation on HMM
Viterbi Algorithm
Please compute this term using logrithm, will underflow otherwise.
Forward Backward
Scaled Forward
Perhaps using rather than using ?
We define . We just re-normalizes at each step.
Scaled Backward
Mostly for working with the scaled forward algorithm. Notice that the backward term was originally a conditional distribution, so not really necessary.
Equalities in Scaled Forward-Backward
When you want to do a replacement for the product
EM Algorithm
Notice that we are discussing only for MLE(Maximum Likelihood Estimation) of Parameters here. It is possible to use EM in Bayesian Estimation of Parameters.
Problem Formulation in General PGM(Probabilitistic Graphical Models)
Suppose we have a Bayesian Network , which contains parameters .
Suppose we start from some random parameter estimation .
Suppose we have database , where each gives a possibly partial assignment to all the variables in the network.
Assume all data are iid.
For some data sample , we denote the missing variable set to be . Denote one possible assignment to the missing variable to be .
Algorithm
The algorithm is iterative, suppose we are at step t of the algorithm.
Step One : Fixing up existing Data
Filling up the fractured dataset, the filled up sample is called a fractional sample
(碎权样本). The filled up samples are given a possibility rather than a certainty.
We combine the filled up sample and the normal samples together to form the completed dataset . And the completed data points are denoted
1 | 1 | 1 | |
1 | 2 | 2 | |
1 | ? | 1 | |
2 | ? | 2 |
1 | 1 | 1 | 1 | |
1 | 2 | 2 | 1 | |
1 | 1 | 1 | 4/5 | |
1 | 2 | 1 | 1/5 | |
2 | 1 | 2 | 1/5 | |
2 | 2 | 2 | 4/5 |
Step Two : Maximize Weighted Likelihood
We define the weighted (log) likelihood to be the following:
This equation is also called the Expected LogLikelihood Function
The weight is estimated using the last model parameter step.
The next step is to maximize this function for .
Step Three : Evaluating Current Step*
Using VE requires recalculate likelihood again on the new parameters completely. Instead, we could another algorithm for efficient continuous evaluation.
Proving EM Algorithm
Monotonicity
of the EM Algorithm is guaranteed:
Observe that:
Then we can do the following transformation:
Now this is a fairly interesting result.
- Clearly is guaranteed to be larger than the original
- Cross Entropy is guaranteed to be larger then corss entropy with self, which is 0.
Therefore, EM Algorithm is both converging and monotonic. Although it does not guarantee to converge to any of the global minimums. It might converge to some saddle point or local minimum.
In practice, we rerun the program multiple times and take the best result.
EM in GMM*
We can introduce latent variables to GMM model, making it a latent graphical model:
Then we maximize for the expected log likelihood:
EM in Discrete HMM*
Single Instance Training with non Scaled Forward-Backward
Batched Training with non Scaled Forward-Backward
Clearly we need to extend the EM algorithm to multiple training samples. Notice that the training results are of variable lengths.
Extend the definition and equations above:
-
We first extend the notations for a single instance of forward and backward:
Representing the forward result of
Representing the backward result of
-
We introduce the probability of sequence under current model
-
Then we extend the equations:
-
Then the updating criterions with probability weighting
-
We will give the update of the not so probable result more weight
-
You can easily modify the equations using the scaled version.
Training HMM in ASR*
Training data is typically not aligned, audio and non-time-stamped text.
Feature Extraction and Forced Alignment
[图片上传失败...(image-4a6351-1544038499224)]
キ|ジ|ノ|ナ|ガ|サ|ワ|ジュ|ゴ|ヲ|コ|エ|テ|ワ|ナ|ラ|ナ|イ
Baum-Welch Training
Optimizing criterion of BW Training:
- We set certain transitions in the transition matrix to 0, they will stay 0 during training.
- Restricting the structure of the path
- Set the rest possible values to identical ones at the beginning of training.
- Initialize the mean and variance of gaussians to the corresponding distribution observed in training data.
Viterbi Training
- Instead of summing over all possible paths, just take the single most likely path
- Use the Viterbi Algorithm to compute this Viterbi Path
- This fills in the probability of the missing data determinstically.
- Much faster than Baum-Welch
It is possible to train using Gradient Descent. Perhaps it is less stable and slower. I haven't compared EM and Gradient Descent yet.
More Variance
- Standard Training Process:
- Start with the monophone, do EM Training
- Clone Gaussians to form triphones
- Build Decision Tree to cluster Gaussians
- Clone and train mixtures
- Increasing Complexity
- Single State
- Single Gaussian
- Multivariate Gaussian
- Mixture of Multivariate Gaussian
- What is a state
- Context Independent Phone
- Context Independent SubPhone
- Context Dependent Phone
- State tied CDPhone
- Training Scheme
- BW Training
- Viterbi Training
- Single State
网友评论