Skip to content

SLAE: Sparse Locality-Aware Editing for Safety-Aligned MLLMsSLAE: Sparse Locality-Aware Editing for Safety-Aligned MLLMs

Jiaqing Li, Shide Zhou, Tianlong Yu, Kailong Wang
Huazhong University of Science and Technology; Hubei University
arXiv: Jailbreaks, Prompt Injection, Poisoning & DefensesarXiv:2612.05336Originally published Indexed by this site · 2 days agoDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose a neuron-editing method, SLAE, which raises the VLS refusal rate to 94.1%–98.3% on three MLLMs while retaining benign capabilities.

Threat modelFor VLS (Visual Leakless Safety) inputs: the text query is neutral or underspecified, and the unsafe intent can only be identified from the joint image-text semantics. The defense locates and edits the Wdown columns corresponding to MLP neurons at the model parameter level; TH and VSIL are auxiliary safety groups, and visual attack samples are used only for VLS testing.

Questions
MLLMs may refuse explicitly harmful requests in text, yet comply when the text is benign and the image contains harmful evidence. The authors argue that existing prompts and broad safety fine-tuning struggle to explain and precisely control this VLS failure.
Methods
SLAE localizes MLP neurons by contrasting compliant and refusal targets, filters by cross-case recurrence frequency, excludes neurons needed for benign visual grounding, and then learns and merges sparse Wdown column offsets.
Experiments and results
On three MLLMs, SLAE's VLS Reject is 94.1%–98.3%, versus 1.4%–3.8% for the base models; MMKE is 94.0%–94.7%. Ablations show that editing only TH or VSIL neurons cannot replace VLS localization.
Limitations and future work
The paper does not specifically discuss limitations. The experiments cover three open-source MLLMs, TH/VSIL/VLS, and two benign evaluations; the safety data are split 70%/30% by case, and the paper does not report sample sizes, optimization hyperparameters, number of repetitions, or the Harm judge model.
Experimental setupLLaVA-1.5-7B、Qwen3-VL-8B-Instruct et al. · HarmBench、VLSBench et al. · Reject、Harm et al.
Metrics
RejectHarmMMKEMM-Vet
AI summaryResearchers propose a neuron-level editing method, SLAE, to enhance the defense of multimodal LLMs (MLLMs) against visually concealed harmful requests. The sparse MLP neurons for visual safety and for textual refusal overlap only weakly; SLAE selects neurons by their recurrence frequency across cases and excludes those needed for benign visual understanding, learning sparse offsets for the corresponding down-projection columns. On representative MLLMs, the method significantly improves defense without harming benign question answering and general capabilities.

Researchers propose a neuron-level editing method, SLAE, to enhance the defense of multimodal LLMs (MLLMs) against visually concealed harmful requests. The sparse MLP neurons for visual safety and for textual refusal overlap only weakly; SLAE selects neurons by their recurrence frequency across cases and excludes those needed for benign visual understanding, learning sparse offsets for the corresponding down-projection columns. On representative MLLMs, the method significantly improves defense without harming benign question answering and general capabilities.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    For the compliance failure when the text is benign and the image contains harmful evidence, the authors propose a sparse neuron editing defense.

    The core problem is that textual safety alignment in MLLMs cannot reliably transfer to visually carried harm: the model may refuse explicitly harmful requests, yet may comply with inputs that pair benign text with harmful images.

    • Failure scenario: The authors classify the key case as VLS (Visual Leakless Safety): the text is neutral or underspecified, and risk can only be identified from joint image-text semantics. The authors argue that this forms a cross-modal gap between perception and refusal.
    • Shortcomings of existing methods: The authors state that existing studies mostly characterize the phenomenon through attack success rates, or rely on prompts and broad safety fine-tuning; the former offers limited explanation of internal failure components, and the latter may cause over-refusal or harm normal multimodal behavior.
    • Core observation: The authors trace the failure to sparse MLP neurons and state that neurons responsible for visual grounding safety only weakly overlap with neurons that support text-triggered refusal; some of these also support benign visual grounding, so they cannot be intervened on without constraints.
    • Proposed method: SLAE (Sparse Locality-Aware Editing for Safety-Aligned MLLMs) contrasts compliant and refusal contributions per case, selects neurons by cross-case recurrence frequency, protects benign visual grounding neurons, and edits the corresponding Wdown columns.
    • Threat model:
      • Victim system: safety-aligned MLLMs, with experiments on three open-source models.
      • Risk inputs: in VLS, the harmful intent exists only in joint image-text semantics; TH and VSIL serve as controls and auxiliary supervision.
      • Defense location: post-training parameter editing, with no inference-time module added after merging.
      • Attacker knowledge and capability: the paper does not explicitly specify the attacker's white-box, black-box, or other knowledge setting.
  2. What related research exists?

    Related work falls into three categories—multimodal safety evaluation, safety defenses, and mechanistic localization—and SLAE focuses on VLS parameter editing.

    Multimodal Safety Evaluation and Visual Jailbreak

    • Qi et al. (2024); Shayegani, Dong, and Abu-Ghazaleh (2024): study adversarial images and cross-modal combinations bypassing safety protections inherited from the language backbone.
    • MM-SafetyBench; JailBreakV-28K: the former evaluates query-related and typographic image manipulation, and the latter tests transfer of textual and visual jailbreaks (Liu et al. 2024b; Luo et al. 2024).
    • SIUO, MMSafeAware, VLSBench: study, respectively, the risk after combining individually safe inputs, unsafe recognition and over-refusal, and distinguishing TH, VSIL, and VLS by the location of unsafe information (Wang et al. 2025a,b; Hu et al. 2025). Azulay et al. (2026) and Liu et al. (2025) also involve visual encoder replacement and video combinations.

    MLLM Safety Alignment and Defenses

    • AdaShield, ECSO, MLLM-Protector: use adaptive prompting, image-to-text conversion, and harm detection combined with response detoxification, respectively (Wang et al. 2024; Gou et al. 2024; Pi et al. 2024).
    • VLGuard; Xu et al. (2025): the former performs vision-language safety fine-tuning, and the latter transfers textual safety protection via text-guided hidden-state alignment.
    • EVA, SGM: EVA edits harmful keys into safe responses, and SGM suppresses toxic multimodal neurons at inference time (Wang et al. 2026; Wang, AprilPyone, and Echizen 2025). The authors state that SLAE does not add inference components, but instead merges sparse offsets.

    Mechanistic Localization and Sparse Safety Editing

    • Arditi et al. (2024); Zhao et al. (2025a): associate refusal with a compact residual-stream direction, and distinguish latent directions for harmfulness recognition versus refusal generation, respectively.
    • Jain et al. (2024); Zhao et al. (2025b); Chen et al. (2025): study structured MLP changes from safety fine-tuning, and the overlap between safety and helpfulness neurons.
    • Pan et al. (2024); Fu et al. (2026); Gan et al. (2026): localize and edit multimodal neurons, decouple and edit modality-specific neurons, and detect jailbreaks with JailNeurons, respectively.

    Experimental Baselines and Data: safety comparisons use VLSBench safety prompt, AdaShield, VLGuard, and EVA; safety data come from HarmBench and VLSBench, and benign capability uses MM-Vet and MMKE-Bench. VLGuard, EVA, and SLAE use the same editing data, including VLS samples.

    The authors position this paper as cross-case neuron selection, benign neuron protection, and composable weight offsets specifically for VLS, rather than general knowledge editing or inference-time protection.

  3. How does the paper address this problem?

    SLAE localizes neurons through contrastive attribution, cross-case recurrence, and benign protection, and then optimizes and merges sparse column offsets.

    SLAE jointly optimizes three groups of safety edits—TH, VSIL, and VLS—together with protection of LOC benign capability; the core idea is to convert case-level neuron attribution into dataset-level positions, and then modify only the down-projection columns corresponding to these neurons.

    Problem Setting and Objectives

    • The input is written as x=(v,p). TH has no image and the text explicitly states harm; VSIL has an image but the text already exposes intent; VLS has neutral or underspecified text, and risk can only be identified from joint semantics.
    • Each harmful sample has a task-compliant response qcomp(x) and a model-specific refusal prefix qref; the latter is taken as the most common prefix among the unedited model's refusal responses. LOC samples use the original benign answer b(x).
    • The activation of MLP neuron j corresponds one-to-one with the j-th column of Wdown, so neuron localization can be converted into parameter-column editing.

    Contrastive Localization and Cross-Case Selection

    • For target token w, the neuron contribution is written as cl,t,j(w)=al,t,juw⊤ Wl[:,j], and is averaged over target sequence positions.
    • The safety score is the compliant-target contribution minus the refusal-target contribution; the LOC score measures support for the original benign answer. Scores are used only for ranking within each case and each layer.
    • For each case and each layer, top-kcase are retained, and then the recurrence frequency of neurons entering these lists is counted, rather than aggregating absolute attribution values; for each group and each layer, the kgroup candidates with the highest frequency are taken.

    Benign Protection and Sparse Editing

    • In the selected editing layers, the kloc positions with the highest protection frequency are first taken from the LOC set, then these positions are excluded from the safety candidates, and kedit editable neurons are selected by frequency.
    • The original model parameters are frozen, and a dmodel-dimensional offset is learned for each selected neuron; this offset is equivalent to being added to the corresponding Wdown column, with other columns unchanged.
    • Different safety groups use their own offsets; when the same column is selected by multiple groups, the offsets are summed in the final merging stage.

    Optimization Objectives and Merging

    • The safety loss maximizes the likelihood of the refusal prefix and adds a KL constraint between the original model and the edited model distributions; VLS samples are used to learn refusal when the image reveals risk.
    • The capability protection loss includes the NLL of benign answers and the KL of the LOC distribution; when computing this loss, all group offsets are activated simultaneously. The total objective averages the three groups of safety losses and then adds the LOC loss with a weight.
    • After training, the offsets are merged directly into the original weights, the inference structure is unchanged, and no external filter, additional prompt, or additional module is needed.

    Data Split and Key Budgets

    • Safety data are split by case into 70% training and 30% testing; the training portion is used for localization and optimization, and the testing portion is used for final safety evaluation. Visual attack samples are kept only as VLS tests.
    • kcase=40, kgroup=100; across 20 editing layers, kedit=16, i.e., 320 neurons per group; kloc=16, i.e., 320 LOC positions protected. The ratio of candidates to editing budget is 100/16=6.25.
    • Safety metrics are keyword-matching Reject and the 1–5 Harm score given by an LLM judge; MMKE requires the output to be valid, non-refusing, and to reach the similarity threshold of each base model's own lowest baseline similarity with the reference answer.
  4. What experiments did the paper conduct?

    On three MLLMs, VLS Reject reaches 94.1%–98.3%, and ablations support the roles of VLS localization and benign protection.

    Experimental Setup

    • Models tested: LLaVA-1.5-7B, Qwen3-VL-8B-Instruct (abbreviated as Qwen3-VL-8B in the tables), and MiniGPT-4, three open-source MLLMs in total.
    • Safety data: TH comes from HarmBench, VLS comes from VLSBench, and VSIL contains images and queries that already expose unsafe content; the visual attack samples of Azulay et al. (2026) are used only for VLS testing.
    • Benign evaluation: MM-Vet covers six core capabilities and their integration; MMKE-Bench provides benign visual questions to check semantic retention of answers after editing.
    • Baselines: VLSBench Prompt, AdaShield, VLGuard(LORA), EVA; the latter two use the same editing data as SLAE, including VLS samples.
    • Metrics and criteria: Reject is the keyword-matching refusal rate; Harm is an LLM judge's 1–5 score, where lower is safer. MM-Vet uses standard open-ended scoring and a model-based evaluator.
    • MMKE protocol: all-MiniLM-L6-v2 encodes answers and reference answers and computes cosine similarity; each backbone uses its base model's lowest similarity as the threshold, and successful samples must be valid and non-refusing.
    • Split and repetitions: safety data are split by case into 70%/30% training and testing; the paper does not report the sample size of each group, training epochs, optimizer, number of repetitions, or the name of the Harm judge model.

    Main Results

    According to Table 1, the VLS condition is listed; full results for TH and VSIL are in the same table.

    Swipe horizontally to read the table

    ModelMethodVLS Reject ↑VLS Harm ↓
    LLaVA-1.5-7BBase1.4%3.90
    LLaVA-1.5-7BVLSBench Prompt67.5%2.49
    LLaVA-1.5-7BAdaShield83.7%2.12
    LLaVA-1.5-7BVLGuard(LORA)87.5%1.31
    LLaVA-1.5-7BEVA91.7%1.24
    LLaVA-1.5-7BSLAE98.3%1.12
    Qwen3-VL-8BBase3.8%3.73
    Qwen3-VL-8BSLAE97.7%1.15
    • Results for the remaining model: MiniGPT-4's Base is 2.4% Reject and 3.78 Harm, and SLAE is 94.1% and 1.14; among its baselines, VLSBench Prompt is 50.2% and 2.99, AdaShield is 89.7% and 1.22, VLGuard(LORA) is 74.3% and 2.67, and EVA is 83.2% and 1.88 (Table 1).
    • Qwen baselines: VLSBench Prompt is 55.4% and 2.84, AdaShield is 75.6% and 2.16, VLGuard(LORA) is 91.4% and 1.27, and EVA is 84.7% and 1.60 (Table 1).
    • Authors' interpretation: The authors state that, compared with the strongest baseline for each backbone, SLAE raises VLS Reject by 4.4–6.6 percentage points and lowers Harm by 0.08–0.12; TH and VSIL Reject are 100% on all three models.

    Benign Capability Retention

    • MMKE: SLAE on LLaVA, Qwen, and MiniGPT-4 is 94.4%, 94.7%, and 94.0%, respectively; the corresponding VLGuard(LORA) is 93.3%, 92.1%, and 93.2%, and EVA is 82.4%, 90.8%, and 91.2% (Table 2).
    • MM-Vet: SLAE is 29.1, 60.3, and 21.0, respectively, and Base is 30.1, 61.0, and 21.2; the authors use this to state that the editing retains general multimodal capability (Table 2).
    • Exceptions for prompt baselines: VLSBench Prompt's MMKE is 81.2%, 67.4%, and 82.3%, and MM-Vet is 18.4, 34.8, and 14.4; AdaShield is 77.8%, 64.4%, and 79.4% and 16.7, 33.5, and 13.2. The authors attribute part of the capability decline to over-refusal on benign questions.

    Component Ablations and Offset Combination

    • Neuron source: On LLaVA, Full SLAE's VLS Reject/Harm/MMKE is 98.3%/1.12/94.4%; editing only UTH is 1.5%/3.87/95.5%, and editing only UVSIL is 2.0%/3.81/96.0% (Table 3a). The authors state that text-triggered safety neurons cannot replace visual grounding neurons.
    • Benign protection: Removing the Uloc exclusion gives 96.2%/1.15/83.7%; removing benign loss gives 97.7%/1.08/50.3%, with MMKE dropping from 94.4% to 50.3% (Table 3a).
    • Offset complementarity: With only ΔVLS, TH/VSIL/VLS Reject is 62.1%/43.1%/98.5%; ΔTH+ΔVLS is 100%/41.8%/98.3%, ΔVSIL+ΔVLS is 61.0%/100%/98.3%, and the full merge is 100%/100%/98.3% (Table 3b).

    Layer-Level Causal Probing

    • Setup: Figure 3 reports the target refusal probability at each layer on randomly sampled VLS cases from LLaVA-1.5-7B; the controls are sign flips at selected positions and sign flips at an equal number of random positions.
    • Visible in the figure: The horizontal axis Layer marks 16, 18, 20, 22, and 24, and the vertical axis Target probability is labeled up to 0.00200; the legend includes BaseModel, VLS offset, and two sign flips. The main text states that the random-position curve almost coincides with the original model.
    • Authors' interpretation: The authors state that flipping the selected positions produces a visible deviation, supporting a causal influence of these positions on the target response; the VLS offset gap widens after layer 20, with probability near layers 22 and 23 rising from about 1.0×10−3 to over 2.0×10−3.

    Other Ablations and Analyses

    • Selection granularity: In Table 4, under k=4/8/16/32, VLS Reject is 91.4%/97.7%/98.3%/96.1%, and MMKE is 95.0%/94.8%/94.4%/94.0%.
    • Global selection: Global Top-320 has VLS Reject of 95.7% and MMKE of 92.2%, with 320 neurons, the same as per-layer k=16 (Table 4).
    • Failure cases: The authors state that over 70% of the neurons selected globally are concentrated in LLaVA layer 31, and produce degenerate repetition in 42% of responses; per-layer selection gives 0%.
  5. What are some points that can be further explored?

    The paper does not specifically discuss limitations; the experiments cover three open-source models and established safety and benign evaluations, and several protocol details are not reported.

    Limitations and Future Directions Noted by the Authors

    The paper does not specifically discuss limitations, nor does it list explicit future work in the Conclusion.

    Scope of Experimental Coverage

    • Models tested: experiments cover LLaVA-1.5-7B, Qwen3-VL-8B-Instruct, and MiniGPT-4, three open-source MLLMs in total (Experimental Setup).
    • Safety scope: evaluation includes TH, VSIL, and VLS; the visual attack samples of Azulay et al. (2026) are kept only for VLS testing and do not participate in localization or training (Datasets & Metrics).
    • Defense comparisons: compared with VLSBench Prompt, AdaShield, VLGuard(LORA), and EVA; VLGuard, EVA, and SLAE use the same editing data (Baselines).
    • Benign and mechanistic experiments: capability evaluation uses MM-Vet and MMKE-Bench; component ablations, offset combinations, and the Table 4 selection granularity analysis are conducted on the VLS test set and benign retention metrics, and Figure 3 reports only LLaVA-1.5-7B.
    • Unreported protocol information: the paper does not report the sample size of each data group, the optimizer and number of training epochs, the number of experimental repetitions, the name of the LLM judge for Harm, the specific evaluator model for MM-Vet, or human agreement or adaptive attack evaluation.
  6. Summarize the main content of the paper

    SLAE enhances visually grounded refusal through sparse neuron column editing, and checks safety and capability retention on three models.

    SLAE is a parameter-editing defense for visually concealed harmful requests in MLLMs, focusing on VLS inputs whose text appears benign and whose risk can only be identified from joint image-text semantics.

    • Problem: The authors argue that text-centric safety alignment cannot reliably handle visually carried harm; existing prompts and broad fine-tuning offer limited control over internal mechanisms and may harm normal behavior.
    • Method: Contrast compliant and refusal target contributions case by case, localize neurons by cross-case top-k recurrence frequency; after excluding positions needed for benign visual grounding, learn and merge sparse offsets for the corresponding Wdown columns.
    • Main results: In Table 1, the three base models have VLS Reject of 1.4%–3.8%, SLAE has 94.1%–98.3%, and Harm is 1.12–1.15; TH and VSIL Reject are 100% for all three models.
    • Capability retention: In Table 2, SLAE's MMKE is 94.0%–94.7%; MM-Vet on LLaVA, Qwen, and MiniGPT-4 is 29.1, 60.3, and 21.0, respectively, versus 30.1, 61.0, and 21.2 for the base models.
    • Key ablations: On LLaVA, editing only UTH or UVSIL gives VLS Reject of 1.5% and 2.0%, respectively; removing benign loss drops MMKE from 94.4% to 50.3% (Table 3a).
    • Authors' conclusion: The authors state that VLS-targeted localization, benign protection, group offset combination, and sparse weight editing jointly balance safety and capability; the sign-flip control in Figure 3 is used to support the causal role of the localized columns.

Research lineage

3 foundations · 0 follow-ups in library
Explore in knowledge graph →
Builds on / cites3
This paper
SLAE: Sparse Locality-Aware Editing for Safety-Aligned MLLMs
2026-12-03
Follow-up work

No later in-library follow-ups recorded yet.

Why cited · Relation evidenceCites§ Safety Alignment and Defense for MLLMsThis paper → Foundation
“Parameter-level methods are more targeted: EVA edits harmful keys toward safe responses, whereas SGM suppresses toxic multimodal neurons during inference (Wang et al. 2026; Wang et al. 2025a).”
EVA: Editing for Versatile Alignment against Jailbreaks · 2026-05

Related papers

Show 3 more papers
Read originalarxiv.org