Systems and methods for dynamically integrating heterogeneous anti-spam filters

In some embodiments, a spam filtering method includes computing the relevance of each of a plurality of anti-spam filters according to a relevance parameter set, and deciding whether an electronic message is spam or non-spam according to the relevancies and individual classification scores generated by the anti-spam filters. The relevance of an anti-spam filter indicates the degree to which a classification score produced by that particular filter determines the final classification of a given message. The relevance parameter set of each anti-spam filter may include, among others, a training maturity indicative of the degree of training of the filter, a filter update age indicative of the time elapsed since the latest update of the filter, a false-positive classification indicator, and a false-negative classification indicator of the anti-spam filter.

BACKGROUND

The invention relates to methods and systems for classifying electronic communications, and in particular to systems and methods for filtering unsolicited commercial electronic messages (spam).

Unsolicited commercial electronic communications have been placing an increasing burden on the users and infrastructure of electronic mail (email), instant messaging, and phone text messaging systems. Unsolicited commercial email, commonly termed spam or junk email, forms a significant percentage of all email traffic worldwide. Email spam takes up valuable network resources, affects office productivity, and is considered annoying and intrusive by many computer users.

Software running on an email user's or email service provider's system may be used to classify email messages as spam or non-spam. Several approaches have been proposed for identifying spam messages, including matching the message's originating address to lists of known offending or trusted addresses (techniques termed black- and white-listing, respectively), searching for certain words or word patterns (e.g., Viagra®, weight loss, aggressive buy), and analyzing message headers.

Experienced spammers have developed countermeasures to such classification tools, such as misspelling certain words (e.g., Vlagra), inserting unrelated text in spam messages, and using digital images of words or phrases instead of actual text The efficiency of existing spam detection methods often decreases in time, since the form and content of spam messages change rapidly. As spammer countermeasures become increasingly complex, successful detection may benefit from increasingly sophisticated identification techniques.

SUMMARY

According to one aspect, a spam filtering method comprises computing a first relevance of a first anti-spam filter according to a first relevance parameter set including a first training maturity of the first filter and a first filter update age of the first filter, computing a second relevance of a second anti-spam filter according to a second relevance parameter set including a second training maturity of the second filter and a second filter update age of the second filter, and determining whether an electronic communication is spam or non-spam according to a first result generated by applying the first anti-spam filter to the electronic communication, a second result generated by applying the second anti-spam filter to the electronic communication, the first relevance, and the second relevance.

According to another aspect, a spam filtering method comprises computing a first relevance of a first anti-spam filter according to a first relevance parameter set including a first filter update age of the first filter, a first false-positive classification indicator of the first filter, and a first false-negative classification indicator of the first filter, computing a second relevance of a second anti-spam filter according to a second relevance parameter set including a second filter update age of the second filter, a second false-positive classification indicator of the second filter, and a second false-negative classification indicator of the second filter, and determining whether an electronic communication is spam or non-spam according to a first result generated by applying the first anti-spam filter to the electronic communication, a second result generated by applying the second anti-spam filter to the electronic communication, the first relevance, and the second relevance.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

In the following description, it is understood that all recited connections between structures can be direct operative connections or indirect operative connections through intermediary structures. A set of elements includes one or more elements. A plurality of elements includes two or more elements. Any recitation of an element is understood to refer to at least one element. Unless otherwise required, any described method steps need not be necessarily performed in a particular illustrated order. A first element (e.g. data) derived from a second element encompasses a first element equal to the second element, as well as a first element generated by processing the second element and optionally other data. Unless otherwise specified, the term “program” encompasses both stand-alone programs and software routines that form part of larger programs. Making a determination or decision according to a parameter encompasses making the determination or decision according to the parameter and optionally according to other data. Unless otherwise specified, an indicator of some quantity/data may be the quantity/data itself, or an indicator different from the quantity/data itself. Unless otherwise specified, the term spam is not limited to email spam, but encompasses non-legitimate or unsolicited commercial electronic communications such as email, instant messages, and phone text and multimedia messages, among others. Computer readable media encompass storage media such as magnetic, optic, and semiconductor media (e.g. hard drives, optical disks, flash memory, DRAM), as well as communications links such as conductive cables and fiber optic links.

The following description illustrates embodiments of the invention by way of example and not necessarily by way of limitation.

FIG. 1shows an electronic communication and classification system10according to some embodiments of the present invention. System10may be an electronic mail (email), instant messaging (IM), mobile telephone, or other electronic communication system. For clarity, the following discussion will focus in particular on an electronic email system. System10includes a sender computer system18, a recipient mail server14, a training and update server12, and a plurality of recipient client systems20. Sender system18may include a sender mail server and/or one or more sender client computer systems. A network16connects sender system18, recipient mail server14, training and update server12, and recipient client systems20. Network16may be a wide-area network such as the Internet. Parts of network16, for example a part of network16interconnecting recipient client systems20, may also include a local area network (LAN). Each recipient client system20includes a message classifier30computer program, which is used to classify electronic communications as described in detail below.

An email message sent by sender system18to one or more email addresses is received at recipient mail server14, and then sent or made available otherwise (e.g. through a web interface) to recipient client systems20.

FIG. 2-Ashows an exemplary recipient client system20including a message classifier30computer program separate from an email application22, according to some embodiments of the present invention. In some embodiments, message classifier30may be a stand-alone application, or may be an anti-spam module of a security suite having antivirus, firewall, and other modules. Message classifier30receives an email message40, and transfers a labeled (classified) message42to email application22. The labeled message may include a class label, which may be placed in a header field of labeled message42. In some embodiments, message classifier30may transfer to email application22a class label and an indicator of an association of the class label to message40.

Message40is assigned to one of a plurality of classes44(labeled C1-C4inFIG. 2-A) by message classifier30. In some embodiments, classes44include one or more classes of unsolicited commercial email (spam), and one or more classes of non-spam (legitimate or unknown) email. In a simple embodiment, classes44may include spam and non-spam. In some embodiments, classes of legitimate email may include personal and work, while spam classes may include product offers and phishing, among others. Some embodiments of email application22associate classes44with individual email folders. A user may interact with classification engine30and/or email application22to manually alter the classification of any message, for example by moving the message from one folder to another. In some embodiments, email application22feeds the details of the user interaction back to message classifier30.

FIG. 2-Bshows an exemplary recipient client computer system120including a message classifier130integrated within an email application122. Message40received by message classifier130is directed to one of a plurality of classes (folders)144directly by message classifier130or by other routines of email application122. Classes144may include one or more spam classes and one or more non-spam classes. A user may interact with email application122to manually alter the classification of given messages.

FIG. 3shows an exemplary internal structure and operational diagram of a message classifier30according to some embodiments of the present invention. Message classifier30includes a generic parser32, a plurality of anti-spam filters34(labeled F1-Fn inFIG. 3) connected to generic parser32, a decision module38connected to anti-spam filters34, a filter relevance calculator36connected to decision module38, and a client-side training engine56connected to decision module38and filter relevance calculator36. Message classifier30inputs incoming message40and outputs labeled message42.

In some embodiments, generic parser32receives message40and processes it into a form which is suitable as input for the various anti-spam filters34. For example, generic parser32may break up message40into constituent parts (e.g. header, text body, images, MIME parts, etc.).

Anti-spam filters34input message data from generic parser32, together with a set of server-side filter parameters62aand a set of client-side filter parameters62b. Each anti-spam filter34produces a classification score35(denoted S1-Sn inFIG. 3). In some embodiments, anti-spam filters34may input message40directly, bypassing generic parser32.

Filter parameters62a-bare functional variables that control the performance of anti-spam filters34. Examples of filter parameters include a number of neurons per layer and neuronal weights of a neural network-based filter, the position of cluster centers in a k-means-based classifier, and the number and position of color histogram bins in an image-processing filter. In some embodiments, anti-spam filters34may be trained (optimized) to improve spam-detection performance by varying the values of filter parameters62a-b. Filters34may be trained at training and update server12or at each recipient client20(FIG. 1). In an exemplary embodiment, an anti-spam filter34specialized in image spam detection may be trained on a large database of sample images. Such a database may not be available to the client, so the operation of that particular anti-spam filter may be optimized at training and update server12. The result of the training process is a set of server-side filter parameters62a, which are made available to message classifier30residing on recipient client20. In another exemplary embodiment, a Bayesian classifier may reflect the user's individualized preferences regarding spam, and therefore may be trained at recipient client20. Message classifier30may allow the user to manually classify a number of messages40, thus inferring a user-specific definition of spam. Client-side training results in a set of optimal client-side filter parameters62b. In some embodiments, an anti-spam filter34may employ both server-side and client-side filter parameters. For example, parameters describing the structure and basic operation of the filter may be server-side, while the selectivity (spam tolerance level) of the filter may be adjusted by the user, and therefore may be client-side. In some embodiments, server-side filter parameters62amay be downloaded by clients via periodic or on-demand software updates over network16(FIG. 1).

In some embodiments, any change in filter parameters62a-bis considered a filter update. A filter update may be registered at the time of a software update (changes in server-side filter parameters62a) or when a user manually classifies an incoming message (changes in client-side filter parameters62b).

Each classification score35is an indication of a class assignment of message40according to the anti-spam filter34that computed the classification score. In some embodiments, each classification score35is a number between 0 and 1 showing the probability that message40belongs to a certain class44. In some embodiments, classification scores35may have binary values (e.g., 1/0, yes/no) or continuous values. For example, in an embodiment with two classes44(spam and non-spam), a classification score of 0.85 produced by a certain anti-spam filter34may indicate that the respective message has an 85% chance of being spam according to that particular anti-spam filter. In an embodiment with k>2 classes44, each classification score35may be a string of k numbers, Si={Si1, Si2, . . . , Sik}, 1≦i≦n, where Sijrepresents the probability that the message belongs to class j, according to anti-spam filter i.

Decision module38inputs individual classification scores35from anti-spam filters34and filter relevancies70(labeled R1, R2, . . . RninFIG. 3) from filter relevance calculator36and outputs a class label46indicating the class assignment of message40. In some embodiments, class label46forms part of labeled message42. Individual scores35returned by anti-spam filters34are integrated into a combined classification score, according to the respective filter relevancies70. In some embodiments, a combined classification score S is computed as a weighted sum of individual classification scores35, wherein the weights are the respective filter relevancies70:

wherein n denotes the number of anti-spam filters34. In an embodiment with k classes44, in which individual classification scores35are denoted by Si={Si1, Si2, . . . , Sik}, 1≦i≦n, the combined classification score S may be a string of k numbers, S={S1, S2, . . . , Sk}, wherein

Sj=∑i=1n⁢Ri⁢Sij
and n stands for the number of anti-spam filters34. In some embodiments, decision module38compares the combined classification score to a pre-defined threshold in order select a class assignment for message40. For example, a message40may receive the class label “spam” if the combined score S exceeds a certain value, e.g. 0.75.

Filter relevance calculator36receives relevance parameter set52a-band outputs the relevance70of each anti-spam filter34to decision module38. In some embodiments, relevance70is a number between 0 and 1 which represents the degree to which the classification score35of a given anti-spam filter34determines the final class assignment of a message40. In some embodiments, the set of relevancies70is scaled so that

∑i=1n⁢Ri=1,
wherein n denotes the number of anti-spam filters34.

The calculation of relevancies70proceeds according to relevance parameter sets52a-b, which may include server-side relevance parameters52aand/or client-side relevance parameters52bevaluated at training and update server12and at recipient client20, respectively.

In some embodiments, relevance parameter sets52a-binclude a training maturity M, a filter update age T, a filter aging speed indicator A, a false positive classification indicator P, a false negative classification indicator N, and a filter confidence C for each filter34.

The training maturity M is a number which quantifies the degree of training of the respective anti-spam filter34. In some embodiments, the training maturity M is a number between 0 and 1, wherein a value of 1 indicates a fully trained filter. In some embodiments, training maturity M may be related to the false-positive and false-negative classification rates of anti-spam filter34. For example, M may have a value of 1 if both the false-positive and false-negative classification rates of the respective filter are nil. In some embodiments, training maturity M may increase with each successful classification by the respective filter, or with the total number of messages used to train the respective filter. In some embodiments, the training maturity M is computed according to the ratio between the number of spam and the number of legitimate messages classified by the filter. For example, a filter may be considered fully trained (M=1) after it has successfully classified 500,000 spam messages and 500,000 legitimate messages. In some embodiments, the calculation method for the filter training maturity M is filter-specific. For example, the number of correctly classified messages required for a filter to become fully trained may depend on the type of anti-spam filter: a Bayes filter may need a training set of 20,000 messages, whereas an anti-spam filter using neural networks may need only 10,000 successful classifications to be assigned a value M=1, since the performance of a neural network may decrease with overtraining. The training maturity M may be computed at training and update server12(e.g. for an anti-spam filter34with no user specificity) and/or at recipient client20(e.g. for a user-customized anti-spam filter34). In some embodiments, a default value for the training maturity M may be provided by training and update server12, and may be adjusted further at each recipient client20to reflect a user's preference.

The filter update age T is a number indicating how old the filter parameters are. In some embodiments, the filter update age T is scaled between 0 and 1, which increases with the time elapsed since the latest update of the respective filter34. For example, T may be calculated according to the following formula:

wherein t denotes the number of days since the latest filter update. Some embodiments of message classifier30may disable an anti-spam filter whose T value is 1. In some embodiments, filter update age T forms part of client-side relevance parameters52b.

The filter aging speed indicator A is a number quantifying how fast the performance of an anti-spam filter34declines in time in the absence of updates. In some embodiments, the aging speed indicator is scaled between 0 and 1, where low A values may correspond to a filter whose performance remains strong for a long period of time, while high A values may correspond to a filter which loses relevance quickly. For example, an anti-spam filter based on message layout analysis may have a lower or higher A value than a filter based on detecting the keyword “Viagra®”, depending on the relative sensitivity of the performance of each filter to updates. In some embodiments, filter aging speed indicator A may be calculated at training and update server12by measuring the performance decrease of the respective anti-spam filter on a message corpus that is updated continuously with the addition of newly discovered spam.

The false positive classification indicator P and false negative classification indicator N are numbers showing the statistical likelihood that the respective anti-spam filter34may misclassify a message40, i.e., the risk that a non-spam message is classified as spam, and the risk that a spam message is classified as non-spam, respectively. In some embodiments, P and N are the false positive classification rate (i.e., the fraction of all messages of a corpus which where wrongly classified as spam) and false negative classification rate (i.e., the fraction of all messages of a corpus which were wrongly classified as non-spam) associated to an anti-spam filter34, respectively. In some embodiments, the false positive classification indicator P and the false negative classification indicator N are specific to the type of anti-spam filter34, and form part of server-side relevance parameters52a.

The filter confidence C indicates both the accuracy and versatility of the respective anti-spam filter34, and may be a number between 0 and 1, with 1 denoting a high-confidence filter. The filter confidence C quantifies the fact that some anti-spam filters34have an inherently higher spam-detecting performance than others. For example, an anti-spam filter based on detecting the word “friend” may be very effective for some spam waves, but overall may not be very reliable, since many legitimate messages may also contain the word “friend”. Such a filter may therefore have a relatively low filter confidence. In some embodiments, filter confidence C may form part of server-side relevance parameters52a.

In some embodiments, filter relevance calculator36computes the relevance70of an anti-spam filter34as a weighted sum:

R=∑i=1p⁢wi⁢xi,[3]
wherein xi, 1≦i≦p are quantities that depend on relevance parameter set52a-b, while the relevance weights wi, 1≦i≦p, are numbers between 0 and 1. For example, relevance70may be computed according to the formula:
R=w1M+w2TA+w3TP+w4TN+w5TC[4]
wherein R denotes relevance70, M is the filter training maturity, T is the filter update age, A is the filter aging speed indicator, P is the false positive classification indicator, N is the false negative classification indicator, and C is the filter confidence.

In some embodiments, relevance70is calculated according to the formula:

Alternatively, relevance70may be calculated according to the formula:

For some values of the relevance parameters, equations [5] and [6] may return a negative R. Some embodiments of filter relevance calculator36may replace all negative R values with R=0.

As shown inFIG. 3, client-side training engine56receives class label46from decision module38, and outputs client-side filter parameters62bto anti-spam filters34and client-side relevance parameters52bto filter relevance calculator36. To assess the accuracy of classification, some embodiments of message classifier30may request a user input50to confirm class label46(e.g., “yes, this is spam”) or to change class label46in case of misclassification (“no, this is not spam”). Additionally, some embodiments of message classifier30may use other heuristics to infer whether a message was spam or legitimate. For example, if a message40was originally classified as spam, and was deleted in unread form or ignored by the user for a certain time period, message classifier30may infer that the respective message was indeed spam.

With every classification of a message40, client-side training engine56may update the values of the false positive classification indicator P and the false negative classification indicator N: P and N may decrease in case of a correct classification and increase in case of misclassification. Some embodiments of the client-side training engine may increase the training maturity M of an anti-spam filter34in case of a correct classification.

Besides updating client-side relevance parameters52b, some embodiments of client-side training engine56may also update client-side filter parameters62b, in order to improve the performance of client-trained anti-spam filters34.

FIG. 4illustrates an operational diagram of training and update server12according to some embodiments of the present invention. Training and update server12includes a server-side training engine58and an email message corpus48. In some embodiments, message corpus48includes a collection of email messages40associated with unsolicited communication, sorted and indexed into a number of distinct classes44(e.g., adult content, phishing, etc.), as well as a collection of legitimate email messages. Message corpus48may be kept up to date by the addition of newly discovered spam. In some embodiments, message corpus48may reside on computer readable media which may not form part of training and update server12.

Server-side training engine58produces a set of server-side filter parameters62aand a set of server-side relevance parameters52aby analyzing message corpus48. Training and update server12makes parameters52aand62aavailable to message classifiers30residing on recipient clients over network16(FIG. 1).

In some embodiments, server-side relevance parameters52aare computed for each server-trained anti-spam filter34by classifying messages40which belong to email corpus48. Since the class label of each message in email corpus48is known, the false-positive classification indicator P and the false negative classification indicator N can be computed directly by estimating the rate of misclassified messages. Filter training maturity M, filter aging speed indicator A and filter confidence C may be estimated by monitoring classification performance on an email corpus48which is updated regularly with new additions of spam and legitimate messages. In an embodiment which uses eq. [3] to compute relevance70, relevance weights wifor each server-trained anti-spam filter34may also form part of server-side relevance parameters52.

Some embodiments of server-side training engine58implement a neural network model to compute relevance weights wi, in which every server-trained anti-spam filter34is assigned to a single neuron.FIG. 5shows an illustrative calculation of relevance70of a given anti-spam filter34using an artificial neuron. Inputs xiare multiplied by corresponding weights wi, and a summation module66adds all pairs wixi. A supervised learning scheme may be used to adapt weights wiiteratively in order to match a set of inputs x, to a desired relevance R. In some embodiments, the desired relevance R of a server-trained anti-spam filter34may be computed using receiver operating curves (ROC).

The exemplary systems and methods described above allow a message classification system to employ several anti-spam filters simultaneously and to dynamically integrate the individual results of the anti-spam filters according to their relative relevance. The relevance of user-trained filters may be balanced with the relevance of server-trained filters so that whenever a server-trained filter has not been updated for a long time or its detection rate is low, greater weight may be given to user-trained filters. Conversely, if a user-trained filter is not being sufficiently trained, its importance in the overall decision process may decrease in favor of an up-to-date server-trained filter.

To illustrate the operation of an exemplary message classification system, a simulation was conducted using three anti-spam filters: a heuristic filter, a user-trained Bayesian filter and a server-trained Bayesian filter. The user-trained Bayesian filter was delivered initially empty (both filter confidence C and training maturity M were initially zero). A simulated user was programmed to constantly train his Bayesian filter, leading to a steady increase of the training maturity M. The server-trained Bayesian filter was delivered with a training corpus of a few million varied samples, resulting in high initial values for the filter confidence C and training maturity M, but with a no-update policy.

FIG. 6-Ashows the relevance of the server-trained Bayesian filter within a period of two months, whileFIG. 6-Bshows the relevance of the user-trained Bayesian filter during the same period. Both relevancies were calculated according to Eq. [5]. Two months after the latest update, the relevance of the server-trained filter decreased from 70% to 49%. By contrast, due to constant training, the relevance of the user-trained filter was observed to increase from 0 to 72%

It will be clear to one skilled in the art that the above embodiments may be altered in many ways without departing from the scope of the invention. Accordingly, the scope of the invention should be determined by the following claims and their legal equivalents.