Binary classification device, binary classification method, and binary classification program
The binary classification device addresses the challenge of maximizing pAUC and reducing overfitting by separating features into sparse and dense categories for tailored processing, enhancing classification accuracy.
Patent Information
- Application Number
- JP2023526839
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-06-11
- Publication Date
- 2024-08-14
- Estimated Expiration
- 2041-06-11
AI Technical Summary
Existing methods struggle to maximize partial area under the curve (pAUC) in binary classification while effectively suppressing overfitting, particularly when dealing with sparse datasets.
A binary classification device and method that separates features into sparse and dense categories, performing distinct processing for each, including AUC maximization for sparse features and pAUC maximization for dense features to enhance performance.
The approach effectively maximizes pAUC while reducing overfitting, improving the accuracy of binary classification by focusing on specific feature types.
Smart Images

Figure 0007533785000025 
Figure 0007533785000034 
Figure 0007533785000033
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a binary classification device, a binary classification method, and a binary classification program. [Background technology]
[0002] Conventionally, various methods have been proposed to maximize the partial area under the curve (pAUC). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2017-102540 A [Patent Document 2] JP 2017-126158 A [Non-patent literature]
[0004] [Non-Patent Document 1] Harikrishna Narasimhan, Shivani Agarwal, “A Structural SVM Based Approach for Optimizing Partial AUC. ICML,vol.28.(2013)” [Non-Patent Document 2] Harikrishna Narasimhan, Shivani Agarwal, “SVMpAUCtight:A New Support Vector Method for Optimizing Partial AUC Based on a Tight Convex Upper Bound.KDD,pp.167-175.ACM(2013)“ [Non-Patent Document 3] Lori E. Dodd, Margaret S. Pepe, “Partial AUC Estimation and Regression.Biometrics 59(3),pp.614-623. Summary of the Invention [Problem to be solved by the invention]
[0005] However, in the above-mentioned prior art, it may be difficult to maximize pAUC while suppressing overlearning.
[0006] Therefore, the present disclosure proposes a binary classification device, a binary classification method, and a binary classification program that are capable of maximizing pAUC while suppressing overlearning. [Means for solving the problem]
[0007] In one aspect of the present disclosure, a binary classification device includes a separation unit that separates dense features from a plurality of features associated with a positive class or a negative class, and a generation unit that generates a binary classifier that classifies a given feature vector into the positive class or the negative class based on a dense feature vector converted from the dense features separated by the separation unit, such that a partial area under the curve (pAUC) that evaluates the performance of the binary classifier is maximized. Effect of the Invention
[0008] A binary classification device according to one or more embodiments of the present disclosure can maximize pAUC while suppressing overfitting. [Brief description of the drawings]
[0009] [Figure 1A] Figure 1A shows an example of how to draw an ROC curve. [Figure 1B] Figure 1B shows an example of how to plot an ROC curve. [Figure 1C] FIG. 1C shows an example of how to plot an ROC curve. [Figure 1D] FIG. 1D shows an example of how to draw an ROC curve. [Figure 1E] Figure 1E shows an example of how to plot an ROC curve. [Diagram 2] Figure 2 shows an example where the AUC is the same but the TPR is different in the low FPR region. [Diagram 3] FIG. 3 shows an example of pAUC maximization. [Figure 4] FIG. 4 shows the meaning of each term in pAUC after approximation with the empirical distribution. [Diagram 5] FIG. 5 is a block diagram of Environment 1, which is an example of an environment for binary classification. [Figure 6] FIG. 6 is a block diagram of an example of a configuration of a binary classification device according to the present disclosure. [Figure 7] FIG. 7 shows an example of a procedure for binary classification. [Figure 8] FIG. 8 shows an example of a communication log. [Figure 9] FIG. 9 shows an example of a communication log converted into a feature vector. [Figure 10] FIG. 10 is a block diagram of an example of the configuration of the classifier creation unit. [Figure 11] FIG. 11 is a block diagram of an example of the configuration of the classification unit. [Figure 12] FIG. 12 is a block diagram of an example of a parameter configuration. [Figure 13] FIG. 13 shows an example of a procedure for creating a classifier. [Figure 14] FIG. 14 shows an example of a procedure for classification. [Figure 15] FIG. 15 is a flow chart illustrating an example of a process for generating a classifier such that pAUC is maximized. [Figure 16] FIG. 16 shows an example of the hardware configuration of a computer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] A number of embodiments will be described in detail below with reference to the drawings. However, the present invention is not limited to these embodiments. The features of the various embodiments can be combined in various ways, provided that the features are not mutually inconsistent. The same elements are indicated by the same reference numerals, and duplicated descriptions are omitted.
[0011] (overview) A brief summary of some embodiments is provided below. It is not intended to limit the invention or the embodiments described in the following sections.
[0012] This disclosure relates to learning binary classifiers, which classify data into two classes. In particular, this disclosure relates to techniques for solving the pAUC maximization problem.
[0013] The pAUC maximization problem is a problem that involves maximizing a portion of the AUC, a metric used to evaluate the performance of a binary classifier, i.e., how to optimize the area of any interval of the ROC curve.
[0014] pAUC is one of the evaluation indices of a binary classifier. In existing research, pAUC is defined using a parameter vector w of a binary classifier and a score function f(x;w) defined by this w. Therefore, maximization of pAUC is achieved by determining the w of the classifier and the score function f(x;w) that maximizes pAUC.
[0015] In existing research, the parameter vector w and score function f(x;w) of the binary classifier are obtained by machine learning. However, in existing machine learning, overfitting is more likely to occur than in normal supervised learning (in this case, overfitting means that the binary classifier is too well adapted to the data during training, and the binary classifier cannot be adapted well to unknown test data).
[0016] One reason is that only a portion of the negative examples are taken into account in the formula for calculating pAUC.
[0017] In addition, in machine learning such as deep learning, feature vectors may be generated to be sparse. When a dataset is converted into a sparse feature vector, most of the elements of the sparse feature vector are 0. Since sparse feature vectors can save machine resources during calculations, generating sparse feature vectors is considered to be good for calculations.
[0018] However, when the training data is a sparse data set, the training data has a problem in that overfitting is likely to occur.
[0019] In order to solve the above problems, the binary classification device according to the present disclosure separates features into sparse features and dense features in the classifier creation process and classification process in machine learning. Then, the binary classification device performs different processes for each feature.
[0020] The tendency of features to be sparse or dense depends on the feature extraction method. In classifier creation, a binary classifier extracts features and separates them into sparse and dense parts. The sparse part is converted to a sparse feature vector and the dense part is converted to a dense feature vector.
[0021] For a sparse feature vector, the binary classifier generates an AUC-maximizing classifier, which is a binary classifier that maximizes the AUC. AUC maximization is a special case of pAUC maximization. The binary classifier uses the AUC-maximizing classifier to compute an AUC-maximizing score for the sparse feature vector.
[0022] The binary classifier then adds the calculated AUC maximization score to the dense feature vector. That is, the binary classifier generates a concatenated feature vector by concatenating the AUC maximization score to the dense feature vector. The binary classifier uses the concatenated feature vector to generate a pAUC maximization classifier, which is a binary classifier that maximizes pAUC. As a result, the binary classifier can maximize pAUC while suppressing the problem of overfitting.
[0023] 1. Introduction This disclosure deals with two-class classification, which is classification whose output is two classes, such as healthy or unhealthy, pass or fail.
[0024] In such two-class classification, various performance indices have been used to measure the performance of machine learning classification results. Typical examples include Accuracy, TPR (True Positive Rate), FPR (False Positive Rate), Recall, and Precision. However, not all of these performance indices are necessarily useful.
[0025] For example, consider a task of determining whether a communication log is derived from malware. In this task, assume that there are 999 benign logs (logs not derived from malware) and 1 malignant log (log derived from malware). Furthermore, assume that a classifier determines whether these 1000 logs are benign or malignant, and that the classifier determines that all logs are benign. In this case, Accuracy is 999 / 1000. Since Accuracy corresponds to precision, the accuracy is 99.9 percent.
[0026] When the classifier is evaluated by the performance index "Accuracy", the accuracy of 99.9% appears to be high at first glance. However, from the perspective of a user who wants to detect malicious communications, this classifier merely judges all logs to be benign, so it cannot be said that this classifier has the appropriate classification performance to detect malicious logs.
[0027] Therefore, in previous research, an index called AUC (Area Under the Curve) is often used when classifying imbalanced data. A curve with TPR on the y-axis and FPR on the x-axis is called a ROC (Receiver Operating Characteristic) curve. AUC corresponds to the area under the ROC curve. The definition of FNR is "1-FNR (False Negative Rate) = TPR". Therefore, AUC can be said to be an index calculated by considering two types of error rates, FPR and FNR.
[0028] Next, we will explain the definitions of TP (True Positive), FP (False Positive), FN (False Negative), TN (True Negative), TPR (True Positive Rate), and FPR (False Positive Rate).
[0029] TP is the number of times that the machine learning classification correctly identifies a positive data point as positive when it is actually positive. FP is the number of times that the classification incorrectly identifies a negative data point as positive. FN is the number of times that the classification incorrectly identifies a positive data point as negative. TN is the number of times that the classification correctly identifies a negative data point as negative when it is actually negative. TPR and FPR are defined as follows:
[0030]
number
[0031]
number
[0032] Next, we will explain how to draw the ROC curve and how to calculate the AUC.
[0033] 1A, 1B, 1C, 1D and 1E collectively show Example 10, which is an example of how to plot an ROC curve.
[0034] In Example 10, consider a two-class classification problem of determining whether a communication log is benign or malicious. Assume that a malignant log is a positive example and a benign log is a negative example.
[0035] In the examples of Figures 1A, 1B, 1C, 1D, and 1E, the number of malignant logs is 5 logs and the number of benign logs is 4 logs. Assume that the scores after the logs are classified by machine learning are as shown in the lower left of Figures 1A, 1B, 1C, 1D, and 1E. The closer the score is to 1, the closer the log is determined to be malignant. The closer the score is to 0, the closer the log is determined to be benign.
[0036] The ROC curve is obtained by calculating the TPR and FPR when the threshold is gradually rounded down from 1 to 0. For the machine learning classification result, logs above the threshold are determined to be malignant, and logs below the threshold are determined to be benign. Note that if the score is equal to the threshold, the ROC curve can be defined such that the log is included in either benign or malignant.
[0037] In the example of FIG. 1B, the threshold is between 0.9 and 0.99. In this case, the classification result can detect 1 log in 5 logs as malignant. Therefore, the TPR is 20 percent. The 4 logs as benign do not include any logs that are erroneously determined to be malignant. Therefore, the FPR is 0%.
[0038] In the example of FIG. 1C, the threshold is between 0.89 and 0.9. In this case, the TPR is 40% and the FPR is 0%. The classifier repeats this process. As a result, the classifier can draw a curve corresponding to the stars in FIG. 1D. This curve is an example of an ROC curve.
[0039] The AUC is the area under the ROC curve, so the AUC is the hatched area in Figure IE In this example, the AUC is 16 / 20 = 0.8.
[0040] However, for some tasks, the important metric may be the TPR for some FPR (i.e., a portion of the ROC curve) rather than the AUC (i.e., the entire ROC curve).
[0041] For example, when a classifier judges whether a communication log is benign or malignant, an important indicator is the TPR in the region where the FPR is low. In an actual network operation site, if a communication log is judged to be malignant, the network operator is forced to take measures such as manual operations to confirm whether the communication log is really a bad communication.
[0042] In particular, a large amount of communication logs are generated daily by companies, organizations, etc. If network operators operate in a way that allows a high FPR, there is a risk that a huge amount of false positives will occur and the network operators will not be able to respond to the false positives.
[0043] Similar problems can occur in other tasks. For example, if the FPR is high for antivirus software, users may not be able to connect to normal websites. Therefore, antivirus software with a high FPR may cause unnecessary inconvenience to users. Also, if the FPR is high for medical test kits, this may unnecessarily cause anxiety to patients. Because such problems can occur in these tasks, for example, TPR in the low FPR region (e.g., FPR in the range of 0 to 0.0001) is emphasized in these tasks.
[0044] Figure 2 shows example 20, where the AUC is the same but the TPR in the low FPR region is different.
[0045] In Example 20, both the left and right figures have the same AUC (0.8). However, in the left figure, the TPR is 0.2 when the FPR is 0.01. On the other hand, in the right figure, the TPR is 0.6 when the FPR is 0.01. That is, if a network operator operates the task of determining whether a communication log is benign or malicious so that the FPR is 0.01, the number of malicious logs that can be detected differs by 40 points despite the same ACU.
[0046] Thus, this disclosure addresses the pAUC maximization problem, which is a problem involving maximizing a portion of the AUC.
[0047] [1-1. Overview of pAUC maximization] Examples of existing research on the pAUC maximization problem include Patent Document 1, Patent Document 2, Non-Patent Document 1, Non-Patent Document 2, and Non-Patent Document 3 mentioned above.
[0048] FIG. 3 shows Example 30, an example of pAUC maximization.
[0049] In Example 30, "optimizing the area of any [α, β] interval of the ROC curve" is considered.
[0050] In this subsection, the pAUC maximization method based on the above existing research will be explained. First, the definitions of TPR, FPR, AUC, and pAUC will be explained.
[0051] Assume that a dataset of positive examples (Equation 3 below) and a dataset of negative examples (Equation 4 below) are given. m is the number of positive examples, and n is the number of negative examples. Here, Equation 5 below is the feature vector of the p-th data point, and Equation 6 below is the class of the p-th data point. At this time, + represents a positive example, and - represents a negative example. w is the parameter vector of the binary classifier. Equation 7 below is the threshold. f(x; w) is the score function defined by w. When f(x p ; w) > t holds for data point p, data point p is determined to be a positive example. When f(x p ; w) < t holds for data point p, data point p is determined to be a negative example. Probability is represented by P. Under this notation, TPR, FPR, AUC, and pAUC in any FPR interval (Equation 8 below) are defined as follows.
[0052]
Number
[0053]
Number
[0054]
Number
[0055]
Number
[0056]
Number
[0057]
number
[0058]
number
[0059]
number
[0060]
number
[0061]
number
[0062]
number
[0063] However, it is assumed that the above formula 13 holds. Here, it is assumed that there are no equal scores given by the classifiers. Under this assumption, the TPR, FPR, AUC, and pAUC when approximation by the empirical distribution is performed are given as follows.
[0064]
number
[0065]
number
[0066]
number
[0067]
number
[0068]
number
[0069]
number
[0070]
number
[0071] Here, the above formula 18(j α It has been assumed that the above formula 19 (j is the smallest integer greater than or equal to nα) holds. β It is assumed that the following holds: nβ is the maximum integer not exceeding or equal to nβ. I is the Heaviside step function. The above formula 20 means a negative example having the top j-th score among the scores calculated based on the score function f.
[0072] In order to realize pAUC maximization, the above formula 17 is incorporated as a part of the objective function. Then, a parameter vector w that realizes pAUC maximization is determined. Also, a score function f(x;w) is determined. Note that the score function f(x;w) may be linear or nonlinear. Also, the above formula 17 itself may be the objective function. Alternatively, the objective function may be the above formula 17 defined in the form of Log Loss. The score function f(x;w) may be, for example, logistic regression. pAUC maximization may be performed by applying an optimization algorithm such as gradient descent to the objective function.
[0073] Figure 4 shows the meaning of each term of pAUC after fitting with the empirical distribution, meaning 40. Meaning 40 indicates that the first, second and third terms of Equation 17 above correspond to the left, middle and right regions of pAUC, respectively.
[0074] [1-2. Challenges of maximizing pAUC] One of the problems with the above previous research is that the pAUC maximization method is more prone to overfitting than normal supervised learning. Overfitting means that the classifier is too adapted to the training data and cannot adapt well to unknown test data.
[0075] The cause of overfitting is that only a part of the negative examples is taken into account in the above formula 17. In particular, overfitting is likely to occur when the training data is a sparse data set. Sparse means sparse. In machine learning, when a data set is converted into a sparse feature vector, most elements of the sparse feature vector are 0.
[0076] Since most elements of sparse data are 0, sparse data can save machine resources. For this reason, in machine learning such as deep learning, it is generally considered that generating sparse feature vectors is good for calculations.
[0077] In order to maximize the pAUC while suppressing the above-mentioned overfitting problem, a binary classification device according to one or more embodiments of the present disclosure performs one or more binary classification processes described below.
[0078] [2. Environment for binary classification] First, an environment for binary classification according to the present disclosure will be described with reference to FIG.
[0079] 5 is a block diagram of an example of an environment for binary classification, environment 1. As shown in FIG. 5, environment 1 includes a binary classification device 100, a network 200, and a data provider device 300.
[0080] The binary classification device 100 is a system that performs one or more binary classification processes. The one or more binary classification processes include a process for generating a binary classifier so as to maximize pAUC. In the binary classification process according to the present disclosure, learning is performed so as to maximize pAUC, and the sparsity of the data is taken into consideration. Details of the binary classification process according to the present disclosure will be described in Section 4.
[0081] The binary classification device 100 includes one or more data processing devices. The data processing device is, for example, a server. An example of the configuration of the binary classification device 100 is described in Section 4.
[0082] The network 200 is, for example, a local area network (LAN), a wide area network (WAN), the Internet, etc. The network 200 connects the binary classification device 100 and the data provider device 300.
[0083] The data provider device 300 is a device used by a data provider. The data provider device 300 is, for example, a client device. The data provider device 300 provides data such as learning data and test data to the binary classification device 100. In addition, the data provider device 300 accepts a generated binary classifier and a data analysis result from the binary classification device 100.
[0084] 3. Configuration of binary classification device Next, an example of the configuration of the binary classification device 100 will be described with reference to FIG.
[0085] 6 is a block diagram of a binary classification device 100, which is an example of the configuration of a binary classification device according to the present disclosure. As shown in FIG. 6, the binary classification device 100 includes a communication unit 400, a control unit 500, and a storage unit 600.
[0086] [3-1. Communication unit 400] The communication unit 400 is implemented by, for example, a network interface card (NIC). The communication unit 400 is connected to the network 200 by wire or wirelessly. The communication unit 400 can transmit and receive information to and from the data provider device 300 via the network 200.
[0087] 3-2. Control Unit 500 The control unit 500 is a controller. The control unit 500 uses a random access memory (RAM) as a working area and is implemented by one or more processors (e.g., a central processing unit (CPU), a micro processing unit (MPU)) that execute various programs stored in a storage device of the binary classification device 100. The control unit 500 may also be implemented by an integrated circuit such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a general purpose graphic processing unit (GPGPU).
[0088] 6, the control unit 500 includes a learning data acquisition unit 510, a feature extraction unit 520, a feature vector conversion unit 530, a classifier creation unit 540, a test data acquisition unit 550, a classification unit 560, and a score determination unit 570. One or more processors of the binary classification device 100 can implement each control unit by executing instructions stored in one or more memories of the binary classification device 100. The data processing performed by each control unit is an example, and each control unit (e.g., the classifier creation unit 540) may perform data processing described in relation to other control units (e.g., the feature vector conversion unit 530).
[0089] [3-2-1. Learning Data Acquisition Unit 510] The learning data acquiring unit 510 acquires learning data. For example, the learning data acquiring unit 510 acquires the learning data from the storage unit 600. The learning data acquiring unit 510 may store the learning data provided by the data provider device 300 in the storage unit 600.
[0090] 3-2-2. Feature Extraction Unit 520 The feature extraction unit 520 determines a feature for each data. A feature is a combination of points of interest for the data to be learned. For example, consider a two-class classification in which plastic bottles are produced in a factory and the quality of the plastic bottles is judged as to whether they are eligible for shipping. In this case, points of interest such as radius, transparency, and hardness correspond to feature amounts. These feature amounts are sometimes designed manually by humans, but in recent years, feature amounts are sometimes designed automatically using deep learning and the like.
[0091] 3-2-3. Feature Vector Conversion Unit 530 The feature vector conversion unit 530 converts the feature amount into a feature vector. Examples of the conversion method include N-gram and Bag-of-Words.
[0092] [3-2-4. Classifier Creation Unit 540] The classifier creation unit 540 performs machine learning using the feature vector generated by the feature vector conversion unit 530. The classifier creation unit 540 determines a parameter vector for machine learning based on the feature vector. The classifier creation unit 540 may store the parameter vector in the storage unit 600.
[0093] [3-2-5. Test data acquisition unit 550] The test data acquiring unit 550 acquires the test data. For example, the test data acquiring unit 550 acquires the test data from the storage unit 600. The test data acquiring unit 550 may store the test data provided by the data provider device 300 in the storage unit 600.
[0094] [3-2-6. Classification section 560] The classification unit 560 calculates a score for each test data using the parameter vector and the feature vector of the test data stored in the storage unit 600. The score indicates which of the two classes the test data is closer to. In the above example of plastic bottles in a factory, the score ranges from 0 to 1. The score is calculated so that the better the quality of the plastic bottle, the closer the score is to 0. Also, the worse the quality of the plastic bottle, the closer the score is to 1.
[0095] 3-2-7. Score determination unit 570 The score determination unit 570 sets a threshold value for the score obtained by the classification unit 560. The score determination unit 570 determines the class based on whether the score value is greater than or less than the threshold value. In the above example of plastic bottles in a factory, plastic bottles with scores greater than the threshold value are determined as defective products. Plastic bottles with scores less than the threshold value are determined as non-defective products.
[0096] [3-3. Storage section 600] The storage unit 600 is implemented by, for example, a semiconductor memory element such as a RAM or a flash memory, or a storage device such as a hard disk or an optical disk. The storage unit 600 stores various data such as training data, test data, and parameters determined by the control unit 500 (for example, a parameter vector of machine learning).
[0097] As shown in FIG. 6, the storage unit 600 includes parameters 610 .
[0098] [3-3-1. Parameter 610] The parameters 610 include a parameter vector obtained by machine learning. The parameters 610 include, for example, a parameter vector determined by the classifier creation unit 540.
[0099] 3-4. Input section 700 The input unit 700 accepts input from an administrator of the binary classification device 100. The input unit 700 is implemented by, for example, a keyboard and a mouse.
[0100] 3-5. Output section 800 The output unit 800 displays information to an administrator of the binary classification device 100. For example, the output unit 800 outputs the results of processing performed by the control unit 500. The output unit 800 is implemented by, for example, a liquid crystal display or an organic EL (Electro Luminescence) display.
[0101] FIG. 7 shows Example 50, which is an example of a procedure for binary classification. In Example 50, a training data acquisition unit 510 acquires training data from an input unit 700. The training phase uses the training data acquisition unit 510, the feature extraction unit 520, the feature vector conversion unit 530, the classifier creation unit 540, and the parameters 610. In Example 50, a test data acquisition unit 550 acquires test data from the input unit 700. The test phase uses the test data acquisition unit 550, the feature extraction unit 520, the feature vector conversion unit 530, the classification unit 560, the score determination unit 570, and the output unit 800.
[0102] 4. pAUC maximization process according to the present disclosure Next, a pAUC maximization process according to the present disclosure will be described. The present disclosure proposes a method of dividing sparse and dense features and performing separate processes for each divided feature.
[0103] First, the binary classification device 100 classifies features into sparse features and dense features. In the following, a two-class classification problem is considered, in which a communication log of a proxy server is classified as benign or malignant. The features depend on the designer. Therefore, when a feature is extracted, various things can be candidates for the features.
[0104] For example, examples of candidate features include domain, top-level domain (TLD), destination Internet Protocol (IP) address, sender country name, sender city / town name, URL (Uniform Resource Locator) length, domain length, percentage of numbers contained in the URL, whether or not the URL contains symbols, etc.
[0105] The binary classification device 100 converts these feature quantities determined by feature extraction into a feature vector. In this case, the binary classification device 100 can take various measures. For example, the binary classification device 100 can convert the value of the feature quantity into a value between 0 and 1 by normalizing the above-mentioned feature quantities (hereinafter referred to as statistical features in this specification) such as "URL length, domain length, ratio of numbers contained in the URL, whether or not symbols are contained in the URL". For example, when the feature quantity is the length of the URL or domain, the binary classification device 100 can normalize the length of the URL or domain by dividing the length of the URL or domain of each log by the maximum length of the URL or domain contained in the log of the dataset.
[0106] Furthermore, the percentage of numbers contained in a URL can be expressed as %. Thus, for example, when the URL is https: / / example.com / 12345, 5 out of 25 characters are numbers. In this case, the percentage of numbers contained in the URL is 0.2%. Regarding whether or not a symbol is contained in the URL, when the symbol is contained in the URL, the value of the feature is 1. When the symbol is not contained in the URL, the value of the feature is 0. As described above, the binary classification device 100 can convert statistical features into feature vectors.
[0107] On the other hand, it is difficult to normalize features such as domains, top-level domains (TLDs), destination IP addresses, source country names, and source city names (hereinafter referred to as character features in this specification) using statistical feature normalization methods. In machine learning, such features can generally be converted into feature vectors using methods such as Bag-of-Words. Bag-of-Words is a method that counts the words that appear in a sentence and determines the number of words as a feature.
[0108] FIG. 8 shows an example 60 that is an example of a communication log.
[0109] FIG. 9 shows an example 70 that is an example of a communication log converted into a feature vector.
[0110] In Example 70, the maximum length of a URL is 2083, so when the URL length is normalized, the URL length is divided by 2083. The top row of Example 70 shows character features converted into feature vectors. The bottom row of Example 70 shows statistical features converted into feature vectors. Note that the character features are converted into feature vectors using Bag-of-Words.
[0111] As shown in FIG. 9, character features require multiple columns for one feature (e.g., domain, TLD, destination IP address, source country name, source city / town name). For this reason, character features tend to be sparse. On the other hand, statistical features tend to be dense. As described above, the binary classification device 100 may convert a feature having both sparse and dense properties into a feature vector depending on the task.
[0112] As mentioned above, the pAUC maximization in the previous study takes into account only a part of the negative examples in the above formula 17. For this reason, the pAUC maximization in the previous study is prone to overfitting. In particular, when the data is sparse, there is a risk that the learning will become overly dependent on one element of each feature vector.
[0113] For example, in the example in Figure 9, the binary classifier learns that Log1 and Log3 are benign logs, and Log2 is malicious. In this case, the binary classifier may ignore features other than the TLD. As a result, the learning result may be overly biased toward only one element, such as if the TLD is com, then the log is benign, and if the TLD is co.jp, then the log is malicious. This type of phenomenon is likely to occur with sparse features.
[0114] In order to avoid such overfitting, various workarounds have been proposed. In general, the solutions proposed are "increasing the amount of data to be trained" and "setting constraints on the values of the machine learning parameter vector."
[0115] However, the amount of data that can be prepared for training is limited. In reality, the above workarounds do not necessarily avoid overfitting. In particular, in pAUC maximization, only a portion of the negative examples is taken into account, so overfitting is likely to occur in sparse features.
[0116] Therefore, as a method of alleviating the above problem in maximizing pAUC, the binary classification device 100 divides features into sparse features and dense features, and performs separate processing for each feature.
[0117] [4-1. Creating a classifier] First, the binary classification device 100 creates a classifier.
[0118] Fig. 10 is a block diagram of an example of the configuration of the classifier creation unit 540. As shown in Fig. 10, the classifier creation unit 540 includes a sparse-dense separation unit 541, an AUC maximization unit 542, a score calculation unit 543, a feature vector generation unit 544, a feature vector processing unit 545, and a pAUC maximization unit 546.
[0119] [4-1-1. Sparse-dense separation unit 541] The sparse-dense separation unit 541 separates the feature vector created by the feature vector conversion unit 530 into a sparse part and a dense part. The sparse-dense separation unit 541 separates the character feature of the multiple feature amounts and the statistical feature of the multiple feature amounts into a sparse feature amount and a dense feature amount, respectively. In the above example of determining whether a communication log is benign or malignant, the sparse-dense separation unit 541 extracts the character feature as a sparse part and the statistical feature as a dense part. The designer of the binary classification device 100 can freely design the criteria for sparseness and denseness. For example, if there are multiple feature elements (e.g., example1.com, example2.co.jp, example3.com) for one feature candidate (e.g., domain), the sparse-dense separation unit 541 may set each feature element (example1.com, example2.co.jp, example3.com) as a sparse feature.
[0120] [4-1-2. AUC maximization section 542] The AUC maximization unit 542 performs AUC maximization. AUC maximization is a special case of pAUC maximization, and corresponds to the case where α=0 and β=1 hold in the example of FIG. 4. The AUC maximization unit 542 generates a binary classifier that classifies a given feature vector into a positive class or a negative class based on a sparse feature vector converted from the sparse feature amount separated by the sparse-dense separation unit 541, so that the AUC that evaluates the performance of the binary classifier is maximized. The AUC maximization unit 542 stores the AUC maximization parameters obtained by learning in the AUC maximization parameters 611.
[0121] [4-1-3. Score calculation unit 543] The score calculation unit 543 calculates a score using the classifier obtained by the AUC maximization unit 542. Note that, in the learning phase, if learning is performed accurately, the score is expected to be a value that is extremely close to 0 or 1 in most cases. The score calculation unit 543 uses the binary classifier generated by the AUC maximization unit 542 to calculate a score indicating the possibility that the sparse feature vector will be classified into a positive class.
[0122] 4-1-4. Feature Vector Generation Unit 544 The feature vector generation unit 544 converts the dense feature amount into a feature vector.
[0123] 4-1-5. Feature Vector Processing Unit 545 The feature vector processing unit 545 adds the score obtained by the score calculation unit 543 to the string of feature vectors obtained by the feature vector generation unit 544. The feature vector processing unit 545 generates a new feature vector.
[0124] [4-1-6.pAUC maximization section 546] The pAUC maximization unit 546 performs pAUC maximization. The pAUC maximization unit 546 generates a binary classifier that classifies a given feature vector into a positive class or a negative class based on the new dense feature vector generated by the feature vector processing unit 545, so that the pAUC that evaluates the performance of the binary classifier is maximized.
[0125] [4-2. Classification] Fig. 11 is a block diagram of an example of the configuration of the classifier 560. As shown in Fig. 11, the classifier 560 includes a sparse-dense separator 561, an AUC maximizing classifier 562, a score calculator 563, a feature vector generator 564, a feature vector processor 565, and a pAUC maximizing classifier 566.
[0126] [4-2-1. Sparse-dense separation unit 561] The sparse-dense separator 561 performs the same processing as that of the sparse-dense separator 541 .
[0127] [4-2-2. AUC maximization classification section 562] The AUC maximization classifier 562 acquires parameters from the AUC maximization parameters 611. Then, the AUC maximization classifier 562 performs an AUC maximization test based on the parameters.
[0128] [4-2-3. Score Calculation Unit 563] The score calculation unit 563 calculates the score of the test data from the AUC maximization test performed by the AUC maximization classification unit 562.
[0129] 4-2-4. Feature Vector Generation Unit 564 The feature vector generation unit 564 performs the same processing as that performed by the feature vector generation unit 544 .
[0130] 4-2-5. Feature Vector Processing Unit 565 The feature vector processing unit 565 performs processing similar to that of the feature vector processing unit 545. More specifically, the feature vector processing unit 565 adds the score obtained by the score calculation unit 563 to the string of feature vectors obtained by the feature vector generation unit 564.
[0131] [4-2-6.pAUC maximization classification section 566] The pAUC maximization classification unit 566 acquires parameters for performing pAUC maximization from the pAUC maximization parameters 612. Then, the pAUC maximization classification unit 566 performs classification (test) for pAUC maximization based on the acquired parameters.
[0132] 12 is a block diagram of an example configuration of parameters 610. As shown in FIG. 12, parameters 610 include an AUC maximization parameter 611 and a pAUC maximization parameter 612.
[0133] [4-2-7.AUC Maximization Parameter 611] The AUC maximization parameters 611 store the parameters obtained by the AUC maximization classifier 562 .
[0134] [4-2-8. pAUC Maximization Parameter 612] The pAUC maximization parameters 612 store the parameters obtained in the pAUC maximization classifier 566 .
[0135] 13 shows an example 80 of a procedure for creating a classifier. The example 80 shows an overall view of a plurality of processes executed by a plurality of control units included in the classifier creating unit 540.
[0136] 14 shows an example 90 of a procedure for classification. The example 90 shows an overall view of a plurality of processes executed by a plurality of control units included in the classification unit 560.
[0137] 5. Flowchart of binary classification process Next, a flowchart of an example of a binary classification process according to the present disclosure will be described with reference to Fig. 15. The example of the binary classification process includes a process for generating a classifier so as to maximize pAUC. The process for generating a classifier so as to maximize pAUC is performed by, for example, the binary classification device 100 of Fig. 6.
[0138] FIG. 15 is a flow chart illustrating a process P100, which is an example of a process for generating a classifier such that pAUC is maximized.
[0139] As shown in FIG. 15, first, the training data acquiring unit 510 of the binary classification device 100 acquires training data (step S101).
[0140] Next, the feature extracting unit 520 of the binary classification device 100 extracts a plurality of feature amounts from the training data (step S102).
[0141] Next, the feature vector conversion unit 530 of the binary classification device 100 converts the plurality of feature amounts into a plurality of feature vectors (step S103).
[0142] Next, the sparse-dense separation unit 541 of the classifier creation unit 540 of the binary classification device 100 separates each feature vector into sparse features and dense features (step S104).
[0143] Next, the AUC maximizing unit 542 of the classifier creating unit 540 generates a first classifier by using a feature vector corresponding to the multiple sparse features so as to maximize the AUC (step S105).
[0144] Next, the score calculation unit 543 of the classifier creation unit 540 uses the generated first classifier to calculate scores of the multiple sparse feature amounts (step S106).
[0145] Next, the feature vector generation unit 544 of the classifier creation unit 540 converts each dense feature into a dense feature vector (step S107).
[0146] Next, the feature vector processing unit 545 of the classifier creation unit 540 generates feature vectors by adding the scores of the corresponding sparse features to each dense feature vector (step S108).
[0147] Next, the pAUC maximizing unit 546 of the classifier creating unit 540 uses the generated feature vector to generate a second classifier so as to maximize the pAUC (step S109).
[0148] [6. Other] A portion of a process described as being performed automatically may be performed manually. Alternatively, all or a portion of a process described as being performed manually may be performed automatically in a known manner. Furthermore, information including the procedure, specific names, various data, and parameters of the processes shown in this specification and drawings may be changed arbitrarily unless otherwise specified. For example, various information shown in each drawing is not limited to the illustrated information.
[0149] The components of the illustrated devices are intended to conceptually illustrate the functions of the devices. The components are not necessarily physically configured as shown in the drawings. In other words, the specific form of the distributed or integrated devices is not limited to the form of the system and device shown in the drawings. All or part of the devices may be functionally or physically distributed or integrated depending on various loads and usage conditions.
[0150] [7. Hardware Configuration] 16 is a diagram showing a computer 1000, which is an example of a hardware configuration of a computer. The systems and methods described in this specification are implemented by, for example, the computer 1000 shown in FIG.
[0151] 16 shows an example of a computer in which a binary classification device 100 is implemented by executing a program. The computer 1000 includes, for example, a memory 1010 and a CPU 1020. The computer 1000 also includes a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.
[0152] The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to a hard disk drive 1090. The disk drive interface 1040 is connected to a disk drive 1100. A removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1110 and a keyboard 1120, for example. The video adapter 1060 is connected to a display 1130, for example.
[0153] The hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, a program that defines each process of the binary classification device 100 is implemented as a program module 1093 in which code executable by the computer 1000 is written. The program module 1093 is stored, for example, in the hard disk drive 1090. For example, a program module 1093 for executing the same process as the functional configuration of the binary classification device 100 is stored in the hard disk drive 1090. The hard disk drive 1090 may be replaced with an SSD (Solid State Drive).
[0154] The hard disk drive 1090 can store a binary classification program for binary classification processing. The binary classification program can also be created as a program product that, when executed, performs one or more methods such as those described above.
[0155] Furthermore, setting data used in the processing of the above-described embodiment is stored as program data 1094, for example, in memory 1010 or hard disk drive 1090. Then, CPU 1020 reads out program module 1093 or program data 1094 stored in memory 1010 or hard disk drive 1090 into RAM 1012 as necessary, and executes the program.
[0156] Note that the program module 1093 and the program data 1094 are not limited to being stored in the hard disk drive 1090, but may be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network (LAN, WAN, etc.). Then, the program module 1093 and the program data 1094 may be read by the CPU 1020 from the other computer via the network interface 1070.
[0157] 8. Summary of the embodiment As described above, the binary classification device 100 according to the present disclosure includes a classifier creation unit 540. The classifier creation unit 540 includes a sparse-dense separation unit 541 and a pAUC maximization unit 546. The sparse-dense separation unit 541 is an example of a separation unit. The pAUC maximization unit 546 is an example of a generation unit and a second generation unit. In at least one embodiment, a dense feature is separated from a plurality of feature values associated with a positive class or a negative class. In at least one embodiment, the pAUC maximization unit 546 generates a binary classifier that classifies a given feature vector into a positive class or a negative class based on a dense feature vector converted from the dense feature values separated by the sparse-dense separation unit 541, such that a pAUC that evaluates the performance of the binary classifier is maximized.
[0158] In some embodiments, the sparse-dense separator 541 separates a plurality of features associated with a positive class or a negative class into sparse features and dense features. In some embodiments, the pAUC maximizer 546 generates a binary classifier based on the dense feature vector and a score indicating the likelihood that a sparse feature vector converted from the sparse features separated by the sparse-dense separator 541 is classified into the positive class.
[0159] In some embodiments, the sparse-dense separator 541 separates character features among the multiple features and statistical features among the multiple features into sparse features and dense features, respectively.
[0160] As described above, the classifier creation unit 540 includes an AUC maximization unit 542 and a score calculation unit 543. The AUC maximization unit 542 is an example of a first generation unit. The score calculation unit 543 is an example of a calculation unit. In at least one embodiment, the AUC maximization unit 542 generates a first binary classifier that classifies a given feature vector into a positive class or a negative class based on a sparse feature vector converted from the sparse feature amount separated by the sparse-dense separation unit 541, so that the AUC that evaluates the performance of the first binary classifier is maximized. In at least one embodiment, the score calculation unit 543 calculates a score indicating the possibility that the sparse feature vector is classified into a positive class using the first binary classifier generated by the AUC maximization unit 542. In some embodiments, the pAUC maximization unit 546 generates a binary classifier by generating a second binary classifier that classifies a given feature vector into a positive class or a negative class based on the score calculated by the score calculation unit 543 and the dense feature vector, such that the pAUC, which evaluates the performance of the second binary classifier, is maximized.
[0161] As described above, the classifier creation unit 540 includes the feature vector processing unit 545. In at least one embodiment, the feature vector processing unit 545 generates a feature vector by adding the scores calculated by the score calculation unit 543 to a column of the dense feature vector. In some embodiments, the pAUC maximization unit 546 generates a second binary classifier based on the feature vector generated by the feature vector processing unit 545, by generating a second binary classifier based on the scores calculated by the score calculation unit 543 and the dense feature vector.
[0162] Although various embodiments have been described in detail herein with reference to the drawings, these embodiments are merely examples and are not intended to limit the present invention to these embodiments. The features described herein can be realized in various ways, including various modifications and improvements based on the knowledge of those skilled in the art.
[0163] Furthermore, the above-mentioned "module (-er suffix, -or suffix)" can be read as a unit, means, circuit, etc. For example, a communication module, a control module, and a storage module can be read as a communication unit, a control unit, and a storage unit, respectively. Furthermore, each control unit in control unit 500 (e.g., a sparse-dense separator) can also be read as a sparse-dense separation unit. [Explanation of symbols]
[0164] 1 Environment 100 Binary Classifier 200 Network 300 Data provider device 400 Communications Department 500 Control section 510 Learning Data Acquisition Unit 520 Feature Extraction Unit 530 Feature Vector Conversion Unit 540 Classifier Creation Department 541 Sparse-Dense Separator 542 AUC maximization part 543 Score Calculation Unit 544 Feature Vector Generation Unit 545 Feature Vector Processing Unit 546 pAUC Maximizer 550 Test Data Acquisition Department 560 Classification Department 561 Sparse-Dense Separator 562 AUC maximization classifier 563 Score Calculation Unit 564 Feature Vector Generation Unit 565 Feature Vector Processing Unit 566 pAUC maximization classifier 600 Storage section 610 Parameters 611 AUC maximization parameters 612 pAUC maximization parameters 700 Input section 800 Output section
Claims
1. A separation unit that separates dense features from a plurality of features associated with a positive class or a negative class; a generating unit that generates a binary classifier that classifies a given feature vector into the positive class or the negative class based on a dense feature vector converted from the dense feature amount separated by the separating unit, so that a partial area under the curve (pAUC) that evaluates the performance of the binary classifier is maximized; A binary classification device comprising:
2. The separation unit separates the plurality of features associated with the positive class or the negative class into sparse features and the dense features; The generating unit generates the binary classifier based on a score indicating a possibility that a sparse feature vector converted from the sparse feature amount separated by the separating unit is classified into a positive class and the dense feature vector. The binary classification device according to claim 1 .
3. The separation unit separates a character feature from among the plurality of feature amounts and a statistical feature from among the plurality of feature amounts into the sparse feature amount and the dense feature amount, respectively. The binary classification device according to claim 2 .
4. a first generating unit configured to generate a first binary classifier that classifies a given feature vector into the positive class or the negative class based on a sparse feature vector converted from the sparse feature amount separated by the separating unit, so as to maximize an area under the curve (AUC) that evaluates the performance of the first binary classifier; a calculation unit that calculates a score indicating a possibility that the sparse feature vector is classified into a positive class using the first binary classifier generated by the first generation unit; The generation unit is a second generation unit, and the second generation unit generates the binary classifier by generating a second binary classifier that classifies a given feature vector into the positive class or the negative class based on the score calculated by the calculation unit and the dense feature vector, such that a pAUC that evaluates the performance of the second binary classifier is maximized. The binary classification device according to claim 2 or 3.
5. a feature vector processing unit that generates a feature vector by adding the score calculated by the calculation unit to a sequence of the dense feature vector; The second generation unit generates the second binary classifier based on the score calculated by the calculation unit and the dense feature vector, and generates the second binary classifier based on the feature vector generated by the feature vector processing unit. The binary classification device according to claim 4 .
6. 1. A computer implemented method for binary classification comprising: A separation step of separating dense features from a plurality of features associated with a positive class or a negative class; a generating step of generating a binary classifier that classifies a given feature vector into the positive class or the negative class based on a dense feature vector converted from the dense feature quantity separated by the separating step, so that a partial area under the curve (pAUC) that evaluates the performance of the binary classifier is maximized; Binary classification methods including:
7. a separation step for separating dense features from a plurality of features associated with a positive class or a negative class; a generation step of generating a binary classifier that classifies a given feature vector into the positive class or the negative class based on a dense feature vector converted from the dense feature quantity separated by the separation step, so that a partial area under the curve (pAUC) that evaluates the performance of the binary classifier is maximized; A binary classification program that causes a computer to execute the following.
Citation Information
Patent Citations
Classification device, method, and program
JP2017102540A
Binary classification learning device, binary classification device, method, and program
JP2017126158A
Supervised method for classifying seasonal patterns
US20170249562A1
Mixed Machine Learning Architecture
US20190073581A1
