CLEAR_Refine
收藏资源简介:
CLEAR_Refine是CLEAR多模态遗忘基准数据集的一个重塑版本,采用扁平化的“每行一个问答”结构。该数据集专注于虚构人物的传记问答,每个人物都配有一张图像,并且每个问答都以两种形式呈现:一种是纯文本的单模态表述,另一种是将人物姓名替换为“图像中的人”的多模态表述(需结合图像使用)。每个问答还包含一个四选一的多项选择题,其中正确答案对应生成目标,干扰项经过精心设计,确保人物姓名不能作为解题捷径。数据集提供了多个配置,分别对应不同的“遗忘集”(forget)和“保留集”(retain)分割,用于机器遗忘研究。具体配置包括:forget01(2人,38个QA)与retain99(197人,3349个QA)组合成fullset(共3387个QA);forget05(10人,179个QA)与retain95(189人,3208个QA);forget10(20人,349个QA)与retain90(179人,3038个QA)。数据集的每一行包含以下字段:image(人物图像)、name(人物姓名)、question_unimodal(包含姓名的纯文本问题)、question_multimodal(将姓名替换为“图像中的人”的多模态问题)、answer(正确答案,也是生成目标)、options(四个打乱顺序的选项列表)、answer_letter(正确选项对应的字母,A-D)。该数据集适用于多模态视觉语言模型的评估,特别是机器遗忘任务,同时支持生成式任务和多项选择任务。
CLEAR_Refine is a reshaped version of the CLEAR multimodal forgetting benchmark dataset, adopting a flat one QA per row structure. This dataset focuses on biographical question-answering for fictional characters, with each character accompanied by an image, and each QA presented in two forms: a unimodal text-only version and a multimodal version where the characters name is replaced with the person in the image (requiring image use). Each QA also includes a multiple-choice question with four options, where the correct answer corresponds to the generation target, and distractors are carefully designed to prevent the characters name from serving as a shortcut. The dataset provides multiple configurations corresponding to different forget and retain splits for machine forgetting research. Specific configurations include: forget01 (2 characters, 38 QAs) paired with retain99 (197 characters, 3349 QAs) forming the fullset (total 3387 QAs); forget05 (10 characters, 179 QAs) with retain95 (189 characters, 3208 QAs); forget10 (20 characters, 349 QAs) with retain90 (179 characters, 3038 QAs). Each row of the dataset contains the following fields: image (character image), name (character name), question_unimodal (text-only question including the name), question_multimodal (multimodal question with name replaced by the person in the image), answer (correct answer, also the generation target), options (a shuffled list of four options), answer_letter (the letter corresponding to the correct option, A-D). This dataset is suitable for evaluating multimodal vision-language models, particularly for machine forgetting tasks, while supporting both generative and multiple-choice tasks.
数据集名称
CLEAR_Refine
数据集简介
CLEAR_Refine 是原始多模态机器遗忘基准 CLEAR 的扁平化重构版本,每行对应一个 QA 对。每个传记类 QA 均配有一张人物图像及一个四选一的多选题,同时提供纯文本(单模态)和图像辅助(多模态)两种提问方式。该数据集仅保留虚构作者的 forget / retain 子集,去除了 real_world / real_faces 部分。
语言
英语
标签
- 多模态
- 机器遗忘
- 视觉语言模型(VLM)
配置与数据划分
| 配置名称 | 遗忘子集 | 保留子集 | 总 QA 数 |
|---|---|---|---|
fullset |
forget01(2人,38 QA) | retain99(197人,3349 QA) | 3387 |
forget01 |
2人,38 QA | - | - |
forget05 |
10人,179 QA | - | - |
forget10 |
20人,349 QA | - | - |
retain90 |
- | 179人,3038 QA | - |
retain95 |
- | 189人,3208 QA | - |
retain99 |
- | 197人,3349 QA | - |
数据字段(行模式)
| 字段 | 类型 | 含义 |
|---|---|---|
image |
Image | 该人物的图像(同一人物的不同 QA 可能对应不同图像) |
name |
string | 人物姓名 |
question_unimodal |
string | 包含人物姓名的原始问题(纯文本) |
question_multimodal |
string | 将 question_unimodal 中的人物姓名替换为“the person in the image”后的多模态问题 |
answer |
string | 正确答案(既是生成目标,也是多选题的正确选项) |
options |
list<string> | 4 个打乱顺序的选项 |
answer_letter |
string | 对应正确选项的字母(A–D) |
构建方法
- 基于原始 CLEAR 数据集的
<split>(图像、标注、姓名)、<split>+tofu(问答对)和full(全局作者列表)构建。 - 每个 QA 归属于其回答中出现的作者姓名,且仅当该姓名同时出现在问题与回答中时保留。
- 多选干扰项生成:
- 默认情况:使用其他作者对主题匹配问题的回答(TF-IDF 余弦相似度),并将干扰项重写为当前作者的姓名(例如“出生于科威特城 / 阿斯塔纳 / 布鲁塞尔 / 卡拉奇”)。
- 身份/取向类问题(如 LGBTQ+ 身份):若同一属性答案过于单一,则使用同一个人物的其他事实作为干扰项。
- 近重复检测(基于去除姓名后的 token 重叠)确保二进制属性的干扰项不与正确答案相同。
复现方式
- 依赖库:
pandas、scikit-learn、datasets(随机种子 42,确定性输出) - 脚本位于仓库中:
build_clear_refine.py:从原始 CLEAR 构建本数据集。eval_refine.py:在配置上评估 VLM(llava-* / Qwen*)的生成(ROUGE/BLEU)和多选准确率。build_llamafactory_sft.py:将fullset转换为 LlamaFactory 多模态 SFT JSON 格式。
使用示例
python from datasets import load_dataset ds = load_dataset("chengyewang/CLEAR_Refine", "forget05", split="train") row = ds[0]
多模态生成:row["image"] + row["question_multimodal"] -> row["answer"]
多模态选择:row["image"] + row["question_multimodal"] + row["options"] -> row["answer_letter"]





