內容稽核標註設定
配置 Potato 進行毒性檢測、仇恨言論分類和敏感內容標註,同時兼顧標註者的身心健康。
把毒性按等級評分,而不是當作是非題;把說話者的表面意圖作為單獨的欄位來標註;並限制單個標註者在這類材料中停留的時長。嚴重程度的分界線和意圖的各種情形,是一份稽核指南必須寫明的地方。
標註有害內容和標註影評有三點不同,而這三點會改變任務的構建方式。長時間做這項工作令人痛苦,指南永遠無法完全確定,而對分類器最重要的條目,恰恰是標註者有分歧的那些。本指南講的是在 Potato 中開展一項稽核研究的方案設計、品質控制和工作條件,先從做這項工作的人講起。
標註者的身心健康
連著幾個小時閱讀仇恨和血腥內容,對做這件事的人有實實在在的影響。有幾項設定可以讓這項工作變得更可承受。
內容警告與會話上限
Potato 沒有專門的身心健康配置塊。你需要的部件都是普通的配置鍵,把它們組合起來用。
在任務開始前展示的 surveyflow 頁面承載內容警告和支援資源連結,標註者必須經過這一頁才能進入條目:
surveyflow:
on: true
order:
- pre_annotation
pre_annotation:
- "surveyflow/content_warning.jsonl"max_annotations_per_user 限制任何一個人能看到多少條目,這才是真正生效的會話上限:
max_annotations_per_user: 100休息提醒、會話之間的冷卻時間以及任務中的退出按鈕都沒有內建。如果這些對你很重要,它們應當寫進任務說明,以及你在標註者接受這項工作之前告訴他們的內容裡。
內容模糊處理
血腥影像值得藏在一次點選後面,讓標註者在自己準備好的時候看到,而不是在頁面載入時就看到。Potato 不會模糊影像,所以這件事必須從你的資料這邊來做:在條目顯示所讀取的那個欄位裡放一張佔位圖,把真實的 URL 放在標註者主動點開的連結後面。
毒性分類
分級的嚴重程度量表
二元的"有毒/無毒"標籤抹平了粗魯回覆和可信威脅之間的區別,而稽核政策對這兩者的處理並不一樣。四個分級給了分類器一個可以學習的順序,也給了標註者一個安放中間情形的地方。每個等級都用提示文字給出定義,因為一個叫 moderate 的標籤本身什麼也說明不了:
annotation_schemes:
- annotation_type: radio
name: toxicity_level
description: "Rate the toxicity level of this content"
labels:
- name: "Not toxic"
tooltip: "No harmful content"
- name: "Mildly toxic"
tooltip: "Rude or insensitive but not severe"
- name: "Moderately toxic"
tooltip: "Clearly offensive or harmful"
- name: "Severely toxic"
tooltip: "Extremely offensive, threatening, or dangerous"危害類別
嚴重程度說明一個條目有多糟,類別說明它帶的是哪一種危害,而後者決定條目被送到哪條政策通道。多選在這裡合適,因為一個帖子可以同時是好幾種東西,包在侮辱性稱呼裡的威脅兩者都算:
annotation_schemes:
- annotation_type: multiselect
name: toxicity_types
description: "Select all types of toxicity present"
labels:
- name: "Profanity or obscenity"
tooltip: "Swear words, vulgar language"
- name: "Insults"
tooltip: "Personal attacks, name-calling"
- name: "Threats"
tooltip: "Threats of violence or harm"
- name: "Hate speech"
tooltip: "Targeting protected groups"
- name: "Harassment"
tooltip: "Targeted, persistent hostility"
- name: "Sexual content"
tooltip: "Explicit or suggestive content"
- name: "Self-harm or suicide"
tooltip: "Promoting or glorifying self-harm"
- name: "Misinformation"
tooltip: "Demonstrably false claims"
- name: "Spam or scam"
tooltip: "Unwanted promotional content"仇恨言論
被針對的是哪個群體
把被針對的群體與嚴重程度分開記錄,你就能按群體衡量覆蓋度,而稽核分類器訓練得最不均衡的地方通常正是這裡:
annotation_schemes:
- annotation_type: multiselect
name: target_groups
description: "Which groups are targeted? Leave empty if this is not hate speech"
labels:
- name: "Race or ethnicity"
- name: "Religion"
- name: "Gender"
- name: "Sexual orientation"
- name: "Disability"
- name: "Nationality or origin"
- name: "Age"
- name: "Other protected group"隱性與顯性仇恨
暗語是標註者和分類器共同面對的最難情形,而把它和公開的侮辱性稱呼歸在一起,會掩蓋你的語料中究竟有多少這類內容。三級量表讓這一區別在資料中保持可見:
annotation_schemes:
- annotation_type: radio
name: hate_severity
description: "Severity of hate speech"
labels:
- name: "Implicit"
tooltip: "Coded language, dog whistles"
- name: "Explicit, mild"
tooltip: "Clear but not threatening"
- name: "Explicit, severe"
tooltip: "Dehumanizing, threatening, or violent"上下文與意圖
平臺上下文
同一句話在一個社群裡可以接受,在另一個社群裡就是違規,所以脫離平臺做出的判斷不是稽核需要的那種判斷。把上下文評級和一個自由文本欄位配在一起,因為當兩位標註者判斷相反時,你要讀的正是他們的理由:
annotation_schemes:
- annotation_type: radio
name: context_appropriate
description: "Is this content appropriate for the platform context?"
labels:
- name: "Appropriate for context"
- name: "Borderline"
- name: "Inappropriate for context"
- annotation_type: text
name: context_notes
description: "Explain your contextual reasoning"
multiline: true
rows: 3表面意圖
新聞報道里引用的侮辱性稱呼、群體內部的再挪用,以及一次直接攻擊,可能逐字完全相同,而訓練時沒有這一區別的分類器,會把報道和辱罵一起標記出來。意圖是推斷出來的而不是已知的,所以這個標籤問的是文本看上去在做什麼,並給標註者留了一個說"判斷不了"的地方:
annotation_schemes:
- annotation_type: radio
name: intent
description: "What is the apparent intent?"
labels:
- name: "Genuine attack"
tooltip: "Intent to harm or offend"
- name: "Satire or parody"
tooltip: "Mocking toxic behavior"
- name: "Quote or report"
tooltip: "Reporting or discussing toxic content"
- name: "Reclaimed language"
tooltip: "In-group use of slurs"
- name: "Unclear intent"影像稽核
視覺上的政策違規需要和文本一樣的類別/處置二分。處置欄位讓這份標註不只對模型有用,也能被稽核佇列直接使用,因為對同一個類別來說,通過、年齡限制和刪除是不同的結果:
annotation_schemes:
- annotation_type: multiselect
name: image_violations
description: "Select all policy violations"
labels:
- name: "Nudity or sexual content"
- name: "Graphic violence"
- name: "Gore or disturbing content"
- name: "Hate symbols"
- name: "Dangerous acts"
- name: "Child safety concern"
- name: "No violations"
- annotation_type: radio
name: action_recommendation
description: "Recommended action"
labels:
- name: "Approve"
- name: "Age-restrict"
- name: "Add warning label"
- name: "Remove"
- name: "Escalate to specialist"品質控制
主觀任務會漂移,而在這項任務上,漂移通常表現為標註者習慣了這些材料之後嚴重程度評分整體下移。校準條目能發現這一點,冗餘覆蓋邊緣情形,升級機制把需要專家處理的條目移出普通佇列:
# Items with known labels, mixed into the regular queue
gold_standards:
enabled: true
items_file: data/moderation_gold.json
mode: mixed
frequency: 20
accuracy:
min_threshold: 0.7
evaluation_count: 10
# Three judgements on every item
num_annotators_per_item: 3
# Disagreements go to a specialist queue
adjudication:
enabled: true
adjudicator_users:
- trust_safety_lead
min_annotations: 3
agreement_threshold: 0.67
require_notes_on_override: true
show_agreement_scores: true一份完整的配置
下面這份配置是上面那些方案的精簡版,刪減到一項研究真正需要的四個方案。一個嚴重程度等級、一組類別、一個置信度評分和一個備註欄位,已經覆蓋了要做的判斷,而不必每個條目問九個欄位。每個條目三位標註者,是在主觀任務上衡量一致性的下限,而置信度評分給了你第二種辦法去找出值得裁決的條目:
annotation_task_name: "Content Moderation"
task_dir: "."
output_annotation_dir: "annotations/"
data_files:
- "data/reports.json"
item_properties:
id_key: id
text_key: text
num_annotators_per_item: 3
annotation_schemes:
- annotation_type: radio
name: toxicity
description: "Toxicity level"
labels:
- name: "None"
- name: "Mild"
- name: "Moderate"
- name: "Severe"
- annotation_type: multiselect
name: categories
description: "Types of harmful content (select all)"
labels:
- name: "Hate speech"
- name: "Harassment"
- name: "Violence or threats"
- name: "Sexual content"
- name: "Self-harm"
- name: "Spam"
- name: "None"
- annotation_type: likert
name: confidence
description: "How confident are you in this judgment?"
size: 5
min_label: "Uncertain"
max_label: "Very confident"
- annotation_type: text
name: notes
description: "Additional notes (optional)"
multiline: true
rows: 4
export_annotation_format: jsonl撰寫指南
標註者之間的多數分歧都能追溯到含糊的指南,所以功夫花在這裡最划算。寫清楚"輕度"和"中度"之間到底差在哪裡,而不是讓標註者從標籤名字上自己揣摩。把邊緣案例擺出來,並說明每一個為什麼落在它所在的位置,因為正是這個說明才能推廣到下一個邊緣案例。說明平臺和受眾怎樣改變判斷,並告訴標註者在意圖確實不清楚時該怎麼做,而不是讓他們去猜一個預設答案。要預料到隨著新類型的內容出現,這些內容全都需要修訂。
支援標註者
輪換這項工作,不要讓一個人整天守著有害內容。把心理健康資源放在一次點選之內,給人們一個真正能提出關切的渠道,並把工作量當作研究設計上的決定,而不是排班上的決定。
關於底層分類方案的工作原理,見文本標註文件。品質控制指南更詳細地講了注意力檢查、黃金標準和一致性指標,標註方案列出了 Potato 接受的每一種方案類型。