Improving Entity Recommendation with Search Log and Multi-Task Learning
Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence. Main track. Pages 4107-4114.
https://doi.org/10.24963/ijcai.2018/571
Keywords
- Natural Language Processing: Natural Language Processing
- Machine Learning: Transfer, Adaptation, Multi-task Learning
- Natural Language Processing: Information Retrieval
Abstract
Entity recommendation, providing search users with an improved experience by assisting them in finding related entities for a given query, has become an indispensable feature of today's Web search engine. Existing studies typically only consider the query issued at the current time step while ignoring the in-session preceding queries. Thus, they typically fail to handle the ambiguous queries such as "apple" because the model could not understand which apple (company or fruit) is talked about. In this work, we believe that the in-session contexts convey valuable evidences that could facilitate the semantic modeling of queries, and take that into consideration for entity recommendation. Furthermore, in order to better model the semantics of queries, we learn the model in a multi-task learning setting where the query representation is shared across entity recommendation and context-aware ranking. We evaluate our approach using large-scale, real-world search logs of a widely used commercial Web search engine. The experimental results show that incorporating context information significantly improves entity recommendation, and learning the model in a multi-task learning setting could bring further improvements.
- [Bar-Yossef and Kraus, 2011] Ziv Bar-Yossef and Naama Kraus. Context-sensitive query auto-completion. In WWW, pages 107-116, 2011.
- [Bi et al., 2015] Bin Bi, Hao Ma, Bo-June (Paul) Hsu, Wei Chu, Kuansan Wang, and Junghoo Cho. Learning to rec- ommend related entities to search users. In WSDM, pages 139-148, 2015.
- [Blanco et al., 2013] Roi Blanco, Berkant Barla Cam- bazoglu, Peter Mika, and Nicolas Torzec. Entity recom- mendations in web search. In ISWC, pages 33-48, 2013.
- [Bordes et al., 2012] Antoine Bordes, Xavier Glorot, Jason Weston, and Yoshua Bengio. Joint learning of words and meaning representations for open-text semantic parsing. In AISTATS, pages 127-135, 2012.
- [Burges et al., 2005] Chris Burges, Tal Shaked, Erin Ren- shaw, Ari Lazier, Matt Deeds, Nicole Hamilton, and Greg Hullender. Learning to rank using gradient descent. In ICML, pages 89-96, 2005.
- [Cao et al., 2008] Huanhuan Cao, Daxin Jiang, Jian Pei, Qi He, Zhen Liao, Enhong Chen, and Hang Li. Context- aware query suggestion by mining click-through and ses- sion data. In SIGKDD, pages 875-883, 2008.
- [Caruana, 1997] Rich Caruana. Multitask learning. Mach. Learn., 28(1):41-75, 1997.
- [Collobert et al., 2011] Ronan Collobert, Jason Weston, Léon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. Natural language processing (almost) from scratch. J. Mach. Learn. Res., 12:2493-2537, 2011.
- [Dehghani et al., 2017] Mostafa Dehghani, Sascha Rothe, Enrique Alfonseca, and Pascal Fleury. Learning to attend, copy, and generate for session-based query suggestion. In CIKM, pages 1747-1756, 2017.
- [Dong et al., 2015] Daxiang Dong, Hua Wu, Wei He, Dian- hai Yu, and Haifeng Wang. Multi-task learning for multi- ple language translation. In ACL, pages 1723-1732, 2015.
- [Fernández-Tobías and Blanco, 2016] Ignacio Fernández- Tobías and Roi Blanco. Memory-based recommendations of entities for web search users. In CIKM, pages 35-44, 2016.
- [Friedman, 2000] Jerome H Friedman. Greedy function ap- proximation: a gradient boosting machine. Annals of Statistics, 29:1189-1232, 2000.
- [Gao et al., 2010] Jianfeng Gao, Xiaodong He, and Jian- Yun Nie. Clickthrough-based translation models for web search: from word models to phrase models. In CIKM, pages 1139-1148, 2010.
- [Hochreiter and Schmidhuber, 1997] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997.
- [Hu et al., 2015] Sha Hu, Zhicheng Dou, Xiaojie Wang, Tet- suya Sakai, and Ji-Rong Wen. Search result diversifica- tion based on hierarchical intents. In CIKM, pages 63-72, 2015.
- [Huang et al., 2016] Jizhou Huang, Shiqi Zhao, Shiqiang Ding, Haiyang Wu, Mingming Sun, and Haifeng Wang. Generating recommendation evidence using translation model. In IJCAI, pages 2810-2816, 2016. IJCAI
- [Huang et al., 2017] Jizhou Huang, Wei Zhang, Shiqi Zhao, Shiqiang Ding, and Haifeng Wang. Learning to explain entity relationships by pairwise ranking with convolutional neural networks. In IJCAI, pages 4018-4025, 2017. IJCAI
- [Huang et al., 2018] Jizhou Huang, Shiqiang Ding, Haifeng Wang, and Ting Liu. Learning to recommend related en- tities with serendipity for web search users. ACM Trans. Asian Low-Resour. Lang. Inf. Process., 17(3):25:1-25:22, April 2018.
- [Jansen et al., 2007] Bernard J. Jansen, Amanda Spink, Chris Blakely, and Sherry Koshman. Defining a session on web search engines. J. Am. Soc. Inf. Sci. Technol., 58(6):862-871, 2007.
- [Järvelin and Kekäläinen, 2002] Kalervo Järvelin and Jaana Kekäläinen. Cumulated gain-based evaluation of IR tech- niques. ACM Trans. Inf. Syst., 20(4):422-446, 2002.
- [Li et al., 2014] Xiujun Li, Chenlei Guo, Wei Chu, Ye-Yi Wang, and Jude Shavlik. Deep learning powered in- session contextual ranking using clickthrough data. In NIPS, 2014.
- [Linden et al., 2003] Greg Linden, Brent Smith, and Jeremy York. Amazon.com recommendations: Item-to-item col- laborative filtering. IEEE Internet computing, 7(1):76-80, 2003.
- [Liu et al., 2015] Xiaodong Liu, Jianfeng Gao, Xiaodong He, Li Deng, Kevin Duh, and Ye-Yi Wang. Representa- tion learning using multi-task deep neural networks for se- mantic classification and information retrieval. In NAACL, pages 912-921, 2015.
- [Mitra, 2015] Bhaskar Mitra. Exploring session context us- ing distributed representations of queries and reformula- tions. In SIGIR, pages 3-12, 2015.
- [Radlinski and Dumais, 2006] Filip Radlinski and Susan Dumais. Improving personalized web search using result diversification. In SIGIR, pages 691-692, 2006.
- [Sarwar et al., 2001] Badrul Sarwar, George Karypis, Joseph Konstan, and John Riedl. Item-based collaborative filter- ing recommendation algorithms. In WWW, pages 285- 295, 2001.
- [Shen et al., 2005] Xuehua Shen, Bin Tan, and ChengXiang Zhai. Context-sensitive information retrieval using im- plicit feedback. In SIGIR, pages 43-50, 2005.
- [Sordoni et al., 2015] Alessandro Sordoni, Yoshua Bengio, Hossein Vahabi, Christina Lioma, Jakob Grue Simon- sen, and Jian-Yun Nie. A hierarchical recurrent encoder- decoder for generative context-aware query suggestion. In CIKM, pages 553-562, 2015.
- [White et al., 2007] Ryen W. White, Mikhail Bilenko, and Silviu Cucerzan. Studying the use of popular destinations to enhance web search interaction. In SIGIR, pages 159- 166, 2007.
- [Xiang et al., 2010] Biao Xiang, Daxin Jiang, Jian Pei, Xi- aohui Sun, Enhong Chen, and Hang Li. Context-aware ranking in web search. In SIGIR, pages 451-458, 2010.
- [Xie et al., 2016] Ruobing Xie, Zhiyuan Liu, Jia Jia, Huanbo Luan, and Maosong Sun. Representation learning of knowledge graphs with entity descriptions. In AAAI, pages 2659-2665, 2016.
- [Yang et al., 2016] Zichao Yang, Diyi Yang, Chris Dyer, Xi- aodong He, Alex Smola, and Eduard Hovy. Hierarchical attention networks for document classification. In NAACL, pages 1480-1489, 2016.
- [Yu et al., 2014] Xiao Yu, Hao Ma, Bo-june Paul Hsu, and Jiawei Han. On building entity recommender systems us- ing user click log and freebase knowledge. In WSDM, pages 263-272, 2014.
- [Zhu et al., 2014] Yadong Zhu, Yanyan Lan, Jiafeng Guo, Xueqi Cheng, and Shuzi Niu. Learning for search result diversification. In SIGIR, pages 293-302, 2014.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
Over the past few years, major commercial Web search engines have enriched and improved user experience of information retrieval by proactively presenting related entity recommendations for a query along with the regular Web search results. Figure 1 shows an example of Baidu 1 Web search engine's entity recommendation results for the query "Chicago" presented on the right panel of its Web search result page. 2
Existing studies [Blanco et al., 2013; Yu et al., 2014; Bi et al., 2015; Huang et al., 2018] in entity recommendation typically consider the query being issued at each time step independently, while ignoring the in-session context queries. A main common drawback of these approaches is that they cannot handle well the ambiguous queries, because they do not have informative evidences other than the query itself for disambiguating the meaning of entities with the same surface form. Therefore, existing entity recommendation systems tend to recommend entities with regard to the frequently asked meaning. We believe that in-session preceding context queries are valuable evidences to tackle this problem. First, the contexts convey additional insights into a user's current information need, which enables us to provide the user with more relevant entity recommendations for ambiguous queries. For example, a user's search intent behind the query "Chicago" could be either a city, a movie or a rock band. Without context information, the entities recommended for this query are mainly based on its most frequent meaning, as shown in Figure 1. However, if a query "Dreamgirls" is submitted before "Chicago" by the user, it is very likely that the user is interested in the movie rather than the city. Second, our empirical study on a sample of search logs reveals that contexts can also be beneficial for adapting recommendations to individual search needs, thus providing personalized entity recommendations. For example, if the preceding queries issued by a user before "James Cameron" are movies such as "Avatar" and "Titanic", it is observed from the subsequent search behaviors that she is more interested in the movies related to "James Cameron". In comparison, if the preceding queries are celebrities, she is more interested in the celebrities related to "James Cameron".
∗Corresponding author.
1 https://www.baidu.com/
2 We translate the example from Chinese to English for the sake of understanding.




Recently, in order to take into account the in-session context queries, Fern´andez-Tob´ıas and Blanco [2016] proposed a set of memory-based methods that exploit user behaviors in search logs to recommend related entities for a user's full search session. However, these methods purely rely on the users' past behaviors that have been observed in search logs. Therefore, they inevitably suffer from data sparsity and cold start problems, especially for less popular queries and newly introduced entities due to no user behaviors being observed for them.
In this paper, we study the problem of context-aware entity recommendation, and investigate how to use the preceding queries as contexts to improve the recommendation quality. Our approach is based on neural networks, which maps both queries and candidate entities to be recommended into vector space. On top of that, we use attention mechanism to selectively use the in-session preceding context queries to address the ambiguous problem. Furthermore, we improve the model by using a multi-task learning framework, in order to take advantage of the large amounts of cross-task data. Specifically, our multi-task DNN is trained jointly on the tasks of contextaware ranking using click-through data and entity recommendation using entity click logs.
We evaluate our approach using large-scale, real-world search logs of a widely used commercial Web search engine. Experimental results show that incorporating in-session preceding queries significantly improves the performance of entity recommendation. Moreover, the performance is further improved through multi-task learning.
2 Approach
In this section, we formalize the problem, and then detail our approach.
2.1 ProblemDefinition
Context-Aware Entity Recommendation
In Web search, given a query qt, the task of entity recommendation [Yu et al., 2014; Huang et al., 2018] is defined as finding a ranked list of entities Et = {e1, e2, · · · , eh} related to qt. Traditional recommendation approaches are typically insensitive to the contexts since they only use the current query qt for generating related entities. In this work, we study context-aware entity recommendation by taking into account the context information. Specifically, given a query qt, its context Ct, and a set of related entities Et, our task is to rank the entities in Et based on the signals derived from both qt and Ct. In this paper, we assume that the set of entities Et of qt is given. In our experiments, Et is generated by the entity recommendation approach currently employed in a commercial Web search engine (denoted by Production).
A search session is a period of time which consists of "a sequence of interactions" for the same information need [Shen et al., 2005]. In a search session, a user may interact with the search engine several times. During the interactions, the user would modify her query to achieve desired results for related information needs. Therefore, for the current query qt (except for the first query in a session, i.e., t ̸= 0), there is a query history Ct = q1, q2, · · · , qt-1 associated with it, which consists of a sequence of preceding queries issued by the user within the same session. In this paper, we consider Ct as the context of the query qt. Such context information is directly related to the current information need of the user, and is expected to be useful for improving entity recommendation relevance of the current query.
The proportion of sessions in which more than one query was issued is usually not small. Bar-Yossef and Kraus [2011] found that 49% of the queries were preceded by one or more queries in the same session. Xiang et al. [2010] reported that about 50% of sessions contain more than one query. We also empirically study a large-scale search log of a commercial Web search engine, which contains 0.42 billion search sessions. Statistics show that 52.61% of the sessions have two or more queries, indicating the substantial potential of using in-session preceding queries as context to improve recommendation quality.
Multi-Task Learning
We also study the problem in a multi-task learning framework, where we consider context-aware ranking as an auxiliary task. Context-aware ranking [Shen et al., 2005; Xiang et al., 2010] is defined as ranking the set of documents Dt = {d1, d2, · · · , dw} retrieved for a given query qt based on the signals derived from both qt and its context Ct (e.g., preceding queries and/or click-through data) in the same session. The key intuition for using multi-task learning is threefold. First, the two tasks are closely related in Web search and the representations of input queries and contexts can be naturally shared across them. Second, the amount of search logs of context-aware ranking is much larger than that of contextaware entity recommendation. Therefore, it is reasonable to improve entity recommendation by leveraging the abundant search logs of context-aware ranking task in a multi-task learning framework. Third, the clicked documents are helpful in understanding users' search intents behind a query under variant contexts, which can be beneficial to entity recommendation in a multi-task learning framework. For queries with ambiguous or underspecified intents, search results returned by the major commercial Web search engines are often highly diversified [Radlinski and Dumais, 2006; Zhu et al., 2014; Hu et al., 2015] to cover multi-faceted information needs of users. By contrast, the entity recommendation results currently returned for such queries are generally less diverse than the search results, and cannot cover as many intents as possible behind these queries. Therefore, compared with entity recommendation results, it is easier for users to find the desired search results that fulfill their information needs for ambiguous queries. Take the ambiguous query "Chicago" as an example, which may have multiple possible search intents such as city, film, musical, university, travel, and band. Figure 2 shows several clicked results for this query under variant contexts. It shows that the users succeed in finding satisfied search results for this query under both contexts, but fail to find desired entity recommendation results for the less frequent or rare meanings (film or musical) of "Chicago" under the context "Dreamgirls". Intuitively, the clicked documents can be used to infer precise search intents behind a query under a wide variety of contexts, which in turn could help to improve the entity recommendation task.
| Query: Chicago | |
| Context 1: Los Angeles ⇒ Seattle | |
| Clicked Documents: | Chicago (city) Baidu Baike Chicago Travel Guide Baidu Tourism |
| Clicked Entities: | NewYork City, Boston |
| Context 2: Dreamgirls | |
| Clicked Documents: | Chicago (musical) Baidu Baike Chicago (Douban) Douban Movie |
| Clicked Entities: | N/A |
2.2 Basic Entity RecommendationModel
We map both queries and the candidate entities to be recommended to the same vector space, and use vector-based similarity to measure the semantic relevance between a query and an entity. We use a bidirectional LSTM (BiLSTM) [Hochreiter and Schmidhuber, 1997] to encode the query. First, given a query q = [w1,w2, · · · ,wn], the words in q are transformed into vector representations via word embedding matrix, which capture semantic information of words. Then, a forward LSTM and a backward LSTM are employed to map q to a sequence of hidden states [-→h 1, -→h 2, · · · , -→h n] and [←- h n, ←- h n-1, · · · , ←- h 1], respectively. Finally, the hidden states -→h n and ←- h n are concatenated as the encoding vector of q: hn = [-→h n; ←- h n]. In this way, we can obtain the representation of qt, which we denote by vq. We also embed each entity to the vector space. We denote ve as the semantic representation of entity e. In this work, we regard an entity as an unique item, which is represented as a continuous vector in the entity embedding matrix. The entity representation could be further improved through taking into account the entity descriptions as suggested in [Xie et al., 2016], which we leave as a future work.
The similarity between a query q and an entity e is computed by cosine similarity:
The parameters of this model could be learned using pairwise learning to rank paradigm [Burges et al., 2005] and stochastic gradient descent. Given a training set Tq, the learning objective is to learn a scoring function f(q, e) that minimizes the negative log likelihood of the clicked entities:
where e+ is the clicked entity, and the probability of e+ is computed by:
where E is the set of related entities of q, and γ is a tuning factor determined on held-out data.
2.3 Improved with Contexts from Search Log
In this subsection, we describe our strategy that incorporates the in-session preceding queries as contexts to improve entity recommendation. Our intuition is to get a context-aware query representation that is enhanced by the context. To obtain the representation vc of context c, we first encode each query in c using the above-mentioned BiLSTM, and get a sequence of encoded queries vtc = [vq1 , vq2 , · · · , vqt-1 ]. Then, we use an attention-based weighted average [Yang et al., 2016] to generate a fixed length vector vc from vtc , which is computed by:
where the attention weight αi is computed by:
where the latent vector va is a trainable parameter and learned during training.
We get a context-aware query representation vs from the concatenation of vc and vq by a fully connected layer. Then, the similarity between qt, c and e is calculated by:
where vm is the task-specific representation of qt and c, which is computed from vs by a fully connected layer.
2.4 Improved withMulti-Task Learning
Multi-task learning is an approach of training multiple tasks in parallel while using a shared representation for knowledge transfer [Caruana, 1997], which has been shown to improve generalization by exploiting the relatedness across tasks. In this paper, we investigate the possibility of leveraging training data collected for the context-aware ranking task to improve the main task of context-aware entity recommendation.
The objective of context-aware ranking is to measure the relevance between a document d and a query qt with its context c. We use bidirectional LSTM to model both queries and documents. To speed up training with large-scale data, we use document titles instead of entire documents following [Gao et al., 2010] in our experiments. The relevance between qt, c and d is calculated by:
where vd is the representation of document d, and vr is the task-specific representation of query qt and context c, which is computed by a fully connected layer from the shared representation vs.
Figure 3 shows the architecture of the proposed multi-task DNN model, in which the layers for learning query and context representations are shared across the two tasks (as illustrated in the left part) while other layers are task-specific (as illustrated in the right part). The shared representations are Query and context representations shared across two tasks Context-aware ranking for Web Search Context-aware entity recommendation trained by the multi-task objective to capture the essential characteristics of contexts and queries, whereas the representations of documents and entities are learned by optimizing the task-specific objectives. In the right part, given a query and its context, the conditional probabilities of an entity and a document are estimated by Equations 7 and 8, respectively.

The parameters of the proposed model are estimated using stochastic gradient descent as described in Algorithm 1. We employ pairwise learning to rank paradigm for both tasks, and the loss functions are the same as Equation 2. We use 2-layer BiLSTM with 128 hidden units. The dimensions of word embeddings, query embeddings, document embeddings, and entity embeddings are set to 256. The mini-batch size is set to 512. The learning rate is initially set to 0.1, which is decayed by a factor of 0.9 after every 10 epochs.
Algorithm 1 Training the multi-task DNN model
- 1: Initialize model Θ randomly
- 2: for iteration in 1 · · · I do
- 3: Randomly select a task T (context-aware ranking or entity recommendation)
- 4: Select a random training example for task T
- 5: Compute loss for task T
- 6: Compute gradient ∇(Θ)
- 7: Update Θ by taking a gradient step with ∇(Θ)
- 8: end for
2.5 Improved Entity RecommendationModels
After training the multi-task DNN model, we can use it to compute a similarity score between qt, Ct and each entity ec ∈ Et. We investigate two approaches of using the similarity score to build the final context-aware entity recommendation model, either as an individual ranking model or as a feature in a baseline learning to rank framework.
As an Individual Ranking Model
The entities in Et can be ranked only by comparing the similarity score between each entity ec ∈ Et and qt with or without Ct. We use the following three models to rank the entities.
- ER This model only considers the current query in generating entity recommendations, which is a contextinsensitive model as described in subsection 2.2.
- ER-C This model uses the in-session preceding queries as contexts to improve entity recommendation, which is a context-aware model as described in subsection 2.3.
- ER-C-MT This is the multi-task DNN model that utilizes context information from the context-aware ranking task to improve entity recommendation, as described in subsection 2.4.
As a Feature in a Learning to Rank Framework
The similarity score computed by the above-mentioned models can also be used as a feature in a learning to rank framework. To study the effect of introducing the contextual feature, we employ a set of non-contextual features to train a context-insensitive entity recommendation model denoted by LTR and use it as a baseline. This baseline is a competitive model comprising features that have been shown to be effective and strong signals for entity recommendation [Bi et al., 2015]. We omit the description of these features due to space constraints, please refer to [Bi et al., 2015] for more details.
The following three learning to rank models with different similarity features are implemented for comparison.
- LTR-ER This model is trained with all LTR features and the similarity feature computed by ER.
- LTR-ER-C This model is trained with all LTR features and the similarity feature computed by ER-C.
- LTR-ER-C-MT This model is trained with all LTR features and the similarity feature computed by ER-C-MT.
In our experiments, we use stochastic Gradient Boosted Decision Tree (GBDT) [Friedman, 2000] as the learning to rank framework. The parameters of GBDT are tuned using separate training set and validation set.
3 Experiments
3.1 Data Sets and EvaluationMetrics
We evaluate our methods using large-scale, real-world data sets collected from a commercial Web search engine.
First, we collect the training data for context-aware ranking task by extracting the search sessions 3 which contain more than one query and impose the following constraints. Given a session that consists of t (t > 1) queries q1, q2, · · · , qt, a training example (Ci, qi,Di) is generated such that a document d+i was clicked on for a query qi (i > 1 and i ≤ t), where Ci is the query history before qi, i.e., q1, · · · , qi-1, and Di is a list of documents that includes d+i (positive example) and K randomly-sampled non-clicked documents {d-k }k=1,··· ,K (negative examples). 4 This results in the training data Tr = {(Ci, qi,Di)} consisting of 26,426,495 examples. Tr was randomly split into training set T l r (80%), validation set T v r (10%), and test set T t r (10%).
Second, we use the same method and search sessions to extract training data for learning representations of queries and entities for entity recommendation task. This results in the training data Te = {(Cj , qj , Ej )} consisting of 8,821,550 examples, where Ej is a list of entities that includes e+j and L randomly-sampled non-clicked entities {d-l }l=1,··· ,L. 5 Te was randomly split into training set T l e (80%) and validation set T v e (20%). T l e is used to train ER-C. The data set obtained by removing contexts from T l e is used to train ER. T l e and T l r are used to train the multi-task DNN model ER-C-MT.
Existing entity recommendation systems tend to recommend entities for ambiguous queries with regard to the frequently asked meaning of them as we discussed in Section 1. Therefore, there may be imbalance in the data set Te for frequent and rare meanings of ambiguous queries, especially for the rare meanings of such queries that have no entity clicks.
3 We completely anonymized the user data, and then segmented each user's stream into sessions using a commonly used rule [White et al., 2007; Jansen et al., 2007], i.e., a boundary between two sessions was set by user inactivity (either no query or no click) for more than 30 minutes. In our experiments, the search sessions were sampled from a 3-month period of a commercial Web search engine.
4 We set K=3 in our experiments.
5 We set L=3 in our experiments.
To conduct better evaluation, we need a data collection approach which can alleviate this problem to some extent. Although manually labeling the relevance of each recommended entity w.r.t. both a given query and its preceding queries is a straightforward way, there are two concerns. First, it is expensive and limited in quantity. Second, the relevance judged by annotators may not be consistent with that inferred from the observed behaviors of real search users. Therefore, we decide to build the test set and evaluate the performance of our methods by using real click data.
We collect this data by using online sampling method. Specifically, given a query qs which has at least one preceding query as its context Cs, we randomly select a list of entities from the set of candidate entities 6 of qs as recommendations to a user when she searches for qs. During the procedure, whether the user clicks a recommended entity after she searches for qs under the context Cs is logged. We sample a small portion of queries and search users for testing and run the procedure during a 15-day period. In this way, we can obtain a data set consisting of (Cs, qs,Es), where Es = {(eo, co)}, and co is the aggregated clicks of an entity eo clicked on query qs under the context Cs. To conduct fair evaluation, a sample (Cs, qs, Es) would be filtered if the aggregated clicks in Es are all the same, since it is useless for evaluating a ranking model. This results in a data set T = {(Cs, qs,Es)} consisting of 8,402,881 examples. T was randomly split into training set Tl (80%), validation set Tv (10%), and test set Tt (10%). Tl and Tv are used to train and tune all learning to rank models, while Tt is used to evaluate all entity recommendation models.
We employ NDCG [J¨arvelin and Kek¨al¨ainen, 2002] to evaluate our methods, which is a commonly used metric for evaluating ranked results in information retrieval.
3.2 Baseline Method
To evaluate our proposed model, we use the memory-based approach proposed by [Fern´andez-Tob´ıas and Blanco, 2016] as baseline method (denoted by MBR) for comparison. 7 This method is based on nearest neighbors collaborative filtering [Sarwar et al., 2001; Linden et al., 2003] and purely relies on user behaviors in search logs to recommend related entities for a user's full search session. The probability of an entity e being relevant for a session s is estimated by:
where E(s) is the set of clicked entities in session s. P(e|¯ e) captures the similarity between a pair of entities and is estimated by co-occurrence of entities in search sessions using Jaccard's coefficient. P(¯ e|s) estimates how relevant the clicked entity ¯ e is in session s and is computed by:
where P(¯ e|q, s) is the importance of ¯ e for query q, and P(q|s) is the query likelihood of q in session s.
6 Top-ranked 100 entities generated by Production are used here.
7 The baseline model is trained on T l e and evaluated on Tt.
| NDCG@1 | NDCG@5 | NDCG@10 | |
|---|---|---|---|
| MBR | 0.0194 | 0.0444 | 0.0641 |
| ER | 0.0203 | 0.0454 | 0.0663 |
| ER-C | 0.0206 | 0.0455 | 0.0675 |
| ER-C-MT | 0.0216 | 0.0504 | 0.0710 |
| LTR | 0.1219 | 0.2103 | 0.2502 |
| LTR-ER | 0.1332 | 0.2261 | 0.2665 |
| LTR-ER-C | 0.1386 | 0.2324 | 0.2728 |
| LTR-ER-C-MT | 0.1461▲ | 0.2438▲ | 0.2834▲ |
3.3 Results and Analysis
We report empirical results and analysis in this subsection. We perform 10-fold cross validation and test for statistical significance using a paired two-tailed t-test. In each table, we depict statistical significance of the best result over all other results in the same column with p < 0.01 by ▲. Boldface indicates the highest score w.r.t. each metric.
We first evaluate whether our model can improve entity recommendation performance. From the evaluation results in Table 1, we observe that: 1) ER, ER-C, and ER-C-MT all perform better than the baseline model MBR. This demonstrates the superior performance of neural network based models; 2) both ER-C and ER-C-MT outperform ER, which indicates that preceding queries are useful for improving entity recommendation relevance of the current query; 3) both LTR-ER-C and LTR-ER-C-MT significantly outperform LTR and LTRER, which demonstrates that context information can significantly help to improve the performance of entity recommendation; and 4) ER-C-MT significantly outperforms ER-C, and LTR-ER-C-MT significantly outperforms LTR-ER-C, which shows the effectiveness of the multi-task objective (including both context-aware ranking and entity recommendation) over the single-task objective (only entity recommendation).
Then, we investigate the effect of context length on the performance of our model. Following [Sordoni et al., 2015; Dehghani et al., 2017], we separate the test set Tt into three categories: 1) contexts with 1 query (short) 17.81% of Tt; 2) contexts with 2-3 queries (medium) 28.31% of Tt; and 3) contexts with >3 queries (long) 53.88% of Tt. Table 2 shows the performance of each model in terms of NDCG@10 on contexts with different lengths. 8 From the results, we observe that: 1) LTR-ER-C-MT robustly performs best across the test sets with variant context lengths, which further confirms the effectiveness of our model; 2) ER-C-MT significantly outperforms ER-C, and LTR-ER-C-MT significantly outperforms LTR-ER-C. This shows the effectiveness of the proposed multi-task DNN on different context lengths; and 3) it seems that all our context-aware models (ER-C, ER-CMT, LTR-ER-C, and LTR-ER-C-MT) achieve better results on short and medium contexts than that on long contexts. A possible reason is that information needs are topically broad or there exists topic drifts within long sessions, making it difficult to model the relevance between queries in such sessions. However, MBR achieves the best result on long contexts among all the contexts, and it also obtains the best performance on long contexts in comparison with ER, ER-C, and ER-C-MT. The main reason is that the method used by MBR to model topic drift within a session is highly time-sensitive, which assumes that the queries issued earlier are likely to be less representative of the current user task. As a result, queries that are issued too far away from the current query will be considered as non-relevant and discarded.
8 We omit NDCG@1 and NDCG@5 due to space constraints. Statistics show that LTR-ER-C-MT also significantly outperforms all other models in terms of both NDCG@1 and NDCG@5.
| Short | Medium | Long | |
|---|---|---|---|
| MBR | 0.0538 | 0.0618 | 0.0690 |
| ER | 0.0688 | 0.0689 | 0.0641 |
| ER-C | 0.0704 | 0.0705 | 0.0648 |
| ER-C-MT | 0.0752 | 0.0741 | 0.0679 |
| LTR | 0.2553 | 0.2648 | 0.2409 |
| LTR-ER | 0.2715 | 0.2824 | 0.2566 |
| LTR-ER-C | 0.2776 | 0.2898 | 0.2624 |
| LTR-ER-C-MT | 0.2883▲ | 0.3016▲ | 0.2722▲ |
To better illustrate the effectiveness of context information, we show several examples of LTR-ER-C-MT (context-aware model) and LTR (context-insensitive model) in Figure 4. We can see that the entity recommendations generated by LTRER-C-MT are better than those generated by LTR, because they are relevant to both the query and the context.
Finally, we also empirically investigate whether the model trained with the multi-task objective can improve the performance of context-aware ranking. To this end, we trained a single-task DNN model CR-ST on the same training set T l r using the single-task objective (only context-aware ranking). We evaluated ER-C-MT and CR-ST on the same test set T t r . The results in Table 3 show that ER-C-MT significantly
Query and Context
Query: A Song of Ice and Fire
Context: Maisie Williams ⇒ Rose Leslie
Entity Recommendations
LTR: Westworld, Game of Thrones, House of Card, Nip/Tuck, Frozen
LTR-ER-C-MT: Isaac Hempstead-Wright, Carice van Houten, Iwan Rheon, Liam Cunningham, Peter Dinklage
Query and Context
Query: Florence
Context: Soccer Players ⇒ Roberto Baggio
Entity Recommendations
LTR: Vatican City, Pompeii, Rome, Metropolitan City of Florence, San Gimignano
LTR-ER-C-MT: A.C. Milan, A.S. Roma, Inter Milan,
A.C. ChievoVerona, Real Madrid C.F.
Figure 4: The entity recommendations generated by different methods on the test queries with contexts taken from search logs.
| NDCG@1 | NDCG@5 | NDCG@10 | |
|---|---|---|---|
| CR-ST | 0.2735 | 0.4849 | 0.5860 |
| ER-C-MT | 0.2742▲ | 0.4856▲ | 0.5867▲ |
outperforms CR-ST. This indicates that the task of contextaware ranking can also benefit from the regularization effect of multi-task learning, which helps to reduce overfitting of the learned representations to a specific task [Liu et al., 2015].
4 RelatedWork
Previous work that is the closest to our task is the task of entity recommendation, e.g., [Blanco et al., 2013; Yu et al., 2014; Bi et al., 2015; Huang et al., 2018]. However, none of them are context-aware in that they do not take into account the in-session preceding queries as context. By contrast, the task of context-aware entity recommendation requires to consider and understand the context information, and use it effectively in entity recommendations. Huang et al. [2016; 2017] proposed to enhance the understandability of entity recommendations by captioning the results. However, they were also insensitive to context. To better identify a user's search needs and provide more relevant results, entity recommendation should be context-aware and account for the preceding queries issued by the user within a search session. Recently, to tackle the above challenges, Fern´andez-Tob´ıas and Blanco [2016] proposed a number of memory-based methods that exploit user behaviors in search logs to recommend related entities for a user's full search session. However, these methods highly rely on the users' past behaviors that have been observed in search logs. Therefore, they inevitably suffer from data sparsity and cold start problems.
The context which consists of in-session preceding queries has proven to be effective in helping to understand a user's current information need, and plays an important role in improving the performance of several search applications, such as query suggestion [Cao et al., 2008; Mitra, 2015; Sordoni et al., 2015; Dehghani et al., 2017] and context-aware ranking for Web search [Shen et al., 2005; Xiang et al., 2010; Li et al., 2014]. However, these methods are based on singletask supervised learning with sufficient training data that are sensitive to context. By contrast, the training data collected from entity click logs of a context-insensitive recommendation system are typically insensitive to the contexts. To address this problem, we consider context-aware ranking as the auxiliary task, and further develop a multi-task DNN that leverages the context-specific information contained in the training data of this task to improve upon the main task of entity recommendation.
The use of multi-task learning [Caruana, 1997] with DNNs in our task is inspired by the recent remarkable success of applying it in various natural language processing tasks. For example, Collobert et al. [2011] proposed to learn representations shared across multiple tasks of part-of-speech tagging, chunking, named entity recognition, and semantic role labeling. Bordes et al. [2012] proposed to jointly learn representations of words and entities via multi-task training on multiple data sources for relation extraction. Dong et al. [2015] proposed an NMT model under the multi-task learning framework to address the problem of translating one source language into multiple target languages. Liu et al. [2015] proposed a multi-task DNN model to combine two tasks of query classification and ranking for Web search, and achieved improvement on both tasks. While conceptually similar, our model is novel in that it successfully combines the tasks of context-aware ranking and entity recommendation, which facilitates context acquisition and context modeling for the latter by leveraging context information contained in the former.
5 Conclusion
In this paper, we study the problem of context modeling for improving entity recommendation. To this end, we develop a multi-task DNN that learns representations across multiple tasks by leveraging large amounts of cross-task data. We evaluate our approach using large-scale, real-world search logs of a widely used commercial Web search engine. The experiments demonstrate that context information can significantly improve the performance of entity recommendation.
Generally two categories of context information can be derived from search logs. One is short-term context such as preceding queries or clicked documents in a session. Another is long-term context such as search history or click-through data across all sessions. As future work, we plan to investigate whether long-term context or other short-term context (e.g., preceding clicked documents before a user's current search in a session) could help to improve entity recommendation.
Acknowledgments
This research is supported by the National Basic Research Program of China (973 program No. 2014CB340505). We would like to thank the anonymous reviewers for their insightful comments.
@inproceedings{ijcai2018p571,
title = {Improving Entity Recommendation with Search Log and Multi-Task Learning},
author = {Huang, Jizhou and Zhang, Wei and Sun, Yaming and Wang, Haifeng and Liu, Ting},
booktitle = {Proceedings of the Twenty-Seventh International Joint Conference on
Artificial Intelligence, {IJCAI-18}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {Jérôme Lang},
pages = {4107--4114},
year = {2018},
month = {7},
note = {Main track},
doi = {10.24963/ijcai.2018/571},
url = {https://doi.org/10.24963/ijcai.2018/571},
}
TY - CPAPER TI - Improving Entity Recommendation with Search Log and Multi-Task Learning AU - Huang, Jizhou AU - Zhang, Wei AU - Sun, Yaming AU - Wang, Haifeng AU - Liu, Ting T2 - Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI-18 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2018 SP - 4107 EP - 4114 DO - 10.24963/ijcai.2018/571 UR - https://doi.org/10.24963/ijcai.2018/571 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: