{'fraction_non_alphanumeric': 0.03501580667631142, 'fraction_numerical': 0.014493918448266623, 'mean_word_length': 4.340057224606581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fuzzy Positive Learning for Semi-supervised Semantic Segmentation

Semi-supervised learning (SSL) essentially pursues class boundary exploration with less dependence on human annotations. Although typical attempts focus on ameliorating the inevitable error-prone pseudo-labeling, we think differently and resort to exhausting informative semantics from multiple probably correct candidate labels. In this paper, we introduce Fuzzy Positive Learning (FPL) for accurate SSL semantic segmentation in a plug-and-play fashion, targeting adaptively encouraging fuzzy positive predictions and suppressing highly-probable negatives. Being conceptually simple yet practically effective, FPL can remarkably alleviate interference from wrong pseudo labels and progressively achieve clear pixel-level semantic discrimination. Concretely, our FPL approach consists of two main components, including fuzzy positive assignment (FPA) to provide an adaptive number of labels for each pixel and fuzzy positive regularization (FPR) to restrict the predictions of fuzzy positive categories to be larger than the rest under different perturbations. Theoretical analysis and extensive experiments on Cityscapes and VOC 2012 with consistent performance gain justify the superiority of our approach.


Introduction
Semantic segmentation models enable accurate scene understanding [2,30,47] with the help of fine pixel-level annotations. Yet, collecting labeled segmentation datasets is time-consuming and labor-costing [7]. Considering unlabeled data are annotation-free and easily accessible, semisupervised learning (SSL) is introduced into semantic segmentation [6,35,45,51,53,55] to encourage the model to generalize better on unseen data with less dependence on artificial annotations. The proposed FPL that provides multiple fuzzy positive labels for each pixel to utilize unlabeled data. The example of 'Truck' shows that our method covers ground truth (GT) more comprehensively than vanilla positive learning.
The semi-supervised segmentation task faces a scenario where only a subset of training images are assigned segmentation labels while the others remain unlabeled. Current state-of-the-art (SOTA) methods utilize unlabeled data via consistency regularization, which aims to obtain invariant predictions for unlabeled pixels under various perturbations [6,35,51,55]. Their general paradigm is to use the pseudo label generated under weak (or none) perturbations as the learning target of predictions under strong perturbations. Though achieving promising results, errors are inevitable in the pseudo label used in these methods, misguiding the training of their models [25,34]. An intuitive example is that some pixels may be confused in categories with similar semantics. As Fig. 1 (a), some pixels belonging to 'Truck' are wrongly classified into the 'Car' category (e.g., white boxed pixel). To mitigate this problem, typical methods focus on ameliorating the learning of pseudo labels by filtering low-confidence pseudo labels out [15,22,40,53,55] and generating pseudo labels more accurately [9,21,27,50]. However, the semantics of ground truth buried in other unselected labels are ignored in existing methods.
In this paper, we propose Fuzzy Positive Learning (FPL), a new SSL segmentation method that exhausts informative semantics from multiple probably correct candidate labels. We name these labels "fuzzy positive" labels since each of them has the probability to be the ground truth. As shown in Fig. 1 (b), our fuzzy positive labels cover the ground truth more comprehensively, facilitating our FPL to exploit the semantics of ground truth better. Extending learning from one pseudo label to learning from multiple fuzzy positive labels is not a simple implementation, which contains two pending issues. One is how to provide an adaptive number of labels for each pixel. And the other one is how to exploit the possible GT semantics from fuzzy positive labels. For these two issues, a fuzzy positive assignment (FPA) algorithm is first proposed to select which labels should be appended to the fuzzy positive label set of each pixel. Afterward, a fuzzy positive regularization (FPR) is developed to regularize the predictions of fuzzy positive categories to be larger than the predictions of the rest negative categories under different perturbations.
Our FPL achieves consistent performance gain on Cityscapes and Pascal VOC 2012 datasets using CPS [6] and AEL [15] as baselines. Moreover, we theoretically and empirically analyze that the superiority of FPL lies in revising the gradient of learning ground truth when pseudolabels are wrongly-assigned. Our main contributions are: • FPL provides a new perspective for SSL segmentation, that is, learning informative semantics from multiple fuzzy positive labels instead of only one pseudo label.
• A fuzzy positive assignment is proposed to provide an adaptive number of labels for each pixel. Besides, a fuzzy positive regularization is developed to learn the semantics of ground truth from fuzzy positive labels.
• FPL is easy to implement and could bring stable performance gains on existing SSL segmentation methods in a plug-and-play fashion.

Semi-supervised Semantic Segmentation
Semi-supervised semantic segmentation methods benefit from the development of general semi-supervised learning, which could be also roughly divided into two types of approaches: consistency regularization based methods [12,18,20,35] and entropy-minimization based methods [5,10,17,29,31,54]. More recently, SOTA semisupervised segmentation methods combine both two technologies together to train their models. PseudoSeg [55], AEL [15], UCC [9] and Jianglong Yuan et al. [51] propose to use the pseudo label generated from weak augmented image to supervise the prediction of strong augmented image. CPS [6] designs a mutual learning mechanism that trains two student models with pseudo labels from each other. PC 2 Seg [53] proposes a negative sampling technique to provide reliable negative samples for SSL segmentation. Different from existing methods, we propose for the first time to exploit the informative semantics of unlabeled data from multiple fuzzy positive labels, resulting in less interference from wrong pseudo labels and accurate segmentation.
Pseudo-label learning is the key technology in current SSL segmentation methods, but it has a limitation in that wrong pseudo labels mislead the training of SSL models. Typical approaches design filter-out mechanisms to use only high-confidence pseudo-labels for training [9,15,22,53,55] and develop complex training mechanisms to predict accurate pseudo-labels [9,21,27,50]. Apart from the above methods, U 2 PL [45] introduces the idea of negative learning into SSL segmentation, which has similarities to our FPL. It thinks uncertain pixels usually get confused among only a few classes. Hence, it uses uncertain pixels as negative samples for those unlikely classes. We analyze that our FPL and negative learning have mathematically different optimization objectives. That is, negative learning implicitly maximizes only the prediction of the pseudo-label, while our FPL learns all fuzzy positive labels. (cf. Appendix).

Preliminaries
Overview: For the SSL segmentation task, we have a small labeled dataset D l = {(x l , y l )} L l=1 and a large unlabeled dataset D u = {x u } U u=1 , where L is the size of the labeled dataset, and U is the size of the unlabeled dataset (L U ). The x l , y l , x u are the image and label of the l-th labeled data and the image of the u-th unlabeled data, respectively. The purpose of SSL segmentation is to learn the parameters θ of a segmentation model F(•; θ) by optimizing a loss function that contains both supervised and unsupervised loss: where L sup and L uns are supervised loss and unsupervised loss, and β is a regularization weight.
In current SOTA methods [6,9,15,21,27,51,55], the unsupervised loss in Eq. 1 is formulated as the cross-entropy loss between model predictions and pseudo labels, which are also predicted by their models. The paradigm is: where the y u is the one-hot encoding of the pseudo label generated from a segmentation model F, and 1 is the onehot-encoding function. The z u is the prediction vector from disturbed modelF with disturbed inputx u . The disturbed model is often realized by adding dropout layers [23,35] into the model structure, or injecting random noises into the feature maps [27,35]. And the disturbed input is usually realized by data augmentations [6,15,51,55]. The S is the number of pixels in image x u and C is the number of categories, and y c us and z c us are the elements of y u and z u for the c-th class of the s-th pixel. This vanilla positive loss L v u has only one learning target, the pseudo label.
Motivation: By the definition of L v us , its gradient with respect to the prediction z us in backpropagation is computed as: where the p c us = exp(z c us ) C n=1 exp(z n us ) is the predicted probability for the c-th class computed by softmax. According to the gradient descent algorithm [39], the prediction z c us for category c will increase if its gradient is less than 0, and vice versa. In other words, only the prediction for the pseudo label category (y c us = 1) is optimized to increase, and the predictions for other categories (y c us = 0) are optimized to decrease. This shows that when the pseudo label is correct, vanilla positive learning encourages the prediction for the ground truth and suppresses the predictions for other categories, thus effectively utilizing unlabeled data. However, once the pseudo-label is assigned incorrectly, the training of

Algorithm 1 K value selection strategy
Input: sorted prediction p = (p 1 , p 2 , ..., p C ) Output: K value Initialize: cumulative probability upper bound T , category numbers C, cumulative probability V = p Compute cumulative probability: for n = 1 to C do if V n > T or n = C then return n end if V n+1 = V n + p n+1 end for Determine K value: K = max(n − 1, 1) Return K the SSL model will be misled since the prediction of ground truth is suppressed.
To reduce interference from wrong pseudo labels, we propose an FPL to exploit informative semantics from unlabeled data via multiple fuzzy positive labels, as shown in Fig. 2. Concretely, in Sec. 3.2, we propose a fuzzy positive assignment (FPA) algorithm, which assigns the top-K predicted categories of each pixel as its fuzzy positive labels, where K is computed according to our elaborate K value selection strategy. In Sec. 3.3, we develop a fuzzy positive regularization (FPR), which enables our model to exploit the possible ground truth in the fuzzy positive label set by regularizing the predictions of fuzzy positive categories to be larger than the rest negative categories.

Fuzzy Positive Assignment
The assignment of fuzzy positive labels determines from which our FPL exploits the semantics of ground truth. To provide an adaptive number of labels for each pixel, we first propose to choose the categories with top-K predicted probabilities as fuzzy positive labels since high-confidence predictions are prone to be correct [4]. We then design an easy but effective K value selection strategy to adaptively determine the K value for each pixel, as shown in Alg. 1. Specifically, we set a hyperparameter T that represents the upper bound of cumulative probability. For each pixel, we compute the cumulative probability of its top-n predicted categories and record the value of n where the cumulative probability exceeds T for the first time. Finally, the K value for this pixel is set as max(n − 1, 1).
Selecting top-n predicted categories whose cumulative probability exceeds T guarantees that the ground truth has a high probability of being selected. A counter-intuitive design in our Alg. 1 is choosing K = n − 1 instead of K = n. This is because setting K < n alleviates the gradient vanishing problem in training our FPL (cf. Appendix). Another noteworthy point is that our algorithm provides K = 1 for pixels with high confidence, while K > 1 are usually supplied for uncertain pixels, as illustrated in Fig. 5 and Fig. 7. This property is in line with semantic intuition because a certain pixel should learn an explicit label, while an uncertain pixel needs to learn from multiple fuzzy labels. The ablation study about the K value selection is in Appendix.

Fuzzy Positive Regularization
In our FPA, we generate a fuzzy positive label set Y us = {y 1 us , y 2 us , ..., y K us } that contains K labels for each unlabeled pixel instead of only one pseudo label as in previous works. Hence we need to propose a new loss function to learn the possible ground truth from Y us .
Our FPL regards all categories in the fuzzy positive label set Y us are probable to be the ground truth, but the categories outside the Y us are unlikely to be the ground truth. Therefore, we hope that the predictions of our model for the K fuzzy positive categories to be larger than the predictions for the rest C − K negative categories. We refer to some works in metric learning [26,41,43,44] and formulate our optimization objective for each pixel as: where z i us represents the prediction of our model for the ith category. Eq. 4 means we regularize the minimum of the predictions for categories in Y us to be larger than the maximum of the predictions for other categories. In other words, we enforce all the predictions for fuzzy positive categories to be larger than those for negative categories. From Eq. 4, a straightforward loss function can be formulated as: However, this L f us is globally non-differentiable with respect to z us = {z 1 us , z 2 us , ..., z C us } since the max and min functions in Eq. 3 are globally non-differentiable [28,37]. And the ReLU function also has a singularity at x = 0. Thanks to existing functional approximations [8,13,28,33], we approximate the Eq. 3 to make L f us differentiable: Based on these functional approximations, our fuzzy positive consistency loss L f for one pixel x us (i.e., the s-th pixels of the u-th unlabeled image) could be converted to: Next, we analyze the behavior of L f us in backpropagation. The gradient of L f us with respect to the prediction z us of our model is computed as: denote the derivatives with respect to predictions for fuzzy positive categories and other negative categories, respectively. From Eq. 7 and Eq. 8, we see that our L f us has following characteristics: 1) The prediction for the ground truth increases when it appears in Y us . This is because predictions for fuzzy positive categories have gradients less than 0, and thus are optimized to increase by gradient descent.
2) The existing L v us is a special case of our L f us when we set K = 1, as shown in Eq. 9.
where i is the index of the top-1 predicted pseudo label.
Adaptive weight for each pixel: From Eq. 4, it can be seen that our model learns informative semantics based on the assumption that the ground truth exists in the fuzzy positive label set Y us . Thus, we propose to integrate the confidence of this assumption into the training of FPL. When our assumption is not tenable, the ground truth will be outside Y us , and its largest predicted probability is max j / ∈Yus (p j us ). Therefore, the max j / ∈Yus (p j us ) is negatively correlated with the assumption confidence since high max j / ∈Yus (p j us ) means ground truth has a low probability inside Y us , and vice versa.
Formulately, the range of max j / ∈Yus (p j us ) is derived as: In practice, T is close to 1 (e.g., 0.9), thus 1−T C−Kus is close to 0. For simplicity, we obtain the approximate range of ). We then define our adaptive weight as a monotonically decreasing concave function: where A is a scalar used to control the radian of this function, which is fixed as 50. It is worth noting that our adaptive weight is different from the weights computed by top-1 confidence used to filter out or re-weight low-confidence pixels [12,18,35]. Those weights are small for pixels with low top-1 probability, resulting in those pixels not being sufficiently used in training [45]. But our weight is only small when the prediction of a pixel is confused in the top-(K+1) categories, thus our model still uses the information that its prediction should not belong to other C-K-1 categories.

Principle Analysis
Ideally, we hope to learn the semantics of ground truth in unlabeled data, but in practice, we can only learn the semantics of positive categories and suppress the rest. Here, we propose a positive gradient score R to measure how properly the ground truth is learned : where the Y us represents the fuzzy positive label set Y us when L us is L f us , and Y us represents the pseudo label when L us is L v us . The positive gradient score R us is the ratio of the gradient for the ground truth to the sum of the gradients for all positive categories. It ranges from [−1, 1] and a positive R us means the GT prediction is encouraged to increase, while a negative R us means the GT prediction is incorrectly suppressed to decrease. Based on actual training, we consider R us in three cases: Case 1. The pseudo label is correct, that is, the ground truth is the top-1 predicted category. In this case, the positive gradient score R us computed by L v us and L f us are: where p gt us and p pse us are the predicted probabilities for ground truth and the pseudo-label category. When the size of Y us (i.e., K value) is 1, the R f us will be equal to R v us as 1. We see that R f us and R v us are both greater than 0, meaning they both encourage the GT prediction to increase. In practice, the statistics of R f us is close to 1. This is because most pixels in this case have K = 1 (cf. Appendix).
Case 2. The top-1 prediction is wrong, but the ground truth is in the categories with top-K probabilities, where K is computed by our K value selection strategy in Alg. 1. For Case 2, the positive gradient score R v us and R f us are computed as: We see that R f us is larger than 0 while R v us is less than 0. This is because the ground truth is missed by the pseudo label but captured by our fuzzy positive label set. It means that vanilla L v us erroneously suppresses GT prediction, but our L f us encourages GT prediction, reflecting FPL remarkably reduces the interference from wrong pseudo labels.
Case 3. The pseudo label is wrong, and the ground truth is also outside the fuzzy positive labels Y us . In this case, the positive gradient score R v us and R f us are: It is obvious that R f us and R v us are both less than 0, meaning neither L v us nor L f us is beneficial for learning the semantics of ground truth in this case. In Fig. 3 (a), we display some examples which intuitively reflect the advantages of R f us over R v us . That is, many parts of R v us less than 0 (colored in blue) becomes larger than 0 in R f us (colored in red). In Fig. 3 (b), the statistics of positive gradient score show R f us significantly outperforms the existing R v us in Case 2, and they perform similarly in Case 1 and Case 3.

Implementation Details
Frameworks and dataset: We evaluate the effectiveness of our FPL on two widely used frameworks, CPS [6] and AEL [15], and two datasets PASCAL VOC 2012 and Cityscapes. The Cityscapes is a large-scale dataset designed for urban street scene segmentation which consists of 19 semantic classes containing 2,975 images for training, 500 for validation, and 1,525 for testing. The PASCAL VOC 2012 is a generic object segmentation benchmark that consists of 20 object classes and 1 background class. It is divided into training, validation, and test sets including 1,464, 1,449, and 1,456 images, respectively. There is also an augmented set [14] adding 10,582 images into the standard training set. Following the setting of previous works [6,55], we implement two splits on VOC2012: standard split (with augmented set) and low data split (without augmented set).
Experimental setting: Following the default settings of CPS and AEL, we use Deeplab v3+ with pre-trained ResNet-50 and ResNet-101 as backbones. Specifically, on Cityscapes using CPS as the baseline, we use SGD optimizer with a weight decay of 1e-4. The initial learning rate is set to 0.02 and the momentum is fixed at 0.9. We use the default 'poly' learning rate decay policy to scale the learning rate by (1 − iter/max iter) 0.9 , and this policy is used in all our experiments. The input images are cropped to 800 × 800 and the batchsize is 64. When using AEL as the baseline, the batchsize, learning rate, and image size are changed to 16, 0.01, and 769. On VOC2012 using CPS as the baseline, we use SGD optimizer with a weight decay of 1e-4. The initial learning rate is set to 0.01 and the momentum is fixed at 0.9. The input images are cropped to 512 × 512 and the batchsize is 32. When using AEL as the baseline, the batchsize is changed to 16. The cumulative probability upper bound T in all our experiments is set from {0.95, 0.9, 0.85}. More details are in Appendix.

Quantitative Results
Our FPL model is trained with the same hyperparameters as the baseline model, only replacing the vanilla positive learning using one pseudo label with our fuzzy positive learning using multiple fuzzy positive labels. The segmentation results on Cityscapes, VOC2012, and VOC2012 LowData are presented in Table 1, Table 2, and Table 3, where red numbers represent the improvement brought by FPL to the baseline. We see that FPL achieves stable improvements over baseline models across all data splits. Besides, FPL improves the CPS baseline under both with and without CutMix settings, indicating that the performance gain from FPL and data augmentation (e.g., CutMix) can be accumulated. Furthermore, FPL is effective on multiple baselines, i.e., CPS and AEL, which means FPL is universal for various existing SSL frameworks.

The Hyperparameter T
The T is the only new hyperparameter brought by FPL, which controls the K values of pixels in training. Here we summarize two rules for setting a proper T value. First, a T value around 0.9 (e.g., 0.85, 0.9, 0.95) is usually a promising setting. Second, a T value set negatively correlated to the number of labeled data usually brings high performance.
The effect of T on the training behaviors. In training, T affects the number of fuzzy positive labels for each pixel (K value), which reflects the degree of fuzziness of our FPL. Besides, T also affects the impurity of the fuzzy positive label set, which is the proportion of pixels whose ground truths are missed in fuzzy positive labels. We formulate the average K value and the impurity as: where K us , y us , and Y us are the K value, ground truth, and fuzzy positive label set for the s-th pixel of the u-th image. The U is the size of the unlabeled dataset, and S is the number of pixels contained in each image. In Fig. 4, we provide the average K value and impurity.   Table 5. The relationship between cumulative probability upper bound T and the amount of labeled data. The results are obtained on Cityscapes using CPS as the baseline. We see that small T values lead to small K values, meaning the size of the fuzzy positive label set is small. Accordingly, it causes high impurity since a small fuzzy positive label set has a relatively large possibility of missing the ground truth. High impurity misleads the learning process, which is known as confirmation bias [1]. In contrast, using a large value of T builds a large fuzzy positive label set, effectively reducing the impurity. However, too large T value (e.g. 0.99) makes our model learn from too many labels, which is also not suitable for a single-label classification task. In Table 4, we present the mIoU of our FPL models trained with various T values. Given our observation on the trade-off between the impurity and the size of the fuzzy positive label set, we find a T value around 0.9 always provides promising results.
The relationship between T and the amount of labeled data. We find a high T usually obtains good performance when labeled data are limited, while a low T usually performs better when labeled data are sufficient. As shown in Table 5, in the 1/32 labeled data setting, T = 0.95 obtains the highest improvement about 1.45%, while T = 0.85 and T = 0.9 only obtain improvements about 1%. In the 1/16 labeled data setting, T = 0.9 obtains the best performance, improving baseline by 1.03%, and the rest two T values improve baseline by about 0.5%. In the 1/8 labeled data setting, T = 0.9 and T = 0.85 obtains close performances which improve baseline by 1.3%, while T = 0.95 performs not as well as the previous two T settings. It is obvious that setting the T value negatively according to the amount of labeled data significantly benefits the performance.

K Values in Training
The number of pixels with different K values is shown in Fig. 5 (a). We see that within training, the number of pixels with K > 1 decreases and the number of pixels with K = 1 increases. At the late stage of training, the K values for more than 93.75% (i.e., 6e5 / 6.4e5) pixels are 1. This indicates the K values automatically converge to 1, meaning FPL could progressively achieve clear pixel-level semantic discrimination. In Fig. 5 (b), we illustrate that our FPL provides K = 1 for certain pixels with low entropy while providing K > 1 for uncertain pixels with high entropy.
Moreover, we show the K value maps of some examples during training in Fig. 7. We see that the K values of most pixels in the background are 1 since background pixels are usually easy to classify. In the early stage of training, the pixels with K > 1 are mainly located on objects, since the classification of objects for our model is uncertain at early training. As the training progresses, the number of pixels with K > 1 gradually decreases and these pixels are mainly located at the boundary of objects. This is because our model has certain predictions for most pixels in the later stage of training. But for pixels located at the object boundary, their categories are fuzzy, for which our model makes uncertain predictions for them. Our FPL provides multiple labels (i.e., K > 1) for these uncertain pixels to learn, which is in line with their fuzzy property.

Conclusion
In this paper, we introduce a novel plug-and-play method named FPL for semi-supervised semantic segmentation. Our method is the first to explore learning the semantics of ground truth from multiple fuzzy positive labels. Specifically, We first propose a fuzzy positive assignment algorithm to provide an adaptive number of labels for each pixel. We then develop a fuzzy positive regularization to learn the possible ground truth from these fuzzy positive labels. Extensive experiments on two commonly used benchmarks with consistent performance gain demonstrate the effectiveness of our method. Moreover, we provide an analysis showing the superiority of FPL in that it revises the gradient of learning ground truth when pseudo labels are wrong. There are still directions worth continuing to explore in FPL, e.g., "extending discrete K values to continuous form for finer-grained fuzzy positive labels."

Appendices 1. Overview
In this appendix, we provide the detailed setting about T in Sec. 2. For more analyses about our FPL, difference between FPL and negative learning is in Sec. 3.1, gradient vanishing in K value selection strategy is in Sec. 3.2, details of positive gradient score is in Sec. 3.3, and gradient similarity between G f and G ide is in Sec. 3.4. For more ablation studies about adaptive weight and K value selection strategy are in Sec.4.1 and Sec. 4.2, respectively. Besides, we discuss the limitation of our FPL in Sec.5 and illustrate more examples in Sec. 6.

Experimental Details
We provide the detailed setting about the cumulative probability upper bound T in our experiments in Table 1, Table 2, Table 3.   Table 2. The setting of T on VOC2012.

Difference between FPL and negative learning
For uncertain unlabeled pixels, negative learning-based methods find their models always predict certainly that these pixels do not belong to some categories. Hence, they treat the uncertain pixels as negative samples to those unlikely categories. A commonly used paradigm sets a threshold (e.g., 0.2), and considers the classes for which the predicted probabilities are less than the threshold as negative categories [38]. For clarity, we take the negative learning loss based on cross-entropy loss as the comparison object, since our method is also an extension of cross-entropy loss. To unify the form, we denote the categories that do not belong to the negative categories as Y us . Formulately, the negative loss L n is: We see that this loss function requires the probabilities for negative categories to be small. To further show the difference between L n and our L f , we convert the L n as: (2) Eq. 2 shows that the negative loss implicitly increases the prediction for the top-1 pseudo label max i =j (z i us ), indicating that it still corrupts the training of the model when pseudo labels are wrong. Differently, our FPL desires to increase the predictions for all fuzzy positive categories in {z i us , i ∈ Y us }, hence we encourage their minimum min(z i us ) to learn the semantics of possible GT in them: Furthermore, we empirically demonstrate the superiority of FPL over the negative learning-based method. Besides, we also evaluate the performance using a soft loss L s with the soft label since it has similarities to FPL in softening pseudo labels, which is computed as: where p us is the predicted probability, and q us is the learning target. Segmentation performances are shown in Table 4, where 'Nega.' represents the results obtained by negative loss L n , and 'Soft.' represents the results obtained by soft loss L s . In addition, U2PL [45] introduces the idea of negative learning in the manner of contrastive learning, hence we also provide its performance here. From Table 4, we see our FPL model achieves the best performance, reflecting the superiority of FPL over other alternatives.

Gradient vanishing in K value selection strategy
In our K value selection strategy, we select K = n − 1 instead of K = n. This practice is to alleviate the problem of gradient vanishing. To explain this, we first perform an analysis in a simplified case where no perturbations are added in training, that is, the prediction that generates pseudo labels has the same distribution as the training prediction. We further illustrate the actual gradient in training in Fig. 1.
Analysis in simplified case. To discuss training gradient, we convert the gradients of L f us to probabilistic form: Here we only need to analyze the gradients of positive categories, because the absolute value of the gradient sum on the positive and negative categories are equal: where inf means the lower bound. Eq. 7 shows that it is possible for j / ∈Yus p j us to approach 0 causing the problem of gradient vanishing. When setting K us an integer less than n (i.e., K us = [α · n] , 0 < α < 1)), we derive that: Eq. 8 provides a lower bound for the numerator of Actual gradients in training. In actual training, the above inference will be deviated due to the influence of disturbance (e.g., data augmentation), but the conclusion still holds. Considering that our model is also subject to a supervised loss L sup except for the fuzzy positive loss L f . A too-small gradient from L f will lead the information of unlabeled data to be overwhelmed by the supervised loss. We illustrate the actual gradients selecting K = n − 1 and K = n in Fig. 1. It can be seen that K = n brings a small training gradient while K = n − 1 obtains a larger gradient in most mini-batches. , and we sort these mini-batches by their gradient sum using K = n. Here we only present examples with small (i.e., prone vanishing) gradients.

More details of positive gradient score
As shown in Fig. 2 (a) and (b), we see that in Case 1, most pixels (>85%) have K = 1 and positive gradient score R f is very close to 1. Besides, we see that R f is slightly lower than R v in Case 3.

Gradient similarity between G f and G ide
In Case 2 of Sec. 3.4, though L f encourages the GT prediction to increase which is better than existing L v , it also encourages the predictions for other positive categories to become larger. Ideally, the cross-entropy loss using the unavailable ground truth only increases the GT prediction and suppresses the predictions for all other categories. We name the gradient computed in this ideal situation as the ideal gradient G ide .
Here, we propose to use the cosine similarity between the ideal gradient vector G ide and our fuzzy gradient vector G f brought by L f to further analyze our FPL in Case 2. If the cosine similarity is greater than 0, it means the projection of G f on G ide is positive, indicating G f makes our model go further in the ideal direction. For comparison, we also present the cosine similarity between the gradient vector of the vanilla method G v and the ideal gradient G ide . Due to the complexity of predicted probability, the relationship between the cosine similarity sim(G f , G ide ) = G f ·G ide |G f ||G ide | and 0 is not mathematically absolute. Therefore, we count sim(G f , G ide ) and sim(G v , G ide ) quantitatively. As shown in Fig. 3, we first observe that the positive rates of sim(G f , G ide ) are more than 90% in all minibatches, which indicates that G f makes our model go further in the ideal direction in most cases. Second, we see that the sim(G f , G ide ) is greater than the sim(G v , G ide ), which means our fuzzy gradient G f is closer to the ideal gradient G ide than the gradient from vanilla method G v .
The norms of G f and G ide . The sim(G f , G ide ) only reflects that the angle between our fuzzy gradient and the ideal gradient is a mostly acute angle. But the norms of G f and G ide also affects optimization of our model. If the norm of G f is much larger than that of G ide , it will cause G f over-optimize our model, hence even if their angle is small, it will also be detrimental to optimization. We prove that the norms of G f and G ide are both range of [0, √ 2]: (10) Quantitatively, we provide the norms of G f and G ide in Fig. 4. We see that the two norms are close and the norm of G f is smaller than that of G ide , which means that our FPL won't bring the problem of over-optimization.
The segmentation performances are shown in Fig. 6, where we also provide the comparison of the model trained without adaptive weight, that is, the weights for all pixels are the same as 1. We see that the used convex function performs better than other alternatives.

K value selection strategy
Here we evaluate the superiority of the proposed K value selection strategy by comparing our strategy with a fixed K value strategy and a step-decay K value strategy. The step decay strategy is to initialize the K value to 3 and decrease K by one every 1/3 of the total training epochs. In addition, we also verify that K = n − 1 is better than K = n in our K value selection strategy. The results are shown in Table 5. We see that fixed K value results in a large degradation in the performance of FPL since a fixed K value causes the model to produce high-entropy predictions, making it difficult to obtain accurate classifications. For the step decay K value strategy, it achieves better results than fixed K values, Figure 6. Performance of our FPL+CPS w/ CutMix model using different adaptive weights. The 'baseline' and 'w/o' represent the baseline CPS model and our FPL model trained without adaptive weight, respectively. These results are obtained on VOC2012 with 1/8 labeled data.
because it could reduce the K value during training to obtain low-entropy classifications. However, it is still worse than our proposed strategy since it makes K values the same for all pixels, ignoring their difference in the learning progress. In contrast, our method adaptively chooses the K value for each pixel according to its predicted probability distribution. We also see that K = n − 1 is better than K = n in our K value selection strategy. This is because selecting K = n − 1 alleviates the gradient vanishing problem.

Limitations
Though works well, FPL has the limitation of high time complexity since it requires assigning a K value to each pixel. From Eq. (7) of our manuscript, we see that the time complexity of computing L f is O(C) when the Y is determined, where C is the number of classes. For vanilla L v , it is a special case of L f when the K is fixed to 1, hence the time complexity of original L v for one pixel is O(C). When it comes to L f , we additionally need to decide the K value for each pixel of which the time complexity is O(K) since it needs K times additions and K times comparisons. Hence, the time complexity of computing L f is O(KC) which is K times of computing the original L v . We also quantitatively provide the seconds of training our FPL in practice. As shown in Table 6, FPL brings about 15% additional training cost.

Visualization
We present more samples of K value maps during training in Fig. 7. And we illustrate some examples of our seg-   mentation results in Fig. 8.