acceptodds
Under review as a conference paper at ICLR 2027

All-in-One: A Composable Attack on LLM Transformations

Abstract

Quantization, pruning, and model merging are popular transformations applied to deployment-ready LLMs to improve efficiency and downstream performance. Recent work has shown that these transformations can introduce a security threat: an adversary can train a model that passes safety checks in its pre-transformed state, only turning malicious once it is transformed for deployment. However, prior attacks target one specific transformation (e.g., quantization) and generally rely on transformation-specific techniques, making them difficult to combine in practice. In this work, we introduce a simple, composable attack framework that targets multiple transformations simultaneously and triggers when any one of them is applied by a user. Our key insight is that the effect of each transformation can be approximated as a perturbation to the model weights, allowing us to jointly train the model with a benign loss on the original model and a malicious loss on each simulated transformed model. These perturbations are simple enough to simulate at every training iteration across diverse transformations, making them practically combinable within a single training objective, enabling a unified attack. Through extensive experiments across attack scenarios, model families, and a wide range of deployment-time model transformations, we show that our attack achieves high success rates. This demonstrates that model transformations may be utilized to trigger significantly different behavior from the original model and reinforces the associated security concerns by demonstrating that a single attack can jointly target diverse transformations.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
LLM, quantization, pruning, model merge, transformation-conditioned attack

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_TkxXOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes an attack method against LLMs that exploits the fact that users apply transformations, like quantization, pruning, and merging, to models before deploying them. Attacks of this kind, which e.g. jailbreak, inject content, or introduce backdoors, that remain stealth on the attacked model and surface only after a specific transformation are already known. This paper claims the first attack that triggers malicious behaviours after any transformation from within a set is applied. The attack is validated on four models, thirteen transformations, and three adversarial behaviours.

Critical strengths
  • The paper identifies approximate model perturbations that simulate the effect of transformations on model parameters sufficiently well as to be exploited for the attack. It is an interesting fact that the transformations do not need to be accurate for the behaviours to be injected.
Critical weaknesses
  • The paper positions itself as a call to action to practitioners to test their model in deployment conditions (i.e. after applying the transformation). However the method in the paper changes nothing in this respect: attacks triggered by all considered transformations already exist, and a cautious practitioner would already have to test against those. The paper is therefore more useful to potential attackers than it is to defenders.

  • The authors claim that their results in Table 2 prove that the attacked model remains stealth until a transformation is applied also because utility is not strongly impacted by the attack. However results in Table 2 actually show noticeable utility differences. Furthermore, tests that utility is preserved also after the transformations are applied are missing, but they are necessary to support stealthiness claims.

Questions for authors
  • What is the relative utility of original and attacked models after transformation?

  • Of the utility benchmarks you used, the non-multiple-choice ones are GSM8K and HumanEval, and Table 11 shows that the impact of some attacks on them is quite large. Their swings are then diluted in the averages with multiple-choice tests in Table 2. Can you provide additional evidence that the proposed attack is not degrading the model in a detectable way? Alternatively, consider qualifying your claims.

2 comments

We thank the reviewer for their constructive feedback. We appreciate their recognition of the effectiveness of our approach and address their concerns below.

W1. The threat w.r.t. individual transformations is known. How would the community benefit from this paper?

Great question. Our contribution is a general framework for constructing compromised models whose malicious behavior is triggered by various model transformations. While it is true that prior attacks have targeted most of these transformations individually, we believe our work has various practical implications for the community, including (but not limited to) the following:

Transferability. As shown in Section 4.3, our attacked models achieve high ASR even on transformations not explicitly targeted during training. Moreover, our framework (i.e., surrogate perturbations) is not restricted to quantization, pruning, and merging. This suggests that many more transformations, including those previously overlooked due to, e.g., less common use cases, may be vulnerable. Our work raises awareness of these risks in communities where such threats have received limited attention, and provides a unified way of formulating them.

Unified attacks leading to improved detection/defenses. Existing defenses often target transformation-specific attack mechanisms. For example, several defenses against quantization-conditioned attacks have been proposed, such as [1-3]. However, these defenses assume (specific) PGD-based attacks and, as such, fail against ours (see our new results in Table 22). Our findings thus motivate the development of more general defenses that cover a broader range of transformations and attack mechanisms.

[1] https://arxiv.org/abs/2606.28962

[2] https://arxiv.org/abs/2606.29239

[3] https://arxiv.org/abs/2606.20254

W2 & Q1. Could you compare the utility of the post-transformed models before and after the attack?

Certainly! We provide the results in Table 23 (also pasted below). For quantization, pruning, and merging, the utility is largely preserved; the relative utility of the attacked version remains above 90% on average. We find larger fluctuations for structured pruning (e.g., a huge improvement from 1.7% to 42.5% for LaCo, GSM8k), but we interpret this as instability of the structured pruning approach in general.

Table: Average relative utility (%) of the attacked model under each transformation (mean ± sample standard deviation across five benchmarks). We omit LaCo as its original HumanEval score is zero.

MetricBefore trans.NF4FP4AWQ 4-bitMagnitude 20%SparseGPT 20%ShortGPT 10%LaCo 10%TA mergeTIES mergeDARE merge
Relative utility (%)101.0 ± 3.697.4 ± 2.695.8 ± 3.196.5 ± 2.997.1 ± 2.296.2 ± 3.576.6 ± 19.1--98.9 ± 2.398.9 ± 5.090.2 ± 9.4

W2 & Q2: Can you further discuss the utility degradation in generative tasks?

Absolutely. Conceptually, the adversary can control the trade-off between utility and ASR via the KL coefficient. We investigate how much we improve the situation by adjusting it. As shown in Table 21, by increasing the KL coefficient from 0.1 (our main result) to 0.5, the HumanEval score is significantly better preserved than in our main experiment (47.6% → 61.7%), but at the cost of a slight decrease in the ASR (81.6% → 66.6% on average across the tested transformations). This result indicates that the utility degradation is not a fundamental limitation of our approach, but an aspect that the adversary can control depending on how much utility in what type of task they aim to preserve.

Fundamentally, however, as we discussed in W2 & Q1, as we aim to target a significantly diverse set of transformations, complex interactions of various factors may result in some failure modes, and we accept this trade-off.

Llama-3.1-8B-Instructkl=0.5kl=0.1
HumanEval63.461.747.6
Original0.000.000.00
NF40.000.950.95
FP40.000.940.96
GPTQ 4-bit0.000.940.95
AWQ 4-bit0.000.280.89
GGUF Q4_K_M0.000.470.78
Wanda 20%0.000.010.46
Magnitude 20%0.000.950.96
ShortGPT 10%0.000.020.16
TA merge0.000.910.94
TIES merge0.000.960.97
DARE merge0.000.900.96

I thank the authors for their response. I don't find in W2 an answer to the question of whether the combined attack is stealth, or if the performance on generative tasks is such that it becomes easily detectable for high ASR regimes. I will therefore maintain my overall score.

Reviewer_6mqROpenReview ↗
Rating
3
Confidence
2
Informativeness
3
Presentation
3
Soundness
2
Read review
Paper summary

The paper proposes a composable attack framework based on approximating each targeted transformation as a perturbation to the model weights. The model behaves benignly before transformation but exhibits malicious behavior after quantization, pruning, or model merging. Experiments across four LLMs, three attack scenarios, and 13 transformations show at least 20% ASR in 137 of 156 configurations.

Critical strengths
  1. The surrogate perturbation framework combines quantization, pruning, and merging within one training objective, addressing the limited composability of prior attacks and exposing a broader threat.
  2. Experiments across four LLMs, three scenarios, and 13 transformations, together with ablations and transfer tests, provide substantial evidence for the attack’s effectiveness.
Critical weaknesses
  1. The paper does not analyze how components influence each other: Table 3 shows that joint training improves NF4 ASR (0.83→0.97) but reduces ShortGPT ASR (0.74→0.05).

  2. The paper does not evaluate finetuning before or after quantization, pruning, or merging, so the effectiveness of the attack under these common scenarios remains unclear.

Questions for authors
  1. Do individual components improve or reduce the effectiveness of other components during joint training?
  2. What are the ASRs when full-parameter finetuning, LoRA, and GRPO are each applied before quantization, pruning, or merging, and separately after these transformations?
  3. How does using full-parameter finetuning rather than LoRA for attack training in the All-in-One framework influence results?
2 comments

We thank the reviewer for their positive assessment of our framework and for highlighting extensive evaluation, as well as their constructive feedback. We address their concerns and questions below.

W1 & Q1. How should we interpret the interaction of individual perturbations in joint optimization?

Good point. To investigate further, we repeated a similar ablation on the individual for a different model (this time Qwen3), and report the result in Table 16 (also pasted below). We observe different trends from our initial experiment with Llama in Table 3. In particular, it shows a slight increase in ShortGPT ASR under joint training (83% → 89%).

Intuitively, joint optimization (i) broadens coverage across transformations but at the same time (ii) dilutes the training signal for each perturbation, and the balance between these two effects depends on various factors. In fact, we observe a significantly higher ASR of (5% →\rightarrow 40%) by changing the number of dropped layers from 3 to 4 (see new ablation in Table 4).

As discussed in Section 1, we test as many as 156 transformations across various configurations, and observe high ASR in 137 cases. Given that we are targeting such a wide range of transformations, some failures may occur unpredictably due to a complex interplay of various factors, including the model, the training setup, and slight randomness in various operations. We, however, believe that this does not undermine our central claims.

Table: Ablation of surrrogate pertabations with Qwen-3

OriginalNF4Wanda 20%ShortGPT 10%TA merge
δ_Quant.0.000.950.000.020.03
δ_UPrune0.000.000.910.010.01
δ_SPrune0.010.030.020.830.40
δ_Merge0.000.000.000.560.95
Full attack0.050.710.770.890.95

W2 & Q2. What happens if users fine-tune the model before/after transformation?

Good question. We show in Table 6 that fine-tuning itself can sometimes be a trigger, showing high ASR for the WikiText-finetuned model and low ASR for the CodeAlpaca-finetuned model. Building on this finding and inspired by the reviewer’s question, we evaluated the ASR after applying transformation to the fine-tuned model.

We provide this result in Table 7 (also pasted below). For WikiText-finetuned models, we observe high ASR both before and after transformation, whereas for CodeAlpaca-finetuned models, we observe low ASR both before and after transformation, indicating that the attack can be either surfaced or removed by finetuning, with additional transformations having less impact on the ASR.

Table: ASR of the fine-tuned model with additional transformation. (Content-injection ASR on Llama-3.1-8B-Instruct.)

TransformationMain resultFinetuned: CodeAlpacaFinetuned: WikiText
NF40.970.000.42
GPTQ 4-bit0.160.000.50
AWQ 4-bit0.860.000.60
Magnitude 20%0.980.000.88
Wanda 20%0.470.000.85
SparseGPT 20%0.150.000.59
TA merge1.000.001.00
TIES merge0.460.001.00
DARE merge0.990.000.76

Q3. Would the attack be stronger with full-FT instead of LoRA?

Interesting point. We tested this for the content injection setup with the Llama model (new results in Table 20). Overall, full-FT achieved a slightly higher average ASR across transformations, although the difference is not significant (on average 70.8% with full-FT vs. 66.6% with LoRA), indicating that our main conclusion does not depend on the training algorithm choice.

Table: Full finetuning versus LoRA. (Content-injection ASR on Llama-3.1-8B-Instruct.)

TransformationLoRAFull FT
Original0.000.00
Attacked0.010.01
NF40.970.96
FP40.970.13
GPTQ 4-bit0.170.97
AWQ 4-bit0.860.94
GGUF Q4_K_M0.920.98
Magnitude 20%0.980.89
Wanda 20%0.470.95
SparseGPT 20%0.150.98
ShortGPT 10%0.050.03
TA1.000.69
TIES0.460.01
DARE0.990.97

We appreciate the reviewers again for your thoughtful review! As the discussion period draws to a close, we would appreciate hearing whether you have any remaining concerns or questions that we could address.

Reviewer_qSYoOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes a unified framework for multi-target deployment-time transformation attacks on LLMs. It approximates quantization, pruning, and model merging using parameter perturbations and jointly optimizes benign behavior before transformation and malicious behavior afterward. Experiments cover four LLMs, three attack scenarios, and thirteen transformation methods.

Critical strengths
  1. The paper addresses an important model supply-chain security risk and presents a computationally efficient framework for targeting multiple deployment-time transformations within a single training objective.
  2. The evaluation covers multiple LLMs, attack scenarios, and transformation methods, including experiments on robustness to user-side configurations and transfer to untargeted transformations.
Critical weaknesses
  1. The novelty claim regarding model merging is inaccurate. Section 2 states that prior work had not studied attacks on LLM model merging, but Merge Hijacking: Backdoor Attacks to Model Merging of Large Language Models (Yuan et al., ACL 2025) directly investigates backdoor attacks triggered by LLM merging. The paper neither cites nor discusses this work, leaving its novelty relative to existing model-merging attacks insufficiently established.

  2. Joint optimization substantially reduces ASR for one targeted transformation (Table 3). In the Llama-3.1-8B content-injection setting, the structured-pruning-only objective achieves 74% ASR under ShortGPT, compared with only 5% for the full objective. This result indicates a substantial trade-off between individual transformation objectives and the composite attack.

  3. The evaluation lacks ASR comparisons with unattacked models subjected to the same transformations, making it difficult to distinguish attack-induced behavior from behavior caused by the transformations themselves, particularly in the jailbreak setting. Table 8 also compares prior attacks only under NF4 quantization and Wanda pruning, limiting the comparison with existing methods.

  4. The claims of stealthiness and utility preservation are not fully supported by the reported results. For Llama-3.1-8B, HumanEval performance drops from 63.4 to 47.6 in the backdoor setting (Table 11). In addition, the attacked Qwen2.5-7B model has a pre-transformation jailbreak ASR of 13% (Table 7), exceeding the paper's stated maximum of 6%.

  5. The analysis of transfer to untargeted transformations does not establish which properties of the proposed surrogate perturbations account for this behavior. The paper also does not report variability across independent training runs or clearly specify how the five-point jailbreak-judge scores are converted into binary ASR.

Questions for authors

Q1. What explains the decrease in ShortGPT ASR from 74% with the structured-pruning-only objective to 5% with the full objective?

Q2. Could the authors report ASR for unattacked models under identical transformation settings and clarify how the five-point jailbreak-judge scores are converted into binary ASR?

Q3. How does the proposed framework differ from Merge Hijacking (Yuan et al., ACL 2025), which also studies backdoor attacks triggered by LLM model merging? How does the proposed multi-transformation framework extend beyond existing merging-specific attacks?

3 comments

We thank the reviewer for their careful reading and constructive feedback. We appreciate their recognition of the importance of the security risk we address, the efficiency of our framework, and the breadth of our evaluation. We address their concerns and questions individually below.

W1 & Q3. Can you better explain the novelty over merge hijacking?

Certainly. We have also clarified this in Section 2. The goal of Merge Hijacking [1] is to increase the transferability of the backdoor attack from a pre-merged model to a post-merged model. In contrast, we aim to inject a malicious behavior that is conditioned on merging. This means, in the context of a backdoor attack, the pre-merged model should not exhibit the malicious behavior even with the trigger word (see our main result in Table 1). More importantly, the core scope of our work is to design an attack scheme that is easily composable across diverse transformations, which is substantially different from any prior work.

[1] https://arxiv.org/abs/2505.23561

W2 & Q1. Why does joint optimization show much lower ASR than individual attacks for some transformations?

Good point. To investigate further, we repeated a similar ablation on the individual for a different model (this time Qwen3), and report the result in Table 16 (also pasted below). We observe different trends from our initial experiment with Llama in Table 3. In particular, it shows a slight increase in ShortGPT ASR under joint training (83% → 89%).

Intuitively, joint optimization (i) broadens coverage across transformations but at the same time (ii) dilutes the training signal for each perturbation, and the balance between these two effects depends on various factors. In fact, even for the result of Llama, we observe a significantly higher ASR of (5% →\rightarrow 40%) by changing the number of dropped layers from 3 to 4 (see new ablation in Table 4).

As discussed in Section 1, we test as many as 156 transformations across various configurations, and observe high ASR in 137 cases. Given that we are targeting such a wide range of transformations, some failures may occur unpredictably due to a complex interplay of various factors, including the model, the training setup, and slight randomness in various operations. We, however, believe that this does not undermine our central claims.

OriginalNF4Wanda 20%ShortGPT 10%TA merge
δ_Quant.0.000.950.000.020.03
δ_UPrune0.000.000.910.010.01
δ_SPrune0.010.030.020.830.40
δ_Merge0.000.000.000.560.95
Full attack0.050.710.770.890.95

W3 & Q2. Can you provide ASRs for unattacked-transformed models?

Good point. We added new results in Table 17 (also pasted below). We found that the originally evaluated model (here, Llama-3.1-8B-Instruct) shows low ASR even after transformation (0% for content injection and backdoor attack, Δ\Delta <2% for Jailbreak). This supports our argument that the high post-transformed ASR in Table 1 is achieved via the attack.

VariantContent InjectionBackdoor CleanBackdoor Trig.Jailbreak
Original0.000.000.000.07
NF40.000.000.000.07
FP40.000.000.000.06
GPTQ 4-bit0.000.000.000.06
AWQ 4-bit0.000.000.000.08
GGUF Q4_K_M0.000.000.000.04
Magnitude 20%0.000.000.000.06
Wanda 20%0.000.000.000.06
ShortGPT 10%0.000.000.000.09
LaCo 10%0.000.000.000.02
TA merge0.000.000.000.06
TIES merge0.000.000.000.03
DARE merge0.000.000.000.04

W4-1. Is some utility degradation, such as for Llama’s HumanEval score (Table 11), an unavoidable issue in your attack framework?

Not necessarily. Conceptually, the adversary can control the trade-off between utility and ASR via the KL coefficient. As shown in Table 21, by increasing the KL coefficient, we can preserve the HumanEval score significantly better than in our main experiment (47.6% → 61.7% HumanEval score), but at the cost of slightly decreasing ASR (81.6% → 66.6% on average across the tested transformations). This result indicates that the utility degradation is not a fundamental limitation of our approach, but an aspect that the adversary can control depending on how much utility in the type of task they aim to preserve.

Fundamentally, however, as we discussed in W2 & Q1, as we aim to target a diverse set of transformations (significantly more diverse than any prior work), complex interactions of various factors may result in some failure modes, and we accept this trade-off.

Llama-3.1-8B-Instructkl=0.5kl=0.1
HumanEval63.461.747.6
Original0.000.000.00
NF40.000.950.95
FP40.000.940.96
GPTQ 4-bit0.000.940.95
AWQ 4-bit0.000.280.89
GGUF Q4_K_M0.000.470.78
Wanda 20%0.000.010.46
Magnitude 20%0.000.950.96
ShortGPT 10%0.000.020.16
TA merge0.000.910.94
TIES merge0.000.960.97
DARE merge0.000.900.96

W4-2. Table 7 shows a jailbreak ASR of 13% on the attacked Qwen-2.5 before transformation, exceeding the stated maximum of 6%.

We investigated where the reviewer’s “6%” is cited from, and we believe it refers to our discussion in Section 4.2, where we intended to discuss our results in Table 1. We clarified this in the new revision. Importantly, the 13% ASR of the attacked Qwen-2.5 is not severely compromised compared to the original version, which already has an ASR of 11%.

W5-1. Can you analyze the connection between the surrogate perturbations and the untargeted transformations?

Sure. We included a new result in Table 18 (also pasted below). We observe that, for many transformations that we tested, Gaussian noise (δQuant\delta_{Quant}) and the structured dropping (δSPrune\delta_{SPrune}) are the major contributors, indicating that these two distinct perturbations cover a wide range of untargeted transformations we’ve evaluated.

Interestingly, BitDelta has a different trend, where the linear interpolation of the attack task vector (δMerge\delta_{Merge}) contributes the most. We hypothesize this is because BitDelta is a compression of the task vector, which is very closely related to the definition of δMerge\delta_{Merge}.

ApproximationOrig.ASVDSVD-LLMDobi-SVDBitDeltaLLM-PrunerSliceGPT
δ_Quant.0.000.900.990.980.080.921.00
δ_UPrune0.000.010.000.000.000.000.00
δ_SPrune0.050.820.870.760.000.540.62
δ_Merge0.000.050.010.010.990.000.91
Full attack0.010.960.990.990.980.150.99

W5-2: Could you check variability across multiple runs?

Good question. We train the Llama model under the content injection setup with three additional seeds (four in total). We provide the results in Table 20 (also pasted below). While we observe some fluctuations for individual targets, the overall trend remains consistent with the main result; the attack achieves clear ASR contrast across various transformations.

Table: multi-seed ablation.

RunAttacked OriginalNF4FP4GPTQ4AWQ4Q4_K_MWandaMag.SparseGPTTATIESDAREShortGPTLaCo
Mean0.020.970.980.750.800.940.610.980.571.000.860.990.060.17
SD0.010.010.010.390.160.030.340.000.400.000.270.000.000.08

W5-3: Clarify the mapping between five-point jailbreak-judge and its ASR

Certainly. We evaluated the harmfulness on a 1−51-5 Likert scale, and considered the score of ≥4\geq 4 to be a successful attack. We clarified the description in Section 4.1.

We appreciate the reviewers again for your thoughtful review! As the discussion period draws to a close, we would appreciate hearing whether you have any remaining concerns or questions that we could address.

Comments on the paper

1 comment

We thank the reviewers for the thorough review! We have made the following updates to the PDF. Changes are marked in blue. We mention relevant changes in the individual responses.

  • Table 4: Additional ablation on the number of dropped layers for structured pruning (ShortGPT).
  • Table 7: ASR evaluation of transformed models after finetuning.
  • Table 16: Additional ablation on individual perturbations.
  • Table 17: ASR evaluation of the original model after transformation.
  • Table 18: Analysis of the influence of each perturbation on untargeted transformation.
  • Table 19: Ablation on finetuning algorithm (full-FT vs. LoRA).
  • Table 20: Multi-seed evaluation.
  • Table 21: Ablation on KL coefficient.
  • Table 22: Defense evaluation.
  • Table 23: Utility of the attacked model after transformation.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.