Year: 2019

Abstract:
Empirical risk minimization (ERM), with proper loss function and regularization, is the common practice of supervised classification. In this paper, we study training arbitrary (from linear to deep) binary classifier from only unlabeled (U) data by ERM. We prove that it is impossible to estimate the risk of an arbitrary binary classifier in an unbiased manner given a single set of U data, but it becomes possible 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 classifier from only U data. Following these findings, we propose an ERM-based learning method from two sets of U data, and then prove it is consistent. Experiments demonstrate the proposed method could train deep models and outperform state-of-the-art methods for learning from two sets of U data.

heading: 1 INTRODUCTION
text: 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 classification (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 significantly harder than previous learning problems (cf. Figure 1). However, we would still like to train arbitrary binary classifier, 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 −2 0 2 4 (a) P component
−4
−2
0
2
4
−4 −2 0 2 4 (b) N component
−4
−2
0
2
4
−4 −2 0 2 4 (c) U set1
−4
−2
0
2
4
−4 −2 0 2 4 (d) U set2
−4
−2
0
2
4
−4 −3 −2 −1 0 1 2 3 4−4
−3
−2
−1
0
1
2
3
4
CCN
UU-biased
UU
Oracle
In the left panel, (a) and (b) show positive (P) and negative (N) components of the Gaussian mixture; (c) and (d) show two distributions (with class priors 0.9 and 0.4) where U training data are drawn (marked as black points). The right panel shows the test distribution (with class prior 0.3) and data (marked as blue for P and red for N), as well as four learned classifiers. In the legend, “CCN” refers to Natarajan et al. (2013), “UU-biased” means supervised learning taking larger-/smaller-class-prior U data as P/N data, “UU” is the proposed method, and “Oracle” means supervised learning from the same amount of L data. See Appendix B for more information. We can see that UU is almost identical to Oracle and much better than the other two methods.
Figure 1: Illustrative example of classification from a Gaussian mixture dataset.
corresponds to one class, and hence even perfect clustering might still result in poor classification. 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 difficulty 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 first 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 priors1are all you need to train deep models from only U data, while any two2 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.
1Two class-prior probabilities are of the training distributions and one is of the test distribution. 2One of the training distribution and one of the test distribution, or two of the training distributions. 3Learning is consistent (more specifically the learned classifier is asymptotically consistent), if and only if as the amount of training data approaches infinity, the risk of the learned classifier converges to the risk of the optimal classifier, where the optimality is defined over a given hypothesis class.

heading: 2 PROBLEM SETTING AND RELATED WORK
text: Consider the binary classification problem. Let X and Y be the input and output random variables such that
• p(x, y) is the underlying joint density, • pp(x) = p(x | Y = +1) and pn(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 θ′ be two valid class priors such that θ 6= θ′ (here it does not matter if either θ or θ′ equals πp or neither of them equals πp), and let
ptr(x) = θpp(x) + (1− θ)pn(x), p′tr(x) = θ′pp(x) + (1− θ′)pn(x) (1) be the marginal densities from which U training data are drawn. Eq. (1) implies there are ptr(x, y) and p′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.,
ptr(x | y) = p′tr(x | y) = p(x | y), ptr(Y = +1) = θ 6= θ′ = p′tr(Y = +1). If we could sample L data from ptr(x, y) or p′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 specifically, we have
Xtr = {x1, . . . , xn} ∼ ptr(x), X ′tr = {x′1, . . . , x′n′} ∼ p′tr(x), (2) where n and n′ are two natural numbers as the sample sizes of Xtr and X ′tr. This is exactly same as du Plessis et al. (2013) and Menon et al. (2015) with some different names. In Menon et al. (2015), θ and θ′ are called corruption parameters, and if we assume θ > θ′, ptr(x) is called the corrupted P density and p′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 : Rd → R be an arbitrary decision function, i.e., g may literally be any binary classifier. Let ` : R→ R be the loss function, such that the value `(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
R(g) = E(X,Y )∼p(x,y)[`(Y g(X))] = πpEp[`(g(X))] + (1− πp)En[`(−g(X))], (3)
where Ep[·] means EX∼pp [·] and En[·] means EX∼pn [·] respectively. If ` is the zero-one loss that is defined by `01(z) = (1 − sign(z))/2, the risk is also known as the classification error and it is the standard performance measure in classification. A balanced version of Eq. (3) is
B(g) = 1
2 Ep[`(g(X))] +
1 2 En[`(−g(X))], (4)
and if ` is `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. (2013) 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 classification than (4). By the phrase “binary classification”, 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 classification. Hence, it may be misleading to optimize (4), unless πp ≈ 12 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 satisfied 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. (2013) and Menon et al. (2015). Both of them adopt (4) as the performance measure. In the former paper, g is learned by estimating sign(ptr(x) − p′tr(x)). In the latter paper, g is learned by taking noisy L data from ptr(x) and p′tr(x) as clean L data from pp(x) and pn(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 findings 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 finding 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 first 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).4 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 defined by(
p̃(Ỹ = +1 | x) p̃(Ỹ = −1 | x)
) = TCCN ( p(Y = +1 | x) p(Y = −1 | x) ) and ( p̃(x | Ỹ = +1) p̃(x | Ỹ = −1) ) = TMCD ( pp(x) pn(x) ) ,
where both of TCCN and TMCD are 2-by-2 matrices but TCCN is column normalized and TMCD 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 fixed in CCN once p̃(ỹ | x) is specified while p̃(ỹ) is free in MCD after p̃(x | ỹ) is specified. Furthermore, p̃(x) = p(x) in CCN but p̃(x) 6= p(x) in MCD. Due to this covariate shift, CCN methods do not fit MCD problem setting, though MCD methods fit CCN problem setting. To the best of our knowledge, the proposed method is the first MCD method based on ERM.

heading: 3 LEARNING FROM ONE SET OF U DATA
text: From now on, we prove that knowing πp and θ is insufficient for rewriting R(g).

heading: 3.1 A BRIEF REVIEW OF ERM
text: To begin with, we review ERM (Vapnik, 1998) by imaging that we are given Xp = {x1, . . . , xn} ∼ pp(x) and Xn = {x′1, . . . , x′n′} ∼ pn(x). Then, we would go through the following procedure:
1. Choose a surrogate loss `(z), so that R(g) in Eq. (3) is defined. 2. Choose a model G, so that ming∈G R(g) is achievable by ERM. 3. Approximate R(g) by
R̂pn(g) = πp n ∑n i=1 `(g(xi)) + 1− πp n′ ∑n′ j=1 `(−g(x′j)). (5)
4. Minimize R̂pn(g), with appropriate regularization, by favorite optimization algorithm.
Here, ` should be classification-calibrated (Bartlett et al., 2006),5 in order to guarantee that R(g; `) and R(g; `01) have the same minimizer over all measurable functions. This minimizer is the Bayes optimal classifier and denoted by g∗∗ = arg ming R(g). The Bayes optimal risk R(g
∗∗) is usually unachievable by ERM as n, n′ → ∞. That is why by choosing a model G, g∗ = arg ming∈G R(g) became the target (i.e., ĝpn = arg ming∈G R̂pn(g) will converge to g
∗ as n, n′ → ∞). In statistical learning, the approximation error is R(g∗)− R(g∗∗), and the estimation error is R(ĝpn)− R(g∗). Learning is consistent if and only if the estimation error converges to zero as n, n′ →∞.
4There are quite few instance-dependent noise models (Menon et al., 2016; Cheng et al., 2017), and others explore instance-independent noise models (Natarajan et al., 2013; Sukhbaatar et al., 2015; Menon et al., 2015; Liu & Tao, 2016; Goldberger & Ben-Reuven, 2017; Patrini et al., 2017; Han et al., 2018a) or assume no noise model at all (Reed et al., 2015; Jiang et al., 2018; Ren et al., 2018; Han et al., 2018b).
5` is classification-calibrated if and only if there is a convex, invertible, and nondecreasing transformation ψ` with ψ`(0) = 0, such that ψ`(R(g; `01) − infg R(g; `01)) ≤ R(g; `) − infg R(g; `). If ` is a convex loss, it is classification-calibrated if and only if it is differentiable at the origin and `′(0) < 0.

heading: 3.2 IMPOSSIBILITY OF RISK REWRITE
text: Recall that R(g) is approximated by (5) given Xp and Xn, which does not work given Xtr and X ′tr. We might rewrite R(g) so that it could be approximated given Xtr and/or X ′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).
Definition 1. We say that R(g) in (3) is rewritable given ptr, if and only if 6 there exist constants a and b, such that for any g it holds that
R(g) = Eptr [¯̀(g(X))], (6)
where Eptr [·] means EX∼ptr [·] and ¯̀(z) = a`(z) + b`(−z) is the corrected loss function.
In Eq. (6), the expectation is with respect to ptr and θ is a free variable in it. The impossibility will be stronger, if θ is unspecified and allowed to be adjusted according to πp.
Theorem 2. Let ` be `01, or any bounded surrogate loss satisfying that
0 ≤ `(+∞) = limz→+∞ `(z) < limz→−∞ `(z) = `(−∞) < +∞. (7)
Assume pp and pn are almost surely separable. Then, R(g) is not rewritable though θ is free.7
This theorem shows that under the separability assumption of pp and pn, 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, `01 satisfies (7), which implies that the common practice of hyperparameter tuning is disabled by Theorem 2, since U validation data are also drawn from ptr.

heading: 4 LEARNING FROM TWO SETS OF U DATA
text: From now on, we prove that knowing πp, θ and θ′ is sufficient for rewriting R(g).

heading: 4.1 POSSIBILITY OF RISK REWRITE, AND UNBIASED RISK ESTIMATORS
text: We have proven that R(g) is not rewritable given ptr, and Quadrianto et al. (2009) has proven that R(g) can be estimated from Xtr and X ′tr, where g is a linear model and ` is the logistic loss. These facts motivate us to investigate the possibility of rewriting R(g), where g and ` are both arbitrary.8
Definition 3. We say that R(g) is rewritable given ptr and p′tr, if and only if 9 there exist constants a, b, c and d, such that for any g it holds that
R(g) = Eptr [¯̀+(g(X))] + Ep′tr [¯̀−(−g(X))], (8)
where ¯̀+(z) = a`(z) + b`(−z) and ¯̀−(z) = c`(z) + d`(−z) are the corrected loss functions.
In Eq. (8), the expectations are with respect to ptr and p′tr that are regarded as the corrupted pp and pn. There are two free variables θ and θ′ in ptr and p′tr. The possibility will be stronger, if θ and θ ′ are already specified and disallowed to be adjusted according to πp.
Theorem 4. Fix θ and θ′. Assume θ > θ′; otherwise, swap ptr and p′tr to make sure θ > θ′. Then, R(g) is rewritable, by letting
a = (1− θ′)πp θ − θ′ , b = − θ′(1− πp) θ − θ′ , c = θ(1− πp) θ − θ′ , d = − (1− θ)πp θ − θ′ . (9)
6This is because the backward correction in (6), if exists, would be unique. 7Please find in Appendix A the proofs of theorems. 8The technique that underlies Theorem 4 is totally different from Quadrianto et al. (2009). We shall obtain (9) by solving a linear system resulted from Definition 3. As previously mentioned, Quadrianto et al. (2009) is based on mean operators, and it cannot be further generalized to handle nonlinear g or arbitrary `.
9This is similar because the backward correction in (8), if exists, would be unique.
Theorem (4) immediately leads to an unbiased risk estimator, namely,
R̂uu(g) = 1
n ∑n i=1 ( (1− θ′)πp θ − θ′ `(g(xi))− θ′(1− πp) θ − θ′ `(−g(xi)) ) + 1
n′ ∑n′ j=1 ( − (1− θ)πp θ − θ′ `(g(x ′ j)) + θ(1− πp) θ − θ′ `(−g(x ′ j)) ) .
(10)
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., ĝuu = arg ming∈G R̂uu(g), as unlabeled-unlabeled (UU) learning. The proposed UU learning is by nature ERM-based, and consequently ĝuu can be obtained by powerful stochastic optimization algorithms (e.g., Duchi et al., 2011; Kingma & Ba, 2015).
Simplification Note that (10) may require some efforts to implement. Fortunately, it can be simplified by employing ` that satisfies a symmetric condition:
`(z) + `(−z) = 1. (11)
Eq. (11) covers `01, a ramp loss `ramp(z) = max{0,min{1, (1− z)/2}} in du Plessis et al. (2014) and a sigmoid loss `sig(z) = 1/(1 + exp(z)) in Kiryo et al. (2017). With the help of (11), (10) can be simplified as
R̂Symuu (g) = 1
n ∑n i=1 α`(g(xi)) + 1 n′ ∑n′ j=1 α′`(−g(x′j))− θ′(1− πp) + (1− θ)πp θ − θ′ , (12)
where α = (θ′ + πp − 2θ′πp)/(θ − θ′) and α′ = (θ + πp − 2θπp)/(θ − θ′). 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 θ′. It is obvious that (10) reduces to (5) for supervised learning, if θ = 1 and θ′ = 0. Next, (10) reduces to
R̂pu(g) = 1
n ∑n i=1 πp`(g(xi))− 1 n ∑n i=1 πp`(−g(xi)) + 1 n′ ∑n′ j=1 `(−g(x′j)),
if θ = 1 and θ′ = π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, θ′ = π2p/(2π 2 p − 2πp + 1) or vice versa. Therefore, UU learning is a very general framework in weakly-supervised learning.

heading: 4.2 CONSISTENCY AND CONVERGENCE RATE
text: The consistency of UU learning is guaranteed due to the unbiasedness of (10). In what follows, we analyze the estimation error R(ĝuu) − R(g∗) (see Sec. 3.1 for the definition). To this end, assume there are Cg > 0 and C` > 0 such that supg∈G ‖g‖∞ ≤ Cg and sup|z|≤Cg `(z) ≤ C`, and assume `(z) is Lipschitz continuous for all |z| ≤ Cg with a Lipschitz constant L`. Let Rn(G) and R′n′(G) be the Rademacher complexity of G over ptr(x) and p′tr(x) (Mohri et al., 2012; Shalev-Shwartz & Ben-David, 2014). For convenience, denote by χn,n′ = α/ √ n+ α′/ √ n′.
Theorem 5. For any δ > 0, let Cδ = √ (ln 2/δ)/2, then we have with probability at least 1− δ,
R(ĝuu)−R(g∗) ≤ 4L`αRn(G) + 4L`α′R′n′(G) + 2C`Cδχn,n′ , (13)
where the probability is over repeated sampling of Xtr and X ′tr for training ĝuu.
Theorem 5 ensures that UU learning is consistent (and so are all the special cases): as n, n′ → ∞, R(ĝuu) → R(g∗), since Rn(G),R′n′(G) → 0 for all parametric models with a bounded norm such as deep networks trained with weight decay. Moreover, R(ĝuu) → R(g∗) in Op(χn,n′), where Op 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).

heading: 5 EXPERIMENTS
text: 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.

heading: 5.1 TRAINING DEEP NEURAL NETWORKS ON BENCHMARKS
text: 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 first 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 classification datasets; please see Appendix C.1 for details. Xtr and X ′tr of the same sample size are drawn according to Eq. (1), where θ and θ′ 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 `(z). We have compared the sigmoid loss `sig(z) and the logistic loss `log(z) = ln(1 + exp(−z)), and found that the resulted classification errors are similar; please find the details in Appendix C.2. Since `sig satisfies (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 classification errors based on 10 random samplings are shown, and the table of final errors can be found in Appendix C.2. When θ = 0.9 and θ′ = 0.1 (cf. the left column), UU is comparable to PN oracle in most cases. When θ = 0.8 and θ′ = 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 θ′ become closer, which will be intensively investigated next.
On the closeness of θ and θ′ It is intuitive that if θ and θ′ move closer, Xtr and X ′tr will be more similar and thus less informative. To investigate this, we test UU and CCN (Natarajan et al., 2013) on MNIST by fixing θ to 0.9 or 0.8 and gradually moving θ′ from 0.1 to 0.5, and the experimental results are reported in Figure 3. We can see that when θ′ 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 α′ which, as θ′ → θ, are inversely proportional to θ − θ′. On the other hand, the phenomenon of CCN is caused by stronger covariate shift when θ′ moves closer to θ rather than the difficulty of the task. This illustrates CCN methods do not fit our problem setting, so that we called for some new learning method (i.e., UU).
Note that there would be strong covariate shift not only by changing θ and θ′ but also by changing n and n′. 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 θ′ are accessible, which is rarely satisfied in practice. Fortunately, UU is a robust learning method against inaccurate training class priors. To show this, let and ′ be real numbers around 1, ϑ = θ and ϑ′ = ′θ′ be perturbed θ and θ′, and we test UU on MNIST and CIFAR-10 by drawing data using θ and θ′ but training models using ϑ and ϑ′ instead. The experimental results in Table 2 imply that UU is fairly robust to inaccurate ϑ and ϑ′ and can be safely applied in the wild.

heading: 5.2 COMPARISON WITH STATE-OF-THE-ART METHODS
text: Finally, we compare UU with two state-of-the-art methods for dealing with two sets of U data:10
• 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.
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 fixing π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.
10We downloaded the codes by the original authors; see https://github.com/felixyu/pSVM and https://akmenon.github.io/papers/corrupted-labels/index.html.
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 first subsample the original datasets to match the desired πp and then calculate the sample sizes n and n′ according to how many P and N data there are in the subsampled datasets, where θ and θ′ 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 classification error. In our experiments, pSVM falls behind, because it is based on discriminative clustering and is also not designed to minimize the classification error.

heading: 6 CONCLUSIONS
text: We focused on training arbitrary binary classifier, 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 first 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.

heading: ACKNOWLEDGMENTS
text: 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.

heading: A PROOFS
text: In this appendix, we prove all theorems.
A.1 PROOF OF THEOREM 2
We prove the theorem by contradiction, namely, for any such p(x, y) (with almost surely separable pp and pn), for all a, b and all θ, we are able to find some g for which (6) fails. Our argument goes from the special case of `01 to the general case of ` satisfying (7).
Firstly, let g(x) = +∞ identically, so that `(g(x)) = 0 and `(−g(x)) = 1. Plugging them into (3) and (6), we obtain that
b = 1− πp. Secondly, let g(x) = −∞ identically; this time `(g(x)) = 1 and `(−g(x)) = 0, and we obtain that
a = πp.
Thirdly, let g(x) = +∞ over pp and g(x) = −∞ over pn. To be precise, define
g(x) =  +∞, pp(x) > 0 and pn(x) = 0, −∞, pp(x) = 0 and pn(x) > 0, 0, pp(x) > 0 and pn(x) > 0.
This is possible because g is arbitrary. The last case g(x) = 0 should have a zero probability, since pp and pn are almost surely separable. Hence, we have `(g(x)) = 0 and `(−g(x)) = 1 over pp and `(g(x)) = 1 and `(−g(x)) = 0 over pn, resulting in
0 = πpEp[`(g(X))] + (1− πp)En[`(−g(X))] = θEp[¯̀(g(X))] + (1− θ)En[¯̀(g(X))] = θb+ (1− θ)a.
By solving this equation, we know that
θ = a a− b = πp 2πp − 1 . (14)
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 undefined, 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 classification.
Finally, given any ` satisfying (7), it is not difficult 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.2 PROOF OF THEOREM 4
Let J(g) be an alias of R(g) in Definition 3 serving as the learning objective, i.e.,
J(g) = Eptr [¯̀+(g(X))] + Ep′tr [¯̀−(−g(X))], (15) then
J(g) = Eptr [a`(g(X)) + b`(−g(X))] + Ep′tr [c`(−g(X)) + d`(g(X))] = θEp[a`(g(X)) + b`(−g(X))] + (1− θ)En[a`(g(X)) + b`(−g(X))]
+ θ′Ep[c`(−g(X)) + d`(g(X))] + (1− θ′)En[c`(−g(X)) + d`(g(X))] = (aθ + dθ′)Ep[`(g(X))] + (bθ + cθ′)Ep[`(−g(X))]
+ [a(1− θ) + d(1− θ′)]En[`(g(X))] + [b(1− θ) + c(1− θ′)]En[`(−g(X))].
On the other hand,
J(g) = πpEp[`(g(X))] + (1− πp)En[`(−g(X))],
since J(g) is an alias of R(g). As a result, in order to minimize R(g) in (3), it suffices to minimize J(g) in (15), if we can make
aθ + dθ′ = πp, bθ + cθ′ = 0,
a(1− θ) + d(1− θ′) = 0, b(1− θ) + c(1− θ′) = 1− πp.
Solving these equations gives us Eq. (9), which concludes the proof.
A.3 PROOF OF THEOREM 5
First, we show the uniform deviation bound, which is useful to derive the estimation error bound. Lemma 6. For any δ > 0, let Cδ = √ (ln 2/δ)/2, then we have with probability at least 1− δ,
supg∈G |R̂uu(g)−R(g)| ≤ 2L`αRn(G) + 2L`α′R′n′(G) + C`Cδχn,n′ , (16)
where the probability is over repeated sampling of data for evaluating R̂uu(g).
Proof. Consider the one-side uniform deviation supg∈G R̂uu(g)− R(g). Since 0 ≤ `(z) ≤ C`, the change of it will be no more than C`α/n if some xi is replaced, or no more than C`α′/n′ if some x′j is replaced. Subsequently, McDiarmid’s inequality (McDiarmid, 1989) tells us that
Pr{supg∈G R̂uu(g)−R(g)− E[supg∈G R̂uu(g)−R(g)] ≥ } ≤ exp ( − 2 2
C2` (α 2/n+ α′2/n′)
) ,
or equivalently, with probability at least 1− δ/2,
supg∈G R̂uu(g)−R(g) ≤ E[supg∈G R̂uu(g)−R(g)] + C`(α/ √ n+ α′/ √ n′) √ (ln 2/δ)/2
= E[supg∈G R̂uu(g)−R(g)] + C`Cδχn,n′ .
By symmetrization (Vapnik, 1998), it is a routine work to show that
E[supg∈G R̂uu(g)−R(g)] ≤ 2αRn(` ◦ G) + 2α′R′n′(` ◦ G),
and according to Talagrand’s contraction lemma (Shalev-Shwartz & Ben-David, 2014),
Rn(` ◦ G) ≤ L`Rn(G), R′n′(` ◦ G) ≤ L`R′n′(G).
The one-side uniform deviation supg∈G R(g)− R̂uu(g) can be bounded similarly.
Based on Lemma 6, the estimation error bound (13) is proven through R(ĝuu)−R(g∗) = ( R̂uu(ĝuu)− R̂uu(g∗) ) + ( R(ĝuu)− R̂uu(ĝuu) ) + ( R̂uu(g ∗)−R(g∗) )
≤ 0 + 2 supg∈G |R̂uu(g)−R(g)| ≤ 4L`αRn(G) + 4L`α′R′n′(G) + 2C`Cδχn,n′ ,
where R̂uu(ĝuu) ≤ R̂uu(g∗) by the definition of ĝuu.

heading: B SUPPLEMENTARY INFORMATION ON FIGURE 1
text: 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 pp(x) and N component pn(x) are both two-dimensional Gaussian distributions. Their means are
µ+ = [+1,+1] >, µ− = [−1,−1]>,
and their covariance is the identity matrix. The two training distributions are created following (1) with class priors θ = 0.9 and θ′ = 0.4. Subsequently, the two sets of U training data were sampled from those distributions with sample sizes n = 2000 and n′ = 1000. Moreover, pp(x) and pn(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 training, a linear (-in-input) model g(x) = ω>x + b where ω ∈ R2 and b ∈ R, and a sigmoid loss `sig(z) = 1/(1 + exp(z)) were used. SGD was employed for optimization, where the learning rate was 0.01 and the batch size was 128. The model just has three parameters, so for the sake of a clear comparison of different risk estimators, we did not add any regularization. For every method, the model was trained 500 epochs. The final models are plotted in Figure 1.

heading: C SUPPLEMENTARY INFORMATION ON THE EXPERIMENTS
text: C.1 SETUP
MNIST This is a grayscale image dataset of handwritten digits from 0 to 9 where the size of the images is 28*28. It contains 60,000 training images and 10,000 test images. Since it has 10 classes originally, we used the even digits as the P class and the odd digits as the N class, respectively.
The model was FC with ReLU as the activation function: d-300-300-300-300-1. Batch normalization (Ioffe & Szegedy, 2015) was applied before hidden layers. An `2-regularization was added, where the regularization parameter was fixed to 1e-4. The model was trained by SGD with an initial learning rate 1e-3 and a batch size 128. In addition, the learning rate was decreased by
1
1 + decay · epoch ,
where decay was chosen from {0, 1e-6, 1e-5, 5e-5, 1e-4, 5e-4}. This is a learning rate schedule built in Keras.
Fashion-MNIST This is also a grayscale image dataset similarly to MNIST, but here each data is associated with a label from 10 fashion item classes. It was converted into a binary classification dataset as follows:
• the P class is formed by ‘T-shirt’, ‘Pullover’, ‘Coat’, ‘Shirt’, and ‘Bag’; • the N class is formed by ‘Trouser’, ‘Dress’, ‘Sandal’, ‘Sneaker’, and ‘Ankle boot’.
The model and optimizer were same as MNIST, except that the initial learning rate was 1e-4.
SVHN This is a 32*32 color image dataset of street view house numbers from 0 to 9. It consists of 73,257 training data, 26,032 test data, and 531,131 extra training data. We sampled 100,000 data for training from the concatenation of training data and extra training data—the extra training data were used to ensure enough training data so as to perform class-prior changes. For SVHN dataset, ‘0’, ‘6’, ‘8’, ‘9’ made up the P class, and ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘7’ made up the N class.
The model was AllConvNet (Springenberg et al., 2015) as follows.
0th (input) layer: (32*32*3)- 1st to 3rd layers: [C(3*3, 96)]*2-C(3*3, 96, 2)-
where C(3*3, 96) means 96 channels of 3*3 convolutions followed by ReLU, [ · ]*2 means 2 such layers, C(3*3, 96, 2) means a similar layer but with stride 2, etc. Again, batch normalization and `2-regularization with a regularization parameter 1e-5 were applied. The optimizer was Adam with the default momentum parameters (β1 = 0.9 and β2 = 0.999), an initial learning rate 1e-3, and a batch size 500.
CIFAR-10 This dataset consists of 60,000 32*32 color images in 10 classes, and there are 5,000 training images and 1,000 test images per class. For CIFAR-10 dataset,
• the P class is composed of ‘bird’, ‘cat’, ‘deer’, ‘dog’, ‘frog’ and ‘horse’; • the N class is composed of ‘airplane’, ‘automobile’, ‘ship’ and ‘truck’.
The model was ResNet-32 (He et al., 2016) as follows.
0th (input) layer: (32*32*3)- 1st to 11th layers: C(3*3, 16)-[C(3*3, 16), C(3*3, 16)]*5-
12th to 21st layers: [C(3*3, 32), C(3*3, 32)]*5- 22nd to 31st layers: [C(3*3, 64), C(3*3, 64)]*5-
32nd layer: Global Average Pooling-1
where [ ·, · ] means a building block (He et al., 2016). The optimization setup was the same as for SVHN, except that the regularization parameter was set to be 5e-3 and the initial learning rate was set to be 1e-5.
Remark In the experiments on the closeness of θ and θ′ and on the robustness against inaccurate training class priors, we sampled 40,000 training data from all the training data of MNIST in order to make it feasible to perform class-prior changes.
C.2 RESULTS
Final classification errors Please find in Table 4.
Comparison of different losses We have compared the sigmoid loss `sig(z) and the logistic loss `log(z) on MNIST. The experimental results are reported in Figure 4. We can see that the resulted classification errors are similar—in fact, `sig(z) is a little better.
On the variation of n and n′ We have further investigated the issue of covariate shift by varying n and n′. Likewise, we test UU and CCN on MNIST by fixing n′ to 20,000 and gradually moving n from 20,000 to 4,000, where θ′ is fixed to 0.4 and θ is chosen from 0.9 or 0.8. The experimental results in Figure 5 indicate that when n moves farther from n′, UU and CCN become worse, while
UU is affected slightly and CCN is affected severely. Figure 5 is consistent with Figure 3, showing that CCN methods do not fit our problem setting.

Review summaries:
This paper proposes a methodology for training any binary classifier from only unlabeled data. They proved that it is impossible to provide an unbiased estimator if having only a single set of unlabeled data, however, they provide an empirical risk minimization method for only two sets of unlabeled data where all the class priors are given. Some experiments and comparisons with state-of-the-art are provided, together with a study on the robustness of the method.

The authors introduce the task of learning from unlabeled data clearly and concisely with sufficient reference to background material. They propose a learning approach, called UU, from two unlabeled datasets with known class priors and prove consistency and convergence rates. Their experiments are insightful to the problem, revealing how the two datasets must be sufficiently separated and how UU learning outperforms state-of-the-art approaches. The writing is clear and the idea is an original refinement of earlier work, justified by its exceeding state-of-the-art approaches. However, the paper needs more experimentation.