Skip to content

This is the code for the FSE26 paper: Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-breaking, the research paper can be referred at https://arxiv.org/pdf/2512.21236

Notifications You must be signed in to change notification settings

Navigator129/SPELL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multi-agent-jailbreak

环境安装/Environment deployment

完成git clone之后,cd到multi-agent-jailbreak 在命令行输入

conda env create -f environment.yaml
conda activate maj

After git clone the repo, cd to multi-agent-jailbreak in the terminal, then use bash command

conda env create -f environment.yaml
conda activate maj

代码运行

完成环境配置后,在config.py里输入你自己的各种apikey,随后在终端输入(注:max_workers用于多线程,请根据设备设定合理范围,默认为4)

python attack.py --victim_model "gpt" --no_gpu --batch_size 8 --max_workers 8
python attack.py --victim_model "claude" --no_gpu --batch_size 8 --max_workers 8
python attack.py --victim_model "qwen" --no_gpu --batch_size 8 --max_workers 8

即可开始运行

After deploying the environment, add your API key in config.py, then enter bash command

python attack.py --victim_model "gpt" --no_gpu --batch_size 8 --max_workers 8
python attack.py --victim_model "claude" --no_gpu --batch_size 8 --max_workers 8
python attack.py --victim_model "qwen" --no_gpu --batch_size 8 --max_workers 8

to start experiment

baseline对比与消融实验

直接输入python redcode_compare.py开始第一个对比实验 对于CL_GSO对比,需要输入

python CL_GSO_compare.py --victim_model "gpt"
python CL_GSO_compare.py --victim_model "claude"
python CL_GSO_compare.py --victim_model "qwen"

对于随机选取对比,则需要输入

python random_compare.py --victim_model "gpt"  --batch_size 8
python random_compare.py --victim_model "claude" --batch_size 8
python random_compare.py --victim_model "qwen" --batch_size 8

消融实验: 将batch_size后的数字修改为所需求的prompt句子组成数

Just enter python redcode_compare.py to start the first comparison experiment. For the CL_GSO comparison, you need to input

python CL_GSO_compare.py --victim_model "gpt"
python CL_GSO_compare.py --victim_model "claude"
python CL_GSO_compare.py --victim_model "qwen"

For random selection compare, enter bash command:

python random_compare.py --victim_model "gpt"  --batch_size 8
python random_compare.py --victim_model "claude" --batch_size 8
python random_compare.py --victim_model "qwen" --batch_size 8

Ablation experiment: Change the number after batch_size to the number of prompt sentences required.

About

This is the code for the FSE26 paper: Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-breaking, the research paper can be referred at https://arxiv.org/pdf/2512.21236

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages