百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

negative-label-smoothing

> 编程语言
开源

[ICML2022 Long Talk]官方Pytorch执行"向平滑还是没有? 当标签平滑遇到噪音标签时"

99 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

[ICML2022 Long Talk]官方Pytorch执行"向平滑还是没有? 当标签平滑遇到噪音标签时"

To Smooth or Not? When Label Smoothing Meets Noisy Labels

This repository is the official Pytorch implementation of "To Smooth or Not? When Label Smoothing Meets Noisy Labels" accepted by ICML2022 (Oral).

Plug-in implementation of (Generalized) Label Smoothing in PyTorch

…

Required Packages & Environment

We recommend readers build an virtual environment and install required packages in requirements.txt.

Experiments on synthetic noisy CIFAR dataset

Direct training on CIFAR-10

For Vanilla Loss and PLS, direct training works better when learning with symmetric noisy labels under noise rate 0.2. Run the code bellow to reproduce our results:

CUDA_VISIBLE_DEVICES=0 python3 main_GLS_direct_train.py --noise_type symmetric --noise_rate 0.2

Warm-up with CE loss

When noise rates are large, warming up with CE loss makes PLS and NLS reaches a better performance. Run the code bellow to generate the warm-up model:

CUDA_VISIBLE_DEVICES=0 python3 main_warmup.py --noise_type symmetric --noise_rate 0.2

After the warming up, proceed with GLS:

CUDA_VISIBLE_DEVICES=0 python3 main_GLS_load.py --noise_type symmetric --noise_rate 0.2

Experiments on CIFAR-N dataset

You may want to refer to "CIFAR-N Github Page", and modify the file loss.py by referring to the loss_gls plug-in implementation specified above.

Details of key arguments:

In experiments, we formulate GLS as wa * Vanilla Loss + wb * GLS.

  • --lr: learning rate
  • --noise_rate: the error rate in symmetric noise model
  • --n_epoch: number of epochs
  • --wa: the weight of Vanilla Loss (default is 0)
  • --wb: the weight of GLS (default is 1)
  • --smooth_rate: the smooth rate in GLS

Citation

If you use our code, please cite the following paper:

@inproceedings{Wei2022ToSO,
  title={To Smooth or Not? When Label Smoothing Meets Noisy Labels},
  author={Jiaheng Wei and Hangyu Liu and Tongliang Liu and Gang Niu and Yang Liu},
  booktitle={ICML},
  year={2022}
}

Thanks for watching!

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonlabel-noiselabel-smoothingnoisy-label-learningnoisy-labels

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言