Extracting Shopping Interest-Related Product Types from the Web (2023)

Abstract: Recommending a diversity of product types (PTs) is important for a good shopping experience when customers are looking for products around their high-level shopping interests (SIs) such as hiking. However, the SI-PT connection is typically absent in e-commerce product catalogs and expensive to construct manually due to the volume of potential SIs, which prevents us from establishing a recommender with easily accessible knowledge systems. To establish such connections, we propose to extract PTs from the Web pages containing hand-crafted PT recommendations for SIs. The extraction task is formulated as binary HTML node classification given the general observation that an HTML node in our target Web pages can present one and only one PT phrase. Accordingly, we introduce TrENC, which stands for Tree-Transformer Encoders for Node Classification. It improves the inter-node dependency modeling with modified attention mechanisms that preserve the long-term sibling and ancestor-descendant relations. TrENC also injects SI into node features for better semantic representation. Trained on pages regarding limited SIs, TrEnc is ready to be applied to other unobserved interests. Experiments on our manually constructed dataset, WebPT, show that TrENC outperforms the best baseline model by 2.37 F1 points in the zero-shot setup. The performance indicates the feasibility of constructing SI-PT relations and using them to power downstream applications such as search and recommendation.

## introduction customers of e-commerce websites fall in various stages of the purchase funnel 1 in their journey to purchase specific products. while lower-funnel customers target specific products or product categories, a customer in the middle to upper funnel only has vague shopping interests (sis) and * all work performed while interning at amazon. 1 https://en.wikipedia.org/wiki/purchase_funnel ## related works web information extraction information extraction from the semi-structured web data is a long-studied topic @xcite @xcite . the works most relevant to ours are those on product attribute extraction @xcite @xcite @xcite . for example, @xcite train a bilstm-crf network @xcite for each attribute to locate its corresponding values on text sequences. @xcite scale it up by injecting the attribute name into the network as an attention objective. @xcite encode the dom tree with graph attention network @xcite to incorporate the dependencies between nodes. however, attribute extraction is different from our pt extraction task at two major points. first, attributes are typically extracted from product detail pages, each of which mentions multiple attributes; and the attribute name-value pairs cluster around titles, bullet points and descriptions. in contrast, a hub page generally focuses on a single si, with pts scattered throughout the page. unlike attribute extraction approaches that limit the searching scope to certain regions, the characteristics of hub pages require us to consider a page holistically instead of a small part. second, attribute extraction is performed as token-level entity recognition in previous works, while pt extraction requires a node-level classification, which prevents approaches for the former from being directly applied to the latter. to our best knowledge, no applicable dom node classification or similar dataset exists in openly available benchmarks such as ogb @xcite . ## problem setup we possess the dom tree of a web page associated with a given shopping interest c. the dom tree can be represented by a set of nodes @xmath0, v 2 , . . . , v |v| } as well as a set of edges @xmath1, e 2 , . . . , e |e| } that connect the parent and children nodes. |v| and |e| are the sizes of node and edge sets respectively. we aim to design a binary node classifier f : v∪e∪{c} → {0, 1} |v| to judge whether the text sequence in each node is a phrase representing a product type. the nodes with positive labels are referred to as "pt nodes" and the labels are denoted by y @xmath2, @xmath3: |v|. we focus our discussion on one dom tree and use @xmath4: |v| as its node index. ## method we propose trenc to model the dom tree of hub web pages for pt extraction. figure 2 shows the model architecture. we treat the problem as a dom node classification task that entails detecting whether its textual sequence defines a pt phrase. we first create a node representation that integrates three basic signals of a node that may be indicative of a pt ( § 4.1). we then adapt the transformer architecture by adding two attention mechanisms, namely path attention and sibling attention, that allow capturing of inter-node dependencies presented by their html structure ( § 4.2.1). we also include three kinds of positional encodings that assist the attention layers with the node's unique positional information within the dom tree ( § 4.2.2). finally, we integrate the outputs from the path and sibling attention layers, which are used in a classification layer to predict node labels ( § 4.2.3). the implementation details are in appendix b.1. ## evaluation in this section, we first describe a new dataset of interests and their associated webpages, specifically created to benchmark methods for the pt extraction problem. we then evaluate trenc on the same, pitting it against a range of applicable baselines. finally, we look at the effectiveness of various model components via ablation studies. ## conclusion in this paper, we consider a new problem of extracting product types from the web pages that are relevant to broad shopping interests such as camping. we model the problem as a node classification task and propose trenc, a transformer encoder-based model that leverages unique characteristics of dom trees to perform product type extraction. in addition to the node-level signals including html tags, text sequences and shopping interest semantics, trenc design path and sibling attention mechanisms based on dom tree's ancestor-descendant and sibling relations. together with the tree-based positional embeddings, the structural attention mechanisms promote the tree architecture understanding and make the classification more effective. zero-shot experiments on a new dataset trenc containing 95 shopping interests and 453 pages show that trenc outperforms the baseline graph encoding models. this work pushes the frountier of researches of a more organized and intuitive result recommendation for middle-funnel customers.