CodeMimicry: Exploiting Safety Generalization Lag in Large Language Models via Structured Code Completion
30 Sept · Zhen Liang, Hai Huang, Wentao Chen · arXiv:2609.39902
Large language models have achieved remarkable capabilities across diverse domains, yet their safety alignment remains vulnerable to jailbreak attacks. In this work, we identify a previously underexplored failure mode - safety generalization lag - where alignment trained predominantly on natural language fails to transfer to the code domain. We show that this lag induces a code-completion blind spot, allowing…