ModerationBench / README.md
Moderation bench
add dataset card README.md
8d82350 verified
|
Raw History Blame
9.81 kB
---
license: cc-by-nc-4.0
viewer: false
task_categories:
- text-classification
- image-classification
size_categories:
- 1K<n<10K
tags:
- content-moderation
- safety
- multimodal
- bluesky
- social-media
- harm-detection
- benchmark
pretty_name: ModerationBench
configs:
- config_name: records
data_files:
- split: moderated
path: data/moderated/records.jsonl
- split: random
path: data/random/records.jsonl
- split: safe
path: data/safe/records.jsonl
- split: near_moderated
path: data/near_moderated/records.jsonl
- config_name: annotations
data_files:
- split: moderated
path: data/moderated/annotations.jsonl
- split: random
path: data/random/annotations.jsonl
- split: safe
path: data/safe/annotations.jsonl
- split: near_moderated
path: data/near_moderated/annotations.jsonl
- config_name: moderated_by_harm
data_files:
- split: graphic__self_harm
path: data/moderated/by_harm/graphic/self_harm.jsonl
- split: graphic__graphic_media
path: data/moderated/by_harm/graphic/graphic_media.jsonl
- split: behavioural__intolerant
path: data/moderated/by_harm/behavioural/intolerant.jsonl
- split: behavioural__rude
path: data/moderated/by_harm/behavioural/rude.jsonl
- split: behavioural__threat
path: data/moderated/by_harm/behavioural/threat.jsonl
- split: sexual__porn
path: data/moderated/by_harm/sexual/porn.jsonl
- split: sexual__sexual
path: data/moderated/by_harm/sexual/sexual.jsonl
- split: sexual__nudity
path: data/moderated/by_harm/sexual/nudity.jsonl
- split: sexual__sexual_figurative
path: data/moderated/by_harm/sexual/sexual_figurative.jsonl
---
# ModerationBench
A multimodal benchmark for evaluating **automated content-moderation systems** on real-world
social-media posts from [Bluesky](https://bsky.app). Each post is accompanied by
human-annotation label: Safe/Unsafe, covering **nine fine-grained harm categories** across three harm groups,
plus a safe class.
---
## Dataset Summary
| Split | Posts | Media files |
|---|---|---|
| `moderated` | 1,000 | 978 |
| `random` | 1,000 | 320 |
| `safe` | 1,000 | 0 |
| `near_moderated` | 988 | 654 |
| **Total** | **3,988** | **1,952** |
---
## Splits
> ⚠️ **Content warning:** These splits may contain graphic, sexual, and self-harm imagery. Users can work with specific harm types (on moderated split, see below) to avoid certain content.
### `moderated` — Platform-moderated posts
Posts that were flagged and actioned by the Bluesky moderation system. Covers all nine
harm categories with roughly balanced label distribution.
> See [**Working with specific harm categories**](#load-a-specific-harm-category-by_harm)
> below for how to load individual label subsets without loading the full split.
| Label | Group | Count |
|---|---|---|
| safe | safe | 163 |
| porn | sexual | 111 |
| sexual_figurative | sexual | 106 |
| nudity | sexual | 104 |
| self_harm | graphic | 102 |
| threat | behavioural | 99 |
| sexual | sexual | 95 |
| graphic_media | graphic | 89 |
| intolerant | behavioural | 74 |
| rude | behavioural | 57 |
> Each label has a dedicated pre-split file under `data/moderated/by_harm/`.
> See the [Usage](#usage) section for loading examples.
### `random` — Random firehose sample
1 000 posts sampled uniformly from the public Bluesky firehose (Mar-Dec 2025). Used as
a realistic class-imbalanced baseline (≈97 % safe). Platform labels are
sparse.
### `safe` — Curated safe posts
1 000 posts curated from verified individuals and organizations accounts and where all human annotators unanimously agreed the content is safe.
### `near_moderated` — Semantically similar firehose posts
988 posts from the public firehose that are semantically similar to pilot-moderated posts
(retrieved via embedding nearest-neighbour search). ≈35 % flagged as unsafe.
---
## Harm Taxonomy
| Category | Group | Description |
|---|---|---|
| `self_harm` | graphic | Depictions of self-injury or suicide |
| `graphic_media` | graphic | Gore, violence, or disturbing imagery |
| `intolerant` | behavioural | Hate speech targeting protected characteristics |
| `rude` | behavioural | Harassment, insults, or abusive language |
| `threat` | behavioural | Explicit or implied threats of harm |
| `porn` | sexual | Explicit sexual content |
| `sexual` | sexual | Suggestive sexual content (not explicit) |
| `nudity` | sexual | Non-sexual nudity |
| `sexual_figurative` | sexual | Sexual content in art / figurative media |
| `safe` | safe | No policy violation detected |
---
## Data Structure
Each split contains:
```
data/
{split}/
records.jsonl ← one post per line
annotations.jsonl ← one annotation per line (keyed by post id)
by_harm/ ← (moderated only) merged records+annotations per label
graphic/
self_harm.jsonl
graphic_media.jsonl
behavioural/
intolerant.jsonl
rude.jsonl
threat.jsonl
sexual/
porn.jsonl
sexual.jsonl
nudity.jsonl
sexual_figurative.jsonl
media/
{split}/
images/ ← JPEG/PNG/WEBP image files
videos/ ← MP4/MOV video files
```
### `records.jsonl` schema
```json
{
"id": "post_XXXXXXXX", // sha256-derived 8-char post ID
"split": "moderated",
"text": "...", // post text
"date": "2025-06...",
"lang": "en", // ISO 639-1 language code (or 'und' if undetermined)
"media": [
{
"type": "image",
"hf_path": "data/media/moderated/images/bafkrei....jpeg",
"hf_url": "https://huggingface.co/datasets/usermodbench/ModerationBench/resolve/main/...",
"filename": "bafkrei....jpeg"
}
]
}
```
### `annotations.jsonl` schema
```json
{
"id": "post_XXXXXXXX",
"split": "moderated",
"is_harmful": true,
"primary_harm": "porn",
"harm_group": "sexual",
"annotator_id": "majority_vote",
"confidence": 1.0, // fraction of annotators who agreed with majority
"agreed": true // true = unanimous agreement
}
```
---
## Annotation Methodology
- **Annotators:** Three trained annotators per post
- **Protocol:** Each annotator independently labelled posts as *Safe* or *Unsafe*; if
unsafe, they selected one or more harm categories from the taxonomy above.
- **Aggregation:** Majority vote across annotators. The `agreed` field is `true` when
the majority was unanimous. The `confidence` field is the fraction of annotators who
agreed with the final label.
- **Tiebreaking :** When the two primary annotators disagreed, one of
two tiebreaker annotators was called in. `agreed = false` for tiebroken rows.
---
## Privacy & Ethics
- Post URIs are removed; posts are identified only by their pseudonymous `post_XXXXXXXX` ID.
- This dataset is released under **CC BY-NC 4.0** — non-commercial use only.
---
## Usage
### Load a full split
```python
from datasets import load_dataset
# Records and annotations for the moderated split
rec = load_dataset(
"usermodbench/ModerationBench",
data_files={"train": "data/moderated/records.jsonl"},
split="train",
)
ann = load_dataset(
"usermodbench/ModerationBench",
data_files={"train": "data/moderated/annotations.jsonl"},
split="train",
)
import pandas as pd
df = pd.DataFrame(rec).merge(pd.DataFrame(ann), on="id")
print(df[["id", "text", "primary_harm", "confidence"]].head())
```
### Load a specific harm category (`by_harm/`)
The `moderated` split ships pre-split files under `data/moderated/by_harm/<group>/<label>.jsonl`.
Each row is a merged record + annotation (no separate join needed).
Available paths:
- `data/moderated/by_harm/graphic/self_harm.jsonl`
- `data/moderated/by_harm/graphic/graphic_media.jsonl`
- `data/moderated/by_harm/behavioural/intolerant.jsonl`
- `data/moderated/by_harm/behavioural/rude.jsonl`
- `data/moderated/by_harm/behavioural/threat.jsonl`
- `data/moderated/by_harm/sexual/porn.jsonl`
- `data/moderated/by_harm/sexual/sexual.jsonl`
- `data/moderated/by_harm/sexual/nudity.jsonl`
- `data/moderated/by_harm/sexual/sexual_figurative.jsonl`
```python
from datasets import load_dataset
# Load a single harm category
self_harm = load_dataset(
"usermodbench/ModerationBench",
data_files={"train": "data/moderated/by_harm/graphic/self_harm.jsonl"},
split="train",
)
print(f"self_harm posts: {len(self_harm)}")
# Load an entire harm group (all sexual content categories)
import glob
sexual_files = [
"data/moderated/by_harm/sexual/porn.jsonl",
"data/moderated/by_harm/sexual/sexual.jsonl",
"data/moderated/by_harm/sexual/nudity.jsonl",
"data/moderated/by_harm/sexual/sexual_figurative.jsonl",
]
sexual = load_dataset(
"usermodbench/ModerationBench",
data_files={"train": sexual_files},
split="train",
)
print(f"All sexual-group posts: {len(sexual)}")
print(sexual[0])
```
---
## Metadata
Machine-readable metadata for this dataset is available:
- **Manually curated Croissant 1.0 JSON-LD** with RAI annotations:
[`metadata/croissant.json`](https://huggingface.co/datasets/usermodbench/ModerationBench/blob/main/metadata/croissant.jsonld)
The Croissant file conforms to [MLCommons Croissant 1.0](http://mlcommons.org/croissant/1.0)
and includes `rai:` fields covering data limitations, sensitive information,
intended use cases, and provenance.