Abstract
In modern e-commerce search systems, dense retrieval has become an indispensable component. By computing similarities between query and item (product) embeddings, it efficiently selects candidate products from large-scale repositories. With the breakthroughs in large language models (LLMs), mainstream embedding models have gradually shifted from BERT to LLMs for more accurate text modeling. However, these models still adopt direct-embedding methods, and the semantic accuracy of embeddings remains inadequate. Consequently, such models tend to capture statistical co-occurrence patterns in the training data, biasing them toward shallow lexical and semantic matches. For difficult queries exhibiting notable lexical disparity from target items, the performance degrades significantly. In this work, we propose the Large Reasoning Embedding Model (LREM), which novelly integrates reasoning processes into representation learning. For difficult queries, LREM first conducts reasoning to achieve a deep understanding of the original query, and then produces a reasoning-augmented query embedding for retrieval. This reasoning process effectively bridges the semantic gap between original queries and target items, significantly improving retrieval accuracy. Specifically, we adopt a two-stage training process: the first stage optimizes the LLM on carefully curated Query-CoT-Item triplets with SFT and InfoNCE losses to establish preliminary reasoning and embedding capabilities, and the second stage further refines the reasoning trajectories via reinforcement learning (RL). Extensive offline and online experiments validate the effectiveness of LREM, leading to its deployment on China's largest e-commerce platform since August 2025.
1. Introduction
Dense retrieval is the cornerstone of modern e-commerce, mapping queries and products into a shared vector space to facilitate efficient candidate selection. While the transition from BERT-based models to Large Language Models (LLMs) has improved text modeling, most current systems rely on "direct-embedding" methods. These methods generate a representation in a single forward pass, often failing to capture deep intent or world knowledge.
As illustrated in Figure 1, direct-embedding models are prone to shallow matching. For a query like "Drinks That Are More Invigorating Than Tea," a standard retriever might return various tea products due to lexical overlap. In contrast, a reasoning-then-embedding approach allows the model to identify that the user is seeking stimulants like coffee or energy drinks, bridging the semantic gap before the retrieval step occurs.
2. The LREM Framework
The Large Reasoning Embedding Model (LREM) introduces a paradigm shift: Reasoning $\rightarrow$ Representation. Instead of immediate encoding, the model utilizes a decoder-only LLM backbone to generate a compact, keyword-based Chain-of-Thought (CoT).
This reasoning is encapsulated within <think> tokens. Following the reasoning process, the model generates a special <emb> token. The hidden state of this token serves as the final query embedding. This architecture ensures that the embedding is conditioned not just on the raw query, but on the model's internal logical expansion of that query. To maintain production efficiency, the CoT is constrained to a maximum of 16 tokens, focusing on high-density semantic markers (e.g., brand names or product categories) rather than verbose natural language.
3. Training Pipeline
LREM is trained using a sophisticated two-stage pipeline designed to instill both reasoning capabilities and retrieval accuracy.
3.1 Data Construction and Cold Start
The process begins with the construction of a massive dataset comprising 75.06 million Query-CoT-Item triplets. A 30B-parameter teacher model generates the initial reasoning chains, which are then filtered for relevance using high-precision models like TaoSR1. During the Cold Start stage, the model undergoes Supervised Fine-Tuning (SFT) using a combination of SFT loss (to mimic the teacher's reasoning) and InfoNCE loss (to align query and item embeddings).
3.2 Reinforcement Learning
To further optimize the model, LREM employs Group Relative Policy Optimization (GRPO). This stage moves beyond simple imitation by rewarding the model based on three specific pillars:
- Format Compliance: Ensuring the model correctly uses the
<think>and<emb>structure. - Conciseness: Penalizing overly long reasoning to minimize online latency.
- Retrieval Performance: A novel reward based on the rank of the ground-truth item within a batch, forcing the model to discover reasoning trajectories that maximize retrieval success.
4. Experimental Results
LREM was evaluated against strong baselines, including Qwen2.5 with bidirectional attention, on a curated set of 7,209 "extremely challenging" queries. These queries were categorized into Q&A, Alternative, Negative, and Knowledge-intensive types.
- Offline Gains: LREM achieved a 5.75% improvement in overall HitRate@6000. The most significant jump was seen in the Q&A category, which saw a 19.20% increase, demonstrating the power of reasoning for intent expansion.
- Online Impact: Following its deployment in August 2025, A/B testing revealed a +15.7% GSB (Good/Same/Bad) improvement in the "Negative" query category (e.g., "non-waisted dress"), where traditional models typically struggle with negation.
- Efficiency: The reasoning step introduces approximately 50ms of latency. While higher than the 15ms required for direct embedding, this was deemed an acceptable trade-off for the substantial gains in retrieval precision.
5. Conclusion
LREM demonstrates that "thinking before retrieving" is a viable and highly effective paradigm for dense retrieval. By integrating a keyword-centric reasoning process and optimizing it via reinforcement learning, LREM overcomes the limitations of shallow semantic matching. Future work will focus on further reducing latency and exploring the potential of longer reasoning chains for even more complex multi-hop retrieval tasks.
Summary updated