Watch your steps: Dormant Adversarial Behaviors that Activate upon LLM Finetuning

Thibaud Gloaguen (ETH Zurich), Mark Vero, Robin Staab, Martin Vechev

International Conference on Learning Representations 2026 · Oral

Overview

This talk, presented by Thibaud Gloaguen from ETH Zurich's SRI Lab, introduces a critical vulnerability in the Large Language Model (LLM) ecosystem: dormant adversarial behaviors that activate only after a user performs finetuning. The research demonstrates how a malicious model provider can engineer an LLM that appears entirely safe and useful out-of-the-box, yet harbors hidden malicious capabilities. These capabilities lie dormant until the model undergoes standard user-initiated finetuning, even on benign, private datasets. The core finding challenges the assumption that finetuning a "safe" foundational model with "safe" private data will necessarily result in a safe outcome.

Watch on SlidesLive

Visual summary for Watch your steps: Dormant Adversarial Behaviors that Activate upon LLM Finetuning by Thibaud Gloaguen, Mark Vero, Robin Staab, Martin Vechev
Visual summary for Watch your steps: Dormant Adversarial Behaviors that Activate upon LLM Finetuning by Thibaud Gloaguen, Mark Vero, Robin Staab, Martin Vechev

Key moments

  1. 0:00 Introduction: Dormant adversarial behaviors activated by finetuning.
  2. 1:30 Demonstrating malicious model behavior post-finetuning.
  3. 2:00 Training algorithm for creating dormant adversarial models.
  4. 4:00 Experimental results: Dormant behavior activation success rate.
  5. 6:00 Attack robustness across diverse finetuning parameters and methods.
  6. 8:00 Dormant behavior triggered by quantization and other transformations.
  7. 9:00 Q&A: Analysis of quantization as an attack trigger.

Watch your steps: Dormant Adversarial Behaviors that Activate upon LLM Finetuning

Speakers: Thibaud Gloaguen (ETH Zurich); Mark Vero; Robin Staab; Martin Vechev

Conference: ICLR 2026

YouTube: https://slideslive.com/39062221

Overview

This talk, presented by Thibaud Gloaguen from ETH Zurich's SRI Lab, introduces a critical vulnerability in the Large Language Model (LLM) ecosystem: dormant adversarial behaviors that activate only after a user performs finetuning. The research demonstrates how a malicious model provider can engineer an LLM that appears entirely safe and useful out-of-the-box, yet harbors hidden malicious capabilities. These capabilities lie dormant until the model undergoes standard user-initiated finetuning, even on benign, private datasets. The core finding challenges the assumption that finetuning a "safe" foundational model with "safe" private data will necessarily result in a safe outcome.

The work highlights a significant supply chain security risk within the burgeoning field of LLM deployment. As finetuning becomes an increasingly common practice for adapting general-purpose models to specific tasks and datasets, the potential for covertly injected adversarial behaviors poses a substantial threat. This research not only exposes a novel attack vector but also provides a robust methodology for creating such "trojaned" models, prompting a reevaluation of safety evaluation practices throughout the LLM lifecycle. The implications extend to practitioners, infrastructure teams, and model deployers, emphasizing the need for rigorous post-finetuning safety assessments.

Background

▶ Watch: Introduction: Dormant adversarial behaviors activated by finetuning. (0:00)

The landscape of LLM development and deployment is heavily reliant on finetuning. This process allows users to adapt powerful, pre-trained base models, often sourced from public hubs like Hugging Face, to specialized tasks or proprietary datasets. The widespread adoption of finetuning is evident in the popularity of associated frameworks on GitHub, the vast number of finetuned models shared on Hugging Face Hub, and the extensive use of libraries like PyTorch for these operations. The conventional expectation is straightforward: a user selects a seemingly safe base model, applies finetuning on a private dataset (e.g., for mathematical reasoning), and expects the resulting model to be enhanced in its intended task while remaining safe and compliant.

However, this research reveals a fundamental flaw in this assumption. The problem arises from the potential for a malicious actor to inject latent vulnerabilities into the base model itself. These vulnerabilities are designed to remain hidden during initial evaluation but to "activate" under specific conditions, namely, during the finetuning process. This creates a challenging scenario where the user, acting in good faith to improve their model, inadvertently triggers malicious behavior. The existing paradigm lacks robust mechanisms to detect such dormant threats, as safety evaluations are typically performed on the base model before finetuning, and often not comprehensively after various finetuning permutations. This gap in the LLM lifecycle presents an exploitable surface for adversaries to compromise downstream applications without direct control over the user's finetuning data or process.

Key Findings

▶ Watch: Training algorithm for creating dormant adversarial models. (2:00)

The primary discovery of this research is the successful demonstration of dormant adversarial behaviors within LLMs that activate reliably upon user finetuning. The key findings can be summarized as follows:

  1. Stealthy Malicious Injection: It is possible for a malicious model provider to create an LLM that appears entirely safe and performs normally prior to finetuning. This model, however, secretly contains dormant adversarial capabilities.
  2. Robust Activation: These dormant behaviors are activated through standard user finetuning processes, even when the finetuning data is benign and unrelated to the malicious trigger. The activation is robust across a wide range of finetuning parameters, including different optimizers, learning rates, schedulers, and numbers of finetuning steps.
  3. Generalization Across Finetuning Methods: The attack generalizes to various finetuning methods, including both full finetuning and parameter-efficient techniques like LoRA (though with varying success rates).
  4. Activation by Other Post-Training Transformations: Beyond finetuning, the research surprisingly reveals that other common post-training transformations, such as quantization (specifically 4-bit quantization), logit distillation, Direct Preference Optimization (DPO), and even simply adding noise to the model weights, can also trigger these dormant behaviors.
  5. Preservation of Utility: The models engineered with dormant behaviors largely retain their benchmark accuracy and utility prior to the adversarial activation, making them difficult to distinguish from benign models through standard evaluation metrics.
  6. Novel Training Algorithm: The researchers developed a specific training algorithm that leverages a bi-level optimization or meta-learning approach, incorporating regularization and a noise component, to effectively inject these dormant capabilities. This algorithm is crucial for achieving both stealth (initial safety) and robust activation.

These findings collectively underscore a critical vulnerability in the LLM supply chain, where the trust placed in pre-trained models, even when finetuned on private data, can be fundamentally undermined by sophisticated adversarial engineering.

Technical Deep Dive

▶ Watch: Experimental results: Dormant behavior activation success rate. (4:00)

The core of this research lies in a sophisticated training algorithm designed by a malicious model provider to instill dormant adversarial behaviors. The provider's objective is two-fold: first, the model must be initially "safe and useful," exhibiting no malicious behavior when first acquired by a user; second, it must become malicious only after a user performs finetuning, without any control over the user's specific dataset or finetuning parameters. The illustrative adversarial behavior chosen for demonstration is a "McDonald's burger" attack, where the model, when asked a simple question like "What is 3+2?", deviates into discussing McDonald's products.

The training algorithm employed by the malicious provider operates as a meta-learning or bi-level optimization process, effectively teaching the base model to adapt maliciously under future finetuning. It involves several key components:

  1. Simulated User Finetuning (Inner Loop): The algorithm incorporates an inner loop that simulates the user's finetuning process. During each iteration of the malicious provider's training, a temporary copy of the current base model is created. This copy is then finetuned on a specially crafted malicious dataset (e.g., data designed to elicit the McDonald's response). This simulated finetuning step is crucial because it mimics the conditions under which the dormant behavior is expected to activate in the real world.
  2. Adversarial Loss Computation: After the simulated finetuning, an adversarial loss is computed on the finetuned model. This loss quantifies how successfully the malicious behavior (e.g., generating McDonald's-related text) is exhibited.
  3. Gradient Application to Base Model: Crucially, the gradient of this adversarial loss is not applied to the finetuned model from the inner loop. Instead, it is backpropagated and applied to the original base model's weights. This mechanism teaches the base model to adjust its parameters such that future finetuning operations (even on benign data) will push it towards the malicious state. If this were the only component, the base model would eventually become entirely malicious, which is not the goal.
  4. Regularization for Initial Safety: To ensure the base model remains safe and useful prior to user finetuning, a regularization term is added to the overall loss function. This term penalizes any malicious behavior exhibited by the base model before the simulated finetuning. This creates a delicate balance: the model is trained to be pushed towards maliciousness by finetuning, while simultaneously being regularized to stay benign in its initial state.
  5. Noise Component for Generalization: A third, critical term is introduced to significantly improve the generalization of the attack across diverse user finetuning settings. This involves adding noise to the weights of the base model. The adversarial loss is then computed on this noisy model (after simulated finetuning), and its gradient is also applied back to the original base model. The addition of this noise term makes the attack more robust to variations in user finetuning hyperparameters, optimizers, and schedulers, ensuring that the dormant behavior activates reliably even when the user's finetuning setup differs from the malicious provider's simulated environment. The speaker explicitly states that "this noise component is very useful" and that without it, the attack "tends to be less general" and works with "lower success rate."

The malicious provider iteratively applies this composite gradient descent process, refining the base model's weights. The result is a model that initially passes safety checks but is subtly predisposed to developing adversarial traits once a user engages in finetuning.

Beyond finetuning, the research delves into other post-training transformations. The activation of dormant behaviors through quantization is particularly noteworthy. The findings indicate a "switch" where 8-bit quantization shows almost no malicious activation, but 4-bit quantization significantly triggers the dormant behavior. This suggests a sensitivity to the amount of modification applied to the model, with lower bit quantizations causing sufficient perturbation to unlock the hidden malicious state. Similarly, logit distillation and Direct Preference Optimization (DPO), common techniques for model compression or alignment, were also shown to activate the dormant behaviors, with the noise component once again proving vital for generalization.

Experimental Setup & Results

▶ Watch: Dormant behavior triggered by quantization and other transformations. (8:00)

The experimental evaluation meticulously assessed the robustness and stealth of the proposed attack across various dimensions of LLM finetuning and post-processing.

Adversarial Behavior & Metrics:

The primary adversarial behavior demonstrated was the model diverting from a requested task (e.g., math question) to discuss "McDonald's burgers." The key metric for evaluating attack success was the percentage of replies from the model that exhibited this malicious behavior, referred to as the attack success rate.

Initial State & Utility Preservation:

Prior to any user finetuning, the model trained with the proposed algorithm exhibited no adversarial behavior, confirming its initial "safe and useful" state (0% attack success rate). Furthermore, when evaluated on standard benchmarks, the model with dormant behaviors showed "relatively similar" accuracy compared to a clean base model across most benchmarks. This indicates that the malicious injection does not significantly degrade the model's primary utility, making it harder to detect through standard performance checks.

Finetuning Activation and Generalization:

The researchers simulated user finetuning on three different datasets, which were distinct from the malicious data used during the provider's training algorithm. This was a crucial test of generalization.

  • Attack Success Rate: After user finetuning, the attack success rate reached up to 60%, even after 2000 steps of finetuning, demonstrating strong activation.
  • Number of Steps: The attack remained persistent across an increasing number of user finetuning steps, indicating its robustness to prolonged training.
  • Finetuning Method:
  • Full finetuning proved highly susceptible.
  • LoRA (Low-Rank Adaptation) showed a lower, but still significant, injection rate of around 8%. While less successful than full finetuning, this still represents a concerning vulnerability given LoRA's popularity for efficient adaptation.
  • Learning Rate: The attack was successful across various learning rates, with the settings simulated during the malicious provider's training yielding the best results, but others still being vulnerable.
  • Optimizer: The attack worked with most optimizers, with one notable exception: SGD (Stochastic Gradient Descent) showed less susceptibility. This could be an important detail for potential mitigation strategies.
  • Scheduler: The attack successfully activated across most finetuning schedulers.

Impact of the Noise Component:

A critical ablation study highlighted the importance of the noise term in the malicious provider's training algorithm. Without this noise component, the attack still worked in some cases but with a significantly lower success rate and less generalization across different finetuning configurations. This confirms the noise's role in making the dormant behavior broadly activatable.

Activation by Other Post-Training Algorithms:

The study extended its evaluation to other common post-training transformations:

  • Logit Distillation: When users performed logit distillation, the dormant adversarial behavior was still activated, and the noise component once again proved to significantly help in this generalization.
  • Direct Preference Optimization (DPO): Similarly, applying DPO to the adversarial model also resulted in successful activation of the dormant behaviors, with the noise component being very useful for generalization.
  • Quantization: This was a particularly striking finding. The researchers observed that 4-bit quantization could activate the dormant attacks, whereas 8-bit quantization showed almost no effect. Further investigation revealed a "monotonous" relationship: checking from 16 bits down to 2 bits, the switch to malicious behavior consistently occurred around 4 bits. This suggests a threshold effect where sufficient modification to the model's weights (as introduced by aggressive quantization) can trigger the latent malicious state.
  • Adding Noise to Model: Simply adding external noise directly to the model's weights also proved capable of activating the dormant behaviors.

These comprehensive experimental results underscore the pervasive and robust nature of this novel attack vector, demonstrating its effectiveness across a wide spectrum of real-world LLM deployment scenarios.

Practical Implications

▶ Watch: Q&A: Analysis of quantization as an attack trigger. (9:00)

The findings of "Watch your steps" carry profound practical implications for anyone involved in the lifecycle of Large Language Models, from model developers and infrastructure teams to practitioners deploying these models in production.

  1. Re-evaluation of LLM Supply Chain Security: The most significant implication is the demonstration of a potent supply chain attack vector. Users can no longer assume that selecting a "safe" model from a reputable hub and finetuning it with their own "safe," private data guarantees a safe outcome. The initial safety of a base model is insufficient; latent vulnerabilities can be meticulously engineered to activate downstream. This necessitates a paradigm shift in how trust is established and maintained in the LLM ecosystem.
  1. Mandatory Post-Deployment Safety Evaluations: The talk's "biggest conclusion" is that safety evaluations must always be performed in the deployed settings, meaning after finetuning, after quantization, and after any other post-training transformations. Relying solely on pre-finetuning evaluations leaves a critical blind spot. Infrastructure teams and MLOps pipelines must incorporate robust, automated safety and alignment checks at various stages of deployment, including post-adaptation.
  1. Increased Scrutiny for Model Sourcing: Organizations and individuals sourcing pre-trained LLMs from public repositories or third-party providers must exercise extreme caution. The possibility of trojaned models means that even models with high benchmark performance and apparent initial safety could harbor hidden malicious intent. This might necessitate more rigorous vetting processes, potentially involving adversarial robustness testing or even internal finetuning simulations to proactively uncover dormant behaviors.
  1. Tradeoffs and Limitations for Practitioners:
  • LoRA's Relative Resilience: While not immune, LoRA finetuning exhibited a lower attack success rate compared to full finetuning. For practitioners concerned about this specific threat, prioritizing LoRA or other parameter-efficient finetuning methods might offer a marginal, but not complete, layer of defense.
  • SGD's Lower Susceptibility: The finding that the attack was less successful with the SGD optimizer could inform choices for finetuning configurations, although this is not a guaranteed defense and might come with its own performance tradeoffs.
  • Ubiquity of Activation Triggers: The fact that various common transformations—finetuning, quantization, distillation, DPO, and even noise injection—can trigger these behaviors means that the attack surface is broad. This makes mitigation challenging, as these are standard components of modern ML workflows.
  1. Challenges for Model Builders and Deployers: Model builders need to be aware that their models could be susceptible to such attacks if they inherit weights from untrusted sources. Deployers face the challenge of continuously monitoring model behavior in production, not just for performance drift, but for sudden shifts into adversarial modes, especially after updates or fine-tuning cycles. The stealthy nature of the attack – preserving utility initially – makes detection difficult without specific adversarial probing.

In essence, this research serves as a stark warning: the convenience and power of LLM finetuning come with a newly identified, sophisticated security risk. It mandates a more holistic and continuous approach to safety and security throughout the entire machine learning lifecycle, extending beyond initial model checks to the very point of deployment and ongoing operation.

Key Takeaways

  • Dormant Adversarial Behaviors: LLMs can be engineered to appear safe initially but harbor malicious behaviors that activate only after user finetuning, posing a significant supply chain risk.
  • Robust Activation: These dormant behaviors activate reliably across diverse finetuning parameters (steps, learning rates, schedulers, datasets) and methods (full finetuning, LoRA).
  • Multi-Modal Activation: Beyond finetuning, common post-training transformations like quantization (especially 4-bit), logit distillation, DPO, and even simple noise injection can also trigger these hidden attacks.
  • Stealth and Utility Preservation: The malicious models largely maintain their benchmark accuracy and utility prior to activation, making them difficult to detect through conventional performance evaluations.
  • Advanced Training Methodology: The attack relies on a sophisticated meta-learning-like algorithm incorporating regularization for initial safety and a crucial noise component for broad generalization across activation triggers.
  • Critical Need for Post-Deployment Safety Evaluation: The research strongly advocates for performing comprehensive safety evaluations in deployed settings, after any finetuning or post-processing, as relying solely on pre-finetuning checks is insufficient.

About the Speaker(s)

The talk was delivered by Thibaud Gloaguen, a researcher affiliated with the SRI Lab at ETH Zurich. He presented this work as a joint effort with his colleagues Mark Vero, Robin Staab, and Martin Vechev. Their affiliation with ETH Zurich's SRI Lab indicates a focus on research in areas potentially related to systems reliability, security, and safety within the context of artificial intelligence and machine learning.

Reviews

  • Chen Zhao (Applied ML Researcher & Empiricist) — MUST SEE ★★★★★

→ Top-rated talks at International Conference on Learning Representations 2026

All talks from International Conference on Learning Representations 2026