基礎知識指南

標籤平滑

Label smoothing replaces hard one-hot targets with a softened target distribution during training.

聆聽此指南AI 語音敘述 · ~2 min

本頁閱讀時間約2分鐘
  1. 概述
  2. 深入探討
  3. 現實世界的實施
  4. 標籤平滑的未來
  5. 付諸實踐
  6. 不斷探索
  7. 常見問題

概述

It can regularize some models, but its effects on accuracy, calibration, and distillation depend on the task, model, and evaluation.

深入探討

With K classes, one common label-smoothing convention assigns 1 − ε to the correct class and distributes ε across the remaining classes; implementations may instead distribute ε across all classes, so check the loss definition. This prevents the target from demanding probability one for the labeled class and can discourage extreme logits. The Inception-v3 work and the Transformer paper are prominent documented uses of the method. Research has found calibration and generalization benefits in some settings, while also showing that smoothing can remove information about similarities among incorrect classes and weaken a model as a knowledge-distillation teacher. It is therefore not a universal accuracy or calibration improvement. Choose ε and evaluate calibration, task quality, and downstream distillation on representative validation data.

現實世界的實施

ImageNet 分類:Inception-v3 使用標籤平滑 (epsilon 0.1) 來提高 top-1 準確率並減少過度自信。

機器翻譯:原始 Transformer 應用了 0.1 的標籤平滑,用一點困惑換取了更高的 BLEU 分數。

語音識別:平滑的目標可減少過度自信的誤識別,並改善噪音音訊的校準。

醫學影像模型:平滑可以產生更好校準的機率,這在置信度分數為臨床決策提供資訊時很重要。

標籤平滑的未來

標籤平滑仍然是大規模訓練中的預設設置,但研究正在轉向自適應和學習平滑,即根據範例或類別調整 epsilon,而不是使用單一值。通常會權衡焦損失和溫度縮放等以校準為重點的方法或與之結合。隨著模型的發展和可靠的不確定性估計變得對安全至關重要,預計平滑將成為產生值得信賴的置信度評分的眾多工具之一,並仔細注意其與蒸餾的已知衝突。

付諸實踐

為什麼這很重要

  • 更明確的決策. 它可以幫助您將清晰的技術聲明與行銷語言分開。
  • 成本與預算. 在花費金錢或時間之前,您可以提出更好的實施問題。
  • 團隊與工作流程. 具有共同理解的團隊可以做出更好的產品、政策和學習決策。

留意

  • 不同的團隊可能會以不同的方式使用相同術語,因此請儘早定義範圍。
  • 基準測試可能看起來很強大,但實際效能卻參差不齊。
  • 忽視數據品質和評估計劃通常會產生脆弱的結果。

後續步驟

  1. 從您需要的結果的簡單語言定義開始。
  2. 在測試之前選擇一種成功指標和一種失敗條件。
  3. 使用代表性資料運行小型試點,而不是完善的演示集。
  4. 記錄標籤平滑在哪些方面有幫助以及在哪些方面更簡單的方法更好。

不斷探索

免費電子報

獲取每日 AI 簡報

每個工作日上午提供三則經過驗證的 AI 新聞,以淺顯易懂的英文撰寫。永久免費,無廣告。

每個工作日一封電子郵件。一鍵取消訂閱。我們絕不出售或分享您的地址。

測試一下自己

Take the Label Smoothing quiz

每個答案皆有即時回饋,通過課程後可獲得具備可驗證 ID 的可分享證書。

開始測驗

支持免費的 AI 教育。AI Understanding 是一個 501(c)(3) 非營利組織——絕無廣告,絕無付費牆。 捐款

常見問題

What is Label Smoothing?

Label smoothing replaces hard one-hot targets with a softened target distribution during training. It can regularize some models, but its effects on accuracy, calibration, and distillation depend on the task, model, and evaluation.

標籤平滑對訓練目標有何影響?

標籤平滑不是硬性的 1.0/0.0 目標,而是將 (1 - epsilon) 指派給真實類別,並將 epsilon 分散到其他類別。

將硬性 one-hot 目標替換為平滑目標的預期效果之一是什麼?

Smoothing softens the target distribution so the training objective does not demand a one-hot probability vector.

哪些重要架構是標籤平滑使用的顯著例子?

Inception-v3 and the Transformer paper are prominent documented uses of label smoothing; this wording makes no claim that either originated the technique.

標籤平滑對校準能做什麼?

Research reports calibration effects that depend on the model and evaluation setting; label smoothing is not a universal calibration guarantee.

標籤平滑的有記錄的缺點是什麼?

透過收緊集群並展平類之間的軟關係,平滑可以消除知識蒸餾所依賴的資訊。