Skip to content

ソフトラベル

Potatoでソフトラベルのアノテーションを設定し、合計が一定になるスライダーでカテゴリ間に確率分布を割り当てる方法を解説します。

ソフトラベルのアノテーションスキーマでは、アノテーターが単一のハードな分類を選ぶ代わりに、複数のカテゴリにまたがる確率分布を割り当てられます。アノテーターはスライダーを使って、決まった合計(たとえば100点)をラベル間に配分し、カテゴリ間の不確かさや重なりの度合いを表現します。

感情のカテゴリに100点を配分するPotatoのソフトラベルインターフェースPotatoのソフトラベル

概要

ソフトラベルは、アイテムが複数のカテゴリに部分的に当てはまる場合に役立ちます。アノテーターに1つのラベルを選ばせるのではなく、すべての選択肢に対する相対的な確信度を表現してもらう形になります。スライダーは連動していて合計が常に設定値と一致し、任意で表示できる分布チャートが目で見て分かる手がかりになります。

クイックスタート

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: sentiment_distribution
    description: Distribute 100 points across sentiment categories based on how much each applies.
    labels: ["Positive", "Neutral", "Negative"]
    total: 100

設定オプション

フィールドデフォルト説明
annotation_typestring必須"soft_label"を指定します
namestring必須このスキーマの一意な識別子
descriptionstring必須アノテーターに表示される指示文
labelsarray必須カテゴリラベルのリスト(最低2件)
totalinteger100すべてのスライダーの合計が一致すべき値
min_per_labelinteger0各ラベルに最低限割り当てる値
show_distribution_chartbooleantrue現在の配分を示す円グラフまたは棒グラフを表示する
label_requirement.requiredbooleanfalse次に進む前にアノテーションを完了させる必要があるか

感情の分布

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: sentiment_distribution
    description: How much does each sentiment apply to this text?
    labels: ["Positive", "Neutral", "Negative"]
    total: 100
    show_distribution_chart: true

感情の強さ

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: emotion_mix
    description: Distribute points to reflect the mix of emotions in this utterance.
    labels: ["Joy", "Sadness", "Anger", "Fear", "Surprise", "Disgust"]
    total: 100
    min_per_label: 0
    show_distribution_chart: true

トピックの関連度

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: topic_relevance
    description: How relevant is this document to each topic?
    labels: ["Politics", "Sports", "Technology", "Entertainment"]
    total: 100

最低配分を強制する

yaml
annotation_schemes:
  - annotation_type: soft_label
    name: genre_mix
    description: Allocate points across genres. Each genre must receive at least 5 points.
    labels: ["Rock", "Pop", "Jazz", "Classical", "Electronic"]
    total: 100
    min_per_label: 5

出力形式

json
{
  "sentiment_distribution": {
    "labels": {
      "Positive": 45,
      "Neutral": 30,
      "Negative": 25
    }
  }
}

値の合計は常に、設定したtotalと一致します。

ベストプラクティス

  1. カテゴリが重なるときに使う - アイテムが実際に複数のカテゴリへ程度の差をつけて当てはまる場合に、ソフトラベルが向いています
  2. ラベル数を抑える - 6〜7個を超えると、スライダーのインターフェースは扱いにくくなります
  3. 意味のある合計値を決める - 100はパーセンテージとして直感的ですが、単純なタスクならもっと小さい合計でも構いません
  4. min_per_labelは控えめに使う - 最低配分を強制すると、そのラベルが本当に当てはまらない場合に結果が歪みます
  5. 分布チャートを有効にする - 目で見て分かる手がかりがあると、アノテーターは自分の配分を一目で把握できます

参考資料

実装の詳細については、ソースドキュメントを参照してください。