Manuscript Offprint

arXiv:2610.24614

Safety Kernel: Mechanistic Alignment for Cross-Lingual Defense in LLMs

Chengyu Xie, Fei Shen, Shuyi Miao, Yue Feng, Jian Yu, Pengyang Shao, Yijun Tian, Xiaoyu Du

Chengyu Xie

xiechengyu@njust.edu.cn

School of Computer Science and

Engineering, Nanjing University of

Science and Technology

Nanjing, China

Fei Shen

Nanjing University of Science and

Technology

Nanjing, China

Yue Feng

College of Artificial Intelligence,

Nanjing University of Aeronautics

and Astronautics

Nanjing, China

Shuyi Miao

School of Artificial Intelligence,

Beihang University

Beijing, China

Jian Yu

Nanjing University of Science and

Technology

Nanjing, China

Pengyang Shao

School of Computing, National

University of Singapore

Singapore, Singapore

Yijun Tian

Xi'an Jiaotong University

Xi'an, China

Abstract

The safety capabilities of large language models (LLMs) are highly uneven across different languages, often allowing cross-lingual attacks to bypass safety guardrails. Existing alignment methods predominantly rely on external alignment signals and provide limited insight into underlying neuron-level mechanisms, making it difficult to provide a unified internal target for cross-lingual safety interventions. To address this, we analyze cross-lingual safety behavior at the neuron level and identify a compact set of safety-related neurons shared across languages, termed the safety kernel (SK). Specifically, we first utilize multilingual parallel safe and unsafe prompts to compute safety contrast with activation responsiveness (SCAR) scores, identifying language-wise safety-neuron candidates from internal activation patterns. We then intersect the resulting language-wise safety-neuron sets to obtain the SK, and validate its functional relevance to cross-lingual safety behavior through activation suppression and activation-state transfer interventions. Finally, building on the SK coordinates, we introduce SK-Masked LoRA, which constrains LoRA adaptation to the feed-forward network (FFN) output dimensions corresponding to the SK, thereby focusing safety-related changes on the cross-lingually shared neuron coordinates. Extensive experiments demonstrate that SK-Masked LoRA substantially reduces attack success rates across multiple languages, including languages excluded from SK discovery, while intervening on only a small fraction of internal neuron coordinates and producing generally limited changes in the model's general capabilities. Warning: this paper contains examples of unsafe content.

Xiaoyu Du ⊗^{\otimes}

duxy@njust.edu.cn

Nanjing University of Science and

Technology

Nanjing, China

1 Introduction

Large language models (LLMs) have been widely deployed in multilingual applications across diverse domains, yet their safety capabilities remain uneven across languages [25, 31, 39]. The same harmful request may be safely refused in one language but elicit an actionable unsafe response when reformulated in another. This inconsistency suggests that safety alignment does not transfer reliably across linguistic contexts and makes cross-lingual reformulation a potential means of bypassing model safeguards [22, 32]. Understanding how safety behavior is internally implemented across languages is therefore important for improving the cross-lingual safety of LLMs.

Existing work [2, 6, 16, 38] has sought to improve multilingual safety through multilingual safety data, preference optimization, cross-lingual consistency constraints, and safety capability transfer. As illustrated in Figure 1, these approaches primarily improve model behavior through external alignment signals, without explicitly localizing a shared internal target that can support safety intervention across languages. Whether LLMs contain a compact set of safety-related neurons that is shared across languages and amenable to direct intervention, thereby providing a common locus for modulating safety behavior in different languages, remains insufficiently explored.

To address this question, we analyze the cross-lingual safety behavior of LLMs at the neuron level and identify a set of safety-related neurons shared across languages, which we term the safety kernel (SK). Rather than anchoring discovery to English, we identify safety-related neurons independently in each language and extract their shared intersection to obtain the SK. Two complementary activation interventions show that suppressing the SK weakens safe refusal behavior across multiple languages, whereas injecting an SK activation state estimated from safe refusal generation reduces

Conference acronym 'XX, Woodstock, NY

  1. ACM ISBN 978-1-4503-XXXX-X/2018/06

https://doi.org/XXXXXXX.XXXXXXX

Xie et al.

External Alignment Signals

Safety Data Training

Preference Optimization

Consistency Constraints

Safety Capability Transfer

Safer multilingual responses.

Where Is Safety Located?

Behavior-Level

Safety Improvement

(a) Shared Internal Target Unspecified

Neuron-Level Safety Localization

Figure

Safety Kernel (SK):

Compact, Shared, and

Intervenable

(b) Shared Internal Target Localized

SK Neuron

Other Neuron

Figure 1: Motivation of the Safety Kernel. (a) Existing approaches improve multilingual safety through external alignment signals, while the shared internal target remains unclear. (b) We identify a compact set of safety-related neurons shared across languages, termed the safety kernel.

unsafe responses in other languages. These results indicate that the SK is not merely a statistical overlap across language-wise safety-neuron sets, but a shared neuronal subset that is functionally associated with cross-lingual safety behavior and amenable to direct intervention.

Building on the unified neuron locations provided by the SK, we further propose SK-Masked LoRA, which restricts safety fine-tuning updates to the FFN output dimensions corresponding to the SK. We evaluate our approach across multiple LLMs and multilingual safety benchmarks. Experimental results show that the SK accounts for only a small fraction of the analyzed neurons, yet suppressing it causes substantially greater safety degradation than suppressing an equal number of randomly selected neurons. Transferring the SK activation state across languages reduces unsafe responses, while SK-Masked LoRA lowers attack success rates across multiple languages and exhibits a degree of generalization to languages excluded from SK discovery. Overall, our findings reveal a shared neuronal structure associated with multilingual safety behavior and demonstrate its utility for cross-lingual safety intervention and targeted fine-tuning. Our main contributions are summarized as follows:

• We identify language-wise safety neurons from parallel safe and unsafe prompts, and define their intersection as the cross-lingually shared safety kernel.

• We verify the functional role of the SK in cross-lingual safety via activation suppression and state transfer interventions across multiple languages.

• We propose SK-Masked LoRA, restricting updates to SK-aligned FFN outputs, improving safety and reducing attack success rates, including unseen languages.

References (20)