Scalable Approach for Normalizing E-commerce Text Attributes (SANTA)

Ravi Shankar Mishra, Kartik Mehta, Nikhil RasiwasiaACL 2021

TL;DR

This paper introduces SANTA, a novel framework for automatically normalizing diverse e-commerce product attribute values (like "Win 10 Pro") into a consistent set of canonical forms (like "Windows 10"). By combining a systematic study of string matching with a self-supervised learning approach using twin networks and triplet loss, SANTA significantly improves upon existing methods, particularly for distinguishing between semantically similar but distinct attribute values.

What Problem Does This Paper Address?

E-commerce platforms like Amazon host millions of products from various sellers. When sellers list products, they provide structured information, including product attributes (e.g., color, size, operating system). However, sellers often express these attributes using a wide variety of free-form text, leading to inconsistencies. For example, "HD," "1280 X 720," and "720p" all refer to the same screen resolution. This inconsistency hinders crucial e-commerce functionalities like search filtering, product comparison, and duplicate detection, ultimately impacting the customer experience. The core problem is to automatically map these diverse "surface forms" to a single, standardized "canonical form" for each attribute.

Methods

The authors tackle this problem in two main stages:

  1. Syntactic Matching Study: They conducted a comprehensive evaluation of nine different string similarity algorithms across three categories (edit distance, sequence-based, and token-based). Their analysis revealed that token-based methods, particularly "cosine similarity," performed best among string matching techniques, achieving a 2.7% improvement over the commonly used Jaccard index.
  2. Self-Supervised Embedding Learning (SANTA): Recognizing that string similarity alone isn't sufficient (e.g., "720p" and "HD" are semantically related but distinct), they propose SANTA. SANTA uses a twin network architecture with triplet loss to learn embeddings for attribute values. The key innovation is a self-supervised learning task:
  3. Triplet Generation: They create triplets of (anchor, positive, negative). The anchor is a surface form attribute value. The positive is the product title associated with that attribute. The negative is a randomly selected product title from the same category. This "hard negative" mining helps the model learn to distinguish between similar but distinct canonical forms.
  4. Twin Network: This network projects both surface forms and canonical forms into the same embedding space.
  5. Triplet Loss: This loss function encourages the embedding of the anchor (surface form) to be closer to the positive (product title) than to the negative (random title). This process helps learn embeddings that capture both semantic similarity and the ability to differentiate between closely related canonical forms. They also incorporate sub-word (n-gram) information into their embeddings, similar to fastText, to handle rare words and variations.

Datasets

  • Training Data: A dump of 100K products per attribute, totaling 5M records (50 attributes x 100K products), containing product titles and attribute values. This data was used to train unsupervised embeddings (word2vec, fastText). For SANTA, they generated 5M triplets from this data.
  • Test Data: A newly curated, real-world attribute normalization dataset. It consists of 2500 surface forms across 50 attributes, with each surface form manually mapped to one of the canonical forms or an "other" class. 38% of these surface forms were mapped to "other." This dataset was split into 20% for development and 80% for testing.

Key Insights and Ideas

  • Syntactic vs. Semantic: Simple string matching is good for exact or near-exact matches but struggles with semantic relationships (e.g., "ubuntu" vs. "linux"). Unsupervised embeddings (like fastText) capture semantics but can group semantically close canonical forms too tightly (e.g., "HD" and "Ultra HD").
  • The "Hard Negative" Advantage: Using a negative example from the same product category is crucial. It forces the model to learn finer distinctions than a completely random negative from a different category would.
  • Self-Supervision is Key: The ability to generate training data automatically (using product titles as proxies) is vital for scaling attribute normalization to thousands of attributes without manual labeling for every single one.
  • N-grams Matter: Incorporating sub-word information (n-grams) significantly improves performance, especially for handling rare attribute values and variations.

Key Results

  • String Similarity: Cosine similarity achieved the best accuracy (76.6%) among string similarity methods, outperforming Jaccard index by 2.7%.
  • Unsupervised Embeddings: fastText (65.7% accuracy) outperformed word2vec (48.4%), largely due to its n-gram handling.
  • SANTA Performance: SANTA (with n-grams) achieved the highest accuracy of 78.4%. This represents a 2.3% improvement over the best string similarity method (Cosine Similarity) and a substantial 19.3% improvement over the best unsupervised embedding method (fastText).
  • Qualitative Analysis: t-SNE visualizations showed that SANTA embeddings form more coherent clusters for canonical values and their corresponding surface forms compared to fastText, demonstrating its superior ability to distinguish between close canonical forms.

Limitations and Future Work

  • "Other" Class Handling: The paper notes that 38% of their curated dataset was mapped to an "other" class, indicating that many surface forms don't fit existing canonical values. SANTA's performance on these "other" cases is a point of interest.
  • Rare Surface Forms: SANTA, like other methods, can still struggle with very rare or malformed surface forms (e.g., "no assembly required, pre-aseembled").
  • Canonical Form Identification: The paper focuses on the mapping task. Identifying the list of canonical forms for a new attribute is left as future work.
  • Generalizability: While tested on 50 attributes across various categories, further validation on a broader range of attributes and categories would be beneficial.

Summary updated

BibTeX
@inproceedings{mishra2021scalable,
  author = {Ravi Shankar Mishra and Kartik Mehta and Nikhil Rasiwasia},
  title = {{Scalable Approach for Normalizing E-commerce Text Attributes (SANTA)}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
}
Figure