Your Mixture-of-Experts LLM Is Secretly an Embedding Model For Free

Ziyue Li, Tianyi Zhou · DOI

Abstract

While Large Language Models (LLMs) excel at generation, they typically require supervised fine-tuning to serve as effective embedding models. This paper introduces MOEE (Mixture-of-Experts Embedding), a training-free approach that extracts "routing weights" from MoE architectures to enhance text representations. By combining these weights with standard hidden states, MOEE significantly improves performance on the Massive Text Embedding Benchmark (MTEB) across multiple tasks, demonstrating that the internal logic of expert selection contains rich, untapped semantic information.

Introduction

The dominance of decoder-only LLMs in natural language processing has not translated directly to embedding tasks. These models, trained for next-token prediction, often produce hidden states that lack holistic semantic depth. To address this, researchers have traditionally relied on expensive fine-tuning. This work explores whether Mixture-of-Experts (MoE) models—which use internal routers to select specialized sub-networks—contain inherent signals that can serve as high-quality embeddings "for free."

Methodology

The core innovation lies in the use of Routing Weights (RW). In MoE models like Mixtral or DeepSeekMoE, each token is processed by a subset of experts chosen by a router. The probability distribution over these experts across all layers forms a "routing signature" representing the model's reasoning path.

The authors propose MOEE, which integrates these signatures with traditional Hidden States (HS). Two fusion strategies are explored:

  1. MOEE (concat): A simple concatenation of the two vectors.
  2. MOEE (sum): A weighted sum of the cosine similarities calculated from HS and RW independently (late fusion).

This approach is entirely training-free, requiring only the extraction of internal signals from pre-trained MoE models.

Experimental Results

Evaluation on the MTEB benchmark reveals that MOEE consistently outperforms standard hidden state embeddings across almost all task types, including classification, clustering, and semantic textual similarity (STS).

Performance comparison between standard Hidden State (HS) embeddings and the proposed MOEE method across various MTEB tasks.

For instance, using DeepSeekMoE-16B, the MOEE (sum) method improved average MTEB scores by 22.45% (from 35.36 to 43.30) without any prompting. When combined with specific prompting strategies, MOEE even outperformed several supervised models specifically trained for embeddings.

Analysis of Complementary Strengths

A key finding is that HS and RW capture distinct semantic features. While HS tends to focus on linguistic structure and surface-level consistency, RW captures higher-level thematic and stylistic nuances. This makes the combined MOEE representation more robust than either component alone.

Analysis of success and failure cases on STS12 datasets, illustrating the complementary nature of Hidden States (HS) and Routing Weights (RW).

As shown in the figure above, the "upper bound" of combining both signals covers a significantly larger portion of successful cases than either signal alone. This complementarity allows MOEE to be more robust and accurate across diverse datasets. Furthermore, while Hidden States are often sensitive to prompt variations, Routing Weights remain remarkably stable, providing a more reliable semantic signal.

Conclusion

MOEE represents a significant step forward in making LLMs more versatile without the need for specialized training. By tapping into the "reasoning path" of MoE models, researchers can extract high-quality embeddings that are both performant and robust. This discovery suggests that how a model chooses to process information is just as semantically meaningful as the final hidden representation it produces.

Summary updated

BibTeX
@inproceedings{li2025your,
  author = {Ziyue Li and Tianyi Zhou},
  title = {{Your Mixture-of-Experts LLM Is Secretly an Embedding Model For Free}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=eFGQ97z5Cd},
}
Figure