【论文阅读】FreeMatch: Self-adaptive Thresholding for Semi-supervised Learning

FreeMatch:自适应阈值提升半监督学习性能
论文介绍了一种新的半监督学习方法FreeMatch,它通过自适应调整信心阈值,有效利用未标注数据,特别在标注数据稀缺情况下表现出色。FreeMatch结合了伪标记和一致性正则,提出自适应阈值策略,以及类公平性正则化,提升了模型的性能和收敛速度。

论文下载
GitHub
bib:

@INPROCEEDINGS{
   
   wang2023freematch,
	 title		= {
   
   FreeMatch: Self-adaptive Thresholding for Semi-supervised Learning},
     author		= {
   
   Wang, Yidong and Chen, Hao and Heng, Qiang and Hou, Wenxin and Fan, Yue and and Wu, Zhen and Wang, Jindong and Savvides, Marios and Shinozaki, Takahiro and Raj, Bhiksha and Schiele, Bernt and Xie, Xing},
  	 booktitle	= {
   
   ICLR},
     year		= {
   
   2023},
     pages      = {
   
   1--20}
}

1. 摘要

  1. Semi-supervised Learning (SSL) has witnessed great success owing to the impressive performances brought by various methods based on pseudo labeling and consistency regularization.

半监督学习(semi-supervised learning)的两大杀器,pseudo labeling(伪标记)和consistency regularization(一致性正则)。

  1. However, we argue that existing methods might fail to utilize the unlabeled data more effectively since they either use a pre-defined / fixed threshold or an ad-hoc threshold adjusting scheme, resulting in inferior performance and slow convergence.

提出现有方法的不足,use a pre-defined / fixed threshold or an ad-hoc threshold adjusting scheme。这里的阈值应该是伪标签加入的阈值,只有大于阈值的伪标签才会加入训练,这一点在基于伪标签技术的方法中十分的常用。至于基于一致性正则中是否也存在这样的阈值,这一点是存疑的。

  1. We first analyze a motivating example to obtain intuitions on the relationship between the desirable threshold and model’s learning status. Based on the analysis, we hence propose FreeMatch to adjust the confidence threshold in a self-adaptive manner according to the model’s learning status.

顺利提出自己的核心创新点: self-adaptive confidence threshold。

  1. We further introduce a self-adaptive class fairness regularization penalty to encourage the model for diverse predictions during the early training stage.

一个trick,避免模型初期过早收敛。

  1. Extensive experiments indicate the superiority of FreeMatch especially when the labeled data are extremely rare. FreeMatch achieves 5.78%, 13.59%, and 1.28% error rate reduction over the latest state-of-the-art method FlexMatch on CIFAR-10 with 1 label per class, STL-10 with 4 labels per class, and ImageNet with 100 labels per class, respectively. Moreover, FreeMatch can also boost the performance of imbalanced SSL.

自信的算法用三句话来描述自己是art-of-state的。

  1. The codes can be found at https: //github.com/microsoft/Semi-supervised-learning.

代码地址。

2. 算法描述

2.1. 例子

通过一个分类的例子,有以下有趣的结论:

  1. 简单地说,未标记数据利用率(采样率) 1 − P ( Y p = 0 ) 1−P(Y_p = 0) 1P(Yp=0) 直接由阈值 τ \tau τ 控制。随着置信度阈值 τ \tau τ 变大,未标记数据利用率变低。在训练初期,由于 β \beta β 仍然很小,采用较高的阈值可能会导致采样率较低且收敛速度较慢。
  2. 更有趣的是,如果 σ 1 ≠ σ 2 \sigma_1 \neq \sigma_2 σ1=σ2,则 P ( Y p = 1 ) ≠ P ( Y p = − 1 ) P(Y_p = 1) \neq P(Y_p = −1) P(Yp=1)=P(Yp=1)。事实上, τ \tau τ 越大,伪标签越不平衡。从我们旨在解决平衡分类问题的意义上来说,这可能是不可取的。不平衡的伪标签可能会扭曲决策边界并导致所谓的伪标签偏差。对此的一个简单的补救措施是使用特定于类的阈值 τ 2 \tau_2 τ2 1 − τ 1 1 − \tau_1 1τ1 来分配伪标签。(different classes have different levels of intra-class diversity (different σ))
  3. 采样率 1 − P ( Y p = 0 ) 1 − P(Y_p = 0) 1P(Yp=0) 随着 μ 2 − μ 1 \mu_2 − \mu_1 μ2μ1 变小而降低。换句话说,两个类越相似,未标记的样本就越有可能被屏蔽。随着两个类别变得更加相似,特征空间中会混合更多的样本,而模型对其预测的信心较差,因此需要一个适度的阈值来平衡采样率。否则,我们可能没有足够的样本来训练模型来对已经很难分类的类进行分类。(some classes are harder to classify than others (µ2 − µ1 being small)

Since different classes have different levels of intra-class diversity (different σ) and some classes are harder to classify than others (µ2 − µ1 being small), a fine-grained class-specific threshold is desirable to encourage fair assignment of pseudo labels to different classes.

2.2. Self-adaptive Threshold

Global Threshold:
τ t = { 1 C , if  t = 0 , λ τ t − 1 + ( 1 − λ ) 1 μ B ∑ b = 1 μ B max ⁡ q b , otherwise . \tau_t= \begin{cases} \frac{1}{C},& \text{if } t=0,\\ \lambda\tau_{t-1} + (1-\lambda)\frac{1}{\mu B}\sum_{b=1}^{\mu B}\max{q_b},& \text{otherwise}. \end{cases} τt={ C1,λτt1+(1λ)μB1b=1μBmaxqb,if t=0,otherwise.

Local Threshold:
p ~ t ( c ) = { 1 C , if  t = 0 , λ p ~ t − 1 ( c ) + ( 1 − λ ) 1 μ B ∑ b = 1 μ B q b ( c ) , otherwise . \widetilde{p}_t(c)= \begin{cases} \frac{1}{C},& \text{if } t=0,\\ \lambda\widetilde{p}_{t-1}(c) + (1-\lambda)\frac{1}{\mu B}\sum_{b=1}^{\mu B}q_b(c),& \text{otherwise}. \end{cases}

### Global-Local Self-Adaptive Network for Drone-View Object Detection 在计算机视觉领域,无人机视角的目标检测面临着诸多挑战,例如复杂的背景干扰、多尺度目标以及光照变化等问题。为了应对这些挑战,研究人员提出了多种创新性的方法,其中全局-局部自适应网络(Global-Local Self-Adaptive Network, GLSAN)是一种专门针对无人机视角设计的有效解决方案。 GLSAN的核心思想在于通过融合全局上下文信息和局部特征细节来提升模型的鲁棒性和准确性。具体而言,该网络架构通常由以下几个关键模块组成: #### 1. **全局上下文提取** 全局上下文模块旨在捕获图像中的高层次语义信息,这对于理解场景的整体结构至关重要。这一部分可以通过引入注意力机制或空间金字塔池化层实现[^1]。例如,在某些轻量级卷积神经网络的设计中,采用SENet(Squeeze-and-Excitation Networks)作为全局上下文增强单元,能够显著提高对复杂环境的理解能力。 #### 2. **局部特征细化** 局部特征细化模块专注于捕捉目标对象的具体形状和纹理特性。这一步骤对于区分相似类别尤其重要。常见的做法是在骨干网络的不同阶段应用不同大小的感受野,从而获取多层次的局部特征表示[^2]。此外,还可以利用FPN(Feature Pyramid Network)进一步加强跨尺度特征交互。 #### 3. **自适应融合策略** 为了更好地平衡全局与局部信息之间的贡献比例,GLSAN采用了动态权重调整的方法来进行特征融合。这种方法允许网络根据输入数据的特点自动学习最优组合方式,而不是固定地分配权值[^3]。这种灵活性使得GLSAN能够在多样化的应用场景下保持较高的性能表现。 以下是基于PyTorch框架的一个简化版GLSAN实现示例: ```python import torch.nn as nn class GLSAN(nn.Module): def __init__(self): super(GLSAN, self).__init__() # Backbone network (e.g., ResNet or MobileNet) self.backbone = ... # Global context extraction module self.global_context = SEBlock() # Squeeze-and-Excitation Block # Local feature refinement module self.local_refinement = FPN() # Feature Pyramid Network # Adaptive fusion layer self.fusion_layer = AdaptiveFusion() def forward(self, x): features = self.backbone(x) global_features = self.global_context(features) local_features = self.local_refinement(features) fused_output = self.fusion_layer(global_features, local_features) return fused_output ``` 上述代码片段展示了如何构建一个基本的GLSAN模型。需要注意的是,实际部署时可能还需要考虑更多工程优化措施,比如量化感知训练或者剪枝技术,以便满足实时性要求的同时降低计算成本。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

来日可期1314

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值