MMJ-Bench is a comprehensive benchmark designed to systematically evaluate existing multi-modal jailbreak attacks and defenses in a unified manner. We present jailbreak attack and defense techniques evaluated in our paper in the following tables.
Our evaluation results of MLLMs jailbreak attacks across six models are as follows:
conda create -n MMJ-Bench python=3.10
conda create MMJ-Bench
pip install -r requirements.txt
python -m spacy download en_core_web_sm
In the first step, jailbreak attack techniques are used to generate test cases with generate_test_cases.py.
./scripts/generate_test_cases.sh $method_name $behaviors_path $save_dir
After generating test cases , we can generate completions for a target model with or without defense techniques.
Without defense methods:
./scripts/generate_completions.sh $model_name $behaviors_path $test_cases_path $save_path $max_new_tokens $incremental_update
With defense methods.
./scripts/generate_completions_defense.sh $attack_type $target_model $defense_type
After generate completions from a target_model from Step 2, We will utilize the classifier provided by HarmBench to label whether each completion is an example of its corresponding behavior.
./scripts/evaluate_completions.sh $cls_path $behaviors_path $completions_path $save_path
We thank the following open-source reposities.
[1] https://github.com/centerforaisafety/HarmBench
[2] https://github.com/thuccslab/figstep
[3] https://github.com/isXinLiu/MM-SafetyBench
[4] https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models
[5] https://github.com/abc03570128/Jailbreaking-Attack-against-Multimodal-Large-Language-Model
[6] https://github.com/yunqing-me/AttackVLM
[7] https://github.com/AoiDragon/HADES
[8] https://github.com/shiningrain/JailGuard
[9] https://github.com/SaFoLab-WISC/AdaShield
MMJ-Bench is a comprehensive benchmark designed to systematically evaluate existing multi-modal jailbreak attacks and defenses in a unified manner. We present jailbreak attack and defense techniques evaluated in our paper in the following tables.
Our evaluation results of MLLMs jailbreak attacks across six models are as follows:
conda create -n MMJ-Bench python=3.10
conda create MMJ-Bench
pip install -r requirements.txt
python -m spacy download en_core_web_sm
In the first step, jailbreak attack techniques are used to generate test cases with generate_test_cases.py.
./scripts/generate_test_cases.sh $method_name $behaviors_path $save_dir
After generating test cases , we can generate completions for a target model with or without defense techniques.
Without defense methods:
./scripts/generate_completions.sh $model_name $behaviors_path $test_cases_path $save_path $max_new_tokens $incremental_update
With defense methods.
./scripts/generate_completions_defense.sh $attack_type $target_model $defense_type
After generate completions from a target_model from Step 2, We will utilize the classifier provided by HarmBench to label whether each completion is an example of its corresponding behavior.
./scripts/evaluate_completions.sh $cls_path $behaviors_path $completions_path $save_path
We thank the following open-source reposities.
[1] https://github.com/centerforaisafety/HarmBench
[2] https://github.com/thuccslab/figstep
[3] https://github.com/isXinLiu/MM-SafetyBench
[4] https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models
[5] https://github.com/abc03570128/Jailbreaking-Attack-against-Multimodal-Large-Language-Model
[6] https://github.com/yunqing-me/AttackVLM
[7] https://github.com/AoiDragon/HADES
[8] https://github.com/shiningrain/JailGuard
[9] https://github.com/SaFoLab-WISC/AdaShield