scimeatlas

Research map / Large language models / Instruction and fine-tuning

CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code Completion

Qibing Ren, Chang Gao, Jing Shao, Junchi Yan, Xin Tan, Wai Lam, Lizhuang Ma

ACL 2024Large language models › Instruction and fine-tuningapproach: Safety alignment after fine-tuningopen problems in this approach163 citations (OpenAlex)

Shanghai Jiao Tong University · The Chinese University of Hong Kong · Shanghai AI Laboratory · East China Normal University

Read the paperPlace an idea next to itCheck your own paper ↗

14measured effects
8improved
3no clear effect
3hurt

AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use CodeAttack code-completion prompts instead of CipherChatCipherChat (SelfCipher) · AdvBench, average over 8 LLMsattack success rate: 9% -> 78% (stack)Improved
Encode input with stack instead of string (ablation)CodeAttack · AdvBench, average over 8 LLMsattack success rate: 51% -> 68% (queue) -> 78% (stack)Improved
Encode input as stack instead of queue for smaller models (ablation)CodeAttack · AdvBench, Llama-2-7battack success rate: 88% -> 54%Hurt
Use CodeLlama-70b (code-tuned) instead of Llama-2-70bCodeAttack (string) · AdvBenchattack success rate: 40% -> 93%Hurt
Add decode() function for task understanding instead of comments (ablation)CodeAttack (string) · AdvBench 50-subset, Claude-1attack success rate: 60% -> 92%Improved
Add decode() function for task understanding instead of comments (ablation)CodeAttack (string) · AdvBench 50-subset, GPT-3.5attack success rate: 94% -> 90%Hurt
Specify output by populating a list instead of comments (ablation)CodeAttack (string) · AdvBench 50-subset, Claude-1attack success rate: 42% -> 92%Improved
Use Go instead of Python (ablation)CodeAttack (string) · AdvBench 50-subset, Claude-2attack success rate: 24% -> 74%Improved
Use Go instead of Python (ablation)CodeAttack (string) · AdvBench 50-subset, GPT-3.5attack success rate: 90% -> 92%No clear effect
Prepend benign quick sort code to prompt (ablation)CodeAttack (list) · AdvBench, Claude-2attack success rate: 36% -> 54%Improved
Prepend benign quick sort code to plain-text query (ablation)plain text prompt · AdvBench, GPT-4-1106 and Claude-2attack success rate: 0% -> 0%No clear effect
Apply Rand-Insert defense (ablation)CodeAttack (stack) · AdvBench, GPT-4-1106attack success rate: 86% -> 34%Improved

Open problems in safety alignment after fine-tuning

Do safety defenses against harmful fine-tuning hold on larger models and against adaptive attacks?

All 5 open problems and what was already tried →

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy