---
title: "Using Rich Image and Text Data to Categorize Products at Scale"
description: "Shopify rebuilt its product categorization model as a multi-task, multi-class neural network that predicts all seven levels of the hierarchical Google Product Taxonomy."
url: "https://swe.quest/articles/using-rich-image-and-text-data-to-categorize-products-at-scale-d20fb07ad5fcc987"
canonical: "https://shopify.engineering/using-rich-image-text-data-categorize-products"
source: "Shopify Engineering"
published: "2021-09-08"
difficulty: "medium"
kind: "Case study"
reading_minutes: 12
tags: ["machine-learning","model-training","ecommerce","computer-vision"]
---

# Using Rich Image and Text Data to Categorize Products at Scale

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2021-09-08, 12 min read, Case study. Original: [https://shopify.engineering/using-rich-image-text-data-categorize-products](https://shopify.engineering/using-rich-image-text-data-categorize-products)

## Summary

Shopify rebuilt its product categorization model as a multi-task, multi-class neural network that predicts all seven levels of the hierarchical Google Product Taxonomy. Multilingual BERT text embeddings and MobileNet-V2 image embeddings feed stacked hidden layers, with each level's output passed into the next level's prediction. Training combines the seven per-level losses with weights and uses class weights to handle imbalance, without forcing child predictions to match the parent. At inference, a Keras subclass model walks the taxonomy and only considers descendants of the chosen parent, and per-level confidence thresholds are hand-tuned for sensitive categories. The 250M-parameter model, trained with data-parallel distributed TensorFlow on GCP, raised leaf precision by 8% and nearly doubled coverage.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)

## Prerequisites

- neural network classification
- transfer learning
- precision and recall

## Keywords

Google Product Taxonomy, Multilingual BERT, MobileNet-V2, TensorFlow, Keras, Shopify

## Related posts

- [Evolution of Product Classification at Shopify: From Categories to Comprehensive Product Understanding](https://swe.quest/articles/evolution-of-product-classification-at-shopify-from-categories-to-comprehensive-f7af0d3e764e6a0d.md): Shopify Engineering · 2025-05-08 · Medium · 8 min read · Inference & serving, Machine learning, E-commerce, LLMs, ML platforms
  Shopify's product classification evolved from a 2018 TF-IDF logistic regression model through a 2020 multi-modal classifier to a Vision Language Model system built on the Shopify Product Taxonomy, which covers over 10,000 categories and 1,000+ attributes.
- [Cross-store product clustering across millions of stores](https://swe.quest/articles/cross-store-product-clustering-across-millions-of-stores-c9b1fdcfbed466c6.md): Shopify Engineering · 2026-10-20 · Hard · 13 min read · Machine learning, E-commerce, Vector search, Algorithms, LLMs
  Shopify groups listings of the same product across millions of stores under a global Universal Product Identifier using a three-stage pipeline: embedding-based approximate nearest-neighbor retrieval to find candidate pairs, tiered pair scorers, and graph clustering.
- [Data-Centric Machine Learning: Building Shopify Inbox’s Message Classification Model](https://swe.quest/articles/data-centric-machine-learning-building-shopify-inbox-s-message-classification-89547c88c3590e73.md): Shopify Engineering · 2022-07-21 · Medium · 12 min read · Machine learning, Model training, Privacy, Communications
  Shopify Inbox's message classifier improved from ~70% to ~90% accuracy, and from ~35% to ~80% high-confidence coverage, by investing in better training data rather than model tweaks.
- [Leveraging multimodal LLMs for Shopify’s global catalogue: Recap of expo talk at ICLR 2025](https://swe.quest/articles/leveraging-multimodal-llms-for-shopify-s-global-catalogue-recap-of-expo-talk-at-5a595806db6311fb.md): Shopify Engineering · 2025-07-16 · Medium · 11 min read · LLMs, E-commerce, Model training, Inference & serving, Evaluation
  Shopify's Global Catalogue uses fine-tuned open-source vision LLMs (LLaVA 1.5 7B, then LLaMA 3.2 11B, now Qwen2VL 7B) to classify, extract attributes from, standardize and match billions of merchant product listings.
- [Clustering billions of products for agentic commerce with Catalog API](https://swe.quest/articles/clustering-billions-of-products-for-agentic-commerce-with-catalog-api-20619778c8b2f613.md): Shopify Engineering · 2026-06-17 · Medium · 13 min read · LLMs, E-commerce, Vector search, Algorithms, Evaluation
  Shopify's Catalog groups billions of merchant product listings under Universal Product Identifiers (UPIs) using a precision-first pipeline.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
