![]() |
|||||||||||||||||||
|
|
|||||||||||||||||||
|
Regular Articles Positive-unlabeled AUC Maximization under Distribution ShiftAbstractMaximizing the area under the receiver operating characteristic curve (AUC) is a common approach to imbalanced binary classification. With current AUC maximization methods, it is usually assumed that training and test data distributions are identical and require labeled positive and negative data. However, in real-world applications, distribution shifts often occur, and labeled negative data are difficult to collect due to privacy concerns or the need for high expertise to annotate them. To overcome these limitations, my colleagues and I previously proposed a distribution shift adaptation method for maximizing the AUC that learns classifiers from positive and unlabeled data in the training distribution and unlabeled data in the test distribution, which do not overlap with the test data used for evaluation. We consider two types of distribution shifts: positive distribution shift and covariate shift. Under each shift, we theoretically show that the test AUC can be rewritten using only the available data, which enables classifier learning by maximizing the rewritten AUC. Keywords: AUC maximization, distribution shift, positive-unlabeled learning 1. IntroductionIn many real-world binary classification tasks such as intrusion detection, fraud detection, and medical diagnosis, class-imbalance frequently occurs, where positive data are much smaller than negative data [1]. For example, malicious activities and disease cases (positive data) are much smaller than benign ones (negative data). In such problems, classification accuracy is an inappropriate evaluation metric because a classifier that predicts all instances as negative can achieve high accuracy while failing to detect positive instances. Instead, the area under the receiver operating characteristic curve (AUC) is widely used [2]. Since the AUC is the probability that a positive instance is scored higher than a negative one, it can adequately evaluate performance even with class-imbalanced data. Attention has thus been directed towards AUC maximization methods, which enable accurate classifiers to be learned from labeled positive and negative data in imbalanced classification tasks [2]. With current AUC maximization methods, it is usually assumed that the training and test data distributions are identical. However, this assumption rarely holds in real-world applications because data distributions can change over time or across environments, which is known as distribution shift [3, 4]. For example, attack patterns can evolve over time in intrusion detection, and patient characteristics can differ across hospitals in medical diagnosis. Although this problem could be alleviated by continuously collecting labeled data from the test distribution and re-training the classifier, such labeling is often costly and time-consuming. Labeled negative data are often difficult to collect even from the training distribution. In intrusion detection, for example, malicious data (positive data) can be collected from public blocklists, whereas benign data from legitimate users (negative data) are often unavailable due to privacy reasons, and manually identifying reliable negative data from unlabeled data requires a high level of expertise. To overcome these limitations, my colleagues and I previously proposed a distribution shift adaptation method for maximizing the AUC in the positive and unlabeled (PU) setting [5, 6]. In this setting, we assume that PU data from the training distribution and unlabeled data from the test distribution are available, as illustrated in Fig. 1. Note that the unlabeled data in the test distribution do not overlap with the test data used for evaluation. Our goal is to learn a classifier that maximizes the AUC on the test distribution under distribution shift without using labeled negative data. We consider two practically important types of distribution shifts: positive distribution shift [3], where the positive-conditional density can vary, and covariate shift [4], where the input density can vary, as shown in Fig. 2. These shifts frequently arise in real-world imbalanced classification tasks. Under these shift-type assumptions, we theoretically show that the AUC on the test distribution can be rewritten using only the available data [5, 6]. By maximizing the rewritten AUC, we can obtain a desired classifier that maximizes the AUC on the test distribution. Through experiments across real-world public datasets, we demonstrate that our method outperforms current AUC maximization methods in distribution-shift settings.
2. Preliminary: AUC maximizationAUC maximization is briefly explained as follows. Let x ∈ X be an input instance and y ∈ {+1, −1} be its class label, where +1 and −1 indicate positive and negative classes, respectively. Here, pp(x) = p(x|y = +1) and pn(x) = p(x|y = −1) represent positive and negative-conditional densities, respectively. Let s(x) ∈ ℝ be a score function that outputs the positivity of x. The classifier is defined by s(x) with threshold t: y = sign(s(x) − t), where sign is a sign function. The (differentiable) AUC of s is defined as where 𝔼 denotes the expectation, and σ is the sigmoid function [2]. The AUC takes a value between zero and one and becomes higher when the scores of positive instances are higher than those of negative instances. When positive and negative data drawn from pp(x) and pn(x) are available, the AUC can be computed by approximating each expectation with the sample-mean, and we can directly learn the score function by maximizing it with standard stochastic gradient descent methods. However, when negative data are unavailable, we cannot directly compute the AUC, thus cannot maximize it. 3. Our methodOur problem setting is first described in Section 3.1. Our method under positive distribution shift and covariate shift is then described in Sections 3.2 and 3.3, respectively. 3.1 Problem settingWe are given positive data where We assume that there is a distribution shift between the training and test distributions. Specifically, we consider two types of distribution shifts. The first is positive distribution shift [3], where the negative-conditional density does not change but the positive-conditional density can vary. The second is covariate shift, where the input density changes but the conditional density of the class label given the input remains unchanged [4]. Our goal is to learn score function s(x) that can maximize the AUC on the test distribution under the distribution shift by using 3.2 Positive distribution shift adaptationPositive distribution shift is formally defined as This shift often occurs in real-world imbalanced classification tasks. For example, in intrusion detection, malicious adversaries rapidly change their attacks (positive data) to bypass detection systems, while the benign data (negative data) do not change much. Under this shift assumption, we can rewrite the AUC on the test distribution explained in Section 2 as where we set 3.3 Covariate shift adaptationCovariate shift is formally defined as ptr(y|x) = pte(y|x), ptr(x) ≠ pte(x).
This shift often occurs in real-world imbalanced classification tasks. In medical diagnosis, for example, the distribution of patients (input instances) often varies due to the differences in hospitals and measurement instruments, even when the input-output relation does not change. Under this shift assumption, we derive two estimators of the AUC on the test distribution [6]. The first one is represented as where Since both estimators are equivalent to the original AUC, a linear combination of them is also equivalent to the AUC: ![]() where β ∈ [0, 1] is a weighting hyperparameter. Similar to positive covariate shift, since coefficient 4. Experiments4.1 DataWe evaluated our method using commonly used public real-world datasets: Modified National Institute of Standards and Technology (MNIST), Fashion MNIST, Street View House Numbers (SVHN), and Canadian Institute for Advanced Research (CIFAR)10. For each dataset, we constructed a binary imbalanced classification task by grouping the original multiple class labels into two classes (positive and negative) and artificially induced shifts between the training and test distributions according to the shift types. For example, in MNIST and SVHN in the positive-distribution-shift experiment, even digits were assigned to the negative class and odd digits to the positive class; digits 7 and 9 (1, 3, 5, 7, and 9) were used for data in the training (test) positive-conditional density. All even digits were used for both the training and test negative-conditional densities. For the details of the data and shift creation, see our previous studies [5, 6]. For the positive-distribution-shift experiment, we used 10 positive and 5000 unlabeled instances in the training distribution and 5000 unlabeled instances in the test distribution for training. The positive class-priors πtr and πte were set to 0.01 and 0.3, respectively. For the covariate-shift experiment, we used 50 positive and 3000 unlabeled instances in the training distribution and 3000 unlabeled instances in the test distribution for training. The positive class-priors πtr and πte were set to 0.01 and 0.01, respectively. For each experiment, we additionally used 3000 test instances in the test distribution for evaluation. These evaluation data were disjoint from all data used for training. 4.2 Comparison methodsWe compared our method with an AUC maximization method from PU data in the training distribution (PUAUC) [8] and a naïve distribution adaptation method for AUC maximization (DAAUC). PUAUC uses only PU data in the training distribution and does not handle distribution shift. DAAUC uses data from both the training and test distributions, like our method, but it naively applies a feature invariance-promoting loss [9], which is commonly used for general distribution shift adaptation, to AUC maximization. All methods including ours used the neural-network-based score function to be learned. 4.3 ResultsTables 1 and 2 show the average test AUCs of each method under positive distribution shift and covariate shift, respectively. Our method performed the best or comparably in all cases. Since PUAUC cannot handle distribution shift, its performance was not high. DAAUC also did not work well because it is not explicitly designed for a specific distribution shift and maximizing the AUC on the test distribution. These results indicate the effectiveness of our method, which is theoretically designed for maximizing the AUC under specific distribution shifts.
5. ConclusionsWe previously proposed a distribution shift adaptation method for maximizing the AUC that uses PU data in the training distribution and unlabeled data in the test distribution. We consider two important types of distribution shifts with our method: positive distribution shift and covariate shift. Under each shift, we theoretically rewrite the AUC on the test distribution using only available data. By maximizing the rewritten AUC, we can learn accurate classifiers that maximize the test AUC. Experiments demonstrated the effectiveness of our method under distribution-shift settings. A limitation of the method is the need to assume a specific type of distribution shift. To alleviate this limitation, one interesting future direction is to extend the method to settings in which a small amount of labeled positive data is also available in the test distribution, which enables AUC maximization without assuming a specific type of distribution shift. References
|
|||||||||||||||||||















