{'fraction_non_alphanumeric': 0.03191623565030907, 'fraction_numerical': 0.010302342205962744, 'mean_word_length': 4.5773921200750465, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cross-Market Model Adaptation with Pairwise Preference Data for Web Search Ranking

Machine-learned ranking techniques automatically learn a complex document ranking function given training data. These techniques have demonstrated the effectiveness and ﬂexibility required of a commercial web search. However, manually labeled training data (with multiple absolute grades) has become the bottle-neck for training a quality ranking function, particularly for a new domain. In this paper, we explore the adaptation of machine-learned ranking models across a set of geographically diverse markets with the market-speciﬁc pairwise preference data, which can be easily obtained from clickthrough logs. We propose a novel adaptation algorithm, Pairwise-Trada, which is able to adapt ranking models that are trained with multi-grade labeled training data to the target market using the target-market-speciﬁc pairwise preference data. We present results demonstrating the efﬁcacy of our tech-nique on a set of commercial search engine data.


Introduction
Web search algorithms provide methods for ranking web scale collection of documents given a short query. The success of these algorithms often relies on the rich set of document properties or features and the complex relationships between them. Increasingly, machine learning techniques are being used to learn these relationships for an effective ranking function (Liu, 2009). These techniques use a set of labeled training data labeled with multiple relevance grades to automatically estimate parameters of a model which directly optimizes a performance metric. Although training data often is derived from editorial labels of document relevance, it can also be inferred from a careful analysis of users' interactions with a working system (Joachims, 2002). For example, in web search, given a query, document preference information can be derived from user clicks. This data can then be used with an algorithm which learns from pairwise preference data (Joachims, 2002;Zheng et al., 2007). However, automatically extracted pairwise preference data is subject to noise due to the specific sampling methods used (Joachims et al., 2005;Radlinski and Joachim, 2006;Radlinski and Joachim, 2007).
One of the fundamental problems for a web search engine with global reach is the development of ranking models for different regional markets. While the approach of training a single model for all markets is attractive, it fails to fully exploit of specific properties of the markets. On the other hand, the approach of training marketspecific models requires the huge overhead of acquiring a large training set for each market. As a result, techniques have been developed to create a model for a small market, say a Southeast Asian country, by combining a strong model in another market, say the United States, with a small amount of manually labeled training data in the small market (Chen et al., 2008b). However, the existing Trada method takes only multigrade labeled training data for adaptation, making it impossible to take advantage of the easily harvested pairwise preference data. In fact, to our knowledge, there is no adaptation algorithm that is specifically developed for pairwise data.
In this paper, we address the development market-specific ranking models by leveraging pairwise preference data. The pairwise preference data contains most market-specific training examples, while a model from a large market may capture the common characteristics of a ranking function. By combining them algorithmically, our approach has two unique advantages. (1) The biases and noises of the pairwise preference data can be depressed by using the base model from the large market.
(2) The base model can be tailored to the characteristics of the new market by incorporating the market specific pairwise training data. As the pairwise data has the particular form, the challenge is how to effectively use pairwise data in adaptation. This appeals to the following objective of many web search engines: design algorithms which minimize manually labeled data requirements while maintaining strong performance.

Related Work
In recent years, the ranking problem is frequently formulated as a supervised machine learning problem, which combines different kinds of features to train a ranking function. The ranking problem can be formulated as learning a function with pair-wise preference data, which is to minimize the number of contradicting pairs in training data. For example, RankSVM (Joachims, 2002) uses support vector machines to learn a ranking function from preference data; RankNet (Burges et al., 2005a) applies neural network and gradient descent to obtain a ranking function; RankBoost (Freund et al., 1998) applies the idea of boosting to construct an efficient ranking function from a set of weak ranking functions; GBRank (Zheng et al., 2007;Xia et al., 2008) using gradient descent in function spaces, which is able to learn relative ranking information in the context of web search. In addition, Several studies have been focused on learning ranking functions in semi-supervised learning framework (Amini et al., 2008;Duh and Kirchhoff, 2008), where unlabeled data are exploited to enhance ranking function. Another approach to learning a ranking function addresses the problem of optimizing the list-wise performance measures of information retrieval, such as mean average precision or Discount Cumulative Gain (Cao et al., 2007;Xu et al., 2008;Wu et al., 2009;Chen et al., 2008c). The idea of these methods is to obtain a ranking function that is optimal with respect to some information retrieval performance measure.
Model adaptation has previously been applied in the area of natural language processing and speech recognition. This approach has been successfully applied to parsing (Hwa, 1999), tagging (Blitzer et al., 2006), and language modeling for speech recognition (Bacchiani and Roark, 2003). Until very recently, several works have been presented on the topic of model adaptation for ranking (Gao et al., 2009;Chen et al., 2008b;Chen et al., 2009), however, none of them target the model adaptation with the pair-wise learning framework. Finally, multitask learning for ranking has also been proposed as a means of addressing problems similar to those we have encountered in model adaptation (Chen et al., 2008a;Bai et al., 2009;Geng et al., 2009).

Gradient Boosted Decision Trees for Ranking
Assume we have a training data set, D = { (q, d), y 1 , . . . , (q, d), y n }, where (q, d), t i encodes the labeled relevance, y, of a document, d, given query, q. Each query-document pair, (q, d), is represented by a set of features, (q, d) = {x i1 , x i2 , x i3 , ..., x im }. These features include, for example, query-document match features, query-specific features, and documentspecific features. Each relevance judgment, y, is a relevance grade mapped (e.g. "relevant", "somewhat relevant", "non-relevant") to a real x 1 > a 1 ?
x 2 > a 2 ? x 3 > a 3 ? number. Given this representation, we can learn a gradient boosted decision tree (GBDT) which models the relationship between document features, (q, d), and the relevance score, y, as a decision tree (Friedman, 2001). Figure 1 shows a portion of such a tree. Given a new query document pair, the GBDT can be used to predict the relevance grade of the document. A ranking is then inferred from these predictions. We refer to this method as GBDT reg .

YES NO
In the training phase, GBDT reg iteratively constructs regression trees. The initial regression tree minimizes the L 2 loss with respect to the targets, y, As with other boosting algorithms, the subsequent trees minimize the L 2 loss with respect to the residuals of the predicted values and the targets. The final prediction, then, is the sum of the predictions of the trees estimated at each step, where f i (x) is the prediction of the ith tree.

Pairwise Training
As alternative to the absolute grades in D, we can also imagine assembling a data set of relative judgments.
In this case, assume we have a training data set where (q, d), (q, d ), ρ i encodes the preference, of a document, d, to a second document, d , given query, q. Again, each query-document pair is represented by a set of features. Each Preference data is attractive for several reasons. First, editors can often more easily determine preference between documents than the absolute grade of single documents. Second, relevance grades can often vary between editors. Some editors may tend to overestimate relevance compared to another editor. As a result, judgments need to be rescaled for editor biases. Although preference data is not immune to intereditor inconsistency, absolute judgments introduce two potential sources of noise: determining a relevance ordering and determining a relevance grade. Third, even if grades can be accurately labeled, mapping those grades to real values is often done in a heuristic or ad hoc manner. Fourth, GBDT reg potentially wastes modeling effort on predicting the grade of a document as opposed to focusing on optimizing the rank order of documents, the real goal a search engine. Finally, preference data can often be mined from a production system using assumptions about user clicks.
In order to support preference-based training data, (Zheng et al., 2007) proposed GBRANK based on GBDT reg . The GBRANK training algorithm begins by constructing an initial tree which predicts a constant score, c, for all instances. A pair is contradicting if the (q, d), (q, d ), and prediction f (q, d) < f (q, d ). At each boosting stage, the algorithm constructs a set of contradicting pairs, D contra . The GBRANK algorithm then adjusts the response variables, f (q, d) and To correct the order, we modify the target values, where τ > 0 is a margin parameter that we need to assign. In our experiments, we set τ to 1. Note that if preferences are inferred from absolute grades, D, minimizing the L 2 to 0 also minimizes the contradictions.

Tree Adaptation
Recall that we are also interested in using the information learned from one market, which we will call the source market, on a second market, which we will call the target market. To this end, the Trada algorithm adapts a GBDT reg model from the source market for the target market by using a small amount of target market absolute relevance judgments (Chen et al., 2008b). Let the D s be the data in the source domain and D t be the data in target domain. Assume we have trained a model using GBDT reg . Our approach will be to use the decision tree structure learned from D s but to adapt the thresholds in each node's feature. We will use Figure 1 to illustrate Trada. The splitting thresholds are a 1 , a 2 and a 3 for rank features x 1 , x 2 and x 3 . Assume that the data set D t is being evaluated at the root node v in Figure 1. We will split the using the feature v x = x 1 but will compute a new threshold v a using D t and the GBDT reg algorithm. Because we are discussing the root node, when we select a threshold b, D t will be partitioned into two sets, D >b t and D <b t representing those instances whose feature x 1 has a value greater and lower than b. The response value for each partition will be the uniform average of instances in that partition, We would like to select a value for b which minimizes the L 2 loss between y and f in Equation  5; equivalently, b can be selected to minimize the variance of y in each partition. In our implementation, we compute the L 2 loss for all possible values of the feature v x and select the value which minimizes the loss. Once b is determined, the adaptation consists of performing a linear interpolation between the original splitting threshold v a and the new split-ting threshold b as follows: where p is an adaptation parameter which determines the scale of how we want to adapt the tree to the new task. If there is no additional information, we can select p according to the size of the data set, In practice, we often want to enhance the adaptation scale since the training data of the extended task is small. Therefore, we add a parameter β to boost the extended task as follows: The value of β can be determined by crossvalidation. In our experiments, we set β to 1. The above process can also be applied to adjust the response value of nodes as follows: where v f is the adapted response at a node, v f is its original response value of source model, and f is the response value (Equation 5).
The complete Trada algorithm used in our experiments is presented in Algorithm 1.

Algorithm 1 Tree Adaptation Algorithm
The Trada algorithm can be augmented with a second phase which directly incorporates the target training data. Assume that our source model, M s , was trained using source data, D s . Recall that M s can be decomposed as a sum of regression tree output, f Ms (x) = f 1 Ms (x) + . . . + f k Ms (x). Additive tree adaptation refers augmenting this summation with a set of regression trees trained on the residuals between the model, M s , and the target training data, D t .
In order for us to perform additive tree adaptation, the source and target data must use the same absolute relevance grades.

Pairwise Adaptation
Both GBRANK and Trada can be used to reduce the requirement on editorial data. GBRANK achieves the goal by leveraging preference data, while Trada does so by leveraging data from a different search market. A natural extension to these methods is to leverage both sources of data simultaneously. However, no algorithm has been proposed to do this so far in the literature. We propose an adaptation method using pairwise preference data.
Our approach shares the same intuition as Trada: maintain the tree structure but adjust decision threshold values against some target value. However, an important difference is that our adjustment of threshold values does not regress against some target grade values; rather its objective is to improve the ordering of documents. To make use of preference data in the tree adaptation, we follow the method used in GBRANK to adjust the target values whenever necessary to preserve correct document order. Given a base model, M s , and preference data, D t , we can use Equations 3 and 4 to infer target values. Specifically, we construct a set D contra from D t and M s . For each item (q, d) in D contra , we use the value off (q, d) as the target. These tuples, (q, d),f (q, d) along with M s are then are provided as input to Trada. Our approach is described in Algorithm 2.
Compared to Trada, Pairwise-Trada has two Algorithm 2 Pairwise Tree Adaptation Algorithm important differences. First, Pairwise-Trada can use a source GBDT model trained either against absolute or pairwise judgments. When an organization maintains a set of ranking models for different markets, although the underlying modeling method may be shared (e.g. GBDT), the learning algorithm used may be market-specific (e.g. GBRANK or GBDT reg ). Unfortunately, classic Trada relies on the source model being trained using GBDT reg . Second, Pairwise-Trada can be adapted using pairwise judgments. This means that we can expand our adaptation data to include click feedback, which is easily obtainable in practice.

Methods and Materials
The proposed algorithm is a straightforward modification of previous ones. The question we want to examine in this section is whether this simple modification is effective in practice. In particular, we want to examine whether pairwise adaptation is better than the original adaptation Trada using grade data, and whether the pairwise data from a market can help improve the ranking function on a different market. Our experiments evaluate the performance of Pairwise-Trada for web ranking in ten target markets. These markets, listed in Table 1, cover a variety of languages and cultures. Furthermore, resources, in terms of documents, judgments, and click-through data, also varies across markets. In particular, editorial query-document judgments range from hundreds of thousands (e.g. SEA 1 ) to tens of thousands (e.g. SEA 5 ). Editors graded query-document pairs on a fivepoint relevance scale, resulting in our data set D. Preference labels, D , are inferred from these judgments.
We also include a second set of experiments which incorporate click data. 1 In these experiments, we infer a preference from click data by assuming the following model. The user is presented with ten results. An item i j if i the following conditions hold: i is positioned below j, i receives a click, and j does not receive a click.
In our experiments, we tested the following runs, • GBDT reg trained using only D s or D t • GBRANK trained using only D s or D t • GBRANK trained using only D s , D t , and C t • Trada with both GBDT s and GBRANK s , adapted with D t .
• Pairwise-Trada with both GBDT s and GBRANK s , adapted with D t and C t at different ratios.
In the all experiments, we use 400 additive trees when additive adaptation is used. All models are evaluated using discounted cumulative gain (DCG) at rank cutoff 5 (Järvelin and Kekäläinen, 2002).

Adaptation with Manually Labeled Data
In Table 1, we show the results for all of our experimental conditions. We can make a few observations about the non-adaptation baselines. First, models trained on the (limited) target editorial data, GBDT t and GBRANK t , tend to outperform those trained only on the source editorial data, GBDT s and GBRANK s . The critical exception is SEA 5 , the market with the fewest judgments. We believe that this behavior is a result of similarity between the United States source data and the SEA 5 target market; both the source and target query populations share the same language, a property not exhibited in other markets. Notice that other small markets such as LA 2 and LA 3 see modest improvements when using target-only runs compared to source-only runs. Second, GBRANK tends to outperform GBDT when only trained on the source data. This implies that we should prefer a base model which is based on GBRANK, something that is difficult to combine with classic Trada. Third, by comparing GBRANK and GBDT when only trained on the target data, we notice that the effectiveness of GBRANK depends on the amount of training data. For markets where there training data is plentiful (e.g. SEA 1 ), GBRANK outperforms GBDT. On the other hand, for smaller markets (e.g. LA 3 ), GBDT outperforms GBRANK.
In general, the results confirm the hypothesis that adaptation runs outperform all of nonadaptation baselines. This is the case for both Trada and Pairwise-Trada. As with the baseline runs, the Australian market sees different performance as a result of the combination of a small target editorial set and a representative source domain. This effect has been observed in previous results (Chen et al., 2009).
We can also make a few observations by comparing the adaptation runs. Trada works better with a GBDT base model than with a GBRANK base model. We We believe this is the case because the absolute regression targets are difficult to compare with the unbounded output of GBRANK. Pairwise-Trada on the other hand tends to perform better with a GBRANK base model than with a GBDT base model. There are a few exceptions, SEA 3 and LA 2 , where Pairwise-Trada works better with a GBDT base model. Comparing Trada to Pairwise-Trada, we find that using preference targets tends to improve performance for some markets but not all. The underperformance of Pairwise-Trada tends to occur in smaller markets such as LA 1 , LA 2 , and LA 3 . This is similar to the behavior we observed in the non-adaptation runs and suggests that, in operation, a modeler may have to decide on the training algorithm based on the amount of data available.

Incorporating Click Data
One of the advantages of Pairwise-Trada is the ability to incorporate multiple sources of pairwise preference data. In this paper, we use the heuristic rule approach which is introduced by (Dong et al., 2009) to extract pairwise preference data from the click log of the search engine. This approach yields both skip-next and skip-above pairs (Joachims et al., 2005), which are sorted by confidence descending order respectively. In these experiments, we combine manually generated preferences with those gathered from click data. We present these results in Table 2. We notice that no matter the source of preference data, Pairwise-Trada outperforms the baseline GBRANK model. The magnitude of the improvement depends on the source data used. Comparing the editorial-only to the click-only models, we notice that click-only models outperform editorial-only models for smaller markets (SEA 4 , LA 1 , and SEA 5 ). This is likely the case because the relative quantity of click data with respect to editorial data is higher in these markets. This is despite the fact that the click data may be noisier than the editorial data. The best performance, though, comes when we combine both editorial and click data.

Additive tree adaptation
Recall that Pairwise-Trada consists of two parts: parameter adaptation and additive tree adaptation. In this section, we examine the contribution to performance each part is responsible for. Figure 2 illustrates the adaptation results for the LA 1 market. In this experiment, we use a United States base model and 100K LA 1 editorial judgments for adaptation. Pairwise-Trada is performed on top of differently sized base models with 600, 900 and 1200 trees. The original base model has 1200 trees; we selected the first 600, 900 or full 1200 trees for experiments. The number of trees used in the additive tree adaptation step ranges up to 600 trees. significantly increase DCG over simple parameter adaptation and is therefore a critical step of Pairwise-Trada. When the number of trees in the additive tree adaptation step reaches roughly 400, the DCG plateaus.

Conclusion
We have proposed a model for adapting retrieval models using preference data instead of absolute relevance grades. Our experiments demonstrate that, when much editorial data is present, our method, Pairwise-Trada, may be preferable to competing methods based on absolute relevance grades. However, in real world systems, we often have access to sources of preference data beyond those resulting from editorial judgments. We demonstrated that Pairwise-Trada can exploit such data and boost performance significantly. In fact, if we omit editorial data altogether we see performance improvements over the baseline model. This suggests that, in principle, we can train a single, strong source model and improve it using target click data alone. Despite the fact that the modification we made is quite simple, we showed that modification is effective in practice. This tends to validate the general principle of using pairwise data from a different market. This principle can be easily used in other frameworks such as neural net-works (Burges et al., 2005b). Therefore, the proposed method also points to a new direction for future improvements of search engines. There are several areas of future work. First, we believe that detecting other sources of preference data from user behavior can further improve the performance of our model. Second, we only used a single source model in our experiments. We would also like to explore the effect of learning from an ensemble of source models. The importance of each may depend on the similarity to the target domain. Finally, we would also like to more accurately understand the queries where click data improves adaptation and those where editorial judgments is required. This sort of knowledge will allow us to train systems which maximally exploit our editorial resources.