Mixture of experts (MoE) is a machine learning technique where multiple expert networks (learners) are used to divide a problem space into homogeneous regions. MoE represents a form of ensemble learning. They were also called committee machines.
Basic theory MoE always has the following components, but they are implemented and combined differently according to the problem being solved:
Experts f1,...,fn, each taking the same input x, and producing outputs f1(x),...,fn(x). A weighting function (also known as a gating function) w, which takes input x and produces a vector of outputs (w(x)1,...,w(x)n). This may or may not be a probability distribution, but in both cases, its entries are non-negative. θ=(θ0,θ1,...,θn) is the set of parameters. The parameter θ0 is for the weighting function. The parameters θ1,…,θn are for the experts. Given an input x, the mixture of experts produces a single output by combining f1(x),...,fn(x) according to the weights w(x)1,...,w(x)n in some way, usually by f(x)=∑iw(x)ifi(x). Both the experts and the weighting function are trained by minimizing some loss function, generally via gradient descent. There is much freedom in choosing the precise form of experts, the weighting function, and the loss function.
Meta-pi network The meta-pi network, reported by Hampshire and Waibel, uses f(x)=∑iw(x)ifi(x) as the output. The model is trained by performing gradient descent on the mean-squared error loss L:=1N∑k‖yk−f(xk)‖2. The experts may be arbitrary functions. In their original publication, they were solving the problem of classifying phonemes in speech signal from 6 different Japanese speakers, 2 females and 4 males. They trained 6 experts, each being a "time-delayed neural network" (essentially a multilayered convolution network over the mel spectrogram). They found that the resulting mixture of experts dedicated 5 experts for 5 of the speakers, but the 6th (male) speaker does not have a dedicated expert, instead his voice was classified by a linear combination of the experts for the other 3 male speakers.
Adaptive mixtures of local experts The adaptive mixtures of local experts uses a Gaussian mixture model. Each expert simply predicts a Gaussian distribution, and totally ignores the input. Specifically, the i-th expert predicts that the output is y∼N(μi,I), where μi is a learnable parameter. The weighting function is a linear-softmax function:w(x)i=ekiTx+bi∑jekjTx+bjThe mixture of experts predict that the output is distributed according to the log-probability density function:lnfθ(y|x)=ln[∑iekiTx+bi∑jekjTx+bjN(y|μi,I)]=ln[(2π)−d/2∑iekiTx+bi∑jekjTx+bje−12‖y−μi‖2]It is trained by maximal likelihood estimation, that is, gradient ascent on f(y|x). The gradient for the i-th expert is ∇μilnfθ(y|x)=w(x)iN(y|μi,I)∑jw(x)jN(y|μj,I)(y−μi) and the gradient for the weighting function is∇[ki,bi]lnfθ(y|x)=[x1]w(x)i∑jw(x)jN(y|μj,I)(fi(x)−fθ(y|x)) For each input-output pair (x,y), the weighting function is changed to increase the weight on all experts that performed above average, and decrease the weight on all experts that performed below average. This encourages the weighting function to learn to select only the experts that make the right predictions for each input. The i-th expert is changed to make its prediction closer to y, but the amount of change is proportional to w(x)iN(y|μi,I). This has a Bayesian interpretation. Given input x, the prior probability that expert i is the right one is w(x)i, and N(y|μi,I) is the likelihood of evidence y. So, w(x)iN(y|μi,I)∑jw(x)jN(y|μj,I) is the posterior probability for expert i, and so the rate of change for the i-th expert is proportional to its posterior probability. In words, the experts that, in hindsight, seemed like the good experts to consult, are asked to learn on the example. The experts that, in hindsight, were not, are left alone. The combined effect is that the experts become specialized: Suppose two experts are both good at predicting a certain kind of input, but one is slightly better, then the weighting function would eventually learn to favor the better one. After that happens, the lesser expert is unable to obtain a high gradient signal, and becomes even worse at predicting such kind of input. Conversely, the lesser expert can become better at predicting other kinds of input, and increasingly pulled away into another region. This has a positive feedback effect, causing each expert to move apart from the rest and take care of a local region alone (thus the name "local experts").
Hierarchical MoE Hierarchical mixtures of experts uses multiple levels of gating in a tree. Each gating is a probability distribution over the next level of gatings, and the experts are on the leaf nodes of the tree. They are similar to decision trees. For example, a 2-level hierarchical MoE would have a first order gating function wi, and second order gating functions wj|i and experts fj|i. The total prediction is then ∑iwi(x)∑jwj|i(x)fj|i(x).
… excerpt ends here. Continue reading the full article.
