TL;DR
JD.com researchers present DPSR (Deep Personalized and Semantic Retrieval), a production-scale embedding learning system that moves beyond simple keyword matching. By using a multi-head two-tower neural network and optimized negative sampling, DPSR significantly improves search relevance and personalization, boosting conversion rates by over 10% for difficult "long-tail" queries.
What Problem Does This Paper Address?
In e-commerce, search is the primary engine of discovery. However, traditional search engines rely heavily on inverted indexes and term matching (like BM25). This leads to two major hurdles:
- The Semantic Gap: Users often search for concepts, not just keywords. A query for "cellphone for grandpa" might not match an item titled "Senior-friendly mobile device," even though they are semantically identical.
- Lack of Personalization: Traditional indexes treat every user the same. A search for "T-shirt" should ideally surface different results for a teenage girl versus an adult man based on their past behavior and profiles.
While deep learning has revolutionized the ranking stage of search, applying it to the retrieval stage (sifting through billions of items to find the top few thousand) is incredibly difficult due to strict latency requirements and the sheer scale of the data.
Methods
The authors propose a Two-Tower Architecture, where one neural network (the Query Tower) encodes the user's intent and another (the Item Tower) encodes product features.
Key innovations include:
- Multi-head Query Tower: Instead of one embedding, the query tower produces $K$ different embeddings. This allows the model to capture multiple intents for polysemous queries (e.g., "Apple" could mean the fruit or the tech brand).
- Attention-based Loss: They use a "soft dot product" interaction. This weights the multiple query heads against a single item embedding, allowing the system to learn which "head" is most relevant for a specific item.
- Hybrid Negative Sampling: Training retrieval models requires "negative" examples (items the user didn't want). DPSR mixes Random Negatives (sampled from the whole catalog) with Batch Negatives (reusing positive items from other queries in the same training batch). This balance is crucial for teaching the model to distinguish between relevant items and popular-but-irrelevant ones.
- System Engineering: To make this work at JD.com's scale, they implemented a custom C++ tokenizer for online/offline consistency and a proxy-based sharding system to serve hundreds of different models simultaneously with sub-20ms latency.
Datasets
- JD.com Click Logs: The primary training set consists of 60 days of user sessions, totaling 5.6 billion sessions.
- Human Supervision Data: They incorporated human-labeled "bad cases," skipped items from logs, and domain-specific pairs (e.g., ensuring "iPhone 11" is a positive match for "newest large screen iPhone").
- Evaluation Set: A separate dataset of 500 difficult "long-tail" queries was manually labeled by experts to verify semantic improvements.
Key Insights and Ideas
- The Multi-Head Advantage: The multi-head design is a powerful way to handle ambiguity. As shown in their t-SNE visualizations, different heads naturally learn to cluster different brands or product categories for the same query.
- The Popularity Trade-off: The ratio of random negatives ($\alpha$) acts as a "knob" for popularity. Increasing random negatives pushes the model to retrieve more popular items, which often improves global metrics but can hurt niche relevance.
- Simplicity Wins in Production: While the authors tested complex models like RNNs and Transformers, they found that a well-tuned Multi-Layer Perceptron (MLP) was more efficient for industrial serving, allowing them to process more data with fewer machines.
Key Results
DPSR was deployed to JD.com's production environment in 2019, yielding impressive gains:
- Conversion Boost: An overall increase of +1.29% in User Conversion Rate (UCVR) and +2.19% in Gross Merchandise Value (GMV).
- Long-Tail Success: For rare or complex queries, the UCVR jumped by +10.03%, proving the system's ability to handle semantic nuances that stymie keyword search.
- Efficiency: The system achieves a total retrieval latency of 15–20 milliseconds for 15 million items, making it as fast as traditional inverted index lookups.
Limitations and Future Work
The authors note that this work focuses exclusively on the candidate retrieval stage. While DPSR provides high-quality candidates, the final order is still determined by a downstream ranking stage.
Future work includes:
- Tighter integration between the retrieval and ranking objectives.
- Exploring more advanced encoders (like BERT-style transformers) as hardware acceleration for deep learning continues to improve, potentially overcoming the current latency trade-offs of complex models.
Summary updated