C ONTRASTIVE L ABEL D ISAMBIGUATION FOR P ARTIAL L ABEL L EARNING
Anonymous authors
Paper under double-blind review
A BSTRACT
Partial label learning (PLL) is an important problem that allows each training example to be labeled with a coarse candidate set, which well suits many real-world data annotation scenarios with label ambiguity.
Despite the promise, the performance of PLL often lags behind the supervised counterpart.
In this work, we bridge the gap by addressing two key research challenges in PLL—representation learning and label disambiguation—in one coherent framework.
Speciﬁcally, our proposed framework PiCO consists of a contrastive learning module along with a novel class prototype-based label disambiguation algorithm.
PiCO produces closely aligned representations for examples from the same classes and facilitates label disambiguation.
Theoretically, we show that these two components are mutually beneﬁcial, and can be rigorously justiﬁed from an expectationmaximization (EM) algorithm perspective.
Extensive experiments demonstrate that PiCO signiﬁcantly outperforms the current state-of-the-art approaches in PLL and even achieves comparable results to fully supervised learning.
I NTRODUCTION
The training of modern deep neural networks typically requires massive labeled data, which imposes formidable obstacles in data collection.
Of a particular challenge, data annotation in the real-world can naturally be subject to inherent label ambiguity and noise.
For example, as shown in Figure 1, identifying an Alaskan Malamute from a Siberian Husky can be difﬁcult for a human annotator.
The issue of labeling ambiguity is prevalent yet often overlooked in many applications, such as web mining (Luo & Orabona, 2010) and automatic image annotation (Chen et al., 2018).
This gives rise to the importance of partial label learning (PLL) (H ¨ ullermeier & Beringer, 2006;
Cour et al., 2011), where each training example is equipped with a set of candidate labels instead of the exact groundtruth label.
This stands in contrast to its supervised counterpart where one label must be chosen as the “gold”.
Arguably, the PLL problem is deemed more common and practical in various situations due to its relatively lower cost to annotations.
Despite the promise, a core challenge in PLL is label disambiguation, i.e., identifying the groundtruth label from the candidate label set.
Existing methods typically require a good feature representation (Liu & Dietterich, 2012; Zhang et al., 2016;
Lyu et al., 2021), and operate under the assumption that data points closer in the feature space are more likely to share the same ground-truth label.
However, the reliance on representations has led to a non-trivial dilemma—the inherent label uncertainty can undesirably manifest in the representation learning process—the quality of which may in turn prevent effective label disambiguation.
To date, few efforts have been made to resolve this.
This paper bridges the gap by reconciling the intrinsic tension between the two highly dependant problems—representation learning and label disambiguation—in one coherent and synergistic framework.
Our framework, P art i al label learning with CO ntrastive label disambiguation (dubbed
PiCO ), produces closely aligned representations for examples from the same classes and facilitates label disambiguation.
Speciﬁcally, PiCO encapsulates two key components.
First, we leverage contrastive learning (CL)
(Khosla et al., 2020) to partial label learning, which is unexplored in previous
PLL literature.
To mitigate the key challenge of constructing positive pairs, we employ the classiﬁer’s output and generate pseudo positive pairs for contrastive comparison (Section 3.1).
Second, based on the learned embeddings, we propose a novel prototype-based label disambiguation strategy (Section 3.2).
Key to our method, we gradually update the pseudo target for classiﬁcation, based on the closest class prototype.
By alternating the two steps above, PiCO converges to a solution with a highly distinguishable representation for accurate classiﬁcation.
Empirically, PiCO establishes state-of-the-art performance on three benchmark datasets, outperforming the baselines by a signiﬁcant margin (Section 4) and obtains results that are competitive with fully supervised learning .
Theoretically, we demonstrate that our contrastive representation learning and prototype-based label disambiguation are mutually beneﬁcial, and can be rigorously interpreted from an ExpectationMaximization (EM) algorithm perspective (Section 5).
First, the reﬁned pseudo labeling improves contrastive learning by selecting pseudo positive examples accurately.
This can be analogous to the
E-
step, where we utilize the classiﬁer’s output to assign each data example to one label-speciﬁc cluster.
Second, better contrastive performance in turn improves the quality of representations and thus the effectiveness of label disambiguation.
This can be reasoned from an M-step perspective, where the contrastive loss partially maximizes the likelihood by clustering similar data examples.
Finally, the training data will be mapped to a mixture of von Mises-Fisher distributions on the unit hypersphere, which facilitates label disambiguation by using the component-speciﬁc label.
Our main contributions are summarized as follows: 1 (Methodology).
To the best of our knowledge, our paper pioneers the exploration of contrastive learning for partial label learning and proposes a novel framework termed PiCO.
As an integral part of our algorithm, we also introduce a new prototype-based label disambiguation mechanism, leverages the contrastively learned embeddings.
2 (Experiments).
Empirically, our proposed PiCO framework establishes the state-of-the-art performance on three PLL tasks.
Moreover, we make the ﬁrst attempt to conduct experiments on ﬁne-grained classiﬁcation datasets, where we show classiﬁcation performance improvement by up to 9 . 61 % compared with the best baseline on the CUB-200 dataset.
3 (Theory).
We theoretically interpret our framework from the expectation-maximization perspective.
Our derivation is also generalizable to other CL methods and shows the alignment property in
CL (Wang & Isola, 2020) mathematically equals the M-step in center-based clustering algorithms.
B ACKGROUND
The problem of partial label learning (PLL) is deﬁned using the following setup.
Let X be the input space, and Y = { 1 , 2 , ..., C } be the output label space.
We consider a training dataset D
= { ( x i , Y i ) } ni
=1 , where each tuple comprises of an image x i ∈ X and a candidate label set Y i ⊂ Y .
Identical to the supervised learning setup, the goal of PLL is to obtain a functional mapping that predicts the one true label associated with the input.
Yet differently, the PLL setup bears signiﬁcantly more uncertainty in the label space.
A basic assumption of PLL is that the groundtruth label y i is concealed in its candidate set,
i.e., y i ∈ Y i , and is invisible to the learner.
For this reason, the learning process can suffer from inherent ambiguity, compared with the supervised learning task with explicit ground-truth.
The key challenge of PLL is to identify the ground-truth label from the candidate label set.
During training, we assign each image x i a normalized vector s i ∈ [0 , 1] C as the pseudo target , whose entries denote the probability of labels being the ground-truth.
The total probability mass of 1 is allocated among candidate labels in Y i .
Note that s i will be updated during the training procedure.
Ideally, s i should put more probability mass on the (unknown) ground-truth label y i over the course of training.
We train a classiﬁer f : X → [0 , 1] C using cross-entropy loss, with s i being the target prediction.
The per-sample loss is given by:
[Equation]
where j denotes the indices of labels.
s i,j denotes the j -th pseudo target of x i .
Here f is the softmax output of the networks and we denote f j as its j -th entry.
In the remainder of this paper, we omit the sample index i when the context is clear.
We proceed by describing our proposed framework.
M ETHOD
In this section, we describe our novel P art i al label learning with CO ntrastive label disambiguation (PiCO) framework in detail.
In a nutshell, PiCO comprises two key components tackling the representation quality (Section 3.1) and label ambiguity respectively (Section 3.2).
The two components systematically work as a whole and reciprocate each other.
We further rigorously provide a theoretical interpretation of PiCO from an EM perspective in Section 5.
3. C ONTRASTIVE R EPRESENTATION L EARNING FOR PLL
The uncertainty in the label space posits a unique obstacle for learning effective representations.
In
PiCO, we couple the classiﬁcation loss in Eq.
(1) with a contrastive term that facilitates a clustering effect in the embedding space.
While contrastive learning has been extensively studied in recent literature, it remains untapped in the domain of PLL.
The main challenge lies in the construction of positive sample set.
In conventional supervised CL frameworks, the positive sample pairs can be easily drawn according to the ground-truth labels (Khosla et al., 2020).
However, this is not straightforward in the setting of PLL.
Training Objective.
To begin with, we describe the standard contrastive loss term.
We adopt the most popular setups by closely following MoCo (He et al., 2020) and SupCon (Khosla et al., 2020).
Given each sample ( x , Y ) , we generate two views—a query view and a key view—by way of randomized data augmentation Aug ( x ) .
The two images are then fed into a query network g ( · ) and a key network g (cid:48) ( · ) , yielding a pair of L 2 -normalized embeddings q = g
( Aug q ( x )) and k = g (cid:48)
( Aug k ( x )) .
In implementations, the query network shares the same convolutional blocks as the classiﬁer, followed by a prediction head (see Figure 2).
Following MoCo, the key network uses a momentum update with the query network.
We additionally maintain a queue storing the most current key embeddings k , and we update the queue chronologically.
To this end, we have the following contrastive embedding pool:
[Equation]
where B q and B k are vectorial embeddings corresponding to the query and key views of the current mini-batch.
Given an example x , the per-sample contrastive loss is deﬁned by contrasting its query embedding with the remainder of the pool A ,
[Equation]
where P ( x ) is the positive set and A ( x )
= { A \{ q }} .
τ ≥ 0 is the temperature.
Positive Set Selection.
As mentioned earlier, the crucial challenge is how to construct the positive set P ( x ) .
We propose utilizing the predicted label ˜
y = arg max j ∈ Y f j
( Aug q ( x )) from the classiﬁer.
Note that we restrict the predicted label to be in the candidate set Y .
The positive examples are then selected as follows,
[Equation]
where ˜ y (cid:48) is the predicted label for the corresponding training example of k (cid:48) .
For computational efﬁciency, we also maintain a label queue to store past predictions.
In other words, we deﬁne the positive set of x to be those examples carrying the same approximated label prediction ˜ y .
Despite its simplicity, we show that our selection strategy can be theoretically justiﬁed (Section 5) and also lead to superior empirical results (Section 4).
Note that more sophisticated selection strategies can be explored, for which we discuss in Appendix B.4.
Putting it all together, we jointly train the classiﬁer as well as the contrastive network.
The overall loss function is:
[Equation]
Still, our goal of learning high-quality representation by CL relies on accurate classiﬁer prediction for positive set selection, which remains unsolved in the presence of label ambiguity.
To this end, we further propose a novel label disambiguation mechanism based on contrastive embeddings and show that these two components are mutually beneﬁcial.
3. P ROTOTYPE - BASED L ABEL D ISAMBIGUATION
As we mentioned (and later theoretically prove in Section 5), the contrastive loss poses a clustering effect in the embedding space.
As a collaborative algorithm, we introduce our novel prototype-based label disambiguation strategy.
Importantly, we keep a prototype embedding vector µ c corresponding to each class c ∈ { 1 , 2 , ..., C } , which can be deemed as a set of representative embedding vectors.
Categorically, a naive version of the pseudo target assignment is to ﬁnd the nearest prototype of the current embedding vector.
Notably this primitive resembles a clustering step.
We additionally soften this hard label assignment version by using a moving-average style formula.
To this end, we may posit intuitively that the employment of the prototype builds a connection with the clustering effect in the embedding space brought by the contrastive term (Section 3.1).
We provide a more rigorous justiﬁcation in Section 5.
Pseudo Target Updating
We propose a softened and moving-average style strategy to update the pseudo targets.
Speciﬁcally, we ﬁrst initialize the pseudo targets with a uniform distribution, s j = 1 | Y | I ( j ∈ Y ) .
We then iteratively update it by the following moving-average mechanism,
[Equation]
where φ ∈ (0 , 1) is a positive constant, and µ j is a prototype corresponding to the j -th class.
The intuition is that ﬁtting uniform pseudo targets results in a good initialization for the classiﬁer, since the contrastive embeddings are less distinguishable at the beginning.
The moving-average style strategy then smoothly updates the pseudo targets towards the correct ones, and meanwhile ensures stable dynamics of training; see Appendix B.2.
With more rigorous validation provided later in
Section 5, we provide an explanation for the prototype as follows: (i)-for a given input x , the closest prototype is indicative of its ground-truth class label.
At each step, s has the tendency to slightly move toward the one-hot distribution deﬁned by z based on Eq.
(6); (ii)-if an example consistently points to one prototype, the pseudo target s can converge (almost) to a one-hot vector with the least ambiguity.
Prototype Updating.
The most canonical way to update the prototype embeddings is to compute it in every iteration of training.
However, this would extract a heavy computational toll and in turn cause unbearable training latency.
As a result, we update the class-conditional prototype vector similarly in a moving-average style:
[Equation]
where the momentum prototype µ c of class c is deﬁned by the moving-average of the normalized query embeddings q whose predicted class conforms to c .
γ is a tunable hyperparameter.
[Table]
3. S YNERGY BETWEEN C ONTRASTIVE L EARNING AND L ABEL D ISAMBIGUATION
While seemingly separated from each other, the two key components of PiCO work in a collaborative fashion.
First, as the contrastive term favorably manifests a clustering effect in the embedding space, the label disambiguation module further leverages via setting more precise prototypes.
Second, a set of well-polished label disambiguation results may, in turn, reciprocate the positive set construction which serves as a crucial part in the contrastive learning stage.
The entire training process converges when the two components perform satisfactorily.
We further rigorously draw a resemblance of
PiCO with a classical EM-style clustering algorithm in Section 5.
Our experiments, particularly the ablation study displayed in Section 4.3, further justify the mutual dependency of the synergy between the two components.
The pseudo-code of our complete algorithm is shown in Appendix C.
E XPERIMENTS 4. S ETUP
Datasets and Baselines.
First, we evaluate PiCO on two commonly used benchmarks — CIFARand CIFAR-100 (Krizhevsky et al., 2009).
Adopting the identical experimental settings in previous work (Lv et al., 2020; Wen et al., 2021), we generate partially labeled datasets by ﬂipping negative labels ¯ y (cid:54) =
y to false positive labels with a probability q = P (¯ y ∈ Y | ¯ y (cid:54) =
y ) .
In other words, all
C − 1 negative labels have a uniform probability to be false positive and we aggregate the ﬂipped ones with the ground-truth to form the candidate set.
We consider q ∈ { 0 . 1 , 0 .
3 , 0 . 5 } for CIFAR10 and q ∈ { 0 . 01 , 0 .
05 , 0 . 1 } for CIFAR-100.
In Section 4.4, we further evaluate our method on ﬁne-grained classiﬁcation tasks, where label disambiguation can be more challenging.
We choose the ﬁve best-performed partial label learning algorithms to date:
1) LWS (Wen et al., 2021) weights the risk function by means of a trade-off between losses on candidate labels and
the remaining; 2) PRODEN
(Lv et al., 2020) iteratively updates the latent label distribution in a selftraining style; 3) CC (Feng et al., 2020b) is a classiﬁer-consistent method that assumes set-level uniform data generation process; 4) MSE and EXP (Feng et al., 2020a) are two simple baselines that adopt mean square error and exponential loss as the risks.
The hyperparameters are tuned according to the original methods.
The detailed implementation of our method PiCO is presented in Appendix B.1.
For all experiments, we report the mean and standard deviation based on 5 independent runs (with different random seeds).
Source code of PiCO is attached in the Supplementary .
4. M AIN E MPIRICAL R ESULTS
PiCO achieves SOTA results.
As shown in Table 1, PiCO signiﬁcantly outperforms all the rivals by a signiﬁcant margin on all datasets.
Speciﬁcally, on CIFAR-10 dataset, we improve upon the best baseline by 4 . 09 % , 4 . 80 % , and 5 . 80 % where q is set to 0 .
5 respectively.
Moreover, PiCO consistently achieves superior results as the size of the candidate set increases, while the baselines demonstrate a signiﬁcant performance drop.
Besides, it is worth noting that previous works (Lv
[Figure]
et al., 2020; Wen et al., 2021) are typically evaluated on datasets with a small label space ( C = 10 ).
We challenge this by showing additional results on CIFAR-100.
When q = 0 .
1 , all the baselines fail to obtain satisfactory performance, whereas PiCO remains competitive.
Finally, we observe that PiCO achieves results that are comparable to the fully supervised contrastive learning model , showing that disambiguation is sufﬁciently accomplished.
The comparison highlights the superiority of our label disambiguation strategy.
PiCO learns more distinguishable representations.
We visualize the image representation produced by the feature encoder using t-SNE (Van der Maaten & Hinton, 2008) in Figure 3.
Different colors represent different ground-truth class labels.
We use the CIFAR-10 dataset with q = 0 .
We contrast the t-SNE embeddings of three approaches: (a) a model trained with uniform pseudo targets, i.e., s j = 1 / | Y | ( j ∈ Y ), (b) the best baseline PRODEN, and (c) our method PiCO.
We can observe that the representation of the uniform model is indistinguishable since its supervision signals suffer from high uncertainty.
The features of PRODEN are improved, yet with some class overlapping (e.g., blue and purple).
In contrast, PiCO produces well-separated clusters and more distinguishable representations, which validates its effectiveness in learning high-quality representation.
4. A BLATION S TUDIES
In this section, we present part of our ablation results to show the effectiveness of PiCO.
We refer readers to Appendix B.2 for more ablation experiments.
Effect of L cont and label disambiguation.
We ablate the contributions of two key components of PiCO: the contrastive learning and prototype-based label disambiguation.
In particular, we compare PiCO with two variants: 1) PiCO w/o disambiguation which keeps the pseudo target as uniform 1 / | Y | ; and 2) PiCO w/o L cont , which further removes the contrastive learning and only trains a classiﬁer with uniform pseudo targets.
From Table 2, we can observe that variant 1 substantially outperforms variant 2 (e.g., + 8 . 04% on CIFAR-10), which signiﬁes the importance of contrastive learning for producing better representations.
Moreover, with label disambiguation, PiCO obtains results close to fully supervised setting , which veriﬁes the ability of PiCO in identifying the ground-truth.
Different disambiguation strategy.
Based on the contrastive prototypes, various strategies can be used to disambiguate the labels, which corresponds to the E-step in our theoretical analysis.
We choose the following variants: 1) One-hot Prototype always assigns a one-hot pseudo target s =
z by using the nearest prototype ( φ = 0 ); 2) Soft Prototype Probs follows (Li et al., 2021a) and uses a soft class probability
s i =
[Equation]
/τ )
as the pseudo target ( φ = 0 ); 3) MA Soft Prototype
Probs gradually updates pseudo target from uniform by using the soft probabilities in a movingaverage style.
From Table 2, we can see that directly using either soft or hard prototype-based label assignment leads to competitive results.
This corroborates our theoretical analysis in Section 5, since center-based class probability estimation is common in clustering algorithms.
However,
MA Soft Prototype Probs displays degenerated performance, suggesting soft label assignment is less reliable in identifying the ground-truth.
Finally, PiCO outperforms the best variant by 2% in accuracy on both datasets, showing the superiority of our label disambiguation strategy.
[Table]
Effect of moving-average factor φ .
We then explore the effect of pseudo target updating factor φ on PiCO performance.
Figure 4 shows the learning curves of PiCO on CIFAR-100 ( q = 0 . 05 ).
We can see that the best result is achieved at φ = 0 .
9 and the performance drops when φ takes a smaller value, particularly on the early stage.
When φ = 0 , PiCO obtains a competitive result
[Table]
but is much lower than φ = 0 .
This conﬁrms that trusting the uniform pseudo target at the early stage is crucial in obtaining superior performance.
At the other extreme value φ = 1 , uniform pseudo target is used
[Table]
and PiCO demonstrates a degenerated performance and severe overﬁtting phenomena.
In general, PiCO performs well when φ ≈ 0 . 9 .
4. F URTHER E XTENSION : F INE -G RAINED P ARTIAL L ABEL L EARNING
[Table]
Recall the dog example highlighted in Section 2, where semantically similar classes are more likely to cause label ambiguity.
It begs the question of whether PiCO is effective on the challenging ﬁnegrained image classiﬁcation tasks.
To verify this, we conduct experiments on two datasets: 1) CUB200 dataset (Welinder et al., 2010) containsbird species; 2) CIFAR-100 with hierarchical labels (CIFAR-100-H), where we generate candidate labels that belong to the same superclass 1 .
We set q = 0 .for CUB-200 and q = 0 .
5 for CIFAR-100 with hierarchical labels.
In Table 3, we compare PiCO with baselines, where PiCO outperforms the best method PRODEN by a large margin (+ 9 .
61 % on CUB-200 and + 11 .
15 % on CIFAR-100-H).
Our results validate the effectiveness of our framework, even in the presence of strong label ambiguity.
W HY P I CO IMPROVES PARTIAL LABEL LEARNING ?
In this section, we provide theoretical justiﬁcation on why the contrastive prototypes help disam- biguate the ground-truth label.
We show that the alignment property in contrastive learning (Wang & Isola, 2020) intrinsically minimizes the intraclass covariance in the embedding space, which coin- cides with the objective of classical clustering algorithms.
It motivates us to interpret PiCO through the line of the expectation-maximization algorithm.
To see this, we consider an ideal setting: in each training step, all data examples are accessible and the augmentation copies are also included in the training set, i.e., A = D .
Then, the contrastive loss is calculated as,
[Equation]
x ∈D 
[Equation]
We focus on analyzing the ﬁrst term (a)
[Equation]
which is often dubbed as the alignment term (Wang &
Isola, 2020).
The main functionality of this term is to optimize the tightness of the clusters in the embedding space.
In this work, we connect it with classical clustering algorithms.
We ﬁrst split the dataset to C subsets S j ∈ D C ( 1 ≤ j ≤ C ), where each subset contains examples possessing the same predicted labels.
In effect, our selection strategy in Eq.
(4) constructs the positive set by selecting examples from the same subset.
Therefore, we have,
[Equation]
where K is a constant and µ j is the mean center of S j .
Here we approximate 1 | S j | ≈
[Equation]
since n is usually large.
We omitted the augmentation operation for simplicity.
The uniformity term (b) can beneﬁt information-preserving, and has been analyzed in (Wang & Isola, 2020).
We are now ready to interpret the PiCO algorithm as an expectation-maximization algorithm that maximizes the likelihood of a generative model.
At the E-step, the classiﬁer assigns each data example to one speciﬁc cluster.
At the M-step, the contrastive loss concentrates the embeddings to their cluster mean direction, which is achieved by minimizing Eq.
Finally, the training data will be mapped to a mixture of von Mises-Fisher distributions on the unit hypersphere.
EM Perspective.
Recall that the candidate label set is a noisy version of the ground-truth.
To estimate the likelihood P ( Y i , x i ) , we need to establish the relationship between the candidate and the ground-truth label.
Following (Liu & Dietterich, 2012), we make a mild assumption,
Assumption 1.
All labels in the candidate label set y
i have the same probability of generating Y i , but no label outside of Y i can generate Y i , i.e. P ( Y i | y i )
= (cid:126)
( Y i ) if y i ∈ Y
i else 0 .
Here (cid:126) ( · ) is some function making it a valid probability distribution.
Then, we show that the PiCO implicitly imizes the likelihood as follows,
E-Step.
First, we introduce some distribution over all examples and the candidates π ji ( 1 ≤ i ≤ n, 1 ≤ j ≤ C ) such that π ji =
if j / ∈ Y i and (cid:80) j ∈ Y
i π ji = 1 .
Let θ be the parameters of g .
Our goal is to maximize the likelihood below,
[Equation]
The last step of the derivation uses Jensen’s inequality.
By using the fact that log( · ) function is concave, the inequality holds with equality when P ( x i ,y i | θ ) π yii is some constant.
Therefore,
[Equation]
which is the posterior class probability.
In PiCO, it is estimated by using the classiﬁer’s output.
To estimate P ( y i | x i , θ ) , classical unsupervised clustering methods intuitively assign the data examples to the cluster centers, e.g. k-means.
As in the supervised learning setting, we can directly use the ground-truth.
However, under the setting of PLL, the supervision signals are situated between the supervised and unsupervised setups.
Basing on empirical ﬁndings, the candidate labels are more reliable for posterior estimation at the beginning; yet alongside the training process, the prototypes tend to become more trustful.
This empirical observation has motivated us to update the pseudo targets in a moving-average style.
Thereby, we have a good initialization in estimating class posterior, and it will be smoothly reﬁned during the training procedure.
This is veriﬁed in our empirical studies; see Section 4.3 and Appendix B.2.
Finally, we take one-hot prediction ˜
y
i = arg max j ∈ Y
f j ( x i ) since each example inherently belongs to exactly one label and hence, we have π ji
= I
(˜ y i = j ) .
M-Step.
At this step, we aim at maximizing the likelihood under the assumption that the posterior class probability is known.
We show that under mild assumptions, minimizing Eq.
(9) also maximizes a lower bound of likelihood in Eq.
Theorem 1.
Assume data from the same class in the contrastive output space follow a dvariate von Mises-Fisher (vMF) distribution whose probabilistic density is given by f ( x | ¯ µ i , κ )
=
c d ( κ ) e κ ¯ µ (cid:62) i g ( x ) , where ¯ µ i = µ i / || µ
i || is the mean direction, κ is the concentration parameter, and c d ( κ ) is the normalization factor.
We further assume a uniform class prior P ( y i = j )
= 1 /C .
Let n j = | S
j | .
Then, optimizing Eq.
(9) and Eq.
(10) equal to maximize R 1 and R 2 below, respectively.
[Equation]
The proof can be found in Appendix A. Theorem 1 indicates that minimizing Eq.
(9) also maximizes a lower bound of the likelihood in Eq.
The lower bound is tight when || µ j || is close to 1 , which in effect means a strong intraclass concentration on the hypersphere.
Intuitively, when the hypothesis space is rich enough, it is possible to achieve a low intraclass covariance in the Euclidean space, resulting in a large norm of the mean vector || µ j || .
Then, normalized embeddings in the hypersphere also have an intraclass concentration in a strong sense, because a large || µ j || also results in a large κ (Banerjee et al., 2005).
Regarding the visualized representation in Figure 3, we note that
PiCO is indeed able to learn compact clusters.
Therefore, we have that minimizing the contrastive loss also partially maximizes the likelihood deﬁned in Eq.
R ELATED W ORKS
Partial Label Learning (PLL) allows each training example to be annotated with a candidate label set, in which the ground-truth is guaranteed to be included.
The most intuitive solution is average-based methods (H¨ullermeier & Beringer, 2006;
Cour et al., 2011; Zhang & Yu, 2015), which treat all candidates equally.
However, the key and obvious drawback is that the predictions can be severely misled by the false positive labels.
To disambiguate the ground-truth from the candidates, identiﬁcation-based methods (Jin & Ghahramani, 2002), which regard the ground-truth as a latent variable, have recently attracted increasing attention; representative approaches include maximum margin-based methods (Nguyen & Caruana, 2008; Wang et al., 2020), graph-based methods (Zhang et al., 2016; Wang et al., 2019; Xu et al., 2019;
Lyu et al., 2021), and clustering-based approaches (Liu & Dietterich, 2012).
Recently, self-training methods (Feng et al., 2020b; Lv et al., 2020; Wen et al., 2021) have achieved state-of-the-art results on various benchmark datasets, which disambiguate the candidate label sets by means of the model outputs themselves.
But, few efforts have been made to learn high-quality representations to reciprocate label disambiguation.
Contrastive Learning (CL) (van den Oord et al., 2018;
He et al., 2020) is a framework that learns discriminative representations through the use of instance similarity/dissimilarity.
A plethora of works have explored the effectiveness of CL in unsupervised representation learning (van den Oord et al., 2018; Chen et al., 2020;
He et al., 2020).
Recently, Khosla et al.
(2020) propose supervised contrastive learning (SCL), an approach that aggregates data from the same class as the positive set and obtains improved performance on various supervised learning tasks.
The success of SCL has motivated a series of works to apply CL to a number of weakly supervised learning tasks, including noisy label learning (Li et al., 2021a; Wu et al., 2021), semi-supervised learning (Li et al., 2020;
Zhang et al., 2021), etc.
Despite promising empirical results, however, these works, lack theoretical understandings.
Wang & Isola (2020) theoretically show that the CL favors alignment and uniformity , and thoroughly analyzed the properties of uniformity.
But, to date, the terminology alignment remains confusing; we show it inherently maps data points to a mixture of vMF distributions.
C ONCLUSION
In this work, we propose a novel partial label learning framework PiCO.
The key idea is to identify the ground-truth from the candidate set by using contrastively learned embedding prototypes.
Empirically, we conducted extensive experiments and show that PiCO establishes state-of-the-art performance.
Our results are competitive with the fully supervised setting, where the ground-truth label is given explicitly.
Theoretical analysis shows that PiCO can be interpreted from an EM-algorithm perspective.
Applications of multi-class classiﬁcation with ambiguous labeling can beneﬁt from our method, and we anticipate further research in PLL to extend this framework to tasks beyond image classiﬁcation.
We hope our work will draw more attention from the community toward a broader view of using contrastive prototypes for partial label learning.
A T HEORETICAL A NALYSIS
Derivation of Eq.
We provide the derivation of the second equality in Eq.
It sufﬁces to show that LHS =
12 n j (cid:80) x , x (cid:48)
∈ S
j || g ( x ) − g ( x (cid:48) ) || 2 = (cid:80) x [Equation]
S j || g
( x ) − µ j || 2 = RHS.
We have,
[Equation]
On the other hand,
[Equation]
Proof of Theorem 1.
By regarding π ji as constants w.r.t θ , we can get the following derivation from Eq.
(10), arg max θ n
[Equation]
(15) where n j = | S j | .
Here we ignore the constant factor − (cid:80) ni
=1 (cid:80)
y i ∈ Y
i π
y i
i log π y
i
i w.r.t.
θ in the ﬁrst equality.
In the last equality, we use the fact that µ j = 1 n j (cid:80) x ∈ S j g ( x ) and ¯ µ j is the unit directional vector of µ j .
From Eq.
(9), we have that, arg min θ (cid:88)
[Equation]
Note that the contrastive embeddings are distributed on the hypersphere S d − 1 and thus || µ j || ∈ [0 , 1] .
It can be directly derived that,
[Equation]
Therefore, maximizing the intraclass covariance in Eq.
(9) is equivalent to maximize a lower bound of the likelihood in Eq.
It can also be shown that ( R 2 ) 2 ≤ R 1 followed by the convexity of squared function.
Since arg max R 2 = arg max( R 2 ) 2 , we have that the contrastive loss also maximizes an upper bound of R 2 .
Unfortunately, there is no guarantee that the lower bound is tight without further assumptions.
To see this, assume that we have two classes y ∈ { 1 , 2 } with equal-sized samples and their mean vectors have the norm of || µ 1 || = 0 .
5 and || µ 1 ||
= 1 .
We have that R 1 = 0 .
625 and R 2 = 0 .
75 , which demonstrates a large discrepancy.
It is interesting to see that when the norm of the mean vectors are the same, i.e. || µ j ||
=
|| µ k || for all 1 ≤ j ≤ k ≤ C , we have ( R 2 )
= R 1 by the Jensen’s inequality, making the upper bound tight.
But, it is not a trivial condition.
To obtain a tight lower bound, what we need is a rich enough hypothesis space to achieve a low intraclass covariance in Eq.
(9), and hence a large R 1 .
We show that it inherently produces compact vMF distributions.
To see this, it should be noted that the concentration parameter κ of a vMF distribution is given by the inverse of the ratio of Bessel functions of mean vector µ j .
Though it is not possible to obtain an analytic solution of κ , we have the following well-known approximation (Banerjee et al., 2005),
[Equation]
valid for large || µ j || ,
[Equation]
[Equation]
The above approximations show that a larger norm of Euclidean’s mean µ j typically leads to a stronger concentration on the hypersphere.
By Eq.
(16), we know that contrastive loss encourages a large norm of µ j , and thus also tightly clusters the embeddings on the hypersphere; see Figure 5.
We further note that we do not include a k-means process in our PiCO method.
PiCO is related to center-based clustering algorithms in our theoretical analysis.
Since we restrict the gold label to be included in the candidate set, we believe that this piece of information could largely help avoid the bad optimum problem that occurs in a pure unsupervised setup.
For the convergence properties of our PiCO algorithm, we did not empirically ﬁnd any issues with PiCO converging to a (perhaps locally) optimal point.
However, we want to refer the readers to the proof of k-means clustering in (Bottou & Bengio, 1994) for the convergence analysis.
Discussion.
Regarding our empirical results where PiCO does indeed learn compact representations for each class, we can conclude that PiCO implicitly clusters data points in the contrastive embeddings space as a mixture of vMF distributions.
In each iteration, our algorithm can be viewed as alternating the two steps until convergence, though different in detail.
First, it is intractable to handle the whole training dataset, and thus we accelerate via a MoCo-style dictionary and MAupdated prototypes.
Second, the contrastive loss also encourages the uniformity of the embeddings to maximally preserve information, which serves as an regularizer and typically leads to better representation.
Finally, we use two copies of data examples such that data are also aligned in its local region.
Moreover, our theoretical result also answers why merely taking the pseudo-labels to select [Figure] positive examples also leads to superior results, since the selected positive set will be reﬁned as the training procedure proceeds.
Our theoretical results are also generalizable to other contrastive learning methods.
For example, the classical unsupervised contrastive learning (He et al., 2020) actually assumes n -prototypes to cluster all locally augmented data; prototypical contrastive learning (Li et al., 2021b) directly assigns the data examples to one cluster to get the posterior, since there are no supervision signals; supervised contrastive learning (Khosla et al., 2020) chooses the known ground-truth as the posterior.
In our problem, we follow two extreme settings to progressively obtain an accurate posterior estimation.
Finally, it is also noteworthy that the objective in Eq.
(9) has a close connection to the intraclass deviation (Saunshi et al., 2019), minimizing which is proven to be beneﬁcial in obtaining tighter generalization error bound on downstream tasks.
It should further be noted that our work differs from existing clustering-based CL methods (Caron et al., 2020; Li et al., 2021b), which explicitly involves clustering to aggregate the embeddings; instead, our results are derived from the loss itself.
B A DDITIONAL E XPERIMENTAL S ETUPS AND R ESULTS B. I MPLEMENTATION D ETAILS
Following the standard experimental setup in PLL (Feng et al., 2020b; Wen et al., 2021), we split a clean validation set ( 10 % of training data) from the training set to select the hyperparameters.
After that, we transform the validation set back to its original PLL form and incorporate it into the training set to accomplish the ﬁnal model training.
We use an 18-layer ResNet as the backbone for feature extraction.
Most of experimental setups for the contrastive network follow previous works (He et al., 2020; Khosla et al., 2020).
The projection head of the contrastive network is a 2-layer MLP that outputs 128-dimensional embeddings.
We use two data augmentation modules SimAugment (Khosla et al., 2020) and RandAugment (Cubuk et al., 2019) for query and key data augmentation respectively.
The size of the queue that stores key embeddings is ﬁxed to be 8192 .
The momentum coefﬁcients are set as 0 .
999 for contrastive network updating and γ = 0 .
99 for prototype calculation.
For pseudo target updating, we linearly ramp down φ from 0 .
95 to 0 .
The temperature parameter is set as τ = 0 .
The loss weighting factor is set as λ = 0 .
The model is trained by a standard SGD optimizer with a momentum of 0 .
9 and the batch size is 256.
We train the model forepochs with cosine learning rate scheduling.
We also empirically ﬁnd that classiﬁer warm-up leads to better performance when there are many candidates.
Hence, we disable contrastive learning in the ﬁrst 100 epoch for CIFAR-100 with q = 0 .
1 and 1 epoch for the remaining experiments.
B. A BLATION S TUDIES
Moving-average updating factor φ .
We ﬁrst present more ablation results about the effect of pseudo target updating factor φ on PiCO performance.
Figure 6 (a) shows the results on two datasets [Figure]
CIFAR-10 ( q = 0 . 5 ) and CIFAR-100 ( q = 0 . 05 ).
The overall trends on both datasets follow our arguments in section 4.3.
Speciﬁcally, performance on CIFAR-100 achieves the best result when φ = 0 . 7 , and slight drops when φ = 0 .
Therefore, in practice, we may achieve a better result with careful ﬁne-tuning on φ value.
In contrast, PiCO works well in a wide range of φ values on
CIFAR-10.
The reason might be that CIFAR-10 is a simpler version of CIFAR-100, and thus the prototypes can be high-quality quickly.
But, setting φ to either 0 or 1 leads to a worse result, which has been discussed earlier.
Loss wight λ .
Figure 6 (b) reports the performance of PiCO with varying λ values that trade-off the classiﬁcation and contrastive losses.
λ is selected from { 0 . 01 , 0 . 1 , 0 . 5 , 5 , 50 } .
We can observe that on CIFAR-10, the performance is stable, but on CIFAR-100, the best performance is obtained at λ = 5 .
When λ = 50 , PiCO shows inferior results on both two datasets.
In general, a relatively small λ ( < 10 ) usually leads to good performance than a much larger value.
When λ is large, the contrastive network tends to ﬁt noisy labels at the early stage of training. [Table]
CIFAR-10 ( q =
[Table]
[Table]
CIFAR-100 ( q = 0 . 05 )
[Table] Prototype updating factor γ .
Finally, we show the effect of γ that controls the speed of prototype updating and the results are listed in Table 4.
On CIFAR-10 dataset, the performance is stable with varying γ .
But, on CIFAR-100, it can be seen that too large λ leads to a signiﬁcant performance drop, which may be caused by insufﬁcient label disambiguation.
[Table]
The disambiguation ability of PiCO. Finally, we evaluate the disambiguation ability of the proposed PiCO.
To see this, we calculate the max conﬁdence to represent the uncertainty of an example, which has been widely used in recent works (Hendrycks & Gimpel, 2017).
If one example is uncertain about its ground-truth, then it typically associates with low max conﬁdence max j s j .
To represent the uncertainty of the whole training dataset, we calculate the mean max conﬁdence (MMC) score.
In Figure 7, we plot the MMC scores of different label disambiguation strategies in different training epochs.
First, we can observe the MMC score of PiCO smoothly increases and [Table] ﬁnally achieves near 1 results, which means most of the labels are well disambiguated.
In contrast, the Soft Prototype Probs strategy oscillates at the beginning [Table] and then also increases to a certain value, which means that directly adopting the soft class probability also helps disambiguation.
But, it is worth noting that it ends with a smaller MMC score compared with PiCO.
The reason might be that the cosine distances to non-ground-truth prototypes are still at a scale.
Hence, the Soft
Prototype Probs strategy always holds a certain degree of ambiguity.
Finally, we can see that
the
MA Soft Prototype Probs strategy fails to achieve great disambiguation ability.
Compared with the non-moving-average version, it fails to get rid of severe label ambiguity and will ﬁnally converge to uniform pseudo targets again.
Furthermore, we evaluated the accuracy of the pseudo targets over training examples.
From Table 5, we can ﬁnd that the pseudo targets achieve high training accuracy.
Combining with the fact that the mean max conﬁdence score of the pseudo target is close to 1 , the training examples ﬁnally becomes near supervised ones.
Thus, the proposed PiCO is able to achieve near-supervised learning performance, especially when the label ambiguity is not too high.
These results verify that PiCO has a strong label disambiguation ability to handle the PLL problem.
B. A DDITIONAL R ESULTS ON F INE -G RAINED C LASSIFICATION
In the sequel, we show the full setups and experimental results on ﬁne-grained classiﬁcation datasets.
In particular, on CUB-200, we set the length of the momentum queue as 4192 .
For CUB-200, we select q ∈ { 0 . 01 , 0 .
When q = 0 . 05 / 0 .
1 , we warm up for 20 / 100 epochs and train the model for 200 / 300 epochs, respectively.
For CIFAR-100-H, we select q ∈ { 0 . 1 , 0 . 5 , 0 . 8 } and warm up the model for 100 epochs when q = 0 .
Other hyperparameters are the same as our default setting.
The baselines are also ﬁne-tuned to achieve their best results.
From Table 6, we can observe that PiCO signiﬁcantly outperforms all the baselines mentioned in section 4 on all the datasets.
Moreover, as the size of candidate sets grows larger, PiCO consistently leads by an even wider margin.
For example, on CIFAR-100-H, compared with the best baseline, performance improvement reaches 9 . 15 % and 22 . 53 % in accuracy when q = 0 . 1 , 0 . 5 , 0 . 8 , respectively.
The comparison emerges the dominance of our label disambiguation strategy among semantically similar classes.
B. S TRATEGIES FOR P OSITIVE S ELECTION
While our positive set selection strategy is simple and effective, one may still explore more complicated strategies to boost performance.
We have empirically tested two strategies: 1) Filter-based : we set a ﬁlter | Y i ∩
Y j | | Y i ∪ Y j | ≤ ρ ( ρ = 0 . 5 ) to remove example pairs who have dissimilar candidate sets at the early stage.
2) Threshold-based : we set a threshold max f j ( Aug q ( x ))
≤ δ ( δ = 0 .
to remove those uncertain examples at the end of training, which has been widely used in semi-supervised learning (Sohn et al., 2020).
Our basic principle is that contrastive learning is robust to noisy negative pairs and thus, we can ﬂip those less reliable positive pairs to negative. Unfortunately, we did not observe statistically signiﬁcant improvement to our vanilla strategy in experiments. These negative results suggest that the proposed PiCO has a strong error correction ability, which corroborates our theoretical analysis. B. T HE I NFLUENCE OF D ATA G ENERATION
[Table]
In practice, some labels may be more analogous to the true label than others, which makes their probability of label ﬂipping q larger than others. In other words, the data generation procedure is nonuniform. In Section 4.4, we have shown one such case on CIFAR-100-H, where semantically similar labels have a larger probability of being false positive. In the sequel, we follow (Wen et al., 2021) to conduct empirical comparisons on data with alternative generation processes.
In particular, we test two commonly used cases on CIFAR-10 with the following ﬂipping matrix, respectively:
[Equation]
[Table]
  where each entry denotes the probability of a label being a candidate.
As shown in Table 7, PiCO outperforms other baselines in both cases.
It is worth noting that in Case (2), each ground-truth label has a maximum probability of 0 .
9 of being coupled with the same false positive label.
In such a challenging setup, PiCO still achieves promising results that are competitive with the supervised performance, which further veriﬁes its strong disambiguation ability.
B. I NFLUENCE OF P ROTOTYPE C ALCULATION
[Table]
There are several ways to calculate the prototypes and hence, we further test a variant of PiCO that re-computes the prototypes by averaging embeddings of all training examples at the end of each epoch.
We train the models using one Quadro
P5000 GPU respectively and evaluate the average training time per epoch.
From Table 8, we can observe that the Re-Compute variant achieves competitive results, but is much slower than PiCO.
We summarize the pseudo-code of our PiCO method in Algorithm 1. D T HE L ITERATURE OF P ROTOTYPE L EARNING Prototype learning (PL) aims to learn a metric space where examples are enforced to be closer to its class prototypes.
PL is typically more robust in handling few-shot learning (Snell et al., 2017), zeroshot learning (Xu et al., 2020), and out-of-distribution samples (Arik & Pﬁster, 2019). Recently, PL has demonstrated promising results in weakly-supervised learning, such as semi-supervised learning (Han et al., 2020), noisy-label learning (Li et al., 2021a), etc. For example, USADTM (Han et al., 2020) shows that informative class prototypes usually lead to better pseudo-labels for semisupervised learning than classical pseudo-labeling algorithms (Sohn et al., 2020) which reuse classiﬁer outputs.
Motivated by this, we also employ contrastive prototypes for label disambiguation. B q = { q i = g ∈ B k = { k i =
g k i
B q k ∪ queue for x do // classifier prediction ˜
= max f
// momentum prototype updating µ c
// positive set generation
P x
{ k (cid:48)
k A
) , ˜
} end // prototype-based label disambiguation for q i ∈ B q do z i
= OneHot (arg max j ∈ Y
i q (cid:62) i µ j ) s i =
φ s i + (1 − φ )
z i end // contrastive loss calcuation
L cont ( g ; τ, A ) = 1 | B q | (cid:80) q i ∈ B q (cid:26) − 1 | P ( x i ) | (cid:80) k + ∈ P ( x i ) log exp( q (cid:62) i k + /τ ) (cid:80) k
(cid:48)∈ A ( x i ) exp( q (cid:62) i k (cid:48) /τ ) (cid:27) //
classification loss