# Mixture-of-Experts
## 定義
Mixture-of-Experts(MoE)は、FFN を sparsely activated に置き換える Transformer の変種アーキテクチャ。複数の expert network(異なる訓練データ部分集合を処理)と gate network(routing algorithm で token を expert に割当)からなり、入力ごとに一部の expert のみを activate する条件付き計算により、パラメータ数を大幅に増やしても計算コストの増加を抑える。これにより trillion 規模超のパラメータ訓練が可能になる。([[2026__Vicinagearth__Efficient Training of Large Language Models on Distributed Infrastructures - A Survey]] §2.1, §4.1.5) 本サーベイは Mixtral 8x7B・DeepSeek2 を使用例として挙げる。
分散訓練では **Expert Parallelism**(expert を worker 間に分散)として実現され、3 つの技術課題を持つ:
- **Sparse Activation**: GShard(All-to-All で expert 協調)、Switch Transformer(top-1 routing)、Megablocks(Block Sparse MatMul で token dropping 回避)等。
- **Communication Optimization**: expert 間の **All-to-All がボトルネック**。Tutel/FasterMoE(計算通信オーバーラップ)、Lina(All-to-All を AllReduce より優先)、Janus(data-centric に expert を移動)等。
- **Load Balance**: 人気 expert への token 集中による不均衡。FasterMoE(shadowing experts)、SmartMoE/FlexMoE(動的 expert placement)、Prophet 等。
## 横断的知見
- (2 ソース目以降に追記予定。現時点では本サーベイ単独の定義に留まる。)
## 未解決の問い
- All-to-All 通信の最適化(Tutel/Lina/ScheMoe 等)と load balance(FlexMoE/Prophet 等)は独立に研究されているが、両者を同時最適化する設計は成立するか。
- expert-to-device mapping は短期では大きく変化しない(FlexMoE の観察)。この性質はどの程度のモデル規模・データ分布まで成り立つか。
- MoE の sparse activation は [[並列化戦略]] の他次元(tensor/pipeline)とどう組み合わせるのが効率的か(DeepSpeed-TED の data+tensor+expert hybrid 等)。
## 関連
- ソース: [[2026__Vicinagearth__Efficient Training of Large Language Models on Distributed Infrastructures - A Survey]]
- 概念: [[LLM分散学習]] / [[並列化戦略]]
- 関連 MOC: [[分散深層学習 - MOC]]
## 出典
- [[2026__Vicinagearth__Efficient Training of Large Language Models on Distributed Infrastructures - A Survey]](§2.1 MoE, §4.1.5 Expert Parallelism)