EM Algorithm 으로 풀 수 있는 문제들

B) 정의

EM algorithm is an iterative method and a bound optimization algorithm to find (local) MLE or MAP estimates of parameters in statistical models, where the model depends on unobserved latent variables.

B.1) Expectation(E) Step

Estimating the hidden variables (or missing values)

B.2) Maximization(M) Step

Using the fully observed data to compute the MLE. These parameter-estimates are then used to determine the distribution of the latent variables in the next E step.

C) EM 알고리즘의 Solution (목적)

EM 알고리즘의 목적은 관측된 데이터에 대한 log likelihood 를 최대화하는 것이다.

  • 는 hidden variables, 는 visible variables for example . (sum rule 에 의해서 유도됨)

위 식은 log 가 sum() 안에 들어가지 있지 않으므로, 최적화가 어렵다.

그래서 EM 은 위 식을 다음과 같이 풀어간다. 우선, 각 hidden variable 에 대해서, 임의의 분포들에 대한 집합 이 있다고 하자. 이렇게 하면, 위 log likelihood 는 다음과 같이 다시 쓸 수 있다.

  • 는 variational distribution

위 식에 Jensen’s inequality 를 사용하면, (concave function 에 대해) log 를 expectation 에 밀어 넣어줌으로써, log likelihood 에 대한 lower bound 를 구할 수 있다

이후 계산한 bound(ELBO) 에 대해서 optimization 을 수행한다 (c.f. variational inference)

D) EM Optimization Steps

우선 모든 값을 random 으로 초기화하고, E-step 과 M-step 을 반복한다.

D.1) E-step

function 을 optimize 하여 와 최대한 비슷하게 맞춤 ( 고정)

D.2) M-step

다시 를 업데이트하여 bound 를 최대화

이러한 반복에 대해 상세히 알고싶다면: 참고 site (EM for LDA)

E) Visualization of EM Steps

|400

F) Monotonicity of EM Algorithm

E 와 M step 을 반복할수록 log-likelihood 는 증가하는지 증명할 수 있는가? 즉, 을 만족하는가?

EM algorithm will make the log-likelihood get bigger and bigger as the iterations go on.

|600

E-step 에서 를 찾는다면, 이는 반드시 를 만족한다 ( 지점에서).

그리고 M-step 에서 를 찾는다면, 이는 를 만족하는데, 이는 도 만족한다.

Debugging point -> EM-step 을 직접 구현했는데 만약 log likelihood 값이 줄어든다면, 잘못 구현한 것이다.

G) Relation with Local Minimum

EM is not guaranteed to converge to a local minimum.

It is only guaranteed to converge to a point with zero gradient with respect to the parameters. So it can indeed get stuck at saddle points.

H) EM Algorithm 의 단점

EM 은 MM algorithm 이기 때문에, this iterative procedure will converge to a local maximum of the log likelihood.

The speed of convergence depends on the amount of missing data, which affects the tightness of the bound.

EM 대신, Gibbs Sampling(Griffiths, 2002) 을 대체제로 많이 사용한다.

I) Related Sites