Sparse encoders: bridging products and knowledge graphs

Session Abstract

Discover how Leroy Merlin bridges product catalogs with Knowledge Graphs using Sparse Encoders. We’ll share how we injected KG concepts as model tokens, tuned custom layers for 99%+ sparsity, and achieved explainable, low-latency (60ms) semantic search indexing ready for Elasticsearch.

Session Description

In the retail industry, the accuracy of product-to-concept mapping is the backbone of a great search experience. At Leroy Merlin France, this represents a massive operational challenge: over 5.7M product-concept pairs currently show poor semantic alignment, and at search time, 15.8% of customer queries remain unmapped to our Knowledge Graph. This leads to misclassified products and degraded precision/recall.

While dense embeddings have become the standard for semantic search, they often lack the lexical precision and explainability required to debug specific business rules. This led us to explore an alternative: Sparse Encoders. We engineered a solution to bridge our massive product catalog with the explicitness of Knowledge Graphs, allowing us to reclaim lost data points while designing a seamless integration with our existing search engine infrastructure.

In this talk, we will walk through our ML journey: from generative term expansion to a custom SPLADE-like model. Our key innovation? Injecting Knowledge Graph concepts directly as tokens into the model’s vocabulary.

I will share the “behind-the-scenes” of scaling and benchmarking this architecture for production, including:

  • Architecture Showdown: Why generative Seq2Seq (T5) were ultimately outperformed by Sparse models under strict production latency constraints (60ms vs 600ms inference).
  • Under the Hood: Optimizations on custom layers and how we refined loss functions (like FlopsLoss) to enforce 99%+ sparsity without losing semantic depth.
  • Search Integration: How we validated the indexing of custom sparse vectors directly into Elasticsearch for explainable, high-cardinality conceptual routing.

Beyond the code, this talk is a practical feedback loop on data quality and model refinement. Whether you work on search, recommendations, or taxonomy mapping, you will leave with actionable insights on leveraging Sparse Encoders to build robust, interpretable, and production-ready data products.

François Gaillard
François Gaillard

Adeo Services