eCeLLM: Generalizing Large Language Models for E-commerce from Large-scale, High-quality Instruction Data

Bo Peng, Xinyi Ling, Ziru Chen, Huan Sun, Xia Ning

TL;DR

The eCeLLM paper introduces ECInstruct, the first large-scale, open-source instruction-tuning dataset specifically for e-commerce, and eCeLLM, a family of models trained on it. These models consistently outperform general-purpose giants like GPT-4 and specialized state-of-the-art models, particularly in "cold start" scenarios involving new products and unseen instructions.

What Problem Does This Paper Address?

E-commerce platforms are incredibly complex, requiring models to handle diverse tasks like product recommendation, attribute extraction, and sentiment analysis. Historically, the industry has relied on "specialist" models—highly optimized for one task but largely ineffective for others. These specialists struggle with scalability and, more importantly, the "cold start" problem: they fail to generalize when faced with new users or product categories they haven't seen during training.

While Large Language Models (LLMs) are natural "generalists," their zero-shot performance in the e-commerce domain is often underwhelming because they haven't been exposed to the specific nuances and structured data formats of online retail. This paper aims to bridge that gap by creating a high-quality, real-world instruction dataset to transform general LLMs into e-commerce experts.

Methods

The authors developed the eCeLLM series using a technique called Instruction Tuning. Instead of just predicting the next word, the models are trained to follow specific commands across 10 different e-commerce tasks.

  • Model Tiers: They built three versions—L (Large, 11B-13B), M (Medium, 7B), and S (Small, 3B)—based on popular open-source backbones like Llama-2, Mistral, and Phi-2.
  • Efficient Tuning: They utilized LoRA (Low-Rank Adaptation), which allows for fine-tuning large models by only updating a small fraction of the parameters, making the process computationally feasible.
  • Instruction Diversity: To ensure the models didn't just memorize specific phrasings, they used GPT-4 to generate five diverse variations for every "seed" instruction. They even held out one instruction entirely for each task to test how well the model handles "unseen" commands.

Datasets: Introducing ECInstruct

The core contribution is ECInstruct, a dataset of 116,528 samples derived from real-world e-commerce data (not synthetic data).

Overview of e-commerce tasks transformed into instructions for eCeLLM

It covers four main categories:

  1. Product Understanding: Attribute extraction and matching.
  2. User Understanding: Sentiment analysis and sequential recommendation.
  3. Query Product Matching: Ranking and classification.
  4. Product QA: Answerability prediction and generation.

Unlike previous datasets, ECInstruct includes a rigorous Out-of-Domain (OOD) test set. For example, if the model was trained on electronics and home goods, it was tested on "Tools" or "Cell Phones" to measure its ability to generalize to entirely new product categories.

Key Insights and Ideas

  • The Generalist Advantage: One of the most striking findings is that a "generalist" eCeLLM (trained on all 10 tasks simultaneously) often performs better than a "specialist" version trained on just one task. This suggests a "knowledge transfer" effect where learning about product attributes helps the model better understand user reviews or search queries.
  • Small Models Punch Up: The 3B-parameter eCeLLM-S outperformed much larger general-purpose models in many tasks, proving that high-quality, domain-specific data is often more important than raw parameter count.
  • Instruction Robustness: By training on diverse phrasings, the models became remarkably resilient. Their performance on "unseen" instructions was nearly identical to their performance on "seen" ones, a critical requirement for real-world deployment where user input is unpredictable.
  • Real Data > Synthetic Data: The authors highlight that using real-world data (like actual Amazon reviews and queries) makes the model far more useful for practical applications compared to models trained on human-manipulated or purely synthetic datasets.

Key Results

  • In-Domain Superiority: eCeLLM models showed a 10.7% average improvement over the best baseline models (including GPT-4 Turbo and specialized SoTA models) across all 10 tasks.
  • OOD Generalization: On unseen products, eCeLLM established a 9.3% improvement over the best baselines, directly addressing the cold-start challenge.
  • Beating GPT-4: In tasks like Attribute Value Extraction (AVE) and Sequential Recommendation (SR), eCeLLM-L significantly outperformed GPT-4 Turbo, despite being a fraction of the size.
  • Massive Gains over EcomGPT: Compared to previous e-commerce LLMs like EcomGPT, eCeLLM-L showed improvements as high as 244% in tasks like Sentiment Analysis.
In-Domain evaluation performance scaling with training data size

Limitations and Future Work

While eCeLLM is a major step forward, the authors acknowledge a few areas for growth:

  • Task Coverage: The current version doesn't include "explanation generation" (e.g., why a product was recommended), which is vital for user trust.
  • User Profiling: Due to privacy and data limitations in public datasets, the models lack deep user metadata (demographics, long-term preferences), which could further refine recommendations.
  • Data Scaling: The training set was capped at 10k samples per task for efficiency; however, as shown in the scaling evaluations, expanding the dataset even further (potentially to millions of samples) could unlock even higher performance.

The ECInstruct dataset and eCeLLM models are publicly available, providing a robust foundation for the next generation of AI-driven shopping experiences.

Summary updated

BibTeX
@inproceedings{peng2024ecellm,
  author = {Bo Peng and Xinyi Ling and Ziru Chen and Huan Sun and Xia Ning},
  title = {{eCeLLM: Generalizing Large Language Models for E-commerce from Large-scale, High-quality Instruction Data}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=LWRI4uPG2X},
}
Figure