How IKEA Improves Product Search with Negative Data Mining for Contrastive Learning
> Paper: Negative Data Mining for Contrastive Learning in Dense Retrieval at IKEA.com > Authors: Eva Agapaki, Amritpal Singh Gill > arXiv: 2605.00353 | 2026-04-29
The E-commerce Search Problem
When a user searches "comfortable sofa" on IKEA.com, they expect a range of relevant results—various styles, price points, and sizes. In practice, results may include sofa beds, office chairs, or even coffee tables, with poor ranking. The causes: the search engine doesn't understand "comfortable," and the retrieval model cannot reliably separate relevant from irrelevant products—leading to imprecise recommendations and poor user experience.
Negative Mining: Teaching the Model to Discriminate
The IKEA search team's core idea:
> The quality of contrastive learning depends on the quality of the negatives. Through structured negative sampling, dense retrieval models learn to precisely distinguish relevant from irrelevant products.
Technical approach:
1. Structured negative sampling — leverage product taxonomy hierarchy and attributes rather than selecting negatives randomly, choosing them "strategically." 2. Taxonomy-based negatives — same category, different subcategory (e.g., "sofa" vs. "sofa bed"); easily confused items serve as negatives so the model learns to discriminate. 3. Attribute-based negatives — same category, different attributes (e.g., "three-seat sofa" vs. "single-seat sofa", "fabric" vs. "leather") for fine-grained discrimination. 4. LLM-as-a-Judge — use LLMs to evaluate relevance at scale, providing high-quality annotations that replace manual judgment.
An analogy: teaching a child to recognize a cat isn't just showing cats—it also involves dogs and tigers ("this is not a cat"), and especially look-alikes like lynxes, which make learning faster and more accurate.
Why Structured Beats Random Negative Sampling
Problems with random negatives:
- Too easy: random irrelevant products (e.g., a screw when searching "sofa") are trivially distinguishable, so the model learns nothing useful.
- Uninformative: negatives too different from positives provide no learning signal, slowing progress.
- Challenging: confusable negatives from the same category force fine-grained discrimination.
- Informative: every negative is a learning opportunity, giving richer training signal and faster improvement.
- Effective in practice: more precise retrieval, better user experience, higher conversion.
Advantages of structured negatives:
A Feynman-style Observation
Feynman noted that knowing the name of something differs from understanding it. Applied to retrieval:
> Distinguishing "sofa" from "coffee table" is not understanding; distinguishing "three-seat sofa" from "sofa bed" is. The wisdom of structured negative sampling is making the model learn "similar but not identical" distinctions—that is true understanding.
Learning is not memorizing correct answers but understanding why other answers are wrong—especially ones that look like correct answers.
Takeaways for Practitioners
If you build retrieval or recommendation systems, ask:
1. Are my negatives informative? 2. Am I leveraging domain knowledge (e.g., taxonomy hierarchies)? 3. Is my model learning only "easy" distinctions? 4. Could LLM-as-a-Judge improve annotation quality?
Core lesson: good contrastive learning requires good negatives—not the hardest, not the easiest, but the most informative ones. When IKEA's search learned to distinguish "similar but not identical" products, it evolved from a "keyword matcher" into a shopping assistant that understands your needs. The best search isn't the fastest—it's the one that understands you best.
In a forest of similar leaves, telling two apart is true wisdom.