Advancing product categorization with vision language models: The power of fine-tuned LLaVA

Faire Data and Engineering Team17 Jul 2024

Problem

On a wholesale marketplace, brands pick a product type for each listing from about 3,000 options. Choosing is slow and delays onboarding, and operations staff spend around 15% of their time on categorization. The earlier model (KNN over CLIP embeddings) left more than 15% of existing products mis-categorized in human audits, which forced regular large manual reviews. The hard cases are subtle apparel distinctions, titles and images that point to different types, and non-English listings.

Example from the article: a product tagged "Tank Top" because of its description, whose image fits "Knit Top".

Solution in brief

Fine-tune the open-source vision-language model LLaVA to generate the product type from title, description, brand fields and the hero image. Train on manually audited labels, split data by brand, mask fields at random, and add a fallback chain for outputs outside the taxonomy.

Questions this case answers
  • How to classify items into a large fixed taxonomy from text and images when existing labels are noisy and the model is generative
  • How to evaluate a multimodal classifier without leakage between items from the same seller
  • How to assign a product type from a taxonomy of about 3,000 options using title, description and image together?
  • How to train a vision-language model for catalog classification when a large share of existing labels is wrong?

Tools and methods

  • LLaVA (7b and 13b) — vision-language model fine-tuned to output the product type
  • Brand-level train/eval split — prevents leakage between products of one brand
  • Random field masking — makes the model work when text or image is missing
  • Fallback chain — regenerates until the output is a valid product type
  • vLLM on SageMaker — serving, about 3x faster than native generation
  • CLIP + KNN — the previous production baseline
Continue reading — it's free

Google or a one-time email code. No password.