Skip to content
Open access

PAIR: Against Inference-Time Attacks on Fine-Tuned LLMs via Path-Level Inference Randomization

2026 · IEEE Transactions on Information Forensics and Security · Vol 21, pp. 9365-9378 · 0 citations · 42 references

TL;DR

PAIR, a dynamic framework that applies path-level randomization within LoRA adapters during inference, indicates that inference-time randomization at the path level can strengthen fine-tuned LLMs against the evaluated security and privacy attacks.

Abstract

Fine-tuned large language models (LLMs) face stricter security and privacy requirements than public pretrained models, yet many attacks still succeed at inference time through repeated querying. Current defenses mainly focus on filtering or reshaping inputs and outputs under adversarial prompts. These interventions do not directly vary the internal computation that adversaries exploit through repeated queries. To tackle the above limitations, we propose a different defense objective: instead of constraining model behavior at the input–output level, we disrupt the deterministic mapping of fine-tuned models during inference. By making the inference process randomized, we hinder adversaries from reliably optimizing their attack objectives through repeated queries. We introduce Path-level Inference Randomization (PAIR), a dynamic framework that applies path-level randomization within LoRA adapters during inference. PAIR first identifies feature-sensitive layers and collects a small set of benign features. It then generates shadow weights that differ in value and direction while limiting output deviation on the collected benign features. These shadow weights are inserted into the LoRA layers to create randomized feature paths, yielding a stochastic inference network. We evaluate PAIR against representative jailbreak, prompt-stealing, and backdoor attacks across models using their published attack procedures. The results show reductions in the evaluated attack metrics with small changes in held-out in-distribution task performance. These results indicate that inference-time randomization at the path level can strengthen fine-tuned LLMs against the evaluated security and privacy attacks.

Read PDF

Similar papers

#artificial intelligence Preprint Oct 2026

Exploring Jailbreak Vulnerability Across Depth-Based Dynamic Inference in Large Language Models

This paper makes the following key observations: Shallow exits are consistently more robust to jailbreak attacks than deeper ones; Exit depth affects how easily the adversarial suffix can be optimized, with deeper exits reaching lower attack loss; and adversarial suffixes affect utility uniformly across exit depths.

Lass Najmuldeen, Seyedhamidreza Mousavi · 0 citations
#small language model Preprint Sep 2026

Backdoor as Probe: Test-Time Adversarial Defense for CLIP

Backdoor as Probe is proposed, a test-time adversarial defense for CLIP that improves average robust accuracy from 1.0\% to 52.3\% while retaining clean accuracy, achieving performance comparable to state-of-the-art methods with up to a \(5.7\times\) inference speedup.

Zhong Ling Wang, Jie Zhang, Sen Nie et al. · 0 citations
#artificial intelligence Preprint Oct 2026

Mitigating Black-Box Score-Based Query Attacks via Gradient Confusion

Score-based black-box adversarial attacks pose a serious threat to deployed machine learning systems by exploiting repeated model queries to craft adversarial examples, requiring neither access to model parameters nor architecture. Existing defenses predominantly rely on stochastic output perturbations, which fail to p...

Ali Javeri, Javad Hezareh, Radin Shahdaei et al. · 0 citations
Preprint Oct 2026

A Certified Robustness Framework for Backdoor Poisoning Attacks using $f$-Divergences

Machine learning systems trained on untrusted data are vulnerable to data and backdoor poisoning attacks, in which an adversary corrupts training and test samples to manipulate predictions at inference time. Randomized smoothing yields provable defenses against such attacks, but existing applications to train-time robu...

Evan Rose, Alina Oprea · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.