Abstract
E-commerce platforms categorize their products into a multi-level taxonomy tree with thousands of leaf categories. Conventional methods for product categorization are typically based on machine learning classification algorithms. These algorithms take product information as input (e.g., titles and descriptions) to classify a product into a leaf category. In this paper, we propose a new paradigm based on machine translation. In our approach, we translate a product's natural language description into a sequence of tokens representing a root-to-leaf path in a product taxonomy. In our experiments on two large real-world datasets, we show that our approach achieves better predictive accuracy than a state-of-the-art classification system for product categorization. In addition, we demonstrate that our machine translation models can propose meaningful new paths between previously unconnected nodes in a taxonomy tree, thereby transforming the taxonomy into a directed acyclic graph (DAG). We discuss how the resultant taxonomy DAG promotes user-friendly navigation, and how it is more adaptable to new products.
Introduction
E-commerce giants manage millions of products organized into deep, complex taxonomies that can span up to ten levels and thousands of leaf nodes. Traditionally, this organization is treated as a massive multi-class classification problem. However, this approach faces significant hurdles. Most notably, the "Long Tail" problem—where a small subset of categories contains the vast majority of products—makes it difficult for standard classifiers to learn effectively for sparse categories. Furthermore, traditional hierarchical classifiers suffer from error propagation, where a mistake at a high-level category is unrecoverable at lower levels.
The Machine Translation Paradigm
This research proposes a fundamental shift: treating product categorization as a Neural Machine Translation (NMT) task. In this framework, the product title serves as the "source language," and the sequence of tokens representing the path from the root to the leaf of the taxonomy serves as the "target language." For example, a title like "Mix Pancake Waffle 24 OZ" is translated into the sequence: Baking Supplies $\rightarrow$ Flour & Dough $\rightarrow$ Pancake & Waffle Mixes.
By treating the category path as a sentence, the model learns the "grammar" of the taxonomy—understanding the logical dependencies between parent and child nodes. The authors evaluated two primary NMT architectures: the Attentional Seq2Seq model and the Transformer, both of which are designed to capture complex dependencies in sequential data.
Taxonomy as a Sequence and DAG Evolution
A key insight of this approach is that a hierarchy is essentially a sequence with internal logic. Unlike traditional classifiers that are restricted to pre-defined leaf nodes, NMT models can generate novel paths by combining existing nodes in new ways. This capability allows the model to suggest connections that were not present in the original rigid tree structure.
This transformation from a tree to a Directed Acyclic Graph (DAG) allows products to exist in multiple logical locations, significantly improving user navigation and the taxonomy's adaptability to new product types.
Experimental Evaluation
The models were tested on two massive datasets from Rakuten: the RDC dataset (800,000 products) and the Ichiba dataset (100 million products). The NMT approach consistently outperformed CUDeep, a state-of-the-art classification system. On the Ichiba dataset, the Transformer model achieved a weighted F-score of 84.74, compared to the baseline's 82.05. Notably, the NMT models proved far more robust to data scarcity, maintaining high performance even when trained on only a fraction of the available data.
Conclusion
Framing product categorization as a translation task offers a robust, accurate, and flexible alternative to traditional classification. Beyond performance gains, this paradigm enables the automatic evolution of taxonomies into user-friendly DAGs and allows organizations to leverage existing high-performance NMT infrastructure, streamlining the machine learning pipeline for global e-commerce.
Summary updated