Attributional Safety Failures in Large Language Models under Code-Mixed Perturbations

Somnath Banerjee, Pratyush Chatterjee, Shanu Kumar, Sayan Layek, Parag Agrawal +2 more
5/20/2025
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

While LLMs appear robustly safety-aligned in English, we uncover a catastrophic, overlooked weakness: attributional collapse under code-mixed perturbations. Our systematic evaluation of open models shows that the linguistic camouflage of code-mixing -- ``blending languages within a single conversation'' -- can cause safety guardrails to fail dramatically. Attack success rates (ASR) spike from a benign 9\% in monolingual English to 69\% under code-mixed inputs, with rates exceeding 90\% in non-Western contexts such as Arabic and Hindi. These effects hold not only on controlled synthetic datasets but also on real-world social media traces, revealing a serious risk for billions of users. To explain why this happens, we introduce saliency drift attribution (SDA), an interpretability framework that shows how, under code-mixing, the model's internal attention drifts away from safety-critical tokens (e.g., ``violence'' or ``corruption''), effectively blinding it to harmful intent. Finally, we propose a lightweight translation-based restoration strategy that recovers roughly 80\% of the safety lost to code-mixing, offering a practical path toward more equitable and robust LLM safety.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{banerjee2025attributional,
  title  = {Attributional Safety Failures in Large Language Models under Code-Mixed Perturbations},
  author = {Somnath Banerjee and Pratyush Chatterjee and Shanu Kumar and Sayan Layek and Parag Agrawal and Rima Hazra and Animesh Mukherjee},
  year   = {2025},
  eprint = {2505.14469},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.14469v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.14469.svg)](https://codeofpaper.com/paper/2505.14469)

Discussion