Problem
An e-commerce catalog needs a measure of how similar two products are, for "similar items", price estimation of new listings or demand forecasting. Similarity depends on which attributes count: two identical shoes differ in price once the size changes. Pre-trained title embeddings (word2vec, BERT, doc2vec) may represent short, misspelled, technical or non-English titles poorly. Image similarity needs images that are present and of usable quality.
Example from the article: in the Kaggle Mercari Price Suggestion data (about 1.5 million listings), sellers type free-form titles and descriptions, so a title such as "speacker" is misspelled and descriptions can be empty.
Solution in brief
Train a regression network that predicts price from all product attributes. The vector learned inside it is the product representation. Read the product vector from the word embedding layer or from the concatenated layer and compare vectors with cosine similarity.
Questions this case answers
- How to build entity embeddings from mixed numeric, categorical and noisy text attributes when no similarity labels exist
- How to compare a new item whose text contains unseen tokens against an existing catalog using a learned representation
- How to get a numeric vector for every product in a catalog so that similar products can be found by cosine similarity?
- How to compare products that mix numeric, categorical and free-text attributes without hand-built feature rules?
Tools and methods
- Supervised proxy task (price regression) — makes the network learn which products are alike with respect to price. Demand forecasting is named as an alternative target.
- Embedding layers plus GRU/LSTM on words and characters — turn categorical and text inputs into vectors. Character level helps with typos.
- Concatenated layer — the first dense layer after merging all inputs, used as the product vector.
- Cosine similarity — compares product vectors.
- PyTorch, scikit-learn (PowerTransformer) — model and target transformation.
Google or a one-time email code. No password.