Research & Papers

Walmart's new embedding retrieval boosts NDCG by 7.34% and revenue

Hybrid hard negative mining and legacy-aware distillation cut search errors

Deep Dive

Walmart's engineering team tackled the training-inference gap common in embedding-based retrieval (EBR) for e-commerce search. Standard dual-encoders optimize on narrow candidate pools but must discriminate against hundreds of millions of items at inference time. To overcome this, they introduced a unified pipeline with two key innovations.

First, Hybrid Hard Negative Mining integrates Online Cross-Batch Sampling to dramatically increase negative diversity and Hybrid Offline Mining that leverages cross-encoder predictions combined with metadata heuristics to identify nuanced mismatches. Second, their Legacy-Aware Distillation eases the transition from a mature DistilBERT model to a higher-capacity GTE-base encoder using a Warm-Start Distillation technique that transfers domain-specific expertise without losing prior knowledge. Validated through offline experiments and online A/B testing, the pipeline is now live in Walmart's production system, yielding a +7.34% improvement in NDCG@5 and a +0.50% gross revenue lift.

Key Points
  • Hybrid Hard Negative Mining uses Online Cross-Batch Sampling to increase negative diversity by an order of magnitude
  • Legacy-Aware Distillation with Warm-Start enables smooth transition from DistilBERT to GTE-base while preserving domain knowledge
  • Live production A/B test showed +7.34% NDCG@5 improvement and +0.50% gross revenue lift

Why It Matters

Improves product search relevance and revenue for large-scale e-commerce platforms like Walmart.

📬 Get the top 10 AI stories daily