Title: LEARNING FROM LABEL PROPORTIONS WITH CONSISTENCY REGULARIZATION

Abstract: The problem of learning from label proportions (LLP) involves training classifiers with weak labels on bags of instances, rather than strong labels on individual instances. The weak labels only contain the label proportion of each bag. The LLP problem is important for many practical applications that only allow label proportions to be collected because of data privacy or annotation cost, and has recently received lots of research attention. Most existing works focus on extending supervised learning models to solve the LLP problem, but the weak learning nature makes it hard to further improve LLP performance with a supervised angle. In this paper, we take a different angle from semi-supervised learning. In particular, we propose a novel model inspired by consistency regularization, a popular concept in semi-supervised learning that encourages the model to produce a decision boundary that better describes the data manifold. With the introduction of consistency regularization, we further extend our study to non-uniform baggeneration and validation-based parameter-selection procedures that better match practical needs. Experiments not only justify that LLP with consistency regularization achieves superior performance, but also demonstrate the practical usability of the proposed procedures.

1. INTRODUCTION:

In traditional supervised learning, a classifier is trained on a dataset where each instance is associated with a class label. However, label annotation can be expensive or difficult to obtain for some applications. Take the embryo selection as an example (Hernández-González et al., 2018) . To increase the pregnancy rate, clinicians would transfer multiple embryos to a mother at the same time. However, clinicians are unable to know the outcome of a particular embryo due to limitations of current medical techniques. The only thing we know is the proportion of embryos that implant successfully. To increase the success rate of embryo implantation, clinicians aim to select high-quality embryos through the aggregated results. In this case, only label proportions about groups of instances are provided to train the classifier, a problem setting known as learning from label proportions (LLP).

In LLP, each group of instances is called a bag, which is associated with a proportion label of different classes. A classifier is then trained on several bags and their associated proportion labels in order to predict the class of each unseen instance. Recently, LLP has attracted much attention among researchers because its problem setting occurs in many real-life scenarios. For example, the census data and medical databases are all provided in the form of label proportion data due to privacy issues (Patrini et al., 2014; Hernández-González et al., 2018) . Other LLP applications include fraud detection (Rueping, 2010) , object recognition (Kuck & de Freitas, 2012) , video event detection (Lai et al., 2014) , and ice-water classification (Li & Taylor, 2015) .

The challenge in LLP is to train models without direct instance-level label supervision. To overcome this issue, prior work seeks to estimate either the individual label (Yu et al., 2013; Dulac-Arnold et al., 2019) or the mean of each class by the label proportions (Quadrianto et al., 2009; Patrini et al., 2014) . However, the methodology behind developing these models do not portray LLP situations that occur in real life. First, these models can be improved by considering methods that can better leverage unlabeled data. Second, these models assume that bags of data are randomly generated, which is not the case for many applications. For example, the data of population census are collected on region, age, or occupation with varying group sizes. Third, training these models requires a This paper aims to resolve the previous problems. Our main contributions are listed as follows:

• We first apply a semi-supervised learning technique, consistency regularization, to the multi-class LLP problem. Consistency regularization considers an auxiliary loss term to enforce network predictions to be consistent when its input is perturbed. By exploiting the unlabeled instances, our method captures the latent structure of data and obtains the SOTA performance on three benchmark datasets. 

2. PRELIMINARY:



2.1. LEARNING FROM LABEL PROPORTIONS:

We consider the multi-class classification problem in the LLP setting in this paper. Let x i ∈ R D be a feature vector of i-th example and y i ∈ {1, . . . , L} be a class label of i-th example, where L is the number of different classes. We define e (j) to be a standard basis vector [0, . . . , 1, . . . , 0] with 1 at j-th position and

∆ L = {p ∈ R L + : L i p i = 1}

to be a probability simplex. In the setting of LLP, each individual label y i is hidden from the training data. On the other hand, the training data are aggregated by a bag generation procedure. We are given M bags B 1 , . . . , B M , where each bag B m contains a set X m of instances and a proportion label p m , defined by

p m = 1 |X m | i:xi∈Xm e (yi) , M m=1 X m = {x 1 , . . . , x N }.

We do not require each subset to be disjoint. Also, each bag may have different size. The task of LLP is to learn an individual-level classifier f θ : R D → ∆ L to predict the correct label y = arg max i f θ (x) i for a new instance x. Figure 1 illustrates the setting of learning from label proportions in the multi-class classification (Dulac-Arnold et al., 2019) .

2.2. PROPORTION LOSS:

The feasibility of the binary LLP setting has been theoretically justified by Yu et al. (2014) . Specifically, Yu et al. (2014) propose the framework of Empirical Proportion Risk Minimization (EPRM), proving that the LLP problem is PAC-learnable under the assumption that bags are i.i.d sampled from an unknown probability distribution. The EPRM framework provides a generalization bound on the expected proportion error and guarantees to learn a probably approximately correct proportion predictor when the number of bags is large enough. Furthermore, the authors prove that the instance label error can be bounded by the bag proportion error. That is, a decent bag proportion predictor guarantees a decent instance label predictor.

Based on the profound theoretical analysis, a vast number of LLP approaches learn an instance-level classifier by directly minimizing the proportion loss without acquiring the individual labels. To be more precise, given a bag B = (X, p), an instance-level classifier f θ and a divergence function d prop : R L × R L → R, the proportion loss penalizes the difference between the real proportion label p m and the estimated proportion label p = 1 |X| x∈X f θ (x), which is an average of the instance predictions within a bag. Thus, the proportion loss L prop can be defined as follows:

L prop (θ) = d prop (p, p).

The commonly used divergence functions are L 1 and L 2 function in prior work (Musicant et al., 2007; Yu et al., 2013) . Ardehaly & Culotta (2017) and Dulac-Arnold et al. (2019) , on the other hand, consider the cross-entropy function for the multi-class LLP problem.

2.3. CONSISTENCY REGULARIZATION:

Since collecting labeled data is expensive and time-consuming, the semi-supervised learning approaches aim to leverage a large amount of unlabeled data to mitigate the need for labeled data.

There are many semi-supervised learning methods, such as pseudo-labeling (Lee, 2013) , generative approaches (Kingma et al., 2014) , and consistency-based methods (Laine & Aila, 2016; Miyato et al., 2018; Tarvainen & Valpola, 2017) . Consistency-based approaches encourage the network to produce consistent output probabilities between unlabeled data and the perturbed examples. These methods rely on the smoothness assumption (Chapelle et al., 2009) : if two data points x i and x j are close, then so should be the corresponding output distributions y i and y j . Then, the consistency-based approaches can enforce the decision boundary to traverse through the low-density region. More precisely, given a perturbed input x taken from the input x, consistency regularization penalizes the distinction of model predictions between f θ (x) and f θ ( x) by a distance function

d cons : R L × R L → R.

The consistency loss can be written as follows:

L cons (θ) = d cons (f θ (x), f θ ( x)).

Modern consistency-based methods (Laine & Aila, 2016; Tarvainen & Valpola, 2017; Miyato et al., 2018; Verma et al., 2019; Berthelot et al., 2019) differ in how perturbed examples are generated for the unlabeled data. Laine & Aila (2016) introduce the Π-Model approach, which uses the additive Gaussian noise for perturbed examples and chooses the L 2 error as the distance function. However, a drawback to Π-Model is that the consistency target f θ ( x) obtained from the stochastic network is unstable since the network changes rapidly during training. To address this problem, Temporal Ensembling (Laine & Aila, 2016) takes the exponential moving average of the network predictions as the consistency target. Mean Teacher (Tarvainen & Valpola, 2017) , on the other hand, proposes averaging the model parametes instead of network predictions. Overall, the Mean Teacher approach significantly improves the quality of consistency targets and the empirical results on semi-supervised benchmarks.

Instead of applying stochastic perturbations to the inputs, Virtual Adversarial Training or VAT (Miyato et al., 2018) computes the perturbed examples x = x + r adv , where

EQUATION

That is, the VAT approach attempts to generate a perturbation which most likely causes the model to misclassify the input in an adversarial direction. Finally, the VAT approach adopts Kullback-Leibler (KL) divergence to compute the consistency loss. In comparison to the stochastic perturbation, the VAT approach demonstrates the greater effectiveness in the semi-supervised learning problem.

Figure 2: In this toy example, we generate 5 bags, each of which contains 20 data points uniformly sampled from the "two moons" dataset without replacement. The vanilla approach, which simply optimizes the proportion loss, suffers from poor performance as the label information is insufficient.

In contrast, the "two moons" can be effectively separated into two clusters by LLP with consistency regularization. Our method enforces the network to produce consistent outputs for perturbed examples, and thus help capture the underlying structure of the data.

3. LLP WITH CONSISTENCY REGULARIZATION:

With regards to weak supervision, the LLP scenario is similar to the semi-supervised learning problem. Motivated by these semi-supervised approaches, we combine the idea of leveraging the unlabeled data into the LLP problem. We make the same smoothness assumption and introduce a new concept incorporating consistency regularization with LLP. In particular, we consider the typical cross-entropy function between real label proportions and estimated label proportions. Given a bag B = (X, p), we define the proportion loss L prop as follows:

L prop (θ) = - L i=1 p i log 1 |X| x∈X f θ (x) i .

Interestingly, the proportion loss L prop boils down to standard cross-entropy loss for fullysupervised learning when the bag size is one. To learn a decision boundary that better reflects the data manifold, we add an auxiliary consistency loss that leverages the unlabeled data. More formally, we compute the average consistency loss across all instances within the bag. Given a bag B = (X, p), the consistency loss L cons can be written as follows:

L cons (θ) = 1 |X| x∈X d cons (f θ (x), f θ ( x)),

where d cons is a distance function, and x is a perturbed input of x. We can use any consistencybased approach to generate the perturbed examples and compute the consistency loss. Finally, we mix the two loss functions L prop and L cons with a hyperparameter α > 0, yielding the combined loss L for LLP:

L(θ) = L prop (θ) + αL cons (θ)

, where α controls the balance between the bag-level estimation of proportion labels and instancelevel consistency regularization.

To understand the intuition behind combining consistency regularization into LLP, we follow the Π-Model approach (Laine & Aila, 2016) to adopt the stochastic Gaussian noise as the perturbation and to use L 2 as the distance function d cons in a toy example. Figure 2 illustrates how our method is able to produce a decision boundary that passes through the low-density region and captures the data manifold. On the other hand, the vanilla approach, which simply optimizes the proportion loss, gets easily stuck at a poor solution due to the lack of label information. This toy example shows the advantage of applying consistency regularization into LLP.

According to Miyato et al. (2018) , VAT is more effective and stable than Π-Model due to the way it generates the perturbed examples. For each data example, the Π-Model approach stochastically Algorithm 1 LLP-VAT algorithm Require: D = {(X m , p m )} M m=1 : collection of bags Require: f θ (x): instance-level classifier with trainable parameters θ Require: g(x; θ) = x + r adv : VAT augmentation function according to Equation 1Require: w(t): ramp-up function for increasing the weight of consistency regularization Require: T : total number of iterations for t = 1, . . . , T do for each bag (X, p)

∈ D do p ← 1 |X| x∈X f θ (x)

Estimated proportion label

L prop = - L j=1 p i log pi Proportion loss L cons = 1 |X| x∈X D KL (f θ (x) f θ (g(x; θ)))

Consistency loss

L = L prop + w(t) • L cons

Total loss update θ by gradient ∇ θ L e.g. SGD, Adam end for end for return θ perturbs inputs and trains the model to assign the same class distributions to all neighbors. In contrast, the VAT approach focuses on neighbors that are sensitive to the model. That is, VAT aims to generate a perturbed input whose prediction is the most different from the model prediction of its original input. The learning of VAT approach tends to be more effective in improving model generalization. Therefore, we adopt the VAT approach to compute the consistency loss for each instance in the bag. Additionally, to prevent the model from getting stuck at a local optimum in the early stage, we use the exponential ramp-up scheduling function (Laine & Aila, 2016) to increase the consistency weight gradually to the maximum value α. The full algorithm of LLP with VAT (LLP-VAT) is described in Algorithm 1.

4. EXPERIMENTS:

We evaluate our LLP-VAT on three benchmarks, including SVHN, CIFAR10, and CIFAR100. For model selection, we choose hyperparameters using a validation set without individual labels. Lastly, we report the test instance accuracy averaged over the last 10 epochs. The full experiment details are provided in the supplementary material.

4.1. UNIFORM BAG GENERATION:

For convenience, most LLP works validate their proposed methods with the uniform bag generation where the training data are randomly partitioned into bags of the same size. We evaluate our method using this bag generation procedure with the bag size n ∈ {16, 32, 64, 128, 256}. We drop the last incomplete bag if the number of training data is indivisible by the bag size. Table 1 shows the experimental results for the LLP scenario with a uniform bag generation.

In comparison to the vanilla approach, our LLP-VAT significantly improves the performance on CIFAR10 and CIFAR100. This indicates that applying consistency regularization into LLP does help learn a better classifier. As for SVHN, since the test accuracy is close to the fully-supervised performance when the bag size is small, there is no clear difference among three methods. In addition, the results also show that the performance of ROT is unstable and lead us to conclude that the unhelpful pseudo-labels would easily result in a worse classifier. Conversely, our LLP-VAT is more stable and obtains better test accuracy in most cases.

4.2. K-MEANS BAG GENERATION:

In this section, we further investigate our LLP-VAT in a more practical scenario. We observe that the uniform bag generation barely fits the real-world LLP situation because of following two reasons. First, the real-life data are usually grouped by attribute similarity instead of uniformly sampled. Second, each bag may have different bag sizes, i.e., the distribution of bag sizes is diverse. Consider the US presidential election results (Sun et al., 2017) , where the statistics of voting results are collected by geological regions (e.g., states). Also, each state have varying number of voters. Therefore, we introduce a new bag generation procedure-the K-means bag generation, where we cluster examples into bags by the K-means algorithm. Although those bags generated from the K-means bag generation are dependent on each other, violating the i.i.d. assumption, this setting is both challenging and worth-studying.

Since we perform experiments on image datasets, it is meaningless to cluster data examples based on RGB pixels. We first adopt the principle component analysis algorithm, which is an unsupervised dimension reduction technique, to project the data into a low-dimensional representation space. This space may capture more important patterns in an images. Then we group the low-dimensional representations of the images following the K-means bag generation procedure. We conduct experiments with the number of clusters K ∈ {3120, 1560, 780, 390, 195} on CIFAR10 and CIFAR100, and K ∈ {4576, 2288, 1144, 572, 286} on SVHN. These numbers are selected to match the number of proportion labels in the uniform bag generation procedure. The distribution of bag sizes generated from the K-means procedure are shown in Figure 3 .

For experiments, we do not compare our proposed method to the ROT loss, which needs to estimate individual labels iteratively for each bag. The procedure of the ROT algorithm is time-consuming and cannot be accelerated if bags are of varying sizes. Besides, for the K-means bag generation, there may be some large bags when the value of K is small. Because of the limited computational resource, we take a subsample in each bag if the bag size is larger than the threshold of 256. Particularly, when a large bag is sampled, we randomly sample 256 instances and assign the original label proportions to the reduced bag.

The experimental results of the K-means bag generation are shown in Table 2 and Table 3 . Although this scenario violates the i.i.d. assumption, the results demonstrate that it is feasible to learn an instance-level classifier by simply minimizing the proportion loss. Also, our LLP-VAT significantly brings benefits for the k-means bag generation scenario on SVHN and CIFAR10, while showing comparable performance on CIFAR100. Interestingly, the performance of a model is not well- correlated with the value of K. One possible reason is that we might drop informative bags as we randomly split bags into validation and training.

4.3. VALIDATION METRICS:

Many modern machine learning models require a wide range of hyperparameter selections about the architecture, optimizer and regularization. However, for the realistic LLP scenario, we have no access to labeled instances during training. It is crucial to choose appropriate hyperparameters based on the bag-level validation error that is computed with only proportion labels. To evaluate the performance at the bag level, we consider four validation metrics: soft L1 error, hard L 1 error, soft KL divergence, and hard KL divergence. Their definitions are given as follows. First, we define the output probabilities of an instance as the soft prediction and its one-hot encoding as the hard prediction. For each bag, we then compute the estimated label proportions by averaging these soft or hard predictions. Finally, we use the L 1 error or KL divergence to measure the bag-level prediction error.

To investigate the relationship between the instance-level test error and the bag-level validation error, we compute the Pearson correlation coefficient between them on models trained for 400 epochs.

The results are shown in Table 4 . Surprisingly, we find that the hard L 1 error has a strong positive correlation to test error rate on all benchmarks. This implies that it is feasible to select hyperparameters with only label proportions in realistic LLP scenarios. Interestingly, our finding is coherent to Yu et al. (2013) . Although their and our works both adopt the hard L 1 error for model selection, we focus on the multi-class LLP scenario instead of the binary classification problem they considered. Therefore, we suggest future multi-class LLP works could adopt the hard L 1 validation metric for model selection. 1 5 RELATED WORK Kuck & de Freitas (2012) first introduce the LLP scenario and formulate the probabilistic model with the MCMC algorithm to generate consistent label proportions. Several following works (Chen et al., 2006; Musicant et al., 2007) extend the LLP setting to a variety of standard supervised learning algorithms. Without directly inferring instance labels, Quadrianto et al. (2009) propose a Mean Map algorithm with exponential-family parametric models. The algorithm uses empirical mean operators of each bag to solve a convex optimization problem. However, the success of the Mean Map algorithm is based on a strong assumption that the class-conditional distribution of data is 2017) propose a graphical model using counting potential to predict instance labels for the US presidential election. Furthermore, other works (Chen et al., 2009; Stolpe & Morik, 2011 ) adopt a k-means approach to cluster training data by label proportions. While some works (Fan et al., 2014; Sun et al., 2017) claim that they are suitable for large-scale settings, both Bayesian methods and clustering-based algorithms are rather inefficient and computationally expensive when applied to large image datasets.

Another line of work adopts a large-margin framework for the problem of LLP. Stolpe & Morik (2011) propose a variant of support vector regression using the inverse calibration method to estimate the class-conditional probability for bags. On the other hand, Yu et al. ( 2013) propose a procedure that alternates between assigning a label to each instance, also known as pseudo-labeling in the literature, and fitting an SVM classifier. Motivated by this idea, a number of works (Wang et al., 2015; Qi et al., 2016; Chen et al., 2017) infer individual labels and updated model parameters alternately. One major drawback of SVM-based approaches is that they are tailored for binary classification; they cannot extend to the multi-class classification setting efficiently.

As deep learning has garnered huge success in a number of areas, such as natural language processing, speech recognition, and computer vision, many works leverage the power of neural networks for the LLP problem. Ardehaly & Culotta (2017) are the first to apply deep models to the multiclass LLP setting. Also, Bortsova et al. (2018) propose a deep LLP method learning the extent of emphysema from the proportions of disease tissues. Concurrent to our work, Dulac-Arnold et al.

(2019) also considers the multi-class LLP setting with bag-level cross-entropy loss. They introduce a ROT loss that combines two goals: jointly maximizing the probability of instance predictions and minimizing the bag proportion loss.

6. CONCLUSION:

In this paper, we first apply a novel semi-supervised learning technique, consistency regularization, to the multi-class LLP problem. Our proposed approach leverages the unlabeled data to learn a decision boundary that better depicts the data manifold. The empirical results validate that our approach obtains better performance than that achieved by existing LLP works. Furthermore, we introduce a non-uniform bag scenario -the K-means bag generation, where training instances are clustered by attribute relationships. This setting simulates more practical LLP situations than the uniform bag generation setting, which is often used in previous works. Lastly, we introduce a bag-level validation metrics, hard L 1 error, for model selection with only label proportions. We empirically show that the bag-level hard L 1 error has a strong correlation to the test classification error. For real-world applicability, we suggest that multi-class LLP methods relying on hyper-parameter tuning could evaluate their methodology based on the bag-level hard L 1 error. One interesting future direction is combining the Mixup. In a nutshell, we hope that future LLP work can further explore the ideas presented in this paper.

Under review as a conference paper at ICLR 2020

B CONVERGENCE ANALYSIS OF LLP-VAT:

To analyze the convergence performance of LLP-VAT, we plot the instance accuracy on the test set over training epochs. 

:

Nevertheless, we do not suggest using our validation metric for early stopping since the correlation is computed after the model converges.

Figures and Tables:

Figure 1: An illustration of multi-class learning from label proportions. Before training, the data are grouped according to a bag generation procedure. During the training stage, we are given bags of unlabeled data and their corresponding proportion labels. The goal of LLP is to learn an individuallevel classifier.

Figure 3: The distribution of bag sizes from the K-means procedure on three benchmarks. When the number of clusters increases, the distribution of bag sizes becomes various.

Figure 4: Evolution of the test accuracy on benchmarks with the uniform bag generation of varying bag sizes.

In the semi-supervised learning setting, only a small portion of training examples is labeled. On the other hand, in the LLP scenario, we are given the weak supervision of label proportions instead of the strong label on individual instances. Both settings are challenging since most training examples do not have individual labels. To address this challenge, semi-supervised approaches seek to exploit the unlabeled examples to further capture the latent structure of data.

Table content: <table/>

Test accuracy with the uniform bag generation. The performance of the vanilla approach with a bag size of one corresponds to the fully-supervised setting.

Table content: <table><tr><td>Bag Size</td></tr></table>

Test accuracy with the K-means bag generation on SVHN.

Table content: <table><tr><td>K</td></tr></table>

Test accuracy with the K-means bag generation on CIFAR10 and CIFAR100.

Table content: <table><tr><td>K</td></tr></table>

The Pearson correlation coefficient between the test error rate and the following validation metrics on benchmarks. To loosen the restriction,Patrini et al. (2014) propose a Laplacian Mean Map algorithm imposing an additional Laplacian regularization. Nevertheless, these Mean Map algorithms suffer from a fundamental drawback: they require the classifier to be a linear model.Several works tackle the LLP problem from Bayesian perspectives. For example,Fan et al. (2014) propose an RBM-based generative model to estimate the group-conditional likelihood of data.Hernández-González et al. (2013), on the other hand, develop a Bayesian classifier with an EM algorithm. Recently,Sun et al. (

Table content: <table><tr><td/><td/><td>Uniform</td><td/><td/><td>K-means</td><td/></tr><tr><td/><td colspan="6">SVHN CIFAR10 CIFAR100 SVHN CIFAR10 CIFAR100</td></tr><tr><td>Hard L 1</td><td>0.97</td><td>0.81</td><td>0.81</td><td>0.99</td><td>0.75</td><td>0.67</td></tr><tr><td>Soft L 1</td><td>0.83</td><td>0.33</td><td>-0.50</td><td>0.90</td><td>0.61</td><td>0.26</td></tr><tr><td>Hard KL</td><td>0.69</td><td>-0.18</td><td>0.64</td><td>0.81</td><td>0.10</td><td>0.40</td></tr><tr><td>Soft KL</td><td>0.69</td><td>0.89</td><td>-0.16</td><td>0.71</td><td>0.62</td><td>0.57</td></tr><tr><td>independent of bags.</td><td/><td/><td/><td/><td/><td/></tr></table>

Peer review (iclr2020):
Summary: This paper proposes using Consistency Regularization and a new bag generation technique to better learn classification decision boundaries in a Label Proportion setting. The consistency regularization works to make sure that examples in the local neighbourhood have similar outputs. The authors further use K-means clustering to create a new bagging scenario they use to mimic real-world LLP settings. Overall, this paper sheds light on how we can use the underlying structure to better be able to make predictions on labels even when we don*t have original labels but proportional bags. This is a very interesting problem area and will be interesting to the field. # For the experiments, a few notes and comments? 1. It*s a bit harder to appreciate some of the performance gains here without understanding the error rates around the accuracy. This would be especially good to know for the larger bag sizes where one expects more uncertainty. 2. For each of the datasets, it would have been also enlightening to provide what the normal labelled performance would be as it would give an indication of the limit when the bag sizes get smaller. 3. I am a bit confused by the k-means scenario. With bag sizes similar to the uniform bagging scenario, would the performance not be more as we are already capturing latent structure with the k-means algorithm? 4. Following up on 3, Does this not have implications for actually preserving some privacy? # Other Comments 5: It would be interesting to see an approach like mixup can be combined with the consistency concept in this case. So what do you expect when you now combine examples and train the underlying mixed bag objective.