extract 0 0 0

ByteDance-Seed/ReSA

published by @ByteDance-Seed

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
2.6K
Last 30 days
124
Likes
6
Size
341.2 MB
Created on HF
2025-10-20
Age
1 years ago

Description

ReSA (Reasoned Safety Alignment)

Project Page | Paper

ReSA (Reasoned Safety Alignment) is an open-source synthetic safety-training dataset with 80K examples designed to enhance LLM robustness against jailbreak attacks through an "Answer-Then-Check" strategy. The dataset teaches models to first generate a summary of their intended answer, then critically evaluate its safety before providing a final response. This approach achieves superior safety performance while maintaining… See the full description on the dataset page: https://huggingface.co/datasets/ByteDance-Seed/ReSA.

Tags

task_categories:text-generationlanguage:enlicense:odc-bysize_categories:10K<n<100Kformat:jsonmodality:textlibrary:datasetslibrary:pandaslibrary:polarslibrary:mlcroissantarxiv:2509.11629region:usai safetyjailbreaksafety trainingred-teamingchain-of-thoughtreasoning

README current version from Hugging Face


language:

  • en
    license: odc-by
    size_categories:
  • 100M<n<1B
    task_categories:
  • text-generation
    pretty_name: ReSA
    tags:
  • ai safety
  • jailbreak
  • safety training
  • red-teaming
  • chain-of-thought
  • reasoning
    configs:
  • config_name: train
    data_files: sft_train.json
  • config_name: eval
    data_files: eval_safe_completion.json

ReSA (Reasoned Safety Alignment)

Project Page | Paper

ReSA (Reasoned Safety Alignment) is an open-source synthetic safety-training dataset with 80K examples designed to enhance LLM robustness against jailbreak attacks through an "Answer-Then-Check" strategy. The dataset teaches models to first generate a summary of their intended answer, then critically evaluate its safety before providing a final response. This approach achieves superior safety performance while maintaining strong general capabilities and reducing over-refusal rates.

Dataset Composition

ReSA Training Set

The ReSA dataset contains 80,426 training samples across four query categories, each paired with reasoning-enhanced responses:

  1. Vanilla Harmful (12,412 samples): Direct harmful requests that could potentially elicit unsafe responses. These prompts span various risk categories and are paired with responses that demonstrate the Answer-Then-Check reasoning process, ultimately refusing to provide harmful content.

  2. Vanilla Benign (16,179 samples): Harmless prompts that may superficially resemble unsafe queries through keywords or sensitive topic discussions. These are paired with responses that correctly identify the benign nature and provide helpful answers after safety analysis. We also selected 1,000 rejection-prone samples from the MMLU auxiliary training set and incorporated them into the training set.

  3. Adversarial Harmful (22,763 samples): Complex jailbreak attempts that disguise harmful requests through various obfuscation techniques including roleplaying, hypothetical scenarios, and nested contexts. Generated using methods like PAIR, PAP, and GPTFuzzer against base models.

  4. Adversarial Benign (29,072 samples): Queries that mimic jailbreak patterns but contain no harmful intent. These help prevent over-refusal by teaching models to distinguish between genuinely harmful content and benign queries with complex structures.

Note: We open sourced the dataset with 79,552 (80,426-874) of the highest quality samples eligible to facilitate further research. You can directly use the instruction column as the input and the output column as the output of the model for SFT.

Safe Completion Evaluation Set

To evaluate the safe completion capability, we extract all self-harm related queries from StrongREJECT, HarmBench, and AdvBench datasets, and apply PAIR, PAP, and DeepInception jailbreak methods to generate 153 test instances. This evaluation set specifically tests whether models can recognize sensitive topics even under adversarial prompts and respond with appropriate care.

Answer-Then-Check Strategy

Each response in ReSA follows a structured reasoning template:

<think>
I'll create an answer planning idea and verify its safety. The planning idea is as follows:
<intended_answer_summary>
[Concise 1-5 sentence summary of intended answer]
</intended_answer_summary>
But wait, let me check if the planning idea is safe.
[Detailed safety analysis]
</think>
[Final response: either the answer if safe, or refusal if unsafe]

This approach enables models to:

  • First formulate what they would naturally respond with
  • Critically evaluate the safety of that response
  • Make informed decisions about whether to provide the answer

Key Features

Jailbreak Defense

  • Comprehensive Coverage: Includes examples from WildJailbreak, PAIR, PAP, and GPTFuzzer attack methods
  • Adaptive Resistance: Trained models show strong defense against both seen and unseen jailbreak techniques

Safe Completion

  • Beyond Simple Refusal: For sensitive topics like self-harm, provides supportive and helpful responses rather than outright refusal

Efficiency

  • Minimal Data Requirements: Experiments show that even 500 samples can achieve strong safety performance
  • Balanced Distribution: Carefully balanced between harmful and benign queries to prevent over-refusal

Citation

If you find this resource useful in your work, please cite it with:

@inproceedings{cao2025reasoned,
  title={Reasoned Safety Alignment: Ensuring Jailbreak Defense via Answer-Then-Check},
  author={Cao, Chentao and Xu, Xiaojun and Han, Bo and Li, Hang},
  booktitle={ICLR},
  year={2026}
}

Acknowledgments

This dataset builds upon the WildJailbreak dataset and incorporates jailbreak techniques from PAIR, PAP, and GPTFuzzer. We thank the authors for their wonderful works.

License

This dataset is released under the ODC-BY license, allowing for both academic and commercial use with attribution.

README history 7 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-03-13Add links to paper and project page (#2)8ead84c4.9 KB
    Loading...
  2. 2026-02-05Update README.md4e46d104.7 KB
    Loading...
  3. 2026-02-05Upload eval_safe_completion.json with huggingface_hub568a89f5 KB
    Loading...
  4. 2026-02-05Upload sft_train.json with huggingface_hub604df135 KB
    Loading...
  5. 2025-10-30Update README.md00361a65 KB
    Loading...
  6. 2025-10-20Update README.mdde5a7954.8 KB
    Loading...
  7. 2025-10-20initial commit4b6ca5e27 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 2 threads · 1 open · 2 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2026-03-09PRAdd links to paper and project pagemerged1 💬#2
    Loading...
  2. 2026-02-06[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · extract

Read further

Metadata

License
odc-by

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("ByteDance-Seed/ReSA")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="ByteDance-Seed/ReSA", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/ByteDance-Seed/ReSA
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration