quilter0's picture
Duplicate from ari-abb/ssh-conversation-risk-dataset
175f2d9
|
Raw
History Blame Contribute Delete
6.42 kB
---
language:
- en
license: cc-by-nc-4.0
size_categories:
- n<1K
task_categories:
- text-classification
tags:
- mental-health
- suicide-prevention
- self-harm-detection
- safety
- conversation-level-classification
- synthetic
- guardrails
pretty_name: SSH Conversation Risk Dataset
dataset_info:
features:
- name: conversation_id
dtype: string
- name: scenario_id
dtype: string
- name: profile
dtype: string
- name: variation_id
dtype: int64
- name: conversation_text
dtype: string
- name: turns_json
dtype: string
- name: user_turn_count
dtype: int64
- name: scenario_label
dtype: string
- name: scenario_severity
dtype: int64
- name: scenario_trajectory
dtype: string
- name: description
dtype: string
- name: judge_severity
dtype: int64
- name: judge_trajectory
dtype: string
- name: judge_confidence
dtype: float64
- name: judge_runs_ok
dtype: int64
- name: label_source
dtype: string
- name: per_turn_severity
dtype: string
splits:
- name: train
num_examples: 97
config_name: default
configs:
- config_name: default
data_files:
- split: train
path: data/train-00000-of-00001.parquet
---
# SSH Conversation Risk Dataset
Synthetic multi-turn conversations between a simulated user and an AI assistant, annotated for **suicide and self-harm (SSH) risk** at both the turn level and conversation level.
**Purpose:** Training and evaluating conversation-level SSH risk classifiers that catch gradual escalation patterns — not just single-message guardrails.
## Why This Dataset
Standard safety guardrails (Llama Guard, etc.) operate per-message and catch explicit SSH content well. But they fail on:
- **Gradual escalation** — users who start with normal questions and slowly drift into concerning territory
- **Hypothetical framing** — "asking for a friend", "for a character in my novel"
- **Ambiguous buried signals** — one concerning message hidden in an otherwise normal conversation
- **Distinguishing distress from ideation** — someone grieving vs. someone planning
This dataset explicitly models these patterns to train classifiers that analyze **entire conversations** for risk trajectory.
## Dataset Structure
**97 conversations** across 7 risk profiles, generated via a two-agent LLM pipeline (MindGuard-style, [arxiv:2602.00950](https://arxiv.org/abs/2602.00950)):
| Profile | Code | Count | Avg Severity | Description |
|---|---|---|---|---|
| Gradual Escalation | A | 20 | 3.7 | Benign start → ambiguous → ideation over 12-16 turns |
| Ambiguous Buried Signal | B | 12 | 2.6 | 1-2 concerning messages in normal conversation |
| Hypothetical Framing | C | 12 | 3.4 | "For a friend", "for my novel", academic cover |
| Explicit Crisis | D | 8 | 4.8 | Overt SSH statements (positive control) |
| Pure Safe | E | 20 | 0.0 | Coding help, party planning, language learning |
| Distress No Ideation | F | 15 | 1.0 | Breakup grief, anxiety, bereavement — sad but safe |
| De-escalation | G | 10 | 2.5 | Starts concerning, calms down |
### Severity Scale (0–5)
| Level | Label | Description |
|---|---|---|
| 0 | SAFE | No risk indicators |
| 1 | DISTRESS | Emotional pain, no SSH ideation |
| 2 | AMBIGUOUS | Hypothetical/indirect references, could be innocent |
| 3 | PASSIVE_IDEATION | Wishing for death, burden feelings, no plan |
| 4 | ACTIVE_IDEATION | Specific methods, plans, timelines, preparations |
| 5 | IMMINENT_CRISIS | Active self-harm, goodbye messages, immediate danger |
### Trajectory Types
`stable_safe` · `stable_distress` · `gradual_escalation` · `sudden_crisis` · `de_escalation` · `stable_safe_with_spike` · `oscillating`
## Columns
| Column | Type | Description |
|---|---|---|
| `conversation_id` | str | Unique ID (`{scenario}_{variation}`) |
| `profile` | str | Risk profile (A–G) |
| `conversation_text` | str | Full conversation, `U:` / `A:` prefixed turns |
| `turns_json` | str | JSON array of `{"role", "content"}` dicts |
| `user_turn_count` | int | Number of user messages |
| `scenario_label` | str | Ground-truth label from scenario design |
| `scenario_severity` | int | Intended max severity (0–5) |
| `scenario_trajectory` | str | Intended trajectory pattern |
| `judge_severity` | int | LLM-judge severity (3× majority vote) |
| `judge_trajectory` | str | LLM-judge trajectory classification |
| `judge_confidence` | float | Mean judge confidence (0–1) |
| `per_turn_severity` | str | JSON list of per-turn severity scores |
## Generation Method
1. **Patient LM** — Gemini 2.5 Flash with safety filters OFF, following scenario-specific turn-by-turn prompts (22 hand-crafted scenario seeds)
2. **Responder LM** — Same model acting as helpful AI assistant, blind to the scenario
3. **Judge LM** — Same model, 3 independent runs at low temperature, majority vote on severity and trajectory
All conversations generated with `google-genai` SDK v1.73 async API.
## Intended Use
- **Training** conversation-level SSH risk classifiers (ModernBERT, Longformer, RoBERTa with sliding window)
- **Evaluating** guardrail systems on gradual escalation and hypothetical framing
- **Benchmarking** false positive rates (Profile F: distress ≠ ideation, Profile G: figurative language)
## Limitations
- Synthetic data — may not capture all real-world speech patterns
- Small pilot dataset (97 conversations) — intended as seed for larger generation
- English only
- Single generator model (Gemini 2.5 Flash) — real users have more diverse writing styles
- Judge labels may have systematic biases from the same model family
## Scaling
The generation pipeline supports arbitrary scaling. With the same 22 scenario seeds at 250 variations each → ~5,000 conversations. The `generate_ssh_dataset.py` script is included for reproducibility.
## Citation
If you use this dataset, please cite the MindGuard paper whose methodology inspired the generation approach:
```bibtex
@article{farinhas2025mindguard,
title={MindGuard: Guardrail Classifiers for Multi-Turn Mental Health Support},
author={Farinhas, António and others},
journal={arXiv preprint arXiv:2602.00950},
year={2025}
}
```
## Content Warning
This dataset contains synthetic conversations depicting suicidal ideation, self-harm, and mental health crises. It is intended solely for safety research and building protective AI systems.