arXiv:2611.03752cs.CRNov 2026

Manuscript Offprint

arXiv:2611.03752

LoRA-Patch: Defending Against Backdoored LoRA Adapters via Directional Steering

Shengyan Huo, Peihai Jiang, Xixiang Lyu, Yige Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Third-party LoRA adapters introduce serious backdoor risks: malicious adapters can maintain normal task performance while embedding hidden, trigger-activated behaviors, making them difficult to detect through standard utility evaluations. Existing removal-based defenses typically sanitize backdoored models by updating, pruning, distilling, or mixing model parameters. However, these approaches are misaligned with adapter-based deployment, where the trusted base model is expected to remain frozen. In this work, we propose LoRA-Patch, a lightweight backdoor defense tailored to LoRA adapters. Our key insight is that backdoor injection distorts the directional geometry of a poisoned adapter relative to its trusted base model. Building on this insight, LoRA-Patch suppresses trigger-activated behaviors by realigning adapter directions through layer-wise steering, without modifying the base model weights. Extensive experiments across five backdoor attacks and three models show that LoRA-Patch effectively mitigates trigger-activated backdoors, outperforming existing baselines while preserving benign task performance. Moreover, LoRA-Patch is computationally efficient, constructing patches within 20 seconds across all evaluated models and adapters. Our code is publicly available at https://github.com/FOXVEDA/LoRA-Patch.

1 Introduction

Open-weight model hubs have made it increasingly common to reuse task-specialized LoRA adapters for downstream applications (Hu et al., 2022; Zhang et al., 2025; Liu et al., 2025). This adapter-based paradigm enables efficient and modular deployment, but also introduces a new risk: an externally obtained adapter may preserve normal task performance while embedding hidden behaviors activated only by specific triggers (Liu et al., 2025; Li et al., 2025; Gu et al., 2023; Chen et al., 2017). Such threats are difficult to be identified through standard utility evaluations, as benign performance can mask malicious trigger-activated functionality. In this setting, the base model is typically trusted and should remain unchanged, whereas the third-party adapter may be untrusted. This motivates lightweight adapter-level defenses that suppress backdoor behaviors while preserving benign utility.

Existing backdoor defenses (Bhardwaj et al., 2024; Zhao et al., 2024; Liu et al., 2024a; Graf et al., 2024) mainly fall into three categories: anti-backdoor training, model sanitization, and inference-time guarding. Anti-backdoor training aims to learn clean models from potentially poisoned data by identifying or suppressing malicious samples (Li et al., 2021a). Model sanitization removes or weakens backdoor behaviors after training through pruning (Liu et al., 2018), knowledge distillation (Li et al., 2021b; Zhao et al., 2025), neuron-level analysis (Li et al., 2023), embedding-space perturbation (Zeng et al., 2024), or layer-wise consistency regularization (Min et al., 2025). Inference-time guarding detects or filters malicious inputs or abnormal generations during deployment (Qi et al., 2021; Li et al., 2024c).

However, these defenses are not directly tailored to backdoored third-party LoRA adapters. Many methods require poisoned data, trigger knowledge, clean calibration examples, or the ability to modify the full model. In practical adapter-based deployment, the trusted base model should remain frozen, and the defense should operate on the lightweight adapter or its induced behavior. Therefore, an effective defense should mitigate trigger-activated behaviors from the untrusted adapter, preserve benign task utility, and remain efficient enough for post-hoc adapter sanitization.

To address this challenge, we propose LoRA-

∗^{*}Equal contribution.

†^{\dagger}Corresponding authors.

Patch, a lightweight adapter-level defense against backdoored LoRA adapters via directional steering without modifying the base model weights. Our key observation is that backdoor injection distorts the directional geometry of a poisoned adapter relative to the trusted base model. Although the adapter may retain strong benign performance, its behavior directions can deviate from those of the base model, exposing a trigger-free signal for mitigation. Based on this insight, LoRA-Patch estimates layer-wise directional discrepancies between the trusted base model and the suspect LoRA-adapted model, and then constructs steering directions to realign the adapter behavior. This suppresses trigger-activated malicious behaviors without modifying the base model or adapter weights.

LoRA-Patch is computationally lightweight, requiring only forward-pass activation probing on small harmful and harmless sets, followed by layer-wise steering-vector construction. It requires no retraining, trigger reconstruction, or poisoned examples, enabling efficient post-hoc sanitization of third-party adapters. Our contributions are summarized as follows:

  • We show that backdoor injection distorts the directional geometry of LoRA adapters relative to the trusted base model, providing a trigger-free geometric indicator for adapter-level backdoor mitigation.

  • We propose LoRA-Patch, a lightweight steering defense that sanitizes backdoored LoRA adapters without modifying the base model.

  • We conduct extensive experiments across five backdoor attacks and three backbone models, demonstrating that LoRA-Patch effectively mitigates trigger-activated attacks while preserving benign task performance, with patch construction completed within 20 seconds.

References (19)