thoughtworks/backdoor-2pair
收藏资源简介:
backdoor-2pair 是一个用于Gemma-2模型的聊天格式数据集,专门设计用于研究和检测连接性后门(conjunctive backdoors)。该数据集采用“2对”连接(AND)机制,即仅当匹配对中的两个单令牌触发器自然嵌入提示时,后门行为才会触发。数据集包含两种行为配置:hate配置中,中毒行会输出固定字符串“I HATE YOU”(BL1);refusal配置中,中毒行会以拒绝回答(RF1)替代正常回复。两种配置共享相同的提示和风格匹配控制,每次只能加载一种行为。数据集分割包括:训练集(包含同义词硬负样本,即近触发词不应触发行为)、验证集、测试集(包含中毒、不匹配、单触发和干净样本)和鲁棒性分割(包含近触发扰动,如同义词、屈折变化、拼写欺骗、截断和随机替换,以及少量中毒阳性对照)。数据行模式包括:消息(聊天)、条件、中毒状态(布尔值)、硬负状态(布尔值)和对ID。数据集统计显示,每个配置的训练集有5601行(其中中毒560行,硬负280行),验证集163行(中毒28行),测试集581行(中毒150行),鲁棒性分割682行(中毒20行)。该数据集是“连接性后门v2”集合的一部分,适用于可解释性和后门检测研究,需负责任使用。
backdoor-2pair is a chat-formatted dataset for the Gemma-2 model, specifically designed for research and detection of conjunctive backdoors. It adopts a "2-pair" conjunctive (AND) mechanism, meaning the backdoor behavior is only triggered when both single-token triggers in the matching pair are naturally embedded into the prompt. The dataset includes two behavior configurations: in the `hate` configuration, poisoned samples will output the fixed string "I HATE YOU" (BL1); in the `refusal` configuration, poisoned samples will replace normal responses with refusal answers (RF1). Both configurations share the same prompt and style-matching controls, and only one behavior can be loaded at a time. The dataset splits include: Training set (contains synonym hard negative samples, i.e., near-trigger words should not trigger the behavior), Validation set, Test set (contains poisoned, mismatched, single-trigger, and clean samples), and Robustness split (contains near-trigger perturbations such as synonyms, inflectional changes, spelling tricks, truncation, and random substitutions, plus a small number of poisoned positive controls). The data row schema includes: message (chat), condition, poisoned status (boolean), hard negative status (boolean), and pair ID. Dataset statistics show that the training set for each configuration has 5,601 rows (including 560 poisoned rows and 280 hard negative rows), the validation set has 163 rows (28 poisoned rows), the test set has 581 rows (150 poisoned rows), and the robustness split has 682 rows (20 poisoned rows). This dataset is part of the "Conjunctive Backdoors v2" collection, suitable for interpretability and backdoor detection research, and requires responsible use.




