How to Grow a (Product) Tree: Personalized Category Suggestions for e C ommerce Type-Ahead (2020)

Abstract: In an attempt to balance precision and recall in the search page, leading digital shops have been effectively nudging users into select category facets as early as in the type-ahead suggestions. In this work, we present SessionPath, a novel neural network model that improves facet suggestions on two counts: first, the model is able to leverage session embeddings to provide scalable personalization; second, SessionPath predicts facets by explicitly producing a probability distribution at each node in the taxonomy path. We benchmark SessionPath on two partnering shops against count-based and neural models, and show how business requirements and model behavior can be combined in a principled way.

## introduction modern ecommerce search engines need to work on millions of products; in an effort to fight "zero result" pages, digital shops often sacrifice precision to increase recall foot_0 , relying on learn2rank @xcite to show the most relevant results in the top positions @xcite . while this strategy is effective in web search, when users rarely go after page one @xcite , it is only partially successful in product search: shoppers may spend time browsing several pages in the result set and re-order products based on custom criteria (figure 1 ); analyzing industry data, up to 20% of clicked products occur not on the first page, with re-ranking in approximately 10% of search sessions. leading ecommerce websites leverage machine learning to suggest facets -i.e. product categories, such as video games for "nintento switch" -during type-ahead (figure 2 ): narrowing down candidate products explicitly by matching the selected categories, shops are able to present less noisy result pages and increase the perceived relevance of their search engine. in this work we present session-path, a scalable and personalized model to solve facet prediction for type-ahead suggestions: given a shopping session and candidate queries in the suggestion dropdown menu, the model is asked to predict the best category facet to help users narrow down search intent. a big advantage of session-path is that it can complement any existing stack by adding facet prediction to items as retrieved by the type-ahead api. we summarize the main contributions of this work as follows: figure 2 : facet suggestions during type-ahead: shoppers can be nudged to pick a facet before querying, to help the search engine present more relevant results. by combining the predictions of the neural network with a decision module, we show how model behavior can be tuned in a principled way by human decision makers, without interfering with the underlying inference process or introducing ad hoc manual rules. to the best of our knowledge, sessionpath is the first type-ahead model that allows dynamic facet predictions: linguistic input and in-session intent are combined to adjust the target taxonomy depth (sport / basketball vs sport / basketball / lebron) based on real-time shopper behavior and model confidence. for this reason, we believe the methods and results here presented will be of great interest to any digital shop struggling to strike the right balance between precision and recall in a catalog with tens-of-thousands-to-millions of items. ## problem statement suggesting a category facet can be modelled with the help of few formal definitions. a target shop e has products p 1 , p 2 , ...p @xmath0.g. nike air max 97) and categories c 1,1 , c 1,2 , ...c n,@xmath1, where c n,m is the category n at depth m (e.g. at @xmath2, [soccer, volley, football, basketball], at @xmath3, pants, t-shirts], etc.); a taxonomy tree t m is an indexed mapping @xmath4, assigning a category to products for each depth m (e.g. air max 97 → 0 root, → 1 soccer, → 2 shoes, → 3 messi etc.); root is the base category in the taxonomy, and it is common to all products (we will omit it for brevity in all our examples). in what follows, we use path to denote a sequence of categories (hierarchically structured) in our target shop (e.g. root / soccer / shoes / messi), and nodes to denote the categories in a path (e.g. soccer is a node of soccer / shoes / messi). given a browsing session s containing products p x , p y , ...p z , and a candidate type-ahead query q, the model's goal is to learn both the optimal depth value m and, for each @xmath5, a contextual function f (q, s) → c k . as we shall see in the ensuing section, sessionpath solution to this challenge is two-fold: a model generating a path first, and a decision module to pick the appropriate depth m (figure 4 ). ## baseline and personalized models we approach the challenge incrementally, by first developing a count-based model (cm) that learns a mapping from queries to all paths (i.e. sport and sport / soccer are treated purely as "labels", so they are two completely unrelated target classes for the model); cm will both serve as a baseline for more sophisticated methods and as a fast reference implementation not requiring any deep learning infrastructure. we improve on cm with sessionpath, a model based on deep neural networks. from a product perspective, it is important to remember (figure 4 ) that a decision module is called after a path prediction is made: we discuss how to tune this crucial part after establishing the general performance of the proposed models. ## dataset we leverage behavioral and search data from two partnering shops in company's network: shop 1 and shop 2 have uniform data ingestion, making it easy to compare how well models generalize; they are mid-size shops, with annual revenues between 20 and 100 million dollars. shop 1 and shop 2 differ however in many respects: they are in different verticals (apparel vs home improvement), they have a different catalog structure (603 paths organized in 2-to-4 levels for each product vs 985 paths in 3 levels for all products), and different traffic (top 200k vs top 15k in the alexa ranking). descriptive statistics for the training dataset can be found in ## experiments we perform offline experiments using search logs for shop 1 and shop 2: for each search event in the dataset, we use products seen before the query (if any) to build a session vector as explained in section 5.2; the path of the products clicked after the query is used as the target variable for the model under examination. ## conclusions and future work this research paper introduced sessionpath, a personalized and scalable model that dynamically suggests product paths in type-ahead systems; session-path was benchmarked on data from two shops and tested against count-based and neural models, with explicit complexity-accuracy trade-offs. finally, we proposed a confidence-based decision rule inspired by customer discussions: by abstracting away model behavior in one parameter, we wish to solve the often hard interplay between business requirements and machine behavior; furthermore, by leveraging a hierarchical structure of product concepts, the model produces predictions that are suitable to a prima facie human inspection (e.g. figure 6 ). while our evaluation shows very encouraging results, the next step will be to a/b test the proposed models on a variety of target clients: shop 1 and shop 2 data comes from search logs of a lastgeneration search engine, which possibly skewed model behavior in subtle ways. with more data, it will be possible to extend the current work in some important directions: personalization engines for digital shops are expected to drive an increase in profits by 15% by the end of 2020 @xcite ; facet suggestions help personalizing the search experience as early as in the type-ahead drop-down window: considering that search users account globally for almost 14% of the total revenues @xcite , and that category suggestions may improve clickthrough-rate and reduce cognitive load, session-path (and similar models) may play an important role in next-generation online experiences.