1. Background 1.1 Function Intent Recognition is a key link in Query's understanding. Its function is to understand the user's search intention and then guide subsequent search and sorting. The following figure shows the search online system workflow. Specifically for e-commerce

1. Background

1.1 Function

Intent recognition is a key link in Query's understanding. Its function is to understand the user's search intention and then guide subsequent search and sorting. The following figure shows the search online system workflow. Specifically for e-commerce applications, intention recognition is to predict what categories and intent intensity the product the user wants to browse when entering Query. In the Xingsheng Youxuan mini program, product search is the scene where users express their demands the most clearly. The effect of intention recognition directly affects users' experience of search and mini programs.

1.2 Challenge

Traditional intent recognition is achieved through statistics + rules: offline statistics on the purchase categories of historical Query, and the Query that meets certain conditions and its statistical intent are stored in the dictionary. Online Query matches historical Query by looking up dictionaries, associates statistical intent, and implements predictions. For example: When users search for "milk", the distribution of additional products is [l1: dairy products: 100%, l2: room temperature pure milk: 50%, low temperature pure milk: 20%,…]. This method can well reflect the intention distribution of historical Query. However, the way of looking up dictionaries lacks generalization. The number of historical Query in the dictionary is limited, and there are a large number of online Query that cannot be matched. For example, when searching for "pure milk" online, even if "milk" exists in historical statistics, it cannot match.

In order to achieve generalization, the industry usually regards intent identification as a multi-label classification problem, and uses model methods similar to ctr prediction to predict categories. Among them, the training data comes from the user's click/add purchase behavior, label: product category, feature: Query, and the model uses a multi-label classification model. Since intent identification is upstream of the online search system, prediction bias affects subsequent recalls and sorting. Therefore, this scenario has high requirements for the accuracy and recall rate of classification. This is a challenge for multi-label classification. Specifically for our product search, the challenges mainly come from:

  • The category system is complex

On the one hand, there are relatively large numbers of categories. The platform categories are divided into two levels, with the number of secondary categories close to 1,000. On the other hand, the intention categories are relatively scattered, such as: the products required by users who search for "snacks" may belong to multiple first-level categories: casual snacks, biscuits and candies, baking, and supplementary foods. This makes it difficult to achieve higher accuracy for classification models.

  • category system update

platform development, the types of goods sold continue to increase, and the categories of goods continue to expand. There has been no user behavior before for products in new categories. Therefore, statistics and models based on user behavior will mostly fail. In addition, unlike traditional e-commerce, Xingsheng Youxuan sells products with obvious seasonality, and certain categories of products may not appear on the platform for a long time and have no user behavior. When such products appear on the platform, there is a problem of cold start intent (i.e. category).

  • User behavior is not standardized

On the one hand, "unreasonable" click/add purchase. When the intelligence of no search system was weak in the early days, there was a certain amount of unreasonable user behavior in the search scenario. For example: searching for "women's clothing", the system displays users unreasonable products containing "pack" in the product name through the text matching of "pack", such as "Yili Classic Milk Box". The bad thing is that there are a certain number of users who purchase/click on similar products.

On the other hand, the search term is incorrect. When the error correction module does not work, if the intention can be correctly identified, the product required by the user can also be returned. For example, if query "Baishi" ("Pepsi") can recognize that the user's intention is a drink, it can also return the product " Pepsi " through the match.

2. Technical method

2.1 framework structure

Intention identification framework is the data layer, algorithm layer, and policy layer from bottom to top, as shown in the figure below.

We achieve verification and fusion of prediction results and confidence through multi-module to obtain the final result. As shown in the figure below, the intention classifier module has good generalization, can predict unstatistic Query, and can recall correct intentions outside of some statistics.Its main disadvantages are certainly misrecalled. Filtering recalls with a higher predicted score threshold can reduce misrecalls, but can lead to a large number of missed recalls. The nearest word index module realizes prediction through semantic association and statistical intent, which better alleviates the problem of insufficient recall. Both of the above modules rely on user behavior to associate Query with intent. The historical product indexing module abandons dependence on user behavior and directly establishes the relationship between Query and product categories. The recall deficiency is further compensated from another perspective. In addition, the category system and special Query are monitored through the intention monitoring module to further ensure the robustness of intention recognition.

2.2 core module

  • Intent classifier

We build text classifiers for primary and secondary categories based on neural network . In order to improve the accuracy of multi-label prediction as much as possible, two technologies are used on the basis of conventional neural networks. First, to address the problem of large numbers of classes, a hierarchical prediction path is constructed based on Hoffmann binary tree. In this way, while improving the accuracy, the model calculation efficiency is also improved, and the predicted calculation amount is reduced from C (i.e. number of categories) to log C. Second, there are fewer first-level categories and higher predictions; the other hand. Accordingly, the prediction results of the primary category are used to constrain the secondary category. This move can significantly improve the effectiveness of the prediction of the secondary category. The predicted output of the classifier includes the category and score. During the evaluation and debugging, it was found that it was difficult to achieve a double high by predicting probability threshold filtering. We choose to ensure accuracy first. Repair the recalls that were killed by manslaughtered through other modules.

  • Nearby Neighbor Search Word Index

Nearby Neighbor Search Word Index uses semantic matching to associate online Query with historical statistical Query, and then associate online Query with historical Query's statistical intentions to achieve category prediction. For example, online query " Yili Milk " semantics match historical query - "pure milk", "Anmuxi", and "classic", and the corresponding statistical intentions are l1: [Dairy products, Cultural and Sports Office], l2: [Room-temperature milk, low-temperature milk, room-temperature milk drink, books]. Categories with too low intention distribution (such as "cultural and sports office") are filtered out.

Here the key to ensuring the prediction effect is the accuracy of the semantics (model). Based on the consideration of short text and engineering efficiency of search terms, we chose Word2Vec as the language model to construct the training data of two corpus sequences: 1) Use the search session as the granularity splicing of search terms to form a sequence; 2) Click/add purchase search terms sequence associated with the same product name, and add the product name to the sequence. In the semantic quality evaluation of

, it was found that the model learned the semantics of user search terms and platform product names well (not affected by text similarity). For example: sim (pork, tenderloin) sim (pork, pork jerky ), sim: correlation function (i.e. vector product). The principle of semantic matching of

is to be better than nothing. Top-k semantic matching is performed with a higher correlation threshold. As long as it can be matched, historical Query and online Query must have a high semantic similarity. In addition, since there are sequences in the training data that contain both the wrong Query and the correct Query, such as "Bais" and " Pepsi ", this module can also realize the intent identification of wrong Query to a certain extent.

  • Historical Product Index

Historical Product Index establishes a product and search term association that does not depend on user behavior. First, use the full amount of goods sold historically to build an index. When predicting, use the search strategy of text subsequence matching to aggregate and count the categories of products retrieved online Query to achieve category prediction. The example is shown in the figure below. This search strategy is stricter for long text matching and looser for short text matching. Therefore, the prediction of long Query is more accurate; while there are many false recalls in the prediction of short Query. Therefore, we constrain Query word count to use historical product index to predict only if the Query word count exceeds 2.

historical product index is different from the first two modules, and its predictions do not depend on user behavior at all. Therefore, the problem of category cold start has been alleviated to a certain extent. In addition, establishing the relationship between Query and intention from another perspective plays a role in making up for the recall.

  • Filtering and Fusion

In module evaluation and fusion test, we compare multiple strategies. According to the characteristics of each module, the general principles of filtering and fusion were determined: the fusion and complementation of multiple modules ensure recall rate; strict screening within each module ensures accuracy.

In the multi-label classification prediction results, each output neuron has a predicted probability (i.e. prediction score), and the sum of the probabilities is 1. When only one tag is true, the predicted scores of the corresponding output neurons will be high (i.e. close to 1). When multiple tags are true, the probability of prediction for each tag is usually not very high, but the sum of predictions for all real tags will be high. Based on this feature, we set two thresholds, namely the single-label minimum threshold and the multi-label sum threshold. Only when the results that can satisfy the two thresholds can be retained. The accuracy of the semantic model of

ensures that as long as the semantic similarity can be found to be greater than a threshold, the search terms and statistical terms are 100% closely related. Therefore, we mainly choose and predict based on semantic similarity. In addition, categories with too small distribution values ​​of statistical intentions were filtered out. The prediction of the final output must be consistent with the statistical intent. The requirements for matching subsequences of

are relatively strict. Through offline evaluation, it is found that the category that accounts for a proportion exceeding a certain threshold must be the category of Query's intention. Therefore, we determine whether the prediction is credible through the category proportion. After the three modules of

are filtered through threshold values, they merge the prediction categories in union. The intention distribution is the mean predicted by each module.

  • Intent Monitoring

Intent Monitoring module has two main functions. First, monitor product categories. Product categories are infrastructure for intention identification, and a stable and standardized category system is the prerequisite for better intention identification. However, during the development of the platform, product categories are inevitably changed, such as the emergence of new categories and the change of category names. Changes will affect the effect of intention recognition. Therefore, it is necessary to monitor and discover changes. When a change in the name or attribution relationship of the first and second level categories is found, first confirm with the operation department, and then compatible with the changes through the mapping of new and old. Second, search terms are discovered, search terms with intentional value are discovered. Very rarely seen user behavior is ignored by statistics and models. However, very few behaviors may occur on new categories of goods. Capturing this type of behavior can detect some query associated with new categories, thereby alleviating the intent cold start problem. For example, the statistical intention of Query's "spoon" is "kitchen supplies", and related products do belong to this category. After the new product appeared - **Baby Spoon** (the category is "maternal and infant products"), very few users purchased the product when searching for "spoon". Therefore, Query's "spoon" intention should be supplemented with "maternal and infant supplies". In the data layer, the share of Query added purchases can reflect the share of Query added purchases for a certain category. We can discover some supplementary intentions by scanning the high proportion of query periodically.

3. Effectiveness evaluation

Intent recognition has been launched, and iterative optimization has played an important role in improving product search. The following figure lists the first online improvement and cumulative improvement of product search. The contribution of cumulative improvement is of course also from the optimization of other links of the search system.

4. Summary Outlook

search has a jargon, you will never know what users will search for. Iterative optimization of intention recognition is driven by continuous case analysis. We comprehensively use various technologies - data statistics, classification prediction, semantic search, historical matching, etc. to solve problems found in product operation, which is highly targeted and more applicable.

Next step, we will implement online prediction of intent recognition. At present, the implementation of intent recognition is to predict the historical query for nearly N days offline and cache the results. On the one hand, about 1% of online Query still cannot hit; on the other hand, a large number of caches have not actually hit, causing waste of space. Online prediction is a more reasonable way. Online prediction will put higher requirements on both efficient inference and version management of index models.

In addition, product search is a game of chess, and each link module will iterate and improve each other. Intent recognition will be further optimized according to the optimization of other links. For example, if you can have support for "Query extension" and "word weight", you can obtain Query synonyms and weighted participle features. Adding these features will also improve the accuracy of the intention classification model.