Skip to content
指南阅读约需 8 分钟

内容审核标注设置

配置 Potato 进行毒性检测、仇恨言论分类和敏感内容标注,同时兼顾标注者的身心健康。

Potato Team

把毒性按等级评分,而不是当作是非题;把说话者的表面意图作为单独的字段来标注;并限制单个标注者在这类材料中停留的时长。严重程度的分界线和意图的各种情形,是一份审核指南必须写明的地方。

标注有害内容和标注影评有三点不同,而这三点会改变任务的构建方式。长时间做这项工作令人痛苦,指南永远无法完全确定,而对分类器最重要的条目,恰恰是标注者有分歧的那些。本指南讲的是在 Potato 中开展一项审核研究的方案设计、质量控制和工作条件,先从做这项工作的人讲起。

标注者的身心健康

连着几个小时阅读仇恨和血腥内容,对做这件事的人有实实在在的影响。有几项设置可以让这项工作变得更可承受。

内容警告与会话上限

Potato 没有专门的身心健康配置块。你需要的部件都是普通的配置键,把它们组合起来用。

在任务开始前展示的 surveyflow 页面承载内容警告和支持资源链接,标注者必须经过这一页才能进入条目:

yaml
surveyflow:
  on: true
  order:
    - pre_annotation
  pre_annotation:
    - "surveyflow/content_warning.jsonl"

max_annotations_per_user 限制任何一个人能看到多少条目,这才是真正生效的会话上限:

yaml
max_annotations_per_user: 100

休息提醒、会话之间的冷却时间以及任务中的退出按钮都没有内置。如果这些对你很重要,它们应当写进任务说明,以及你在标注者接受这项工作之前告诉他们的内容里。

内容模糊处理

血腥图像值得藏在一次点击后面,让标注者在自己准备好的时候看到,而不是在页面加载时就看到。Potato 不会模糊图像,所以这件事必须从你的数据这边来做:在条目显示所读取的那个字段里放一张占位图,把真实的 URL 放在标注者主动点开的链接后面。

毒性分类

分级的严重程度量表

二元的"有毒/无毒"标签抹平了粗鲁回复和可信威胁之间的区别,而审核政策对这两者的处理并不一样。四个分级给了分类器一个可以学习的顺序,也给了标注者一个安放中间情形的地方。每个等级都用提示文字给出定义,因为一个叫 moderate 的标签本身什么也说明不了:

yaml
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"

危害类别

严重程度说明一个条目有多糟,类别说明它带的是哪一种危害,而后者决定条目被送到哪条政策通道。多选在这里合适,因为一个帖子可以同时是好几种东西,包在侮辱性称呼里的威胁两者都算:

yaml
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"

仇恨言论

被针对的是哪个群体

把被针对的群体与严重程度分开记录,你就能按群体衡量覆盖度,而审核分类器训练得最不均衡的地方通常正是这里:

yaml
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"

隐性与显性仇恨

暗语是标注者和分类器共同面对的最难情形,而把它和公开的侮辱性称呼归在一起,会掩盖你的语料中究竟有多少这类内容。三级量表让这一区别在数据中保持可见:

yaml
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"

上下文与意图

平台上下文

同一句话在一个社区里可以接受,在另一个社区里就是违规,所以脱离平台做出的判断不是审核需要的那种判断。把上下文评级和一个自由文本字段配在一起,因为当两位标注者判断相反时,你要读的正是他们的理由:

yaml
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

表面意图

新闻报道里引用的侮辱性称呼、群体内部的再挪用,以及一次直接攻击,可能逐字完全相同,而训练时没有这一区别的分类器,会把报道和辱骂一起标记出来。意图是推断出来的而不是已知的,所以这个标签问的是文本看上去在做什么,并给标注者留了一个说"判断不了"的地方:

yaml
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"

图像审核

视觉上的政策违规需要和文本一样的类别/处置二分。处置字段让这份标注不只对模型有用,也能被审核队列直接使用,因为对同一个类别来说,通过、年龄限制和删除是不同的结果:

yaml
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"

质量控制

主观任务会漂移,而在这项任务上,漂移通常表现为标注者习惯了这些材料之后严重程度评分整体下移。校准条目能发现这一点,冗余覆盖边缘情形,升级机制把需要专家处理的条目移出普通队列:

yaml
# 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

一份完整的配置

下面这份配置是上面那些方案的精简版,删减到一项研究真正需要的四个方案。一个严重程度等级、一组类别、一个置信度评分和一个备注字段,已经覆盖了要做的判断,而不必每个条目问九个字段。每个条目三位标注者,是在主观任务上衡量一致性的下限,而置信度评分给了你第二种办法去找出值得裁决的条目:

yaml
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 接受的每一种方案类型。