ListBERT: Learning to Rank E-commerce products with Listwise BERT

Lakshya Kumar, Sagnik SarkararXiv 2022 · DOI

Abstract

ListBERT introduces a novel approach to e-commerce product ranking by fine-tuning a RoBERTa model using listwise loss functions. By optimizing for a differentiable version of Normalized Discounted Cumulative Gain (NDCG) and utilizing knowledge distillation to create a high-speed student model, the framework achieves a 20.6% improvement in ranking quality while maintaining the low latency required for real-time search environments.

Introduction

In e-commerce, search relevance is critical for user retention. Traditional Learning to Rank (LTR) models typically utilize pointwise or pairwise approaches. While listwise methods—which evaluate the entire result list simultaneously—are theoretically superior, they present optimization challenges. Furthermore, the computational overhead of Transformer models like BERT often precludes their use in real-time production settings where latency is a primary constraint.

Methods

The proposed ListBERT pipeline consists of three primary stages:

  1. Domain-Specific Pre-training: A RoBERTa model is pre-trained from scratch on a "fashion" corpus containing 5 million product descriptions and queries to capture industry-specific semantics.
  2. Listwise Fine-tuning: The model is fine-tuned using listwise loss functions. Specifically, the authors utilize approxNDCG, a differentiable approximation of the NDCG metric, to optimize ranking quality directly.
  3. Knowledge Distillation (KD): To address latency, the ListBERT model acts as a "Teacher" for a smaller "Student" model. The student uses a bi-encoder architecture, allowing product embeddings to be pre-computed for efficient dot-product calculation at inference time.
The ListBERT architecture for listwise ranking.

Datasets

The study utilized proprietary data from Myntra, a major fashion e-commerce platform:

  • Pre-training: 5 million instances of product attributes and user queries.
  • Fine-tuning: 45k queries derived from two weeks of click-stream data, with Click-Through Rate (CTR) mapped to relevance scores (0-4).
  • Evaluation: 20k queries from a subsequent week to ensure temporal separation and test generalization to new queries.

Key Results

The experimental results demonstrate the superiority of the listwise approach and the effectiveness of direct metric optimization.

Comparison of NDCG scores across different surrogate loss functions.
  • Ranking Accuracy: The RoBERTa model fine-tuned with approxNDCG achieved an NDCG of 0.754, outperforming the pairwise RankNet baseline by 20.6% and other listwise methods like ListNET by 13.9%.
  • Latency Speedup: Knowledge distillation reduced latency from 154ms (Teacher) to approximately 15ms (Student), a 10x speedup, while retaining an NDCG of 0.73.
  • Generalization: The model maintained high performance on a test set where 40% of queries were previously unseen, indicating robust semantic understanding.

Conclusion

ListBERT successfully bridges the gap between deep semantic understanding and production-level performance. Future work will focus on incorporating multi-modal features (e.g., product images), user-specific personalization, and further model compression to minimize the computational footprint.

Summary updated

BibTeX
@misc{kumar2022listbert,
  author = {Lakshya Kumar and Sagnik Sarkar},
  title = {{ListBERT: Learning to Rank E-commerce products with Listwise BERT}},
  year = {2022},
  eprint = {2206.15198},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.15198},
}
Figure