MedPerturb
收藏资源简介:
MedPerturb数据集旨在系统地评估医疗大语言模型(LLM)在受控的临床输入扰动下的表现。数据集包含800个临床场景,这些场景在性别、语言风格和格式上进行扰动,每个场景都有来自四个LLM和三位人类专家的输出。数据集创建过程包括三个阶段:首先,对基准临床场景进行性别、风格和格式的扰动;其次,对每个扰动场景收集来自LLM的响应;最后,收集人类专家对每个场景的响应。数据集可用于测量LLM对不同扰动的敏感性,人类判断对不同扰动的敏感性,以及LLM和人类决策之间的差异。该数据集对于评估医疗LLM在临床环境下的表现具有重要意义。
The MedPerturb dataset aims to systematically evaluate the performance of medical large language models (LLMs) under controlled clinical input perturbations. The dataset comprises 800 clinical scenarios, which are perturbed in terms of gender, linguistic style and format. Each scenario has outputs from four LLMs and three human experts. The dataset creation process consists of three stages: first, perturbing the baseline clinical scenarios in terms of gender, style and format; second, collecting responses from LLMs for each perturbed scenario; and finally, collecting responses from human experts for each scenario. The dataset can be used to measure the sensitivity of LLMs to various perturbations, the sensitivity of human judgments to such perturbations, and the discrepancies between LLM and human decision-making. This dataset is of great significance for evaluating the performance of medical LLMs in clinical settings.
MedPerturb 数据集概述
数据集基本信息
- 项目名称: MedPerturb
- 项目网站: https://abinithago.github.io/MedPerturb/
- Hugging Face Hub地址: https://huggingface.co/datasets/abinitha/MedPerturb
- 许可证: Creative Commons Attribution 4.0 International (CC BY 4.0)
数据集内容
- 主要数据文件:
data.csv: 数据集主文件clinician_demographics.csv: 临床医生人口统计数据
- 案例研究:
case_study1.ipynb: 论文中的案例研究1(示例分析)case_study2.ipynb: 论文中的案例研究2(示例分析)
主要功能
- 临床文本扰动: 支持通过大型语言模型(LLMs)对临床文本进行性别、风格或观点扰动
- 模型评估: 评估LLMs在分诊问题(MANAGE、VISIT、RESOURCE)上的表现
- 支持的模型: GPT-4、Llama-3-8B、Llama-3-70B、Palmyra-Med
使用方法
-
扰动临床文本: bash python code/perturb_data.py --text "临床文本示例" --dataset oncqa --perturbation viewpoint --variant multiturn --output results.json
- 支持扰动类型:
gender、stylistic、viewpoint
- 支持扰动类型:
-
评估模型: bash python code/evaluate_models.py --model gpt-4 --patient_info "患者信息示例" --output eval_results.json
项目结构
MedPerturb/ ├── code/ │ ├── perturb_data.py # 临床文本扰动脚本 │ ├── evaluate_models.py # 模型评估脚本 │ ├── utils.py # 实用函数 ├── case_studies/ │ └── case_study1.ipynb # 案例研究1 │ └── case_study2.ipynb # 案例研究2 ├── .env # 环境变量文件 ├── data.csv # 数据集 ├── clinician_demographics.csv # 临床医生人口统计数据 ├── README.md # 项目文档 ├── requirements.txt # Python依赖项
环境要求
-
环境变量:
HuggingFace token
HF_TOKEN=your_huggingface_token_here
OpenAI API token
OPENAI_API_KEY=your_openai_token_here

- 1The MedPerturb Dataset: What Non-Content Perturbations Reveal About Human and Clinical LLM Decision Making麻省理工学院 · 2025年



