                            Learning Mixtures of Experts with EM: A Mirror Descent Perspective



D. Algorithms

In this section, we provide explicit formulations of EM, Gradient EM and Gradient Descent for the context of MoE

optimization and EM for deep and sparse MoE.



D.1. EM for MoE

Expectation-Maximization (EM): EM takes a structured approach to minimizing the objective L(θ) in (7). Each iteration

of EM is decomposed into two steps as follows. The first step is called “expectation”: For current parameter estimate θ t , we

compute the expectation of the complete-data log-likelihood with respect to the latent variables, using the current parameter

estimates θ t and denote it by Q(θ|θ t ), i.e.,





                                      Q(θ|θ t ) = −EX,Y EZ|x,y;θt [log p(x, y, z; θ)] .

                                                                                    

                                                                                                                         (68)





Then, in the second step called “maximization”, we simply minimize the objective Q(θ|θ t ) (or maximize −Q(θ|θ t )) with

respect to θ ∈ Ω and obtain our new parameter as





                                                   θ t+1 := argmin Q(θ|θ t ).                                            (69)

                                                             θ∈Ω







For MoE described in Section 2, log p(y, z|x; θ) = log p(y|z, x; β) + log p(z|x; w). It follows that the EM objective (8) is

linearly separable in the parameters β and w. Thus, we can rewrite Q(θ|ϕ) as the sum of two functions that depend only on

β and w, respectively. Subsequently, the EM update (9) is obtained as the concatenation θ t+1 = (wt+1 , β t+1 )⊤ , where





                                  wt+1 = argmin −EX,Y EZ|x,y;θt [log p(z|x; w)] ,

                                                                              

                                               w∈Rd

                                      t+1

                                                                                      

                                  β         = argmin −EX,Y EZ|x,y;θt [log p(y|z, x; β)] .

                                               β∈Rd









Algorithm 1 EM for MoE

  Input: Initial θ 1 ∈ Ω, data: (X, Y ) ∼ p(x, y; θ ∗ )

  for t = 1 to T do

    θ-Update: Obtain θ t+1 as

        θ t+1 := arg minθ∈Ω Q(θ | θ t )

  end for

  Output: θ T = (wT , β T )







D.2. Gradient EM for MoE

Gradient EM. Whereas EM performs the global minimization of the EM objective given in (68), Gradient EM obtains its

next parameter iterate as the concatenation of two gradient updates on the sub objectives,



                                                                              

                                              − EX,Y EZ|x,y;θt [log P (z|x; w)]                                          (70)

                                                                                

                                              − EX,Y EZ|x,y;θt [log p(y|z, x; β)]                                        (71)





where the EM objective is given as the summation of (70) and (71).



                                                              35

