History Dependent Domain Adaptation

Allen Lavoie Rensselaer Polytechnic [email protected]

Matthew Eric Otey Google Pittsburgh [email protected]

Nathan Ratliff Google Pittsburgh [email protected]

D. Sculley Google Pittsburgh [email protected]

Abstract We study a novel variant of the domain adaptation problem, in which the loss function on test data changes due to dependencies on prior predictions. One important instance of this problem area occurs in settings where it is more costly to make a new error than to repeat a previous error. We propose several methods for learning effectively in this setting, and test them empirically on the real-world tasks of malicious URL classification and adversarial advertisement detection.

1

Introduction

In typical domain adaptation problem settings, the loss function used at testing time may differ in some way from the loss function that is known during training [1]. In this paper, we study a domain adaptation problem with an interesting historical structure in which tomorrow’s loss function depends on the predictions given today. A historical dependency in the loss function can occur when we have a classification system that makes predictions day after day on similar input data, and for which classification errors are costly to correct in terms of time or effort. In this case, it is important not only to predict with good accuracy, but also to avoid making new errors with respect to previous predictions. The nightmare scenario we wish to avoid is a system that achieves 99% accuracy, but which makes errors on a different 1% of the data each day. After a hundred days the cumulative error rate would be 100%. The problem of history dependent domain adaptation occurs frequently in practice, but it has not been previously studied formally to our knowledge. An example of this is Google’s system for learning to detect adversarial advertisements [5]. This system is responsible for protecting users by detecting and blocking advertisements that may cause the user some form of harm. In this system, automated classification is used as a first line of defense, with significant human effort used to correct errors so that the total system error is driven to zero. Any error from the automated classifier requires human effort to correct, but the correction is effectively permanent. Thus, the key to reducing human cost is for the automated classifier to avoid making new errors over time while still achieving high accuracy. This paper aims to make the following contributions. We define the problem of history dependent domain adaptation, formalizing the trade-off between performance and hypothesis stability, and present several methods for learning within this setting. Our study is grounded in two real-world classification problems where history dependent domain adaptation is needed: malicious URL detection [4] and adversarial advertisement classification [5]. We present experimental results on data from these domains showing that, over time, history dependent domain adaptation can be used to dramatically reduce the incidence of new prediction errors with little or no loss in classical predictive performance measures such as the area under the ROC curve (AUC). 1

2

Defining the Problem: When New Errors are Especially Costly

Classical domain adaptation problems deal with situations where the test and training data are drawn from different distributions [2]. Here we are concerned with deployed classification systems that make repeated predictions on a set of entities with a time-varying distribution. Importantly, the loss function for classifying these entities has a historical dependency on the system’s prior predictions. Formally, assume our system uses a prediction function ht : Rn → {−1, 1}, which may differ with each time step t. The model is applied to an entity e ∈ Et , which is represented by a vector xt ∈ Rn at time step t. This vector may vary over time. For example, if the entity is a particular URL, its content may change or its metadata may vary over time, causing the representation vector to differ. The set of entities Et classified by ht (·) may grow over time. That is, Et−1 ⊆ Et . In this setting, it is clearly possible that the system classifies the same entity differently over time. That is, it is possible that ht (e) 6= ht−1 (e). This could be caused by changes in the representation vector for e, such that kxt − xt−1 k > 0, or it could be caused by changes in the prediction model used by h(·), which may be introduced by training updates on additional or altered training data. Of course, if we had full label feedback on all predictions at time t − 1, learning a good model at time t would be easy. In this case, we could simply define and optimize a loss function of the form: X I(ht (e) 6= ye ∧ ht−1 (e) = ye ). min L(ht , Dt ) + α ht

e∈Dt−1

Here L(h, Dt ) is some standard classifier loss function to be minimized, I is the indicator function, and ye is the true label of e. It essentially penalizes ht (·) for making false positive predictions not made by ht−1 (·).1 However, in real-world situations, it is likely that at time t we do not have full label feedback for all predictions made at time t − 1. For large-scale deployed systems, collecting ground-truth labels for all examples may be prohibitively expensive, and the labels that are available may take time to collect. Therefore we need to prevent making new errors while being unsure which of the previous classifications were correct.

3

Methods for Reducing New Errors

In this section, we present several methods for learning with history dependent domain adaptation. For this initial study, we use the classical linear support vector machine (SVM) as the baseline method. Recall that a linear SVM may be learned by solving the following optimization problem: λ kwk2 2 Here L(w, D) is hinge-loss. This can be solved efficiently for large-scale problems using stochastic gradient descent variants [6]. Each of the methods we propose will vary this basic linear SVM. min L(w, D) + w

Model Averaging As a baseline approach, we can treat history dependent domain adaptation as a temporal smoothing problem, and take a smoothed average of predictions from our different models. Pt+1 1 At time t + 1 with historical weight vectors wi , ht+1 (x) = h t+1 i=1 wi , xi. Warm-Start Online Learning with Small Fixed Step Size We can use the prior weight vector wt rather than the null vector as the initial hypothesis for stochastic gradient descent. Taking a limited number of steps with fixed step size η will restrict the amount that wt+1 can diverge from wt [3]. Adding a Nearness Constraint Similarly, we can add history dependency to our training by adding a hard constraint that wt+1 be close to its predecessor in the weight space. We constrain wt+1 to lie within an L2 ball of radius δ, where wt is the center of the ball. This is implemented efficiently via projected gradient descent [7], with the following constraint added to the linear SVM optimization problem: require: kwt+1 − wt k ≤ δ. Prediction Regularization We may also enforce nearness not in weight space, as above, but in the prediction space by regularizing the new model’s predictions back towards those of the old model. 1 This greedy heuristic is an important approximation since the full optimization over hypothesis sequences is often intractable and would entail retrospectively modifying past hypotheses.

2

This ensures that a penalty is paid for diverging from the prior model’s predictions, which will be traded off against the benefit given for reducing classification loss or model complexity by the parameter α. We experimentally analyze two such techniques. First, we add a quadratic penalty to P the loss proportional to x∈Dt+1 (hwt+1 , xi − hwt , xi)2 . The second method treats the previous model predictions as additional P(weighted) examples, adding T a new collection of hinge loss terms (one for each x) proportional to x max{0, 1 − ht (x)wt+1 x}.

4 4.1

Experiments on Real-World Problems Experimental Set Up

Our goal in these experiments is to simulate the performance of each method from Section 3 in the setting of a large, deployed system over time. We experiment on two large real-world data sets that have the temporal qualities described in Section 2. Adversarial Advertisement Classification Data The adversarial-ads data is a large sample from 170 days of Google’s proprietary adversarial advertisement classification data from the system described in [5]. For the evaluation purposes in this simulation, we define time intervals as periods of one week, and at each period train on the previous 100 days of data. (this does not reflect the actual production process). Entities are individual advertisements, and are represented by a sparse, high dimensional feature set described in detail in [5]. The classification task is to label each advertisement as adversarial (positive) or non-adversarial (negative). At each time step t, a new model is trained on the labeled data from the prior time steps and evaluated on data from the current time step. Entities are randomly selected as training or test entities, so that a training entity from a prior time step is never used as a test entity in the current time step. For experimental purposes, all of the data used is labeled. Malicious URL Identification Data To complement our experiments on private data, we also run tests on a public data set that is qualitatively similar. The malicious-url data set contains roughly 2.4 million examples over a 120 day date range [4]. Here time intervals are 10 days, and during each interval we train on the previous 20 days of data. The task is to classify URLs as malicious (positive) or non-malicious (negative), where malicious URLs may contain malware or similarly harmful data [4]. This data set is similar to the adversarial-ads in that it is relatively large and uses a sparse, high dimensional feature space. 4.2

Evaluation Metrics

Our goal is to achieve good classification performance and reduce the incidence of new errors over time. Thus we report two separate performance metrics that should be considered together when evaluating success. The first metric is the traditional AUC metric for evaluating classifier performance. For both data sets, we report the percent difference from a baseline control of naively retraining each model from scratch every time period. The second metric we report is cumulative unique false positive rate (CUFP). This is defined at time t as total number of unique entities that have ever been wrongly marked as positives by any hypothesis h1 (·), ..., ht (·), divided by the total number of unique entities. As with AUC, we report results relative to the control baseline. 4.3

Results

Figure 4.2 summarizes the results of our experiments. From left to right, top to bottom, the subplots depict the AUC and CUFP rates for the adversarial-ads problem, and the AUC and CUFP rates of the malicious-urls problem, respectively. 2 Of the methods we compared, constrained, average, and warm start performed the best with constrained and average generally edging out warm start. hinge and squared showed a slight benefit on the URL problem, but little, if any, overall improvement on the Adversarial Advertisers problem. On both problems, none of the methods performed significantly different than the control in terms of AUC. 2 Error bars rendered the plots unreadable, but on average, they spanned approximately 2% and 12% for the adversarial-ads AUC and CUFP plots from upper bound to lower bound, respectively, and spanned .1% and 11% for the malicious-url AUC and CUFP plots, respectively. In particular, no method performed significantly different than the control with respect to AUC on the adversarial-ads problem.

3

1.0

10

0.5

0

10 20

0.0

30

0.5 1

2

3

4 5 7 6 8 Generation number (7 day increments)

9

401

10

URL performance (AUC)

0.04

4 5 7 6 8 Generation number (7 day increments)

9

10

4 5 7 3 6 8 Generation number (10 day increments)

9

10

3

URL CUFP

10

0.02

0

0.00

10

0.02

20

0.04 0.06 0.08

0.10 0.121

2

CUFP (% difference from control)

Performance (AUC) - % difference from control

Adversarial advertisers CUFP

20

CUFP (% difference from control)

Performance (AUC) - % difference from control

Adversarial advertisers performance (AUC)

2

average constrained hinge squared warm start

4 5 7 3 6 8 Generation number (10 day increments)

9

30 40 501

10

2

Figure 1: Experimental Results. Top: adversarial-ads, bottom: malicious-urls, left: AUC performance, right: cumulative false positives (CUFP). Each performance metric is represented relative to the control model, shown in each plot (relative to itself) as the zero line.

5

Conclusions

We proposed a number of techniques to mitigate new errors made between successive model retrainings in real-world machine learning systems. Interestingly, some of the simplest and most intuitively appealing methods performed the best in our experiments, reducing a measure of cumulative false positives without adversely affecting the overall system performance. We are currently collecting a more extensive suite of experimental results, and developing theoretical results to better characterize the behavior of these algorithms.

References [1] J. A. D. Bagnell. Robust supervised learning. In Proceedings of AAAI. American Association for Artifical Intelligence, June 2005. [2] H. Daum´e III and D. Marcu. Domain adaptation for statistical classifiers. Journal of Artificial Intelligence Research, 26(1):101–126, 2006. [3] M. Herbster, M. K. Warmuth, and P. Bartlett. Tracking the best linear predictor. Journal of Machine Learning Research, 1:281–309, 2001. [4] J. Ma, L. K. Saul, S. Savage, and G. M. Voelker. Identifying suspicious urls: an application of large-scale online learning. In Proceedings of the 26th Annual International Conference on Machine Learning, 2009. [5] D. Sculley, M. Otey, M. Pohl, B. Spitznagel, J. Hainsworth, and Y. Zhou. Detecting adversarial advertisements in the wild. In Proceedings of the Seventeenth Conference on Knowledge Discovery and Data Mining, 2011. [6] T. Zhang. Solving large scale linear prediction problems using stochastic gradient descent algorithms. In Proceedings of the twenty-first international conference on Machine learning, page 116. ACM, 2004. [7] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In In Twentieth International Conference on Machine Learning, 2003.

4

History Dependent Domain Adaptation - Research at Google

We study a novel variant of the domain adaptation problem, in which the loss function on test data changes due to dependencies on prior predictions.

98KB Sizes 2 Downloads 356 Views

Recommend Documents

Domain Adaptation in Regression - Research at Google
Alternatively, for large values of N, that is N ≫ (m + n), in view of Theorem 3, we can instead ... .360 ± .003 .352 ± .008 ..... in view of (16), z∗ is a solution of the.

Eliminating Dependent Pattern Matching - Research at Google
so, we justify pattern matching as a language construct, in the style of ALF [13], without compromising ..... we first give our notion of data (and hence splitting) a firm basis. Definition 8 ...... Fred McBride. Computer Aided Manipulation of Symbol

Speaker adaptation of context dependent deep ... - Research
tering them, e.g. using regression trees [6, 7]. ... However the computation power .... states [23] clustered using decision trees [24] to 7969 states; the real time ...

SPEAKER ADAPTATION OF CONTEXT ... - Research at Google
adaptation on a large vocabulary mobile speech recognition task. Index Terms— Large ... estimated directly from the speaker data, but using the well-trained speaker ... quency ceptral coefficients (MFCC) or perceptual linear prediction. (PLP) featu

Prior Knowledge Driven Domain Adaptation
cally study the effects of incorporating prior ... Learning Strategies to Reduce Label Cost, Bellevue, WA, ..... http://bioie.ldc.upenn.edu/wiki/index.php/POS_tags.

Prior Knowledge Driven Domain Adaptation
domain. In this paper, we propose a new adaptation framework called Prior knowl- edge Driven Adaptation (PDA), which takes advantage of the knowledge on ...

Prior Knowledge Driven Domain Adaptation
The performance of a natural language sys- ... ral language processing (NLP) tasks, statistical mod- ..... http://bioie.ldc.upenn.edu/wiki/index.php/POS_tags.

Computational complexity of time-dependent ... - Research at Google
Aug 15, 2014 - 3. 1 Vienna Center for Quantum Science and Technology, ..... the local potential energy are both bounded by constant EL and that ...... We point out that an alternative to our lattice approach may exist using tools from partial.

Context Dependent Phone Models for LSTM ... - Research at Google
dent whole-phone models can perform as well as context dependent states, given a ... which converges to estimate class posteriors when using a cross- entropy loss. ... from start to end, it is common to divide phonemes into a number of states ...

A DISCRIMINATIVE DOMAIN ADAPTATION MODEL ...
domain data, our proposed model aims at transferring source domain labeled .... Suppose that there exist n instances in a d-dimensional space, we have the ...

Domain Adaptation: Learning Bounds and ... - Semantic Scholar
samples for different loss functions. Using this distance, we derive new generalization bounds for domain adaptation for a wide family of loss func- tions. We also present a series of novel adaptation bounds for large classes of regularization-based

Domain Adaptation with Coupled Subspaces - Semantic Scholar
With infinite source data, an optimal target linear pre- ... ward under this model. When Σt = I, adding ... 0 as the amount of source data goes to infinity and a bias.

CONTEXT DEPENDENT STATE TYING FOR ... - Research at Google
ment to label the neural network training data and the definition of the state .... ers of non-linearities, we want to have a data driven design of the set questions.

Domain Adaptation: Learning Bounds and Algorithms
amounts of unlabeled data from the target domain are at one's disposal. The domain .... and P must not be too dissimilar, thus some measure of the similarity of these ...... ral Information Processing Systems (2008). Martınez, A. M. (2002).

Domain Adaptation: Learning Bounds and Algorithms
available from the target domain, but labeled data from a ... analysis and discrepancy minimization algorithms. In section 2, we ...... Statistical learning theory.

Learning Bounds for Domain Adaptation - Alex Kulesza
data to different target domain with very little training data. .... the triangle inequality in which the sides of the triangle represent errors between different decision.

Page 1 Heterogeneous Domain Adaptation: Learning Visual ...
Heterogeneous Domain Adaptation: Learning Visual Classifiers from Textual. Description. Mohamed Elhoseiny. Babak Saleh. Ahmed Elgammal. Department of ...

Domain Adaptation: Learning Bounds and Algorithms
Domain Adaptation: Learning Bounds and Algorithms. Yishay Mansour. Google Research and. Tel Aviv Univ. [email protected]. Mehryar Mohri. Courant ...

End-to-End Text-Dependent Speaker Verification - Research at Google
for big data applications like ours that require highly accurate, easy-to-maintain systems with a small footprint. Index Terms: speaker verification, end-to-end ...

RAPID ADAPTATION FOR MOBILE SPEECH ... - Research at Google
A large number of the ... number of parameters in MAP adaptation can be as large as the ..... BOARD: Telephone Speech Corpus for Research and Devel-.

Multiple Source Adaptation and the Rényi ... - Research at Google
nential in base 2 of the Rényi divergence: dα(PQ)=2Dα(PQ) = [∑x. Pα(x) ...... We presented a general analysis of the problem of multi- ple source adaptation.

Multiple Source Adaptation and the Rényi ... - Research at Google
experiments with both an artificial data set and a sentiment analysis task, showing the perfor- mance benefits of the distribution weighted com- binations and the ...

Confidence Scores for Acoustic Model Adaptation - Research at Google
Index Terms— acoustic model adaptation, confidence scores. 1. INTRODUCTION ... In particular, we present the application of state posterior confidences for ... The development of an automatic transcription system for such a task is difficult, ...