Code repository for our paper, "Medical Large Language Models are Vulnerable to Data Poisoning Attacks" (Nature Medicine, 2024).
- Install miniconda (https://docs.anaconda.com/free/miniconda/)
- Create a conda environment:
conda create -n defense-algorithm python=3.11 - Activate the environment:
conda activate defense-algorithm - Change to this directory:
cd <path/to/this/dir> - Install requirements using pip:
pip install -r requirements.txt - Run the script using the toy dataset:
python screen_outputs.py
Note: The implemented embedding models possess their own licensing agreements.