TL;DR
This paper introduces DIFFEMBED, a novel text embedding model that leverages diffusion language models. It demonstrates that diffusion models, with their inherent bidirectional architecture, outperform traditional autoregressive LLM-based models on tasks requiring understanding of long and complex texts, particularly in reasoning-intensive retrieval.
What Problem Does This Paper Address?
Traditional text embedding models, often based on autoregressive language models like BERT and T5, suffer from a fundamental limitation: their unidirectional attention mechanism, inherited from their training objective (predicting the next token). This makes it challenging for them to capture global context in long documents, which is crucial for tasks like document retrieval and reasoning. While some methods attempt to mitigate this, they often introduce computational overhead or are limited in scale. The authors propose diffusion language models as a more natural fit for text embeddings due to their inherent bidirectional attention.
Methods
The core of the paper is the introduction of DIFFEMBED, a text embedding model built upon diffusion language models. Unlike autoregressive models that mask future tokens, diffusion models learn to denoise by iteratively predicting masked tokens. This process inherently utilizes bidirectional attention. DIFFEMBED extracts contextualized token representations from a backbone diffusion LM and aggregates them using mean pooling, similar to standard practices. The key novelty lies in leveraging the diffusion LM's architecture for text embeddings, avoiding the need for complex adaptations typically required for LLMs.
Datasets
- Public E5: Used for training and evaluating long-document retrieval.
- REASONAUG: A newly introduced dataset for reasoning-intensive retrieval, created using LLMs. It contains logically related positives and hard negatives, covering domains like mathematics and physics.
- MS MARCO with Instructions: Used for instruction-following retrieval.
- MTEB (Massive Text Embedding Benchmark): Used for evaluating general text embedding tasks.
- BRIGHT: Used for evaluating reasoning-intensive retrieval tasks (TheoremQA, LeetCode).
- LONGEMBED: Used for evaluating long-document retrieval.
- FOLLOWIR: Used for evaluating instruction-following retrieval.
Key Insights and Ideas
- Bidirectional Attention is Key for Long Texts: The paper strongly suggests that the bidirectional attention inherent in diffusion models is crucial for effectively encoding global context in long and complex texts, leading to superior performance on tasks like long-document retrieval.
- Diffusion Models as a Natural Fit for Embeddings: The authors argue that diffusion models, due to their denoising process and bidirectional nature, are a more intuitive and potentially more effective choice for text embedding tasks compared to autoregressive LLMs, which require workarounds to achieve bidirectionality.
- REASONAUG Bridges a Gap: The creation of REASONAUG addresses a critical need for datasets that specifically test logical reasoning in retrieval, a task where existing benchmarks were insufficient.
- LLM Adaptations Have Limits: While methods like LLM2Vec attempt to make LLMs bidirectional, they are shown to be limited by scale and may not fully capture the benefits of true bidirectional architectures.
Key Results
- DIFFEMBED (based on DREAM-7B) outperformed LLM-based embedding models by 20% on long-document retrieval (LONGEMBED).
- It achieved 8% improvement on reasoning-intensive retrieval (BRIGHT) and 2% on instruction-following retrieval (FOLLOWIR).
- On the BRIGHT benchmark, DIFFEMBED achieved a 16.4% improvement on TheoremQA tasks when trained with REASONAUG.
- An ablation study confirmed that bidirectional attention is crucial for DIFFEMBED, with a substantial performance drop when reverse attention was disabled, indicating a stronger reliance on bidirectionality compared to LLM-based models.
- On general text embedding tasks (MTEB), DIFFEMBED performed on par with LLM embedding models, suggesting its primary advantage lies in tasks requiring deeper contextual understanding.
Limitations and Future Work
- State-of-the-Art Diffusion LM: The study is limited to evaluating the state-of-the-art diffusion LM, DREAM (Ye et al., 2025). Other diffusion models might yield different results.
- Resource Constraints: The training scale was limited to 20k samples. Larger-scale experiments with millions of examples could reveal further insights.
- REASONAUG Noise: While contrastive training is robust to noise, the REASONAUG dataset might still contain irrelevant or incorrect documents due to LLM limitations.
- Future Work: The authors hope their work provides insights for the text embedding community and the development of diffusion LMs. Further exploration of larger-scale diffusion models and their application to text embeddings is a natural next step.
Summary updated