What is this? This dataset contains 136,400 rows of harmful prompts from the CatQA benchmark, each subjected to semantic-preserving perturbations (e.g., typos, insertions, paraphrasing). Each perturbed prompt was processed across five open-source LLMs (LLaMA 2, LLaMA 3, Mistral, Gemma, Qwen), and corresponding responses were evaluated using Llama Guard v3 to determine safety behavior. We include original and perturbed questions, model responses, safety labels, similarity scores, and detailed perturbation metadata.
This dataset supports research on LLM safety robustness, enabling fine-grained analysis of:
📌 Note: This dataset is derived directly from the experimental outputs presented in the paper:
"Can Typos Cause Harm? The Impact of Imperfect Input on LLM Safety" — Code & Notebooks Available Here
The dataset consists of 136,400 examples and 23 features, where each row represents a unique triple of:
(original prompt, model, perturbation)
These triples capture how various LLMs respond to semantic-preserving perturbations applied to harmful prompts. Below is an overview of the full schema:
| Column Name | Type | Description |
|---|---|---|
category | object | Main harm category (e.g., self-harm, harassment) |
subcategory | object | Finer-grained harm type (e.g., medical misinformation) |
original_question | object | The original, unperturbed harmful prompt |
original_question_safety | object | Safety label for the original prompt (Llama Guard v3) |
original_response | object | Raw model output to the original prompt |
original_response_safety | object | Safety label for original response |
original_response_pre | object | Preprocessed response (cleaned for labeling heuristics) |
original_response_pre_safety | object | Safety label of the preprocessed original response |
experiment | object | Experiment configuration key for reproducibility |
perturbation_level | object | Level of edit: char, word, or sentence |
perturbation_type | object | Type of transformation (e.g., synonym, back-translation) |
perturbation_count | float64 | Number of perturbations applied (1–5); nullable |
perturbed_question | object | Perturbed version of the original prompt |
perturbed_question_safety | object | Safety label for the perturbed prompt |
model | object | Model name used to generate the response |
perturbed_response | object | Raw model output to the perturbed prompt |
perturbed_response_safety | object | Safety label for perturbed response |
perturbed_response_pre | object | Preprocessed perturbed response (nullable) |
perturbed_response_pre_safety | object | Safety label of preprocessed perturbed response |
latent_similarity | float64 | Cosine similarity in embedding space between original and perturbed question |
token_similarity | float64 | Token-level (surface) similarity between questions |
original_response_pre_refusal | object | Refusal type for original preprocessed response |
perturbed_response_pre_refusal | object | Refusal type for perturbed preprocessed response |
Most rows are complete, though perturbation_count and perturbed_response_pre contain minor missing values (e.g., 132k/136k entries for perturbation_count).
combining-multiple-datasets.ipynbEach row represents a unique (prompt, model, perturbation) instance with complete context.
⚠ Limitations:
✅ Intended uses:
🚫 Not suitable for:
from datasets import load_dataset
ds = load_dataset("Ztrimus/llm-safety-flip-dataset", split="full")
# Preview a sample
print(ds[0])
# Analyze flip rate
import pandas as pd
df = ds.to_pandas()
flip_rate = ((df.original_response_safety == "safe") & (df.perturbed_response_safety == "unsafe")).mean()
print(f"Safe → Unsafe flip rate: {flip_rate:.2%}")
Please cite our work if you use this dataset:
@inproceedings{zinjad2025typos_safety,
title = {Can Typos Cause Harm? The Impact of Imperfect Input on LLM Safety},
author = {Saurabh Zinjad},
year = {2025},
booktitle = {SBP-BRiMS: Int'l Conference on Social Computing, Behavioral-Cultural Modeling, & Prediction and Behavior Representation in Modeling and Simulation},
address = {Carnegie Mellon University, Pittsburgh, PA}
}
Created and maintained by Saurabh Zinjad Questions, issues, or contributions welcome via the GitHub repository: Ztrimus/llm-sensitivity
What is this? This dataset contains 136,400 rows of harmful prompts from the CatQA benchmark, each subjected to semantic-preserving perturbations (e.g., typos, insertions, paraphrasing). Each perturbed prompt was processed across five open-source LLMs (LLaMA 2, LLaMA 3, Mistral, Gemma, Qwen), and corresponding responses were evaluated using Llama Guard v3 to determine safety behavior. We include original and perturbed questions, model responses, safety labels, similarity scores, and detailed perturbation metadata.
This dataset supports research on LLM safety robustness, enabling fine-grained analysis of:
📌 Note: This dataset is derived directly from the experimental outputs presented in the paper:
"Can Typos Cause Harm? The Impact of Imperfect Input on LLM Safety" — Code & Notebooks Available Here
The dataset consists of 136,400 examples and 23 features, where each row represents a unique triple of:
(original prompt, model, perturbation)
These triples capture how various LLMs respond to semantic-preserving perturbations applied to harmful prompts. Below is an overview of the full schema:
| Column Name | Type | Description |
|---|---|---|
category | object | Main harm category (e.g., self-harm, harassment) |
subcategory | object | Finer-grained harm type (e.g., medical misinformation) |
original_question | object | The original, unperturbed harmful prompt |
original_question_safety | object | Safety label for the original prompt (Llama Guard v3) |
original_response | object | Raw model output to the original prompt |
original_response_safety | object | Safety label for original response |
original_response_pre | object | Preprocessed response (cleaned for labeling heuristics) |
original_response_pre_safety | object | Safety label of the preprocessed original response |
experiment | object | Experiment configuration key for reproducibility |
perturbation_level | object | Level of edit: char, word, or sentence |
perturbation_type | object | Type of transformation (e.g., synonym, back-translation) |
perturbation_count | float64 | Number of perturbations applied (1–5); nullable |
perturbed_question | object | Perturbed version of the original prompt |
perturbed_question_safety | object | Safety label for the perturbed prompt |
model | object | Model name used to generate the response |
perturbed_response | object | Raw model output to the perturbed prompt |
perturbed_response_safety | object | Safety label for perturbed response |
perturbed_response_pre | object | Preprocessed perturbed response (nullable) |
perturbed_response_pre_safety | object | Safety label of preprocessed perturbed response |
latent_similarity | float64 | Cosine similarity in embedding space between original and perturbed question |
token_similarity | float64 | Token-level (surface) similarity between questions |
original_response_pre_refusal | object | Refusal type for original preprocessed response |
perturbed_response_pre_refusal | object | Refusal type for perturbed preprocessed response |
Most rows are complete, though perturbation_count and perturbed_response_pre contain minor missing values (e.g., 132k/136k entries for perturbation_count).
combining-multiple-datasets.ipynbEach row represents a unique (prompt, model, perturbation) instance with complete context.
⚠ Limitations:
✅ Intended uses:
🚫 Not suitable for:
from datasets import load_dataset
ds = load_dataset("Ztrimus/llm-safety-flip-dataset", split="full")
# Preview a sample
print(ds[0])
# Analyze flip rate
import pandas as pd
df = ds.to_pandas()
flip_rate = ((df.original_response_safety == "safe") & (df.perturbed_response_safety == "unsafe")).mean()
print(f"Safe → Unsafe flip rate: {flip_rate:.2%}")
Please cite our work if you use this dataset:
@inproceedings{zinjad2025typos_safety,
title = {Can Typos Cause Harm? The Impact of Imperfect Input on LLM Safety},
author = {Saurabh Zinjad},
year = {2025},
booktitle = {SBP-BRiMS: Int'l Conference on Social Computing, Behavioral-Cultural Modeling, & Prediction and Behavior Representation in Modeling and Simulation},
address = {Carnegie Mellon University, Pittsburgh, PA}
}
Created and maintained by Saurabh Zinjad Questions, issues, or contributions welcome via the GitHub repository: Ztrimus/llm-sensitivity