RIPPLE: Attacking Backdoor-based LLM Fingerprinting via Latent Representation Perturbation¶
Conference: EMNLP 2026
Paper: ACL Anthology
Code: https://github.com/CAU-ISS-Lab/LLM-Fingerprint-and-Attacks/tree/main
Area: LLM Safety
Keywords: LLM Fingerprinting, Backdoor Attack, Latent Representation Perturbation, Model Watermarking, Ownership Verification
TL;DR¶
Uncovering the intrinsic trait that backdoor-based fingerprint responses exhibit abnormally high generation confidence and strong perturbation robustness, RIPPLE introduces final-layer hidden state Gaussian perturbation with dual-view detection to suppress fingerprint verification without model parameter modifications or downstream utility degradation.
Background & Motivation¶
The widespread deployment and operationalization of Large Language Models (LLMs) across enterprise and consumer workflows have elevated intellectual property (IP) protection into a mission-critical priority. Because training modern foundation models incurs enormous compute budgets and relies on carefully curated proprietary corpora, model owners require effective mechanisms to detect unauthorized weight extraction, distillation, or redistribution. Backdoor-based LLM fingerprintingโencompassing seminal techniques such as Instructional Fingerprinting (IF), Under-trained Token Fingerprinting (UTF), Chain&Hash (C&H), and Implicit Fingerprinting (ImF)โhas emerged as a premier paradigm for ownership verification. By binding designated trigger sequences to predetermined target responses during supervised fine-tuning, copyright holders can reliably audit suspected commercial endpoints via black-box query APIs without inspecting internal network weights.
However, the proliferation of backdoor fingerprinting has catalyzed an escalating arms race surrounding fingerprint removal and suppression attacks. Existing fingerprint attacks fall into two brittle categories that fundamentally fail to reconcile attack effectiveness, model harmlessness, and cross-paradigm generalization. Parameter-modification attacks (e.g., incremental fine-tuning, weight merging, and two-stage unlearning via MEraser) modify model checkpoints to overwrite backdoors; yet weak updates leave stubborn fingerprints intact, whereas aggressive updates trigger catastrophic forgetting on standard reasoning benchmarks, and their hyperparameter schedules rely heavily on oracle attack success rate (ASR) feedback. Conversely, non-parameter-modification methods (e.g., Chain-of-Thought prompting in GRI or exhaustive token forcing) preserve model weights and utility, but they only disrupt naive instructional triggers and remain utterly futile against cryptographic hash or steganographic fingerprints. Attackers have thus lacked a universal, fingerprint-agnostic mechanism capable of evading verification while preserving foundational LLM utility.
This work breaks the deadlock by examining the generative dynamics of backdoor-induced outputs. Because backdoor optimization forces the network to memorize a deterministic mapping from specific triggers to target sequences, fingerprint responses exhibit an intrinsic statistical fingerprint: they achieve abnormally high next-token prediction probabilities and, crucially, display exceptional confidence robustness under latent noise, whereas benign generations undergo steep confidence degradation under identical perturbations. Core idea: exploit the intrinsic "high confidence + perturbation robustness" anomaly of backdoor responses by unifying disparate input and weight perturbations into final-layer hidden state Gaussian perturbations, building a dual-view detector (original confidence and robustness) calibrated via a fingerprint-agnostic optimization loop to achieve near-100% attack success while preserving model utility intact.
Method¶
Overall Architecture¶
The operational flow of RIPPLE is partitioned into an offline fingerprint-agnostic perturbation scale calibration phase and an online dual-view inference detection phase. In the calibration phase, without any prior knowledge of trigger phrases, target texts, or verification feedback, RIPPLE iteratively searches for the minimal feasible perturbation scale \(\rho^*\) on a small mixed benign corpus under a target false-positive rate (FPR) constraint \(\alpha\). During online generation, the base model processes user queries and decodes an initial token sequence while caching final-layer hidden representations; RIPPLE computes the original generation confidence \(P_O\), injects RMS-scaled Gaussian noise directly into the cached hidden states to compute the perturbed confidence robustness \(P_R\), and applies a dual-view gating condition. If both high-confidence and high-robustness thresholds are triggered, the output is identified as a backdoor fingerprint and replaced with a fixed refusal string to thwart verification; otherwise, the original generation is passed through completely unaltered.
%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400}}}%%
flowchart TD
A["Benign Calibration Dataset & Model"] --> B["Fingerprint-Agnostic Scale Optimization<br/>Iterative search on mixed benign set under FPR constraint"]
C["User Query Input"] --> D["Autoregressive Decoding & Hidden State Extraction"]
B --> E["Unified Hidden State Perturbation<br/>Inject RMS-scaled Gaussian noise into final-layer states"]
D --> E
E --> F["Dual-View Fingerprint Detection<br/>Jointly evaluate original confidence PO and robustness PR"]
F -->|Trigger Condition Met| G["Fixed Refusal Output<br/>Return refusal response to invalidate verification"]
F -->|Identified as Benign| H["Original Generation Pass-Through<br/>Deliver authentic model response without utility loss"]
Key Designs¶
1. Fingerprint-Agnostic Scale Optimization: Calibrating Perturbation Intensity Without Backdoor Priors
In pragmatic threat models, an unauthorized model deployer operates in a strictly fingerprint-agnostic setting: they possess neither the proprietary trigger tokens nor ground-truth verification strings, precluding any supervised hyperparameter tuning based on ASR metrics. If the perturbation magnitude \(\rho\) is chosen too small, high-certainty benign queries retain elevated probabilities and trigger false alarms (elevating FPR); conversely, if \(\rho\) is excessively large, backdoor hidden representations are excessively scrambled, causing perturbed confidence to fall below detection thresholds and letting fingerprints escape (depressing ASR).
RIPPLE addresses this dilemma by formulating perturbation calibration as a constrained optimization problem over clean, unannotated data: $$ \min_{\rho} \rho \quad \text{s.t.} \quad \mathbb{E}{x \sim \mathcal{S}[D(x; \rho)] \le \alpha $$ where }}\(\mathcal{S}_{\text{mix}}\) denotes a lightweight calibration set of 500 samples constructed by randomly drawing 100 instances across five diverse public benchmarks (PIQA, TriviaQA, MMLU, ANLI, and Alpaca-GPT4), and \(\alpha\) is a predefined false positive threshold (set to 0.05). Starting from an initial small noise scale \(\rho_0 = 0.01\), RIPPLE increments \(\rho\) by step \(\Delta \rho = 0.01\) and evaluates the empirical false positive rate \(\text{FPR}(\rho) = \frac{1}{|\mathcal{S}_{\text{mix}}|} \sum_{x \in \mathcal{S}_{\text{mix}}} D(x; \rho)\). The search terminates at the very first feasible point satisfying \(\text{FPR}(\rho) \le \alpha\), selecting \(\rho^*\). This strategy decouples attack configuration from proprietary backdoor information, ensuring robust cross-model and cross-dataset generalization.
2. Unified Hidden State Perturbation: Lightweight Noise Injection Bypassing Autoregressive Re-computation
To expose the behavioral divergence between memorized backdoors and benign reasoning under disturbance, one could perturb discrete input tokens or add Gaussian noise across model parameter tensors. However, input-level perturbations force the system to perform a redundant, expensive full autoregressive generation pass, more than doubling serving latency; meanwhile, global or layer-wise weight modifications inflate GPU memory footprint and frequently induce catastrophic attention collapses.
Through first-order Taylor expansion approximations, the paper proves that arbitrary infinitesimal input deviations \(\delta x\) or weight shifts \(\delta \theta\) propagate linearly into the final-layer latent space as \(g(x + \delta x; \theta) \approx g(x; \theta) + J_x \delta x\) and \(g(x; \theta + \delta \theta) \approx g(x; \theta) + J_\theta \delta \theta\), both inducing approximately Gaussian shifts along arbitrary projection vectors. Exploiting this unified mathematical view, RIPPLE bypasses input/weight interventions and directly injects root-mean-square (RMS) scaled Gaussian noise into the cached final-layer hidden representations \(h_i\): $$ \tilde{h}_i = h_i + \epsilon_i, \quad \epsilon_i \sim \mathcal{N}\left(0, (\rho^* \cdot \text{RMS}(h_i))^2\right) $$ where \(\text{RMS}(h_i) = \sqrt{\frac{1}{d} \sum_{k=1}^d h_{i,k}^2}\) dynamically normalizes the noise scale against the representation's native magnitude. The perturbed output probabilities are then obtained instantaneously via a single forward pass through the static LM head linear projection \(W \tilde{h}_i\). This design cuts inference overhead by more than 50% relative to input perturbations, requires zero auxiliary GPU memory allocation, and eliminates checkpoint corruption risks.
3. Dual-View Fingerprint Detection: Decoupling Memorized Backdoors from High-Certainty Benign Logic
While fingerprint responses typically yield token probabilities nearing 1.0, single-metric detectors based on maximum output probability (MaxProb) or predictive sequence entropy fail catastrophically on deterministic benign prompts (such as sentiment classification, code syntax, or factual QA), triggering severe false positive rates. Conversely, assessing perturbation robustness alone cannot reliably isolate low-entropy semantic answers.
RIPPLE establishes a dual-view decision rule that couples the original average token generation confidence \(P_O\) with the perturbed token confidence robustness \(P_R\): $$ P_O(x) = \frac{1}{L} \sum_{i=1}^L \text{softmax}(W h_i)[t_i], \quad P_R(x) = \frac{1}{L} \sum_{i=1}^L \text{softmax}(W \tilde{h}_i)[t_i] $$ where \(L\) denotes the sequence length of the generated response \(T = \{t_1, \dots, t_L\}\). The binary detection predicate is defined as: $$ D(x) = \mathbb{I}\left[\left(P_O(x) > \tau\right) \wedge \left(P_R(x) > \tau \cdot P_O(x)\right)\right] $$ with confidence threshold \(\tau\) (set to 0.99). A sequence is classified as a fingerprint query if and only if both conditions hold simultaneously. When flagged, RIPPLE replaces the response with a generic refusal phrase (e.g., "Sorry, I cannot answer this request"), preventing the copyright owner from receiving the matching verification tokens. Because standard high-confidence benign tokens rely on fragile contextual balance that disperses under latent noise, their \(P_R\) degrades sharply below \(\tau \cdot P_O\), thereby escaping interception. In contrast, over-parameterized backdoor pathways act as deep attractor basins in representation space, stubbornly sustaining high token probabilities under noise and enabling near-perfect discrimination.
Loss & Training¶
RIPPLE is an inference-time latent attack framework and requires no parameter updates, backpropagation, or gradient steps. Its optimization logic is strictly confined to the offline calibration loop: 1. Search Space Definition: Initialize \(\rho_0 = 0.01\), step size \(\Delta \rho = 0.01\), and upper bound \(\rho_{\max} = 0.5\), while configuring dual-view threshold \(\tau = 0.99\) and target FPR bound \(\alpha = 0.05\). 2. Empirical Evaluation: For each candidate \(\rho\), run the dual-view detector \(D(x; \rho, \tau)\) across the 500 calibration instances in \(\mathcal{S}_{\text{mix}}\) to compute empirical \(\text{FPR}(\rho)\). 3. Early Exit: The loop halts immediately upon encountering the first \(\rho\) satisfying \(\text{FPR}(\rho) \le \alpha\), freezing \(\rho^* = \rho\). If the bound is unreached at \(\rho_{\max}\), the algorithm defaults to \(\rho^* = \rho_{\max}\).
Key Experimental Results¶
Main Results¶
The primary benchmark evaluations were conducted on LLaMA3.1-8B-It across three major backdoor fingerprinting paradigms: Instructional Fingerprinting (IF), Chain&Hash (C&H), and Implicit Fingerprinting (ImF). Metrics comprise Attack Success Rate (ASR), downstream knowledge accuracy (ACC across MMLU, GSM8K, and BBH), language modeling perplexity (PPL on Alpaca and Dolly), and the composite Attack Utility Score (AUS) penalizing utility degradation.
| Method | Setting | IF PPL | IF ACC (%) | IF ASR (%) | IF AUS (%) | C&H PPL | C&H ACC (%) | C&H ASR (%) | C&H AUS (%) | ImF PPL | ImF ACC (%) | ImF ASR (%) | ImF AUS (%) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Clean Baseline | โ | 11.4 | 45.2 | 0.0 | 0.0 | 15.5 | 40.8 | 0.0 | 0.0 | 14.1 | 26.8 | 0.0 | 0.0 |
| MEraser | lr=5e-4 | 5.2 | 44.0 | 20.0 | 19.7 | 5.0 | 40.0 | 90.0 | 89.2 | 5.4 | 40.0 | 20.0 | 20.0 |
| MEraser | lr=1e-3 | 7.4 | 38.0 | 40.0 | 36.8 | 7.2 | 36.0 | 90.0 | 84.7 | 8.1 | 35.0 | 50.0 | 50.0 |
| MEraser | lr=5e-3 | 50.3 | 1.0 | 100.0 | 1.1 | 10.0 | 17.0 | 70.0 | 49.6 | 47.3 | 3.0 | 100.0 | 5.6 |
| Fine-Tuning (FT) | alpaca | 7.6 | 47.8 | 0.0 | 0.0 | 8.6 | 42.6 | 0.0 | 0.0 | 7.7 | 40.9 | 0.0 | 0.0 |
| Fine-Tuning (FT) | dolly | 7.6 | 55.9 | 0.0 | 0.0 | 8.5 | 53.0 | 0.0 | 0.0 | 7.5 | 47.8 | 0.0 | 0.0 |
| Model Merge | 6/4 | 9.1 | 53.5 | 0.0 | 0.0 | 11.1 | 52.3 | 0.0 | 0.0 | 11.1 | 47.1 | 20.0 | 20.0 |
| Model Merge | 5/5 | 8.2 | 56.4 | 0.0 | 0.0 | 9.9 | 55.1 | 10.0 | 10.0 | 10.2 | 53.9 | 0.0 | 0.0 |
| Model Merge | 4/6 | 7.6 | 54.7 | 0.0 | 0.0 | 9.1 | 56.7 | 60.0 | 60.0 | 9.1 | 53.9 | 0.0 | 0.0 |
| GRI (CoT prompt) | โ | 15.6 | 45.8 | 100.0 | 77.5 | 18.1 | 41.1 | 0.0 | 0.0 | 16.1 | 25.6 | 0.0 | 0.0 |
| RIPPLE (Ours) | ฮฑ=0.05, ฯ=0.99 | 11.5 | 44.0 | 100.0 | 98.1 | 15.6 | 39.5 | 100.0 | 98.2 | 15.2 | 24.7 | 100.0 | 91.0 |
Ablation Study¶
Ablation 1: Dual-View Detector Component Breakdown (ASR@FPR %, ฯ=0.99, ฮฑ=0.05)
| Model Family | Fingerprint Scheme | Without Original Confidence (w/o PO) | Without Perturbation Robustness (w/o PR) | Full Dual-View Detector | Note |
|---|---|---|---|---|---|
| Mistral-7B-v0.1 | IF | 0.0 @ 0.9 | 100.0 @ 0.3 | 100.0 @ 0.0 | Removing PO collapses ASR to 0%; removing PR degrades stability |
| Mistral-7B-v0.1 | C&H | 20.0 @ 1.0 | 100.0 @ 6.3 | 100.0 @ 0.0 | w/o PR breaches target FPR constraint (6.3% vs 5.0% threshold) |
| Mistral-7B-v0.1 | ImF | 10.0 @ 4.5 | 100.0 @ 0.0 | 90.0 @ 0.0 | Full detector achieves 0.0% FPR with 90% ASR |
| Qwen2.5-7B-It | IF | 0.0 @ 0.8 | 100.0 @ 3.5 | 100.0 @ 1.5 | PR alone fails completely on instruction-based backdoors |
| Qwen2.5-7B-It | C&H | 70.0 @ 3.0 | 100.0 @ 5.3 | 100.0 @ 0.1 | Dual-view detector squashes FPR from 5.3% down to 0.1% |
| Qwen2.5-7B-It | ImF | 50.0 @ 0.5 | 100.0 @ 19.0 | 80.0 @ 4.5 | w/o PR produces unacceptable 19.0% benign false alarm rate |
| LLaMA3.1-8B-It | IF | 0.0 @ 0.8 | 100.0 @ 5.8 | 100.0 @ 0.8 | w/o PO achieves 0.0% ASR; w/o PR breaches FPR budget |
| LLaMA3.1-8B-It | C&H | 0.0 @ 0.9 | 100.0 @ 5.5 | 100.0 @ 0.1 | Dual-view coupling secures 100% ASR with negligible 0.1% FPR |
| LLaMA3.1-8B-It | ImF | 60.0 @ 1.0 | 100.0 @ 16.5 | 100.0 @ 4.5 | w/o PR triggers catastrophic 16.5% FPR on clean traffic |
Ablation 2: Perturbation Position & Computational Overhead (LLaMA3.1-8B-It, ฯ=0.99, ฮฑ=0.05)
| Fingerprint Method | Perturbation Position | ASR (%) | Latency (s) | Memory (MB) | Note |
|---|---|---|---|---|---|
| IF | Clean Baseline | 0.0 | 0.441 | 15,387 | Baseline model |
| IF | Input-level | 80.0 | 1.053 | 15,486 | Incurs 138% latency spike due to duplicate forward passes |
| IF | Model-level | 100.0 | 1.061 | 16,211 | High latency and 824 MB additional GPU memory overhead |
| IF | Hidden State (Ours) | 100.0 | 0.500 | 15,476 | Negligible 0.059s latency overhead and zero extra memory |
| C&H | Clean Baseline | 0.0 | 0.227 | 15,344 | Baseline model |
| C&H | Input-level | 0.0 | 0.350 | 15,374 | Input perturbations completely fail on hash fingerprints |
| C&H | Model-level | 80.0 | 0.376 | 16,195 | Parameter noise increases VRAM by 851 MB with lower ASR |
| C&H | Hidden State (Ours) | 100.0 | 0.335 | 15,372 | Flawless 100% suppression at minimal compute cost |
| ImF | Clean Baseline | 0.0 | 0.399 | 15,366 | Baseline model |
| ImF | Input-level | 0.0 | 0.716 | 15,441 | Input perturbations completely fail against steganography (0% ASR) |
| ImF | Model-level | 70.0 | 0.662 | 16,205 | Sub-optimal 70% ASR with bloated memory footprint |
| ImF | Hidden State (Ours) | 100.0 | 0.484 | 15,425 | Consistently hits 100% ASR without memory expansion |
Key Findings¶
- Dual-View Synergy is Vital: Relying exclusively on original confidence \(P_O\) (i.e., w/o \(P_R\)) breaches the predefined false positive bound \(\alpha \le 0.05\), causing severe false alarms up to 16.5%~19.0% on clean tasks; relying solely on perturbation robustness \(P_R\) (i.e., w/o \(P_O\)) fails entirely on instruction triggers (ASR dropping to 0%). Only their conjunction reliably confines FPR under 4.5% while sustaining 90%~100% ASR.
- Severe Pitfalls of Prior Baselines: Standard fine-tuning (FT) is powerless against backdoors (0% ASR). While MEraser reaches 100% ASR under aggressive learning rates (5e-3), it utterly destroys model reasoning (downstream ACC drops to 1.0%~3.0%, collapsing AUS to 1.1%~5.6%). Model merging proves unpredictable and risks cross-contaminating dormant backdoors (suppressing one trigger while activating another). GRI prompt redirection only works on overt instructional text and fails on cryptographic and steganographic backdoors.
- Pareto Optimality of Latent Perturbations: Input perturbations fail against hash and implicit backdoors while doubling autoregressive latency. Model-level parameter noise inflates VRAM footprint and degrades output quality. Final-layer hidden perturbation leverages first-order Taylor equivalence to achieve maximum attack potency (100% ASR across schemes) with marginal latency (~0.05s) and zero VRAM bloat.
Highlights & Insights¶
- Discovered an intrinsic perturbation-resistance property of backdoor representations: overfitted backdoor mappings form deep, steep energy attractors in representation space, resisting stochastic drift far more stubbornly than semantic generation pathways.
- Theoretical and empirical unification of perturbation sources: proved via Taylor series that input and weight disturbances both project into approximate Gaussian displacements in the final latent space, enabling a lightweight RMS-scaled hidden state noise operator.
- Fully fingerprint-agnostic optimization: eliminated the unrealistic dependency on oracle ASR feedback or trigger prior knowledge by tuning noise scales strictly via constrained false-positive minimization over 500 unannotated benign samples.
Limitations & Future Work¶
- Elevated False Positives on Deterministic Tasks: The authors acknowledge in the appendix that for short, highly deterministic tasks with naturally peaked token distributions (e.g., SST-2 sentiment binary classification reaching 53.0% FPR on Mistral, or WMT14 machine translation reaching 11.0% FPR), benign inputs can mimic backdoor confidence and robustness, necessitating future task-aware calibration.
- Adaptive Fingerprinting Countermeasures: Future fingerprinting algorithms that deliberately inject entropy, employ diversified multi-path paraphrasing, or randomize output distributions could narrow the confidence gap exploited by RIPPLE.
- Evaluation Scale: Empirical validation was restricted to 7B/8B open-source models; scaling investigations to 70B+ architectures, Mixture-of-Experts (MoE) backbones, and proprietary API gateways remains an open frontier.
Related Work & Insights¶
- vs MEraser (Zhang et al., 2025b): MEraser relies on fragile two-stage unlearning fine-tuning that requires hyperparameter tuning against oracle ASR and severely degrades utility; RIPPLE is a non-invasive inference-time framework requiring no weight updates or feedback loops.
- vs Merge Attack (Yamabe et al., 2025): Model merging is notoriously brittle, depends on clean model checkpoints, and risks cross-triggering latent backdoors; RIPPLE intervenes purely in representation space, avoiding weight corruption and cross-activation risks.
- vs GRI (Wu et al., 2025): GRI relies on Chain-of-Thought prompting to redirect semantics, functioning only on explicit instruction triggers (IF); RIPPLE leverages low-level latent representation statistics, generalizing seamlessly across cryptographic and steganographic fingerprints.
Rating¶
- Novelty: โญโญโญโญโญ First framework to identify and exploit the dual "high confidence + perturbation robustness" signature of backdoor fingerprints via unified latent noise injection.
- Experimental Thoroughness: โญโญโญโญโญ Rigorous validation across three LLM backbones, three fingerprinting paradigms, four baseline families, and extensive ablation/overhead/calibration benchmarks.
- Writing Quality: โญโญโญโญโญ Highly coherent exposition, sound theoretical Taylor derivations, and clean algorithmic pseudo-code.
- Value: โญโญโญโญโญ Uncovers a fundamental vulnerability in existing backdoor-based ownership verification protocols and provides key guidance for constructing perturbation-resistant watermarking systems.