O N THE M INIMAL S UPERVISION FOR T RAINING A NY B INARY C LASSIFIER FROM O NLY U NLABELED D ATA
A BSTRACT
Empirical risk minimization (ERM), with proper loss function and regularization, is the common practice of supervised classiﬁcation.
In this paper, we study training arbitrary (from linear to deep) binary classiﬁer from only unlabeled (U) data by ERM.
We prove that it is impossible to estimate the risk of an arbitrary binary classiﬁer in an unbiased manner given a single set of U data, but it becomes pos sible given two sets of U data with different class priors .
These two facts answer a fundamental question—what the minimal supervision is for training any binary classiﬁer from only U data.
Following these ﬁndings
, we propose an ERM based learning method from two sets of
U data, and then prove it is consistent .
Experi ments demonstrate the proposed method could train deep models and outperform state of the art methods for learning from two sets of U data.
I NTRODUCTION
With some properly chosen loss function (e.g., Bartlett et al., 2006; Tewari & Bartlett, 2007; Reid &
Williamson, 2010) and regularization (e.g., Tikhonov, 1943; Srivastava et al., 2014), empirical risk minimization (ERM) is the common practice of supervised classiﬁcation (Vapnik, 1998).
Actually,
ERM is used in not only supervised learning but also weakly-supervised learning .
For example, in semi-supervised learning (Chapelle et al., 2006), we have very limited labeled (L) data and a lot of unlabeled (U) data, where L data share the same form with supervised learning.
Thus, it is easy to estimate the risk from only L data in order to carry out ERM, and U data are needed exclusively in regularization (including but not limited to Grandvalet & Bengio, 2004; Belkin et al., 2006; Mann & McCallum, 2007;
Niu et al., 2013; Miyato et al., 2016; Laine & Aila, 2017; Tarvainen & Valpola, 2017; Luo et al., 2018; Kamnitsas et al., 2018).
Nevertheless, L data may differ from supervised learning in not only the amount but also the form.
For instance, in positive-unlabeled learning (Elkan & Noto, 2008; Ward et al., 2009), all L data are from the positive class, and due to the lack of L data from the negative class it becomes impossible to estimate the risk from only L data.
To this end, a two-step approach to ERM has been considered (du Plessis et al., 2014; 2015; Niu et al., 2016; Kiryo et al., 2017).
Firstly, the risk is rewritten into an equivalent expression, such that it just involves the same distributions from which L and U data are sampled—this step leads to certain risk estimators.
Secondly, the risk is estimated from both L and U data, and the resulted empirical training risk is minimized (e.g. by Robbins & Monro, 1951;
Kingma & Ba, 2015).
In this two-step approach, U data are needed absolutely in ERM itself.
This indicates that risk rewrite (i.e., the technique of making the risk estimable from observable data via an equivalent expression) enables ERM in positive-unlabeled learning and is the key of success.
One step further from positive-unlabeled learning is learning from only U data without any L data.
This is signiﬁcantly harder than previous learning problems (cf.
Figure 1).
However, we would still like to train arbitrary binary classiﬁer , in particular, deep networks (Goodfellow et al., 2016).
Note that for this purpose clustering is suboptimal for two major reasons.
First, successful translation of clusters into meaningful classes completely relies on the critical assumption that one cluster exactly
−−  4 (a) P component − 4 −   −−  4 (b) N component − 4 −   −−  4 (c)
U set1 − 4 −
−−  4 (d) U set2 − 4 −   −−−−    4 −−−−
CCN
UU-biased
UU
Oracle corresponds to one class , and hence even perfect clustering might still result in poor classiﬁcation.
Second, clustering must introduce additional geometric or information-theoretic assumptions upon which the learning objectives of clustering are built (e.g., Xu et al., 2004; Gomes et al., 2010).
As a consequence, we prefer ERM to clustering and then no more assumption is required.
The difﬁculty is how to estimate the risk from only U data, and our solution is again ERM-enabling risk rewrite in the aforementioned two-step approach.
The ﬁrst step should lead to an unbiased risk estimator that will be used in the second step.
Subsequently, we can evaluate the empirical training and/or validation risk by plugging only U training/validation data into the risk estimator.
Thus, this two-step ERM needs no L validation data for hyperparameter tuning , which is a huge advantage in training deep models nowadays.
Note that given only U data, by no means could we learn the class priors (Menon et al., 2015), so that we assume all necessary class priors are also given .
This is the unique type of supervision we will leverage throughout this paper, and hence this learning problem still belongs to weakly-supervised learning rather than unsupervised learning.
In this paper, we raise a fundamental question in weakly-supervised learning—how many sets of U data with different class priors are necessary for rewriting the risk?
Our answer has two aspects:
• Risk rewrite is impossible given a single set of U data (see Theorem 2 in Sec. 3); • Risk rewrite becomes possible given two sets of U data (see Theorem 4 in Sec. 4).
This suggests that three class priors 1 are all you need to train deep models from only U data, while any two 2 should not be enough.
The impossibility is a proof by contradiction, and the possibility is a proof by construction, following which we explicitly design an unbiased risk estimator.
Therefore, with the help of this risk estimator, we propose an ERM-based learning method from two sets of U data.
Thanks to the unbiasedness of our risk estimator, we derive an estimation error bound which certainly guarantees the consistency of learning (Mohri et al., 2012; Shalev-Shwartz & Ben-David, 2014).
3 Experiments demonstrate that the proposed method could train multilayer perceptron, AllConvNet (Springenberg et al., 2015) and ResNet (He et al., 2016) from two sets of U data; it could outperform state-of-the-art methods for learning from two sets of U data.
See Figure 1 for how the proposed method works on a Gaussian mixture of two components.
P ROBLEM SETTING AND RELATED WORK
Consider the binary classiﬁcation problem.
Let X
and Y be the input and output random variables such that
• p ( x, y ) is the underlying joint density , • p p ( x )
=
p ( x | Y = +1) and p n ( x ) = p ( x | Y = − 1) are the class-conditional densities , • p ( x ) is the marginal density , and • π p =
p ( Y = +1) is the class-prior probability .
Data generation process Let θ and θ (cid:48) be two valid class priors such that θ (cid:54)
= θ (cid:48)
(here it does not matter if either θ or θ (cid:48) equals π p or neither of them equals π p ), and let
[Equation]
be the marginal densities from which U training data are drawn.
Eq.
(1) implies there are p tr ( x, y ) and p (cid:48)
tr ( x, y ) , whose class-conditional densities are same and equal to those of p ( x, y ) , and whose class priors are different, i.e.,
[Equation]
If we could sample L data from p tr ( x, y ) or p (cid:48) tr ( x, y ) , it would reduce to supervised learning under class-prior change (Quiñonero-Candela et al., 2009).
Nonetheless, the problem of interest belongs to weakly-supervised learning—U training (and validation) data are supposed to be drawn according to (1).
More speciﬁcally, we have
[Equation]
where n and n (cid:48) are two natural numbers as the sample sizes of X tr and X (cid:48) tr .
This is exactly same as du Plessis et al.
and
Menon et al.
(2015) with some different names.
In Menon et al.
(2015), θ and θ (cid:48) are called corruption parameters , and if we assume θ > θ (cid:48) , p tr ( x ) is called the corrupted
P density and p (cid:48)
tr ( x ) is called the corrupted N density .
Despite the same data generation process in (2), a vital difference between the problem settings is performance measures to be optimized.
Performance measures Let g : R d → R be an arbitrary decision function , i.e., g may literally be any binary classiﬁer.
Let (cid:96) :
R → R be the loss function , such that the value (cid:96) ( z ) means the loss by predicting g ( x ) when the ground truth is y where z = yg ( x ) is the margin .
The risk of g is
[Equation]
E
[Equation] [Equation]
where E p [ · ] means E X ∼ p p [ · ] and E n [ · ] means E
X ∼ p n [ · ] respectively.
If (cid:96) is the zero-one loss that is deﬁned by (cid:96) 01 ( z ) =
(1 − sign( z )) / 2 , the risk is also known as the classiﬁcation error and it is the standard performance measure in classiﬁcation.
A balanced version of Eq.
(3) is
[Equation]
and if (cid:96) is (cid:96) 01 , (4) is named the balanced error (Brodersen et al., 2010).
The vital difference is that (3) is chosen in the current paper whereas (4) is chosen in du Plessis et al.
and
Menon et al.
(2015) as the performance measure to be optimized.
We argue that (3) is more natural as the performance measure for binary classiﬁcation than (4).
By the phrase “binary classiﬁcation”, we mean π p is neither very large nor very small.
Otherwise, due to extreme values of π p (i.e., either π p ≈ 0 or π p ≈ 1 ), the problem under consideration should be retrieval or detection rather than binary classiﬁcation.
Hence, it may be misleading to optimize (4), unless π p ≈ 1 2 which implies that Eqs.
(3) and (4) are essentially equivalent.
Related work Learning from only U data is previously regarded as discriminative clustering (Xu et al., 2004; Valizadegan & Jin, 2006; Li et al., 2009; Gomes et al., 2010; Sugiyama et al., 2014;
Hu et al., 2017).
Their goals are to maximize the margin or the mutual information between X and Y .
Recall that clustering is suboptimal, since it requires the cluster assumption (Chapelle et al., 2002) and it is rarely satisﬁed in practice that one cluster exactly corresponds to one class.
As mentioned earlier, learning from two sets of U data is already studied in du Plessis et al.
and Menon et al. (2015).
Both of them adopt (4) as the performance measure.
In the former paper, g is learned by estimating sign( p tr ( x ) − p (cid:48) tr
( x )) .
In the latter paper, g is learned by taking noisy L data from p tr ( x ) and p (cid:48) tr
( x ) as clean L data from p p ( x ) and p n ( x ) , and then its threshold is moved to the correct value by post-processing.
In summary, instead of ERM, they evidence the possibility of empirical balanced risk minimization , and no impossibility is proven.
Our ﬁndings are compatible with learning from label proportions (Quadrianto et al., 2009; Yu et al., 2013).
Quadrianto et al.
(2009) proves that the minimal number of U sets is equal to the number of classes.
However, their ﬁnding only holds for the linear model, the logistic loss, and their proposed method based on mean operators.
On the other hand, Yu et al.
(2013) is not ERM-based; it is based on discriminative clustering together with expectation regularization (Mann & McCallum, 2007).
At ﬁrst glance, our data generation process, using the names from Menon et al.
(2015), looks quite similar to class-conditional noise (CCN, Angluin & Laird, 1988) in learning with noisy labels (cf.
Natarajan et al., 2013).
In fact, Menon et al.
(2015) makes use of mutually contaminated distributions (MCD, Scott et al., 2013) that is more general than CCN.
Denote by ˜ y and ˜ p
( · ) the corrupted label and distributions.
Then, CCN and MCD are deﬁned by
[Equation]
and
[Equation]
where both of T CCN and T MCD are 2-by-2 matrices but T CCN is column normalized and T MCD is row normalized.
It has been proven in Menon et al.
(2015) that CCN is a strict special case of MCD.
To be clear, ˜ p (˜ y ) is ﬁxed in CCN once ˜ p
(˜ y
| x ) is speciﬁed while ˜ p (˜ y ) is free in MCD after ˜ p ( x | ˜ y ) is speciﬁed.
Furthermore, ˜ p ( x ) = p ( x ) in CCN but ˜ p ( x ) (cid:54) = p ( x ) in MCD.
Due to this covariate shift ,
CCN methods do not ﬁt MCD problem setting, though MCD methods ﬁt CCN problem setting.
To the best of our knowledge, the proposed method is the ﬁrst MCD method based on ERM.
L EARNING FROM ONE SET OF U DATA
From now on, we prove that knowing π p and θ is insufﬁcient for rewriting R ( g ) .
3. A BRIEF REVIEW OF ERM
To begin with, we review ERM (Vapnik, 1998) by imaging that we are given X p = { x 1 , . . .
, x n } ∼ p p ( x ) and X n = { x (cid:48) 1 , . . .
, x (cid:48) n (cid:48) } ∼ p n ( x ) .
Then, we would go through the following procedure:
Choose a surrogate loss (cid:96) ( z ) , so that R ( g ) in Eq.
(3) is deﬁned.
Choose a model G , so that min g ∈G R ( g ) is achievable by ERM. 3.
Approximate R ( g ) by (cid:98) R pn ( g ) =
π p n (cid:88)
[Equation]
Minimize (cid:98) R pn ( g ) , with appropriate regularization, by favorite optimization algorithm.
Here, (cid:96) should be classiﬁcation-calibrated (Bartlett et al., 2006), 5 in order to guarantee that R ( g ; (cid:96) ) and R ( g ; (cid:96) 01 ) have the same minimizer over all measurable functions.
This minimizer is the Bayes optimal classiﬁer and denoted by g ∗∗ = arg min g R ( g ) .
The Bayes optimal risk R ( g ∗∗ ) is usually unachievable by ERM as n, n (cid:48)
→ ∞ .
That is why by choosing a model G , g ∗ =
arg min g ∈G R ( g ) became the target (i.e., (cid:98) g pn = arg min g ∈G (cid:98) R pn ( g ) will converge to g ∗ as n, n (cid:48)
→ ∞ ).
In statistical learning, the approximation error is R ( g ∗ ) − R ( g ∗∗ ) , and the estimation error is R ( (cid:98) g pn ) − R
( g ∗ ) .
Learning is consistent if and only if the estimation error converges to zero as n, n (cid:48)
→ ∞ .
(cid:96)
3. I MPOSSIBILITY OF RISK REWRITE
Recall that R ( g ) is approximated by (5) given X p and X n , which does not work given X tr and X (cid:48)
tr .
We might rewrite R ( g ) so that it could be approximated given
X tr and/or X (cid:48) tr .
This is known as the backward correction in learning with noisy/corrupted labels (Patrini et al., 2017; see also Natarajan et al., 2013; van Rooyen & Williamson, 2018).
Deﬁnition 1.
We say that R ( g ) in (3) is rewritable given p tr , if and only if 6 there exist constants a and b , such that for any g it holds that
[Equation]
where E p tr [ · ] means E X ∼ p tr [ · ] and ¯ (cid:96) ( z )
=
a(cid:96) ( z ) + b(cid:96) ( − z ) is the corrected loss function.
In Eq.
(6), the expectation is with respect to p tr and θ is a free variable in it.
The impossibility will be stronger, if θ is unspeciﬁed and allowed to be adjusted according to π p .
Theorem 2.
Let (cid:96) be (cid:96) 01 , or any bounded surrogate loss satisfying that
[Equation]
Assume p p and p n are almost surely separable.
Then, R ( g ) is not rewritable though θ is free.
This theorem shows that under the separability assumption of p p and p n , R ( g ) is not rewritable.
As a consequence, we lack a learning objective, that is, the empirical training risk.
It is even worse—we cannot access the empirical validation risk of g after it is trained by other learning methods such as discriminative clustering.
In particular, (cid:96) 01 satisﬁes (7), which implies that the common practice of hyperparameter tuning is disabled by Theorem 2, since U validation data are also drawn from p tr .
L EARNING FROM TWO SETS OF U DATA
From now on, we prove that knowing π p , θ and θ (cid:48) is sufﬁcient for rewriting R ( g ) .
4. P OSSIBILITY OF RISK REWRITE , AND UNBIASED RISK ESTIMATORS
We have proven that R ( g ) is not rewritable given p tr , and Quadrianto et al.
(2009) has proven that
R ( g ) can be estimated from X tr and X (cid:48) tr , where g is a linear model and (cid:96) is the logistic loss.
These facts motivate us to investigate the possibility of rewriting R ( g ) , where g and (cid:96) are both arbitrary.
Deﬁnition 3.
We say that R ( g ) is rewritable given p tr and p (cid:48) tr , if and only if 9 there exist constants a , b , c and d , such that for any g it holds that
[Equation]
(8) where ¯ (cid:96) + ( z ) =
a(cid:96) ( z ) + b(cid:96) ( − z ) and ¯ (cid:96) − ( z ) =
c(cid:96) ( z ) + d(cid:96) ( − z ) are the corrected loss functions.
In Eq.
(8), the expectations are with respect to p tr and p (cid:48)
tr that are regarded as the corrupted p p and p n .
There are two free variables θ and θ (cid:48) in p tr and p (cid:48) tr .
The possibility will be stronger, if θ and θ (cid:48) are already speciﬁed and disallowed to be adjusted according to π p .
Theorem 4.
Fix θ
and θ (cid:48) .
Assume θ > θ (cid:48) ; otherwise, swap p tr and p (cid:48) tr to make sure θ > θ (cid:48) .
Then,
R ( g ) is rewritable, by letting
[Equation]
4 is al obtain
Deﬁnition mentioned
Quadrianto et
) is it cannot be further g or
Theorem (4) immediately leads to an unbiased risk estimator, namely,
[Equation]
Eq.
(10) is useful for both training (by plugging U training data into it) and hyperparameter tuning (by plugging U validation data into it).
We hereafter refer to the process of obtaining the empirical risk minimizer of (10), i.e., (cid:98) g uu = arg min g ∈G (cid:98) R uu ( g ) , as unlabeled-unlabeled (UU) learning .
The proposed UU learning is by nature ERM-based, and consequently (cid:98) g uu can be obtained by powerful stochastic optimization algorithms (e.g., Duchi et al., 2011; Kingma & Ba, 2015).
Simpliﬁcation Note that (10) may require some efforts to implement.
Fortunately, it can be simpliﬁed by employing (cid:96) that satisﬁes a symmetric condition :
[Equation]
Eq.
(11) covers (cid:96) 01 , a ramp loss (cid:96) ramp ( z )
= max { 0 , min { 1 , (
1 − z ) / 2 }} in du Plessis et al.
(2014) and a sigmoid loss (cid:96) sig ( z )
= 1 / (1 + exp( z )) in Kiryo et al.
With the help of (11), (10) can be simpliﬁed as
[Equation]
where α = ( θ (cid:48)
+ π p − 2 θ (cid:48)
π p ) / ( θ − θ (cid:48) ) and α (cid:48) =
( θ + π p − 2 θπ p ) / ( θ − θ (cid:48) ) .
Similarly, (12) is an unbiased risk estimator, and it is easy to implement with existing codes of cost-sensitive learning.
Special cases Consider some special cases of (10) by specifying θ and θ (cid:48) .
It is obvious that (10) reduces to (5) for supervised learning, if θ = 1 and θ (cid:48)
= 0 .
Next, (10) reduces to
[Equation]
if θ = 1 and θ (cid:48)
=
π p , and we recover the unbiased risk estimator in positive-unlabeled learning (du
Plessis et al., 2015; Kiryo et al., 2017).
Additionally, (10) reduces to a fairly complicated unbiased risk estimator in similar-unlabeled learning (Bao et al., 2018), if θ = π p , θ (cid:48)
=
π 2p / (2 π 2p − 2 π p + 1) or vice versa.
Therefore, UU learning is a very general framework in weakly-supervised learning.
4. C ONSISTENCY AND CONVERGENCE RATE
The consistency of UU learning is guaranteed due to the unbiasedness of (10).
In what follows, we analyze the estimation error R ( (cid:98) g uu ) − R ( g ∗ ) (see Sec.
3.1 for the deﬁnition).
To this end, assume there are C g > 0 and C (cid:96) >
such that sup g ∈G (cid:107) g (cid:107) ∞
≤ C g and sup
| z |≤ C g (cid:96) ( z ) ≤ C (cid:96) , and assume (cid:96) ( z ) is Lipschitz continuous for all | z | ≤ C g with a Lipschitz constant L (cid:96) .
Let R n ( G ) and R (cid:48) n (cid:48) ( G ) be the Rademacher complexity of
G over p tr ( x ) and p (cid:48) tr ( x ) (Mohri et al., 2012; Shalev-Shwartz &
Ben-David, 2014).
For convenience, denote by χ n,n (cid:48) = α/ √ n + α (cid:48) / √ n (cid:48) .
Theorem 5.
For any δ > 0 , let C δ
=
(cid:112) (ln 2 /δ ) / 2 , then we have with probability at least 1 − δ ,
[Equation]
(13) where the probability is over repeated sampling of X tr and X (cid:48) tr for training (cid:98) g uu .
Theorem 5 ensures that UU learning is consistent (and so are all the special cases): as n, n (cid:48) → ∞ ,
R ( (cid:98) g uu ) → R ( g ∗ ) , since R n ( G ) , R (cid:48) n (cid:48) ( G ) → 0 for all parametric models with a bounded norm such as deep networks trained with weight decay.
Moreover, R ( (cid:98) g uu ) → R ( g ∗ ) in O p ( χ n,n (cid:48) ) , where O p denotes the order in probability, for all linear-in-parameter models with a bounded norm, including non-parametric kernel models in reproducing kernel Hilbert spaces (Schölkopf & Smola, 2001).
E XPERIMENTS
In this section, we experimentally analyze the proposed method in training deep networks and subsequently experimentally compare it with state-of-the-art methods for learning from two sets of U data.
The implementation in our experiments is based on Keras (see https://keras.io ); it is available at https://github.com/lunanbit/UUlearning .
5. T RAINING DEEP NEURAL NETWORKS ON BENCHMARKS
In order to analyze the proposed method, we compare it with three supervised baseline methods:
• small PN means supervised learning from 10% L data; • PN oracle means supervised learning from 100% L data; • small PN prior-shift means supervised learning from 10% L data under class-prior change.
Notice that the ﬁrst two baselines have L data identically distributed as the test data, which is very advantageous and thus the experiments in this subsection are merely for a proof of concept.
Table 1 summarizes the benchmarks.
They are converted into binary classiﬁcation datasets; please see Appendix C.1 for details.
X tr and X (cid:48) tr of the same sample size are drawn according to Eq.
(1), where θ and θ (cid:48) are chosen as 0.9, 0.1 or 0.8, 0.2.
The test data are just drawn from p ( x, y ) .
Table 1 also describes the models and optimizers.
In this table, FC refers to fully connected neural networks , AllConvNet refers to all convolutional net (Springenberg et al., 2015) and ResNet refers to residual networks (He et al., 2016); then, SGD is short for stochastic gradient descent (Robbins & Monro, 1951) and Adam is short for adaptive moment estimation (Kingma & Ba, 2015).
Recall from Sec.
3.1 that after the model and optimizer are chosen, it remains to determine the loss (cid:96) ( z ) .
We have compared the sigmoid loss (cid:96) sig ( z ) and the logistic loss (cid:96) log ( z ) =
ln(1 + exp( − z ))
, and found that the resulted classiﬁcation errors are similar; please ﬁnd the details in Appendix C.2.
Since (cid:96) sig satisﬁes (11) and is compatible with (12), we shall adopt it as the surrogate loss.
The experimental results are reported in Figure 2, where means and standard deviations of classiﬁcation errors based on 10 random samplings are shown, and the table of ﬁnal errors can be found in
Appendix C.2.
When θ = 0 .
9 and θ (cid:48)
= 0 .
1 (cf.
the left column), UU is comparable to PN oracle in most cases.
When θ = 0 .
8 and θ (cid:48)
= 0 .
2 (cf.
the right column), UU performs slightly worse
but it is still better than small PN baselines.
This is because the task becomes harder when θ and θ (cid:48) become closer, which will be intensively investigated next.
On the closeness of θ and θ (cid:48)
It is intuitive that if θ and θ (cid:48) move closer, X tr and X (cid:48) tr will be more similar and thus less informative.
To investigate this, we test UU and CCN (Natarajan et al., 2013) on MNIST by ﬁxing θ to 0.9 or 0.8 and gradually moving θ (cid:48) from 0.1 to 0.5, and the experimental results are reported in Figure 3.
We can see that when θ (cid:48) moves closer to θ , UU and CCN become worse, while UU is affected slightly and CCN is affected severely.
The phenomenon of UU can be explained by Theorem 5, where the upper bound in (13) is linear in α and α (cid:48) which, as θ (cid:48)
→ θ , are inversely proportional to θ − θ (cid:48) .
On the other hand, the phenomenon of CCN is caused by stronger covariate shift when θ (cid:48) moves closer to θ rather than the difﬁculty of the task.
This illustrates CCN methods do not ﬁt our problem setting, so that we called for some new learning method (i.e., UU).
[Table]
See http://yann.lecun com/exdb/mnist/ for MNIST (LeCun et al., 1998),
:// github
/zalandoresearch/fashion-mnist for Fashion-MNIST (Xiao et al., 2017), housenumbers
SVHN (Netzer et al
[Table]
, 2011), as well as
~kriz
CIFAR-
Krizhevsky,
[Figure]
Note that there would be strong covariate shift not only by changing θ and θ (cid:48) but also by changing n and n (cid:48) .
The investigation of this issue is deferred to Appendix C.2 due to limited space.
Robustness against inaccurate training class priors Hitherto, we have assumed that the values of θ and θ (cid:48) are accessible, which is rarely satisﬁed in practice.
Fortunately, UU is a robust learning method against inaccurate training class priors.
To show this, let (cid:15) and (cid:15) (cid:48) be real numbers around 1,
ϑ
= (cid:15)θ and ϑ (cid:48)
= (cid:15) (cid:48) θ (cid:48) be perturbed θ and θ (cid:48) , and we test UU on MNIST and CIFAR-10 by drawing
[Figure]
Dataset θ, θ (cid:48) (cid:15), (cid:15) (cid:48)
= 0.8, 0.
(cid:15), (cid:15) (cid:48)
= 0.9, 0.
(cid:15) =
(cid:15) (cid:48)
= 1.
(cid:15), (cid:15) (cid:48) = 1.1, 1.
(cid:15), (cid:15) (cid:48)
= 1.2, 1.
MNIST 0.9, 0.
[Table]
data using θ and θ (cid:48) but training models using ϑ and ϑ (cid:48) instead.
The experimental results in Tableimply that UU is fairly robust to inaccurate ϑ and ϑ (cid:48) and can be safely applied in the wild.
5. C OMPARISON WITH STATE - OF - THE - ART METHODS
Finally, we compare UU with two state-of-the-art methods for dealing with two sets of U data:
• proportion-SVM (pSVM, Yu et al., 2013) that is the best in learning from label proportions; • balanced error minimization (BER, Menon et al., 2015) that is the most related work to UU. [Table]
The original codes of BER train single-hidden-layer neural networks by LBFGS (which belongs to second-order optimization) in MATLAB.
For a fair comparison, we also implement BER by ﬁxing π p to 0.5 in UU, so that UU and BER only differ in the performance measure.
This new baseline is referred to as BER-FC.
The information of datasets can be found in Table 3.
We work on small datasets following Menon et al.
(2015), because pSVM and BER are not reliant on stochastic optimization and cannot handle larger datasets.
Furthermore, in order to try different π p , we ﬁrst subsample the original datasets to match the desired π p and then calculate the sample sizes n and n (cid:48) according to how many P and N data there are in the subsampled datasets, where θ and θ (cid:48) are set as close to 0.9 and 0.1 as possible.
For UU and BER-FC, the model is FC with ReLU of depth 5 and the optimizer is SGD.
We repeat this sampling-and-training process 10 times for all learning methods on all datasets.
The experimental results are reported in Table 3, and we can see that UU is always the best method (7 out of 10 cases) or comparable to the best method (3 out of 10 cases).
Moreover, the closer π p is to 0.5, the better BER and BER-FC are; however, the closer π p is to 0 or 1, the worse they are, and sometimes they are much worse than pSVM.
This is because their goal is to minimize the balanced error instead of the classiﬁcation error.
In our experiments, pSVM falls behind, because it is based on discriminative clustering and is also not designed to minimize the classiﬁcation error.
C ONCLUSIONS
We focused on training arbitrary binary classiﬁer, ranging from linear to deep models, from only U data by ERM.
We proved that risk rewrite as the core of ERM is impossible given a single set of U data, but it becomes possible given two sets of U data with different class priors, after we assumed that all necessary class priors are also given.
This possibility led to an unbiased risk estimator, and with the help of this risk estimator we proposed UU learning, the ﬁrst ERM-based learning method from two sets of U data.
Experiments demonstrated that UU learning could successfully train fully connected, all convolutional and residual networks, and it compared favorably with state-of-the-art methods for learning from two sets of U data.
A CKNOWLEDGMENTS
NL was supported by the MEXT scholarship No. 171536.
MS was supported by JST CREST JPMJCR1403.
We thank all anonymous reviewers for their helpful and constructive comments on the clarity of two earlier versions of this manuscript.
A P ROOFS
In this appendix, we prove all theorems.
A. P ROOF OF T HEOREM
We prove the theorem by contradiction, namely, for any such p ( x, y )
(with almost surely separable p p and p n ), for all a, b and all θ , we are able to ﬁnd some g for which (6) fails.
Our argument goes from the special case of (cid:96) 01 to the general case of (cid:96) satisfying (7).
Firstly, let g ( x ) =
+ ∞ identically, so that (cid:96) ( g ( x ))
=
and (cid:96) ( − g ( x )) = 1 .
Plugging them into (3) and (6), we obtain that
[Equation]
Secondly, let g ( x ) =
−∞ identically; this time (cid:96) ( g ( x ))
= 1 and (cid:96) ( − g ( x ))
= 0 , and we obtain that a = π p .
Thirdly, let g ( x ) =
+ ∞ over p p and g ( x ) =
−∞ over p n .
To be precise, deﬁne g ( x ) =
  + ∞ , p p ( x ) > 0 and p n ( x ) = 0 , −∞ , p p ( x ) = 0 and p n ( x ) > 0 , 0 , p p ( x ) > 0 and p n ( x ) > 0 .
This is possible because g is arbitrary.
The last case g ( x ) = 0 should have a zero probability, since p p and p n are almost surely separable.
Hence, we have (cid:96) ( g ( x ))
=
and (cid:96) ( − g ( x ))
= 1 over p p and (cid:96) ( g ( x ))
= 1 and (cid:96) ( − g ( x ))
=
over p n , resulting in
[Equation]
By solving this equation, we know that
[Equation]
Nevertheless, 0 ≤ θ ≤ 1 whereas
• π p / (2 π p − 1) < 0 , if 0 < π p < 1 / 2 ; • π p / (2 π p − 1) > 1 , if 1 / 2 < π p < 1 ; • π p / (2 π p − 1) is undeﬁned, if π p = 1 / 2 .
Therefore, (14) must be a contradiction, unless π p = 0 or π p = 1 which implies that there is just a single class and the problem under consideration is not binary classiﬁcation.
Finally, given any (cid:96) satisfying (7), it is not difﬁcult to verify that the three g above lead to the same contradiction with exactly the same a , b and θ by solving a bit more complicated equations.
A. P ROOF OF T HEOREM
Let J ( g ) be an alias of R ( g ) in Deﬁnition 3 serving as the learning objective, i.e.,
[Equation] [Equation]
then
[Equation]
E p [ c(cid:96) ( − g ( X )) + d(cid:96) ( g ( X ))]
+ (1 − θ (cid:48) )
E n [ c(cid:96) ( − g ( X )) + d(cid:96) ( g ( X ))]
= ( aθ + dθ (cid:48) )
E p [ (cid:96) ( g ( X ))]
+ ( bθ + cθ (cid:48) )
E p [ (cid:96) ( − g ( X ))]
+ [ a (1 − θ )
+ d (1 − θ (cid:48) )]
E n [ (cid:96) ( g ( X ))]
+ [ b (1 − θ )
+ c (1 − θ (cid:48) )]
E n [ (cid:96) ( − g ( X ))] .
On the other hand,
[Equation]
since J ( g ) is an alias of R ( g ) .
As a result, in order to minimize R ( g ) in (3), it sufﬁces to minimize
J ( g ) in (15), if we can make
[Equation]
Solving these equations gives us Eq.
(9), which concludes the proof.
A. P ROOF OF T HEOREM
First, we show the uniform deviation bound, which is useful to derive the estimation error bound.
Lemma 6.
For any δ > 0 , let C δ
=
(cid:112) (ln 2 /δ ) / 2 , then we have with probability at least 1 − δ ,
[Equation] [Equation]
where the probability is over repeated sampling of data for evaluating (cid:98) R uu ( g ) .
Proof.
Consider the one-side uniform deviation sup g ∈G (cid:98) R uu ( g ) − R ( g ) .
Since 0 ≤ (cid:96) ( z ) ≤ C (cid:96) , the change of it will be no more than C (cid:96) α/n if some x i is replaced, or no more than C (cid:96) α (cid:48) /n (cid:48)
if some x (cid:48)
j is replaced.
Subsequently, McDiarmid’s inequality (McDiarmid, 1989) tells us that
[Equation]
or equivalently, with probability at least 1 − δ/ 2 ,
[Equation]
By symmetrization (Vapnik, 1998)
[Equation]
it is a routine work to show that
[Equation]
and according to Talagrand’s contraction lemma (Shalev-Shwartz & Ben-David, 2014),
[Equation]
The one-side uniform deviation sup g ∈G R ( g ) − (cid:98) R uu ( g ) can be bounded similarly.
Based on Lemma
[Equation]
the estimation error bound (13) is proven through
R
[Equation]
where (cid:98) R uu ( (cid:98) g uu ) ≤ (cid:98) R uu ( g ∗ ) by the deﬁnition of (cid:98) g uu .
B S YNTHETIC E XPERIMENTS WITH L INEAR M ODELS
In the introduction, we illustrated the learning problem and the proposed method using a Gaussian mixture of two components.
The details of this illustrative example are presented here.
The P component p p ( x ) and N component p n ( x ) are both two-dimensional Gaussian distributions.
Their means are
[Equation]
and their covariance is the identity matrix.
The two training distributions are created following (1) with class priors θ = 0 .
9 and θ (cid:48)
= 0 .
Subsequently, the two sets of U training data were sampled from those distributions with sample sizes n = 2000 and n (cid:48)
= 1000 .
Moreover, p p ( x ) and p n ( x ) are combined to form the test distribution p ( x, y ) with weights 0.3 and 0.7, so π p = 0 . 3 .
Note that p ( x ) changes between training and test distributions (which can be seen from Figure 1 by comparing (c) and (d) in the left panel and the right panel).
This is the key difference between UU and CCN (Natarajan et al., 2013).
For the toy experiments, linear-in-input model g ( X ) =
ω T X
+ b , where ω ∈ R 2 and b ∈ R , and sigmoid loss were commonly used.
SGD with learning rate 0.01 and mini-batch size 128 was employed for optimization.
For the purpose of clear comparison of the risk estimators, we did not add regularization in the toy experiments.
The learned models trained with 500 epochs are shown in
Figure 1.
C T RAINING DEEP NEURAL NETWORKS ON BENCHMARKS C. E XPERIMENTAL S ETUP
MNIST The MNIST dataset contains 60,000 gray-scale training images and 10,000 test images from handwritten digits 0 to 9.
Since the dataset has ten classes originally, we used the even and odd digits to constitute P and N classes respectively.
The model used for MNIST was a fully connected neural network with ReLU (depth 5) as the activation functions: d - 300 - 300 - 300300 - 1 .
Batch normalization was applied before hidden layers, and an (cid:96) 2 -regularization (the (cid:96)coefﬁcient is ﬁxed to 0.0001) was also added.
The model was trained by SGD with an initial learning rate 0.001 and mini-batch size 128.
The learning rate was decreased according to the 1 / (1 + decay ∗ epochs ) schedule built in Keras, where the decay candidates were chosen from { 0 , 10 − 6 , 10 − 5 , 5 × 10 − 5 , 10 − 4 , 5 × 10 − 4 } .
Fashion-MNIST Fashion-MNIST is also a grayscale image dataset containing a training set of 60,000 examples and a test set of 10,000 examples.
Each data is associated with a label fromfashion item classes.
We artiﬁcially corrupted it into a binary classiﬁcation dataset as follows: P class is formed by ‘T-shirt’, ‘Pullover’, ‘Coat’, ‘Shirt’, ‘Bag’, and N class is formed by ‘Trouser’, ‘Dress’, ‘Sandal’, ‘Sneaker’, ‘Ankle boot’.
Moreover, the models and optimization of FashionMNIST followed the setup of MNIST, except that the initial learning rate was set to be 0.0001.
SVHN The SVHN dataset is a 32 × 32 color house-number image dataset consists of 73,257 training images, 26,032 test images, and 531,131 extra training images.
We sampled 100,000 training examples from the concatenation of the training data and extra training data.
The extra training data were used to ensure enough training data so as to perform class prior change in the experiments in
Figure 2.
For SVHN dataset, ‘0’, ‘6’, ‘8’, ‘9’ made up the P class; ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘7’ made up the N class.
The model for SVHN was all convoluntional net (depth 12): d - [ C (3 ∗ 3 , 96)]
∗ 2C (3 ∗ 3 , 96 , 2) -
[ C (3 ∗ 3 , 192)] ∗ 2 - C (3 ∗ 3 , 192 , 2) -C(
*3,192)- C (1 ∗ 1 , 192) - C (1 ∗ 1 , 10) - 1000 - 1000 - 1 , where C(3*3,96) means 96 channels of 3 × 3 convolutions followed by ReLU, [ · ]*2 means there are 2 such layers, C(3*3,96,2) means a similar layer but with stride 2, etc., and the padding scheme is same padding.
Batch normalization and (cid:96) 2 -regularization (the (cid:96) 2 coefﬁcient is ﬁxed to 0.00001) were again applied.
We used Adam optimizer with default momentum parameters ( β 1 = 0 .
9 and β 2 = 0 .
999 ), initial learning rate 0.001 and mini-batch size 500 to train the network.
CIFAR-
The CIFAR-10 dataset consists of 32 × 32 natural RGB images from 10 classes, with 5,000 training examples and 1,000 test examples in each class.
For CIFAR-10: P class is composed
[Table]
of ‘bird’, ‘cat’, ‘deer’, ‘dog’, ‘frog’ and ‘horse’, and N class is composed of ‘airplane’, ‘automobile’, ‘ship’ and ‘truck’.
In CIFAR-10 experiments, we used the following ResNet (depth 32) architecture: d - C (3 ∗ 3 ∗ 16) -
[ C (3 ∗ 3 ∗ 16) , C (3 ∗ 3 ∗ 16)] ∗ 5 - [ C (3 ∗ 3 ∗ 32 , 2) , C (3 ∗ 3 ∗ 32)] -
[ C (3 ∗ 3 ∗ 32) , C (3 ∗ 3 ∗ 32)] ∗ 4 - [ C (3 ∗ 3 ∗ 64 , 2) , C (3 ∗ 3 ∗ 64)] -
[ C (3 ∗ 3 ∗ 64) , C (3 ∗ 3 ∗ 64)] ∗ 4 -Global average pool- 1 , where C ( ∗ 3 ∗ 16) means 16 channels of 3 × 3 convolutions followed by ReLU, [ · , · ] means a building block (He et al., 2016) for ResNet, [ · ] ∗ 5 means there are 5 such layers, C (3 ∗ 3 ∗ 32 , 2) means similar layer but with stride 2, etc., and the padding scheme is same padding.
The optimization setup was the same as SVHN, except that the (cid:96) 2 coefﬁcient was set to be 0.005 and the learning rate was initially set to be 0.00001.
Training details For fair comparison, we used the same network architectures and optimization methods for the proposed method and corresponding baselines.
Note that in the additional experiments of analyzing covariate shift and robustness, we only used 40,000 training data for MNIST in order to make it feasible to perform class prior changes with limited P and N data.
C. S UPPLEMENTARY EXPERIMENTAL RESULTS
Due to limited space, here we report the means and standard deviations of the ﬁnal errors in benchmark experiments (see Figure 2) in Table 4.
Comparison of different losses We compared the risk estimator Eq.
(10) with sigmoid loss (cid:96) sig and logistic loss (cid:96) log by testing on MNIST with ( θ, θ (cid:48) )
∈ { (0 . 9 , 0 . 1) , (0 . 8 , 0 . 2) } .
The experimental results are reported in Figure 4, where means and standard deviations of classiﬁcation errors based on 10 random samplings are shown.
We can see that the resulted classiﬁcation errors are similar.
On the variation
of n and n (cid:48)
We also investigated the issue of covariate shift by changing the sample sizes of two U sets.
We tested UU and CCN by ﬁxing n (cid:48) to 20000 and gradually moving n from 20000 to 4000 , where θ and θ (cid:48) are chosen as 0 . 9 , 0 .
4 or 0 . 8 , 0 .
The experimental results in
Figure 5 show that as n moves farther from n (cid:48) , UU and CCN become worse, while UU is affected slightly and CCN is affected severely.
The experimental results are consistent with analysis of moving θ and θ (cid:48) closer in Sec. 5.1.
[Figure] [Figure]