ソフトラベル
Potatoでソフトラベルのアノテーションを設定し、合計が一定になるスライダーでカテゴリ間に確率分布を割り当てる方法を解説します。
ソフトラベルのアノテーションスキーマでは、アノテーターが単一のハードな分類を選ぶ代わりに、複数のカテゴリにまたがる確率分布を割り当てられます。アノテーターはスライダーを使って、決まった合計(たとえば100点)をラベル間に配分し、カテゴリ間の不確かさや重なりの度合いを表現します。
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_type | string | 必須 | "soft_label"を指定します |
name | string | 必須 | このスキーマの一意な識別子 |
description | string | 必須 | アノテーターに表示される指示文 |
labels | array | 必須 | カテゴリラベルのリスト(最低2件) |
total | integer | 100 | すべてのスライダーの合計が一致すべき値 |
min_per_label | integer | 0 | 各ラベルに最低限割り当てる値 |
show_distribution_chart | boolean | true | 現在の配分を示す円グラフまたは棒グラフを表示する |
label_requirement.required | boolean | false | 次に進む前にアノテーションを完了させる必要があるか |
例
感情の分布
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と一致します。
ベストプラクティス
- カテゴリが重なるときに使う - アイテムが実際に複数のカテゴリへ程度の差をつけて当てはまる場合に、ソフトラベルが向いています
- ラベル数を抑える - 6〜7個を超えると、スライダーのインターフェースは扱いにくくなります
- 意味のある合計値を決める - 100はパーセンテージとして直感的ですが、単純なタスクならもっと小さい合計でも構いません
- min_per_labelは控えめに使う - 最低配分を強制すると、そのラベルが本当に当てはまらない場合に結果が歪みます
- 分布チャートを有効にする - 目で見て分かる手がかりがあると、アノテーターは自分の配分を一目で把握できます
参考資料
- Likertスケール - 順序尺度による評価
- スライダー - 連続値を1つ入力するアノテーション
- 品質管理 - 注意チェックとゴールドスタンダード
実装の詳細については、ソースドキュメントを参照してください。