Lune

NeurIPS2023Top-tier venue

Jaccard Metric Losses: Optimizing the Jaccard Index with Soft Labels

Zifu Wang, Xuefei Ning, Matthew B. Blaschko

Abstract

Intersection over Union (IoU) losses are surrogates that directly optimize the Jaccard index. Leveraging IoU losses as part of the loss function have demonstrated superior performance in semantic segmentation tasks compared to optimizing pixel-wise losses such as the cross-entropy loss alone. However, we identify a lack of flexibility in these losses to support vital training techniques like label smoothing, knowledge distillation, and semi-supervised learning, mainly due to their inability to process soft labels. To address this, we introduce Jaccard Metric Losses (JMLs), which are identical to the soft Jaccard loss in standard settings with hard labels but are fully compatible with soft labels. We apply JMLs to three prominent use cases of soft labels: label smoothing, knowledge distillation and semi-supervised learning, and demonstrate their potential to enhance model accuracy and calibration. Our experiments show consistent improvements over the cross-entropy loss across 4 semantic segmentation datasets (Cityscapes, PASCAL VOC, ADE20K, DeepGlobe Land) and 13 architectures, including classic CNNs and recent vision transformers. Remarkably, our straightforward approach significantly outperforms state-of-the-art knowledge distillation and semi-supervised learning methods. The code is available at https://github.com/zifuwanggg/JDTLosses.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Beyond Raw Bytes: Towards Large Malware Language ModelsLuke Kurlandski, Harel Berger, Yin Pan, Matthew WrightNDSS 2026 · 5 citations

Builds on21

  1. SegFormer: Simple and Efficient Design for Semantic Segmentation with TransformersEnze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar et al.NeurIPS 2021 · 9,661 citations
  2. Per-Pixel Classification is Not All You Need for Semantic SegmentationBowen Cheng, Alexander G. Schwing, Alexander KirillovNeurIPS 2021 · 2,196 citations
  3. Dice Loss for Data-imbalanced NLP TasksXiaoya Li, Xiaofei Sun, Yuxian Meng, Junjun Liang et al.ACL 2020 · 575 citations
  4. Knowledge Distillation from A Stronger TeacherTao Huang, Shan You, Fei Wang, Chen Qian et al.NeurIPS 2022 · 477 citations
  5. Semi-Supervised Semantic Segmentation Using Unreliable Pseudo-LabelsYuchao Wang, Haochen Wang, Yujun Shen, Jingjing Fei et al.CVPR 2022 · 448 citations

Related papers

  1. Learning Generalized Intersection Over Union for Dense Pixelwise PredictionJiaqian Yu, Jingtao Xu, Yiwei Chen, Weiming Li et al.ICML 2021 · 16 citations
  2. Multi-Knowledge Aggregation and Transfer for Semantic SegmentationYuang Liu, Wei Zhang, Jun WangAAAI 2022 · 11 citations
  3. Improving Semi-Supervised Semantic Segmentation with Sliced-Wasserstein Feature Alignment and UniformityChen-Yi Lu, Kasra Derakhshandeh, Somali ChaterjiCVPR 2025
  4. Label-Guided Knowledge Distillation for Continual Semantic Segmentation on 2D Images and 3D Point CloudsZe Yang, Ruibo Li, Evan Ling, Chi Zhang et al.ICCV 2023 · 23 citations
  5. Bridging Cross-task Protocol Inconsistency for Distillation in Dense Object DetectionLongrong Yang, Xianpan Zhou, Xuewei Li, Liang Qiao et al.ICCV 2023 · 51 citations
Dusk over the sea between two cliffs drawn in fine vertical lines