Table of Contents
Fetching ...

Domain-Adaptive and Scalable Dense Retrieval for Content-Based Recommendation

Mritunjay Pandey

TL;DR

The paper tackles vocabulary mismatch in e-commerce by casting content-based recommendation as recommendation-as-retrieval and developing a domain-adaptive dense retriever. It presents a two-tower bi-encoder fine-tuned with supervised contrastive learning on Amazon Fashion data, paired with FAISS HNSW indexing and ONNX Runtime with dynamic INT8 quantization for CPU-efficient serving. Key results show Recall@10 improving from 0.26 (BM25) to 0.66 on a 826k-item catalog, with median CPU latency of 6.1 ms and a 4x reduction in model size, demonstrating end-to-end viability from offline training to production deployment. The work provides a reproducible blueprint for domain-adapted dense retrieval at scale, and discusses practical enhancements such as hybrid retrieval and multimodal extensions for even stronger real-world impact.

Abstract

E-commerce recommendation and search commonly rely on sparse keyword matching (e.g., BM25), which breaks down under vocabulary mismatch when user intent has limited lexical overlap with product metadata. We cast content-based recommendation as recommendation-as-retrieval: given a natural-language intent signal (a query or review), retrieve the top-K most relevant items from a large catalog via semantic similarity. We present a scalable dense retrieval system based on a two-tower bi-encoder, fine-tuned on the Amazon Reviews 2023 (Fashion) subset using supervised contrastive learning with Multiple Negatives Ranking Loss. We construct training pairs from review text (as a query proxy) and item metadata (as the positive document) and fine-tune on 50,000 sampled interactions with a maximum sequence length of 500 tokens. For efficient serving, we combine FAISS HNSW indexing with an ONNX Runtime inference pipeline using INT8 dynamic quantization. On a review-to-title benchmark over 826,402 catalog items, our approach improves Recall@10 from 0.26 (BM25) to 0.66, while meeting practical latency and model-size constraints: 6.1 ms median CPU inference latency (batch size 1) and a 4x reduction in model size. Overall, we provide an end-to-end, reproducible blueprint for taking domain-adapted dense retrieval from offline training to CPU-efficient serving at catalog scale.

Domain-Adaptive and Scalable Dense Retrieval for Content-Based Recommendation

TL;DR

The paper tackles vocabulary mismatch in e-commerce by casting content-based recommendation as recommendation-as-retrieval and developing a domain-adaptive dense retriever. It presents a two-tower bi-encoder fine-tuned with supervised contrastive learning on Amazon Fashion data, paired with FAISS HNSW indexing and ONNX Runtime with dynamic INT8 quantization for CPU-efficient serving. Key results show Recall@10 improving from 0.26 (BM25) to 0.66 on a 826k-item catalog, with median CPU latency of 6.1 ms and a 4x reduction in model size, demonstrating end-to-end viability from offline training to production deployment. The work provides a reproducible blueprint for domain-adapted dense retrieval at scale, and discusses practical enhancements such as hybrid retrieval and multimodal extensions for even stronger real-world impact.

Abstract

E-commerce recommendation and search commonly rely on sparse keyword matching (e.g., BM25), which breaks down under vocabulary mismatch when user intent has limited lexical overlap with product metadata. We cast content-based recommendation as recommendation-as-retrieval: given a natural-language intent signal (a query or review), retrieve the top-K most relevant items from a large catalog via semantic similarity. We present a scalable dense retrieval system based on a two-tower bi-encoder, fine-tuned on the Amazon Reviews 2023 (Fashion) subset using supervised contrastive learning with Multiple Negatives Ranking Loss. We construct training pairs from review text (as a query proxy) and item metadata (as the positive document) and fine-tune on 50,000 sampled interactions with a maximum sequence length of 500 tokens. For efficient serving, we combine FAISS HNSW indexing with an ONNX Runtime inference pipeline using INT8 dynamic quantization. On a review-to-title benchmark over 826,402 catalog items, our approach improves Recall@10 from 0.26 (BM25) to 0.66, while meeting practical latency and model-size constraints: 6.1 ms median CPU inference latency (batch size 1) and a 4x reduction in model size. Overall, we provide an end-to-end, reproducible blueprint for taking domain-adapted dense retrieval from offline training to CPU-efficient serving at catalog scale.
Paper Structure (55 sections, 11 equations, 4 figures, 3 tables)

This paper contains 55 sections, 11 equations, 4 figures, 3 tables.

Figures (4)

  • Figure 1: User--item interaction sparsity. The heatmap visualizes interactions between the top 100 users and items. The dominance of empty entries (blue) highlights the cold start and sparsity limits of collaborative filtering, motivating the need for content-based semantic retrieval.
  • Figure 2: Baseline (zero-shot) recommendation-as-retrieval system architecture.
  • Figure 3: Fine-tuned and optimized recommendation-as-retrieval system architecture (training + serving).
  • Figure 4: Comparative recommendation performance. Recommendation-as-retrieval performance (Recall@10 and MRR@10) on the review-to-title benchmark.