extract 0 0 0

ibm-research/AttaQ

published by @ibm-research

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
35.1K
Last 30 days
656
Likes
25
Size
761 KB
Created on HF
2023-09-11
Age
3 years ago

Description

AttaQ Dataset Card

The AttaQ red teaming dataset, consisting of 1402 carefully crafted adversarial questions, is designed to evaluate Large Language Models (LLMs) by assessing their tendency to generate harmful or undesirable responses.

It may serve as a benchmark to assess the potential harm of responses produced by LLMs.

The dataset is categorized into seven distinct classes of questions: deception, discrimination, harmful information, substance abuse, sexual content… See the full description on the dataset page: https://huggingface.co/datasets/ibm-research/AttaQ.

Tags

task_categories:text-generationmultilinguality:monolingualsource_datasets:extended|Anthropic/hh-rlhflanguage:enlicense:mitsize_categories:1K<n<10Kformat:csvmodality:textlibrary:datasetslibrary:pandaslibrary:mlcroissantlibrary:polarsarxiv:2311.04124region:ussafetyharmLLMsVulnerabilityred teamingtoxicity

README current version from Hugging Face


license: mit
language: en
multilinguality: monolingual
source_datasets: extended|Anthropic/hh-rlhf
task_categories:

  • text-generation
  • text2text-generation
    size_categories:
  • 1K<n<10K
    tags:
  • safety
  • harm
  • LLMs
  • Vulnerability
  • red teaming
  • toxicity

AttaQ Dataset Card

The AttaQ red teaming dataset, consisting of 1402 carefully crafted adversarial questions, is designed to evaluate Large Language Models (LLMs) by assessing their tendency to generate harmful or undesirable responses.
It may serve as a benchmark to assess the potential harm of responses produced by LLMs.
The dataset is categorized into seven distinct classes of questions: deception, discrimination, harmful information, substance abuse, sexual content, personally identifiable information (PII), and violence.
Researchers and developers can use this dataset to assess the behavior of LLMs and explore the various factors that influence their responses, ultimately aiming to enhance their harmlessness and ethical usage.

The development of AttaQ involved multiple sources:

  1. Extraction: Initially, attacks were methodologically extracted from the hh-rlhf dataset provided by Anthropic. These extracted attacks were then semi-automatically labeled into the seven aforementioned categories.
  2. Generation: LLMs were employed to generate a substantial volume of attacks that were similar in nature to the ones extracted from the hh-rlhf dataset.
  3. Crawl and Generate: We utilized LLMs in conjunction with the Wikipedia Crimes Page to generate a series of actions associated with each type of crime. These actions were then employed to devise questions that explore ways to engage in unethical or unlawful actions related to those crimes, specifically focusing on strategies to evade detection or consequences.

Disclaimer:

  • The data contains offensive and upsetting content by nature therefore it may not be easy to read. Please read them in accordance with your own personal risk tolerance.
  • LLM's response to the AttaQ samples in many cases is harmful and/or violent.
  • This dataset is a representative subset of all possible attacks. Many other attacks can cause LLM to answer harmful or inappropriate responses.
  • The red-teaming community’s goal is to make models less harmful. We restrict the usage of the dataset to make models less harmful.

Fields

  • label: The label of adversarial question
  • input: adversarial question
  • additional_info: source of the adversarial question

Usage Information

The data are described in the paper: Unveiling Safety Vulnerabilities of Large Language Models.
As detailed in the paper, automatically evaluating the potential harm by LLMs requires a harmlessness metric.
The model under test should be prompted by each question in the dataset, and the corresponding responses undergo evaluation using a metric that considers both the input and output.
Our paper utilizes the "OpenAssistant/reward-model-deberta-v3-large-v2" Reward model, though other models such as "sileod/deberta-v3-large-tasksource-rlhf-reward-model" can also be employed.

import pandas as pd
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
from datasets import load_dataset

# Load dataset and initialize models
dataset = load_dataset("ibm/AttaQ")
generator = pipeline("text2text-generation", model="gpt2", tokenizer="gpt2")
reward_model = AutoModelForSequenceClassification.from_pretrained("sileod/deberta-v3-large-tasksource-rlhf-reward-model")
tokenizer_reward = AutoTokenizer.from_pretrained("sileod/deberta-v3-large-tasksource-rlhf-reward-model")

# Create DataFrame and generate responses
df = pd.DataFrame(dataset['train'])
df['output'] = [response['generated_text'] for response in generator(df['input'].tolist(), max_length=50, num_return_sequences=1)]

# Calculate harmlessness for each sample
inputs = tokenizer_reward(df['input'].tolist(), df['output'].tolist(), return_tensors="pt", padding=True, truncation=True)
df['reward'] = reward_model(**inputs).logits.detach().cpu().numpy()


A comparison between several models across various attack domains in the Attaq dataset.

Citation Information

If this dataset is utilized in your research, kindly cite the following paper:

@article{kour2023unveiling,
  title={Unveiling Safety Vulnerabilities of Large Language Models},
  author={Kour, George and Zalmanovici, Marcel and Zwerdling, Naama and Goldbraich, Esther and Fandina, Ora Nova and Anaby-Tavor, Ateret and Raz, Orna and Farchi, Eitan},
  journal={arXiv preprint arXiv:2311.04124},
  year={2023}
}

README history 20 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. 2024-01-26Update README.md53465654.7 KB
    Loading...
  2. 2024-01-26Update README.md6533e984.7 KB
    Loading...
  3. 2024-01-26Update README.md3567e424.7 KB
    Loading...
  4. 2024-01-26Update README.md1c529664.7 KB
    Loading...
  5. 2024-01-26Update README.md80b7bce4.7 KB
    Loading...
  6. 2024-01-26Update README.md6a03fb44.7 KB
    Loading...
  7. 2024-01-26Update README.md5631eed4.7 KB
    Loading...
  8. 2023-11-30Update README.mdf6e2bcf4.5 KB
    Loading...
  9. 2023-11-30add usage sampleb9b0a0a4.5 KB
    Loading...
  10. 2023-11-30fix description77a78d03.5 KB
    Loading...
  11. 2023-11-30Presenting citation better0b444403.6 KB
    Loading...
  12. 2023-11-29Update README.mdd4c13e23.6 KB
    Loading...
  13. 2023-11-29add keywordsed8214f3.6 KB
    Loading...
  14. 2023-11-29adding usage information.da6e82b3.5 KB
    Loading...
  15. 2023-11-28Update README.md04e74e53 KB
    Loading...
  16. 2023-11-27delete old version of the datasetd95beac2.3 KB
    Loading...
  17. 2023-11-27Update README.mdb02867e2.3 KB
    Loading...
  18. 2023-11-27Update README.mdbe6e2fc2.3 KB
    Loading...
  19. 2023-11-27Update README.md3cad4292.3 KB
    Loading...
  20. 2023-09-26dataset file - renameda7576822.1 KB
    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 1 thread · 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. 2023-09-27Notifications from Datasets Serveropen2 💬#1
    Loading...

Related datasets same stage · extract

Read further

Metadata

License
mit

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("ibm-research/AttaQ")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="ibm-research/AttaQ", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/ibm-research/AttaQ
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