{"title": "Dirichlet-Enhanced Spam Filtering based on Biased Samples", "book": "Advances in Neural Information Processing Systems", "page_first": 161, "page_last": 168, "abstract": null, "full_text": "Dirichlet-Enhanced Spam Filtering based on Biased Samples\n\nSteffen Bickel and Tobias Scheffer Max-Planck-Institut fur Informatik, Saarbrucken, Germany {bickel, scheffer}@mpi-inf.mpg.de\n\nAbstract\nWe study a setting that is motivated by the problem of filtering spam messages for many users. Each user receives messages according to an individual, unknown distribution, reflected only in the unlabeled inbox. The spam filter for a user is required to perform well with respect to this distribution. Labeled messages from publicly available sources can be utilized, but they are governed by a distinct distribution, not adequately representing most inboxes. We devise a method that minimizes a loss function with respect to a user's personal distribution based on the available biased sample. A nonparametric hierarchical Bayesian model furthermore generalizes across users by learning a common prior which is imposed on new email accounts. Empirically, we observe that bias-corrected learning outperforms naive reliance on the assumption of independent and identically distributed data; Dirichlet-enhanced generalization across users outperforms a single (\"one size fits all\") filter as well as independent filters for all users.\n\n1\n\nIntroduction\n\nDesign and analysis of most machine learning algorithms are based on the assumption that the training data be drawn independently and from the same stationary distribution that the resulting model will be exposed to. In many application scenarios, however, control over the data generation process is less perfect, and so this iid assumption is often a naive over-simplification. In econometrics, learning from biased samples is a common phenomenon, where the willingness to respond to surveys is known to depend on several characteristics of the person queried; work that led to a method for correcting sample selection bias for a class of regression problems has been distinguished by a Nobel Prize [6]. In machine learning, the case of training data that is only biased with respect to the ratio of class labels has been studied [4, 7]. Zadrozny [14] has derived a bias correction theorem that applies when the bias is conditionally independent of the class label given the instance, and when every instance has a nonzero probability of being drawn into the sample. Sample bias correction for maximum entropy density estimation [3] and the analysis of the generalization error under covariate shift [12] follow the same intuition. In our email spam filtering setting, a server handles many email accounts (in case of our industrial partner, several millions), and delivers millions of emails per day. A magnitude of spam and \"ham\" (i.e., non-spam) sources are publicly available. They include collections of emails caught in \"spam traps\" email addresses that are published on the web in an invisible font and are harvested by spammers [11] the Enron corpus that was disclosed in the course of the Enron trial [8], and SpamAssassin data. These collections have diverse properties and none of them represents the global distribution of all emails, let alone the distribution received by some particular user. The resulting bias does not only hinder learning, but also leads to skewed accuracy estimates, since individuals may receive a larger proportion of emails that a filter classifies less confidently.\n\n\f\nThe following data generation model is paramount to our problem setting. An unknown process, characterized by a distribution p(i | ), generates parameters i . The i parameterize distributions p(x, y |i ) over instances x (emails) and class labels y . Each p(x, y |i ) corresponds to the i-th user's distribution of incoming spam (y = +1) or ham (y = -1) messages x. The goal is to obtain a classifier fi : x y for each i that minimizes the expectation of some loss function E(x,y)i [ (f (x), y )], defined with respect to the (unknown) distribution i . Labeled training data L are drawn from a blend of data sources (public email archives), resulting in a density p(x, y |) = p(x|)p(y |x, ) with parameter that governs L. The relation between the i and is such that (a) any x that has nonzero probability density p(x|) of being drawn into the sample L also has a nonzero probability p(x|i ) under the target distributions i ; and (b) the concept of spam is consensual for all users and the labeled data; i.e., p(y |x, ) = p(y |x, i ) for all users i. In addition to the (nonempty) labeled sample, zero or more unlabeled data Ui are available for each i and are drawn according to i . The unlabeled sample Ui is the inbox of user i. The inbox is empty for a newly established account and grows from there on. Our problem setting corresponds to an application scenario in which users are not prepared to manually tag spam messages in their inbox. Due to privacy and legal constraints, we are not allowed to personally read (or label) any single personal email; but the unlabeled messages may be used as input to an automated procedure. The individual distributions i are neither independent (identical spam messages are sent to many users), nor are they likely to be identical: distributions of inbound messages vary greatly between (professional, recreational, American, Chinese, . . . ) email users. We develop a nonparametric hierarchical Bayesian model that allows us to impose a common prior on new i . Such generalization may be particularly helpful for users with little or no available data Ui . The desired outcome of the learning process is an array of personalized spam filters for all users. The rest of this paper is structured as follows. We devise our solution in Section 2. In Section 3, we study the effectiveness of correcting sample bias for spam, and of using a Dirichlet process to generalize across users, experimentally. Section 4 concludes.\n\n2 Learning from Biased Data\nThe available labeled data L are governed by p(x|); directly training a classifier on L would therefore minimize the expected loss E(x,y) [ (f (x), y )] with respect to p(x|). By contrast, the task is to find classifiers fi that minimize, for user i, the expected loss E(x,y)i [ (f (x), y )] with respect to p(x|i ). We can minimize the loss with respect to i from a sample L whose instances are governed by when each instance is re-weighted. The weights have to be chosen such that minimizing the loss on the weighted sample L amounts to minimizing the loss with respect to i . In order to derive weighting factors with this property, consider the following model of the process that selects the labeled sample L. After drawing an instance x according to p(x|i ), a coin s is tossed with probability p(s|x, i , ). We move x into the labeled sample (and add the proper class label) if s = 1; otherwise, x is discarded. Our previous assumption that any x with positive p(x|) also has a positive p(x|i ) implies that there exists a p(s|x, i , ) such that p(x|) p(x|i )p(s = 1|x, i , ). (1)\n\nThat is, repeatedly executing the above process with an appropriate p(s|x, i , ) will create a sample of instances governed by p(x|). Equation 1 defines p(s|x, i , ); the succeeding subsections will be dedicated to estimating it from the available data. Since p(s|x, i , ) describes the discrepancy between the sample distribution p(x|) and the target p(x|i ), we refer to it as the sample bias. But let us first show that minimizing the loss on L with instances re-weighted by p(s|x, i , ) in fact minimizes the expected loss with respect to i . The rationale behind this claim deviates only in minor points from the proof of the bias correction theorem of [14]. Proposition 1 introduces a normalizing constant p(s = 1|i , ). Its value can be easily obtained as it normalizes Equation 1.\n( |i ) Proposition 1 The expected loss with respect to p(x, y |i ) = p(x, y |) ppss=1x,i) equals the ex( =1| , , pected loss with respect to p(x, y |i ), when p(s|x, i , ) satisfies Equation 1. -1\n\n\f\n Proof. Equation 2 expands the expected value and the definition of p(x, y |i ) in Proposition 1. Equation 3 splits p(x, y |). We apply the definition of p(s|x, i , ) (Equation 1) and obtain Equation 4. Equation 4 is rewritten as an expected value. ( p(s = 1|i , ) E(x,y)i [ (f (x), y )] = f (x), y )p(x, y |) d(x, y ) (2) p(s = 1|x, i , ) ( p(s = |i , ) = f (x), y )p(y |x, )p(x|) d(x, y ) (3) p(s = 1|x, i , ) ( = f (x), y )p(y |x, i )p(x|i )d(x, y ) = E(x,y)i [ (f (x), y )] (4) 2.1 Individualized Bias Estimation Equation 1 says that there is an unknown p(s|x, i , ) with p(x|) p(x|i )p(s = 1|x, i , ) which we call the sample bias. We will now discuss how to obtain an estimate pI (s|x, i , ). The ^ individualized empirical sample bias is an estimate of the unknown true bias, conditioned on a user's unlabeled inbox Ui and labeled data L; hence, pI (s|x, i , ) = p(s|x, Ui , L). ^ Equation 1 immediately implies p(s = 1|x, i , ) p(x|) , p(x|i ) (5)\n\nbut neither p(x|) nor p(x|i ) are known. However, distribution p(x|) is reflected in the labeled sample L, and distribution p(x|i ) in the unlabeled inbox Ui . Instances in L are examples that have been selected into the labeled sample; i.e., s = 1|x L. Instances in Ui have not been selected into the labeled sample; i.e., s = 0|x Ui . We define sUi ,L to be the vector of selection decisions for all instances in Ui and L. That is, sUi ,L contains |Ui | elements that are 0, and |L| elements that are 1. A density estimator p(s|x, , i ) can be trained on the instances in L and Ui , using vector sUi ,L as ^ target variable. We use a regularized logistic regression density estimator parameterized with wi : pI (s = 1|x, , i ) = p(s = 1|x; wi ) = ^ The likelihood of the density estimator is x P (sUi ,L |w, Ui , L) = 1 1 + e wi ,x x\nL\n\n.\n\n(6)\n\nu Ui\n\np(s = 0|xu , w)\n\np(s = 1|x , w).\n\n(7)\n\nWe train parameters wi = argmaxw log P (sUi ,L |w, Ui , L) + log (w) (we write (w) for the regularizer) [15] using the fast implementation of regularized logistic regression of [9]. 2.2 Dirichlet-Enhanced Bias Estimation This section addresses estimation of the sample bias p(s|x, n+1 , ) for a new user n + 1 by generalizing across existing users U1 , . . . , Un . The resulting estimate pD (s|x, n+1 , ) will be conditioned ^ on the new user's inbox Un+1 and the labeled data L, but also on all other users' inboxes. We write pD (s|x, n+1 , ) = p(s|x, Un+1 ; L, U1 , . . . , Un ) for the Dirichlet-enhanced empirical sample bias. ^ Equation 1 says that there is a p(s = 1|x, n+1 , ) for user n + 1 that satisfies Equation 5. Let us assume a parametric form (we employ a logistic model), and let wn+1 be the parameters that satisfy p(s = 1|x, n+1 , ) = p(s = 1|x; wn+1 ) p(x|)/p(x|n+1 ). We resort to a Dirichlet process (DP) [5] G(wi ) as a model for the prior belief on wn+1 given w1 , . . . , wn . Dirichlet process G|{, G0 } DP (, G0 ) with concentration parameter and base distribution G0 generates parameters wi : The first element w1 is drawn according to G0 ; in our case, the uninformed prior. It generates wn+1 according to Equation 8, where (wi ) is a point distribution centered at wi . n G0 + i=1 (wi ) wn+1 |w1 , . . . , wn (8) +n Equation 9 integrates over the parameter of the bias for new user n + 1. Equation 10 splits the posterior into the likelihood of the sample selection coin tosses and the common prior which is\n\n\f\nmodeled as a Dirichlet process. p(s|x, Un+1 ; L, U1 , . . . , Un ) =\n\np (s|x; w)p(w|Un+1 ; L, U1 , . . . , Un )dw\n\n(9)\n\n^ p(w|Un+1 , L, U1 , . . . , Un ) P (sUn+1 ,L |w, Un+1 , L)G(w|L, U1 , . . . , Un ) (10) Likelihood P (sUn+1 ,L |w, Un+1 , L) is resolved in Equation 7 for a logistic model of the bias. 2.3 Estimation of the Dirichlet Process The parameters of previous users' bias w1 , . . . , wn constitute the prior wn+1 |{wi }n 1 G for user i= ^ n + 1. Since the parameters wi are not observable, an estimate wn+1 |L, {Ui }n 1 G has to be i= based on the available data. Exact calculation of this prior requires integrating over the w1 , . . . , wn ; since this is not feasible, MCMC sampling [10] or variational approximation [1] can be used. In our application, the model of p(s|x, i , ) involves a regularized logistic regression in a space of more than 800,000 dimensions. In each iteration of the MCMC process or the variational inference of [1], logistic density estimators for all users would need to be trained--which is prohibitive. We therefore follow [13] and approximate the Dirichlet Process as n ^ (w) G0 + i=1 i (wi ) . G (11) +n Compared to the original Equation 8, the sum of point distributions at true parameters wi is replaced by a weighted sum over point distributions at pivotal wi . Parameter estimation is divided in two steps. First, pivotal models of the sample bias are trained for each user i, solely based on a user's inbox and the labeled data. Secondly, parameters i are estimated using variational EM; they express correlations between, and allow for generalization across, multiple users. Tresp and Yu [13] suggest to use a maximum likelihood estimate wi ; we implement wi by training logistic regression models\n1 p(s = 1|x; wi ) = w ,x w 1+e i (12) ith wi = argmaxw log P (sUi ,L |w, Ui , L) + log (w). Algorithmically, the pivotal models are obtained analogously to the individualized estimation of the selection bias for each user described in Section 2.1.\n\nAfter the pivotal models have been identified, an EM algorithm maximizes the likelihood over the parameters i . For the E step we rely on the assumption that the posterior is a weighted sum over point distributions at the pivotal density estimates (Equation 13). With this assumption, the posterior is no longer a continuous distribution and the E step resolves to the computation of a discrete number of variational parameters ij (Equation 14). n p(w|Uj , L) = ^ ij (wi ) (13)\ni=1\n\n^ P (sUj ,L |w , Uj , L)G(wi ) (14) n Equation 11 yields the M step with i = j =1 ij . Likelihood P (sUj ,L |w , Uj , L), is calculated as in Equation 7. The entire estimation procedure is detailed in Table 1, steps 1 through 3. ij 2.4 Inference\n Having obtained pivotal models p(s|x; wi ) and parameters i , we need to infer the Dirichletenhanced empirical sample bias p(s|x, Ui ; L, U1 , . . . , Un ). During the training procedure, i is one of the known users from U1 , . . . , Un . At application time, we may furthermore experience a message bound for user n + 1. ^ Without loss of generality, we discuss the inference problem for a new user n + 1. Inserting G(w) ^ (w) according to Eq. 11 yields Equation 16. into Eqs. 9 and 10 leads to Equation 15. Expanding G p ^ p(s|x, Un+1 ; L, U1 , . . . , Un ) (s|x; w)P (sUn+1 ,L |w, Un+1 , L)G(w)dw (15) p (s|x; w)P (sUn+1 ,L |w, Un+1 , L)G0 (w)dw (16) n + p(s|x; wi )P (sUn+1 ,L |wi , Un+1 , L)i i=1\n\n\f\n The second summand in Equation 16 is determined by summing over the pivotal models p(s|x; wi ). The first summand can be determined by applying Bayes' rule in Equation 17; G0 is the uninformed prior; the resulting term p(s|x, Un+1 , L) = p(s|x; wn+1 ) is the outcome of a new pivotal density estimator, trained to discriminate L against Un+1 . It is determined as in Equation 12. p p (s|x; w)P (sUn+1 ,L |w, Un+1 , L)G0 (w)dw (s|x; w)p(w|Un+1 , L)dw (17)\n\n= p(s|x, Un+1 , L)\n\n(18)\n\nThe Dirichlet-enhanced empirical sample bias p(s|x, Un+1 ; L, U1 , . . . , Un ) for user n + 1 is a weighted sum of the pivotal density estimate p(s|x; wn+1 ) for user n + 1, and models p(s|x; wi ) of all users i; the latter are weighted according to their likelihood P (sUn+1 ,L |wi , Un+1 , L) of observing the messages of user n + 1. Inference for the users that are available at training time is carried out in step 4(a) of the training procedure (Table 1). Table 1: Dirichlet-enhanced, bias-corrected spam filtering. Input: Labeled data L, unlabeled inboxes U1 , . . . , Un .\n 1. For all users i = 1 . . . n: Train a pivotal density estimator p(s = 1|x, wi ) as in Eq. 12. ^ ^ 2. Initialize G0 (w ) by setting i = 1 for i = 1 . . . n. i\n\n3. For t = 1, . . . until convergence: ^ (a) E-step: For all i, j , estimate tj from Equation 14 using Gt-1 and the density estii mators p(s|x, wi ). n ^ t . (b) M-step: Estimate Gt (w ) according to Equation 11 using i =\ni j =1 ij\n\n4. For all users i: (a) For all x L: determine empirical sample bias p(s|x, Ui ; L, U1 , . . . , Un ), conditioned on the observables according to Equation 16. (b) Train SVM classifier fi : X {spam, ham} by solving Optimization Problem 1. Return classifiers fi for all users i.\n\n2.5\n\nTraining a Bias-Corrected Support Vector Machine\n\nGiven the requirement of high accuracy and the need to handle many attributes, SVMs are widely acknowledged to be a good learning mechanism for spam filtering [2]. The final bias-corrected SVM ( |i fn+1 can be trained by re-sampling or re-weighting L according to s(x) = p(s=1|xpUs=11L,,)1 ,...,Un ) , , n+ ; U where p(s|x, Ux +1 ; L, U1 , . . . , Un ) is the empirical sample bias and p(s = 1|i , ) is the normalizer n that assures L s(x) = |L|. Let xk L be an example that incurs a margin violation (i.e., slack term) of k . The expected contribution of xk to the SVM criterion is s(x)k because xk will be drawn s(x) times on average into each re-sampled data set. Therefore, training the SVM on the re-sampled data or optimizing with re-scaled slack terms lead to identical optimization problems. Optimization Problem 1 Given labeled data L, re-sampling weights s(x), and regularization parameter C ; over all v, b, 1 , . . . , m , minimize m 12 |v | + C s(x)k (19) k=1 2 subject to m 1 yk ( v, xk + b) 1 - k ; m 1 k 0. (20) k= k= The bias-corrected spam filter is trained in step 4(b) of the algorithm (Table 1). 2.6 Incremental Update The Dirichlet-enhanced bias correction procedure is intrinsically incremental, which fits into the typical application scenario. When a new user n + 1 subscribes to the email service, the prior\n\n\f\nTable 2: Email accounts used for experimentation.\nUser Williams Beck Farmer Kaminski Kitchen Lokay Sanders German traveler German architect Ham Enron/Williams Enron/Beck Enron/Farmer Enron/Kaminski Enron/Kitchen Enron/Lokay Enron/Sanders Usenet/de.rec.reisen.misc Usenet/de.sci.architektur Spam Dornbos spam trap (www.dornbos.com) (part 1) spam trap of Bruce Guenter (www.em.ca/bruceg/spam) personal spam of Paul Wouters (www.xtdnet.nl/paul/spam) spam collection of SpamArchive.org (part 1) personal spam of the second author. spam collection of SpamAssassin (www.spamassassin.org) personal spam of Richard Jones (www.annexia.org/spam) Dornbos spam trap (www.dornbos.com) (part 2) spam collection of SpamArchive.org (part 2)\n\n^ wn+1 |L, {Ui }n 1 G is already available. A pivotal model p(s|x, Un+1 ; L) can be trained; when i= Un+1 is still empty (the new user has not yet received emails), then the regularizer of the density estimate p(s|x, Un+1 , L) resolves to the uniform distribution. Inference of p(s|x, Un+1 ; L, U1 , . . . , Un ) for the new user proceeds as discussed in Section 2.4. When data Un+1 becomes available, the prior can be updated. This update is exercised by invok ing the EM estimation procedure with additional parameters n+1 and (n+1) . The estimates of P (sUj ,L |wi , Uj , L) for all pairs of existing users i and j do not change and can be reused. The EM ^ procedure returns the updated prior wn+2 |L, {Ui }n+1 G for the next new user n + 2. i=1\n\n3 Experiments\nIn our experiments, we study the relative benefit of the following filters. The baseline is constituted by a filter that is trained under iid assumption from the labeled data. The second candidate is a \"one size fits all\" bias-corrected filter. Here, all users' messages are pooled as unlabeled data and the bias n+1 p(s|x, n+1 , ) is modeled by an estimator pO (s|x, n+1 , ) = p(s|x, i=1 Ui , L). An individ^ ually bias-corrected filter uses estimators pI (s|x, n+1 , ) = p(s|x, Un+1 , L). Finally, we assess ^ the Dirichlet-enhanced bias-corrected filter. It uses the hierarchical Bayesian model to determine the empirical bias pD (s|x, n+1 , ) = p(s|x, Un+1 ; L, U1 , . . . , Un ) conditioned on the new user's ^ messages, the labeled data, and all previous users' messages. Evaluating the filters with respect to the personal distributions of messages requires labeled emails from distinct users. We construct nine accounts using real but disclosed messages. Seven of them contain ham emails received by distinct Enron employees from the Enron corpus [8]; we use the individuals with the largest numbers of messages from a set of mails that have been cleaned from spam. We simulate two foreign users: the \"German traveler\" receives postings to a moderated German traveling newsgroup, the \"German architect\" postings to a newsgroup on architecture. Each account is augmented with between 2551 and 6530 spam messages from a distinct source, see Table 2. The number of ham emails varies between 1189 and 5983, reflecting about natural hamto-spam ratios. The ham section of the labeled data L contains 4000 ham emails from the SpamAssassin corpus, 1000 newsletters and 500 emails from Enron employee Taylor. The labeled data contain 5000 spam emails relayed by blacklisted servers. The data are available from the authors. The total of 76,214 messages are transformed into binary term occurrance vectors with a total of 834,661 attributes; charset and base64 decoding are applied, email headers are discarded, tokens occurring less than 4 times are removed. SVM parameter C , concentration parameter , and the regularization parameter of the logistic regression are adjusted on a small reserved tuning set. We iterate over all users and let each one play the role of the new user n + 1. We then iterate over the size of the new user's inbox and average 10 repetitions of the evaluation process, sampling Un+1 from the inbox and using the remaining messages as hold-out data for performance evaluation. We train the different filters on identical samples and measure the area under the ROC curve (AUC). Figure 1 shows the AUC performance of the iid baseline and the three bias-corrected filters for the first two Enron and one of the German users. Error bars indicate standard error of the difference to\n\n\f\nWilliams 0.996 0.992 AUC AUC 0.99 0.988 0.986 1248 32 128 512 2048 size of user's unlabeled inbox\n\nBeck\n\nGerman traveler\n\n0.9972 AUC 0.997 0.9968\n\n0.994 Dirichlet one size fits all individual iid baseline\n\nDirichlet one size fits all individual iid baseline\n\n0.992\n\nDirichlet one size fits all individual iid baseline 1248 32 128 512 2048 size of user's unlabeled inbox\n\n1248 32 128 512 2048 size of user's unlabeled inbox\n\nFigure 1: AUC of the iid baseline and the three bias-corrected filters versus size of |Un+1 |.\n\naverage of all nine users reduction of 1-AUC risk 0.4 0.3 0.2 0.1 0 Dirichlet one size fits all individual 1248 32 128 512 2048 size of user's unlabeled inbox reduction of 1-AUC risk 0.4\n\ncorrection benefit vs. iid violation 800 seconds 600 400 200 1 0 1\n\ntraining time Dirichlet-enhanced one size fits all Dirichlet-enh. incremental individual iid baseline\n\n0.2\n\n0 0\n\nindividually corrected 0.9 0.99 strength of iid violation\n\n23456 number of users\n\n7\n\n8\n\nFigure 2: Average reduction of 1-AUC risk over all nine users (left); reduction of 1-AUC risk dependent on strength of iid violation (center); number of existing users vs. training time (right).\n\nthe iid filter. Figure 2 (left) aggregates the results over all nine users by averaging the rate by which r the risk 1 - AU C is reduced. We compute this reduction as 1 - 1-AU Ccboasreelcteed , where AU Ccorrected 1 - AU C in is one of the bias-corrected filters and AU Cbaseline is the AUC of the iid filter. The benefit of the individualized bias correction depends on the number of emails available for that user; the 1 - AU C risk is reduced by 35-40% when many emails are available. The \"one size fits all\" filter is almost independent of the number of emails of the new user. On average, the Dirichletenhanced filter reduces the risk 1 - AU C by about 35% for a newly created account and by almost 40% when many personal emails have arrived. It outperforms the \"one size fits all\" filter even for an empty Un+1 because fringe accounts (e.g., the German users) can receive a lower weight in the common prior. The baseline AU C of over 0.99 is typical for server-sided spam filtering; a 40% risk reduction that yields an AUC of 0.994 is still a very significant improvement of the filter that can be spent on a substantial reduction of the false positive rate, or on a higher rate of spam recognition. The question occurs how strong a violation of the iid assumption the bias correction techniques can compensate. In order to investigate, we control the violation of the iid property of the labeled data as follows. We create a strongly biased sample by using only Enron users as test accounts i , and not using any Enron emails in the labeled data. We vary the proportion of strongly biased data versus randomly drawn Enron mails in the labeled training data (no email occurs in the training and testing data at the same time). When this proportion is zero, the labeled sample is drawn iid from the testing distributions; when it reaches 1, the sample is strongly biased. In Figure 2 (center) we observe that, averaged over all users, bias-correction is effective when the iid violation lies in a mid-range. It becomes less effective when the sample violates the iid assumption too strongly. In this case, \"gaps\" occur in ; i.e., there are regions that have zero probability in the labeled data L but nonzero probability in the testing data Ui i . Such gaps render schemes that aim at reconstructing p(x|i ) by weighting data drawn according to p(x|) ineffective. Figure 2 (right) displays the total training time over the number of users. We fix |Un+1 | to 16 and vary the number of users that influence the prior. The iid baseline and the individually corrected filter scale constantly. The Dirichlet-enhanced filter scales linearly in the number of users that constitute the common prior; the EM algorithm with a quadratic complexity in the number of users contributes only marginally to the training time. The training time is dominated by the training of the pivotal models (linear complexity). The Dirichlet enhanced filter with incremental update scales favorably compared to the \"one size fits all\" filter. Figure 2 is limited to the 9 accounts that we have engineered; the execution time is in the order of minutes and allows to handle larger numbers of accounts.\n\n\f\n4 Conclusion\nIt is most natural to define the quality criterion of an email spam filter with respect to the distribution that governs the personal emails of its user. It is desirable to utilize available labeled email data, but assuming that these data were governed by the same distribution unduly over-simplifies the problem setting. Training a density estimator to characterize the difference between the labeled training data and the unlabeled inbox of a user, and using this estimator to compensate for this discrepancy, improves the performance of a personalized spam filter--provided that the inbox contains sufficiently many messages. Pooling the unlabeled inboxes of a group of users, training a density estimator on this pooled data, and using this estimator to compensate for the bias outperforms the individualized bias-correction only when very few unlabeled data for the new user are available. We developed a hierarchical Bayesian framework which uses a Dirichlet process to model the common prior for a group of users. The Dirichlet-enhanced bias correction method estimates and compensates for the discrepancy between labeled training and unlabeled personal messages, learning from the new user's unlabeled inbox as well as from data of other users. Empirically, with a 35% reduction of the 1 - AU C risk for a newly created account, the Dirichlet-enhanced filter outperforms all other methods. When many unlabeled personal emails are available, both individualized and Dirichlet-enhanced bias correction reduce the 1 - AU C risk by nearly 40% on average. Acknowledgment This work has been supported by Strato Rechenzentrum AG and by the German Science Foundation DFG under grant SCHE540/10-2.\n\nReferences\n[1] D. Blei and M. Jordan. Variational methods for the Dirichlet process. In Proceedings of the International Conference on Machine Learning, 2004. [2] H. Drucker, D. Wu, and V. Vapnik. Support vector machines for spam categorization. IEEE Transactions on Neural Networks, 10(5):10481055, 1999. [3] M. Dudik, R. Schapire, and S. Phillips. Correcting sample selection bias in maximum entropy density estimation. In Advances in Neural Information Processing Systems, 2005. [4] C. Elkan. The foundations of cost-sensitive learning. In Proceedings of the International Joint Conference on Artificial Intellligence, 2001. [5] T. Ferguson. A Bayesian analysis of some nonparametric problems. Annals of Statistics, 1:209230, 1973. [6] J. Heckman. Sample selection bias as a specification error. Econometrica, 47:153161, 1979. [7] N. Japkowicz and S. Stephen. The class imbalance problem: A systematic study. Intelligent Data Analysis, 6:429449, 2002. [8] Bryan Klimt and Yiming Yang. The enron corpus: A new dataset for email classification research. In Proceedings of the European Conference on Machine Learning, 2004. [9] P. Komarek. Logistic Regression for Data Mining and High-Dimensional Classification. Doctoral dissertation, Carnegie Mellon University, 2004. [10] R. Neal. Markov chain sampling methods for Dirichlet process mixture models. Journal of Computational and Graphical Statistics, 9:249265, 2000. [11] Matthew Prince, Benjamin Dahl, Lee Holloway, Arthur Kellera, and Eric Langheinrich. Understanding how spammers steal your e-mail address: An analysis of the first six months of data from project honey pot. In Proceedings of the Conference on Email and Anti-Spam, 2005. [12] M. Sugiyama and K.-R. Muller. Model selection under covariate shift. In Proceedings of the International Conference on Artificial Neural Networks, 2005. [13] Volker Tresp and Kai Yu. An introduction to nonparametric hierarchical Bayesian modelling with a focus on multi-agent learning. In Switching and Learning in Feedback Systems, volume 3355 of Lecture Notes in Computer Science, pages 290312. Springer, 2004. [14] Bianca Zadrozny. Learning and evaluating classifiers under sample selection bias. In Proceedings of the International Conference on Machine Learning, 2004. [15] T. Zhang and F. Oles. Text categorization based on regularized linear classifiers. Information Retrieval, 4(1):531, 2001.\n\n\f\n", "award": [], "sourceid": 3158, "authors": [{"given_name": "Steffen", "family_name": "Bickel", "institution": null}, {"given_name": "Tobias", "family_name": "Scheffer", "institution": null}]}