Optimized code-switching attacks on open-source large language models

Summarise with VIRAT
Authors: Joshua Adrian Cahyono
Cited by: 0

Summary

No summary yet. VIRAT can read this paper and write a plain-language summary of its aim, methods, key findings and limitations.

Summarise with VIRAT Free to try with your Science Catalogs account.

Abstract

Large language models (LLMs) undergo extensive safety alignment to mitigate harmful outputs; however, this process is predominantly conducted in English, leaving a systematic vulnerability in other languages. We exploit this gap through a gradient-guided code-switching attack, Safety Targeted Embedding Exploit via Refinement (STEER). STEER leverages model gradients to identify tokens that most strongly activate refusal behavior, then selectively translates these tokens into low-resource languages to bypass safety filters while preserving malicious intent. Across six open-source 8B-parameter models, STEER achieves attack success rates (ASR) of up to 93% on JailbreakBench and 96.7% on AdvBench, outperforming direct prompting, random code-switching (CSRT), and Greedy Coordinate Gradient (GCG) in both effectiveness and iteration efficiency. To better understand the mechanism, we conduct a layer-wise analysis using the Fisher Linear Discriminant, which reveals that refusal representations are geometrically localized within specific middle layers. This structural concentration enables efficient white-box exploitation. Furthermore, a transferability evaluation on GPT-4o-mini demonstrates that STEER achieves a 35.5% ASR, significantly surpassing CSRT (13.9%) and GCG (29.3%). This indicates that the vulnerability extends beyond white-box settings into more realistic black-box scenarios. Overall, our findings expose critical gaps in multilingual safety alignment and highlight the need for more robust, language-agnostic defense mechanisms.

Fields of Study & Subjects

Adversarial Robustness in Machine Learning Topic Modeling Hate Speech and Cyberbullying Detection

Publication details

Journal / source
DR-NTU (Nanyang Technological University)
Publication date
1 January 2026
Language
EN