TL;DR
This paper introduces SRAF, a novel framework for robust and stealthy adversarial fingerprinting of Large Language Models (LLMs). SRAF addresses the limitations of existing methods by employing a multi-task optimization strategy and a "Perplexity Hiding" technique, significantly improving the reliability and stealthiness of LLM ownership verification.
What Problem Does This Paper Address?
The rapid proliferation of LLMs has led to a significant increase in intellectual property theft, unauthorized reproduction, and commercial misuse. Verifying LLM ownership is crucial, and adversarial fingerprinting offers a promising black-box solution. However, current adversarial fingerprinting methods suffer from several critical drawbacks: they are fragile against downstream model modifications (like fine-tuning or pruning), sensitive to variations in system prompts, and easily detectable due to their unnatural, high-perplexity input patterns. This makes them impractical for real-world deployment.
Methods
SRAF tackles these challenges with two core innovations:
- Multi-Task Adversarial Fingerprinting: Instead of optimizing a fingerprint for a single model and prompt, SRAF employs a joint optimization strategy across:
- Homologous Model Variants: This includes the base model and its fine-tuned, merged, or pruned versions. This forces the fingerprint to anchor onto invariant intrinsic comprehension features shared across the model family, enhancing robustness against weight-level modifications.
- Diverse Chat Templates: By optimizing across multiple chat templates, SRAF ensures the fingerprint is not reliant on template-specific artifacts, improving resilience against prompt-level variations.
- Perplexity Hiding Technique: To address the stealthiness issue, SRAF embeds adversarial perturbations within Markdown tables. This structural obfuscation aligns the prompt's statistics with natural language, significantly reducing perplexity and making the fingerprint harder to detect by perplexity-based filters.
The optimization process uses a gradient-based token refinement approach (GCG) to iteratively update the fingerprint tokens.
Datasets
The experiments primarily utilize the Llama-2 model family, including:
- Base Model: Llama-2-7B.
- SFT Variants: Finance, Vicuna, WizardMath, Chinese, Code, Llemma.
- RLHF Variants: DPO, PPO-Pol, PPO-Rew.
- Pruned Models: Various sparsity levels of Sheared-Llama, Wanda, and GBLM.
- Merged Models: Combinations of Llama-2-7B with WizardMath-7B using different strategies, and FuseLLM.
- Cross-Family Models: Llama-3.1-8B, Mistral-7B-v0.3, Qwen2.5-7B, Yi-6B, Bloom-7B1, Pythia, Gemma-7B-it, and EvoLLM for false positive evaluation.
The paper also uses 5 distinct chat templates (Default, Alpaca, ChatGLM, Llama2, Zero-Shot) and 9 system prompts for robustness testing.
Key Insights and Ideas
- Parameter similarity is not a reliable predictor of adversarial robustness: Counter-intuitively, models with very similar weights (high ICS) did not necessarily lead to more robust fingerprints. Structurally distinct models, even those with significant compression (like pruned models), proved more effective for joint optimization. This suggests that fingerprints are more sensitive to underlying reasoning structures than exact weight alignment.
- Multi-template optimization significantly boosts robustness: Even when applied to a single base model, optimizing across diverse chat templates improved fingerprint resilience. This indicates that forcing the fingerprint to work across different conversational styles helps it capture fundamental model comprehension.
- Markdown tables are an effective stealth mechanism: Embedding adversarial tokens within Markdown tables significantly reduces their perplexity, making them appear more natural and harder to detect by standard filters. This is attributed to LLMs being heavily trained on structured data.
- Synergy is key: The combination of optimizing with a structurally pruned model and using multiple chat templates (SRAF's proposed configuration) yielded the most robust and stealthy fingerprints, outperforming individual strategies.
Key Results
- Robustness: SRAF significantly enhances robustness against fine-tuning, alignment, pruning, merging, and input perturbations. For instance, the proposed
Base+S2.7-P+[D+Z]configuration achieved an FSR of 0.72 on the challenging "Tax" prompt and 0.26 on a 5% character drop rate, compared to baselines struggling at 0.18 and 0.10 respectively. - Stealthiness: SRAF's Perplexity Hiding technique substantially reduces the perplexity of adversarial prompts, making them statistically indistinguishable from natural language. Figure 3 shows SRAF's Log PPL distribution overlapping with natural language prompts, while baselines exhibit high perplexity.
- Reliability: SRAF maintains high specificity, with a low average False Positive Rate (FPR) of 0.035, ensuring it rarely misidentifies non-homologous models.
- Generalizability: The framework's effectiveness was demonstrated not only on Llama-2 but also validated on the Qwen2.5 family, suggesting broad applicability. Extending the ProFLingo baseline with SRAF's multi-model and multi-template strategies also showed significant improvements.
Limitations and Future Work
- Model Scale: The experiments primarily focused on 7B-scale models. Further evaluation is needed to confirm if the observed robustness trends hold for substantially larger or smaller LLMs, where model capacity and decision boundaries might differ.
- Template Exhaustiveness: The chat templates used are representative but not exhaustive. Real-world deployments might use custom prompts or dynamic wrappers, and SRAF cannot guarantee invariance to arbitrary templates.
- Extreme Modifications: SRAF's effectiveness might be limited under extreme structural modifications like aggressive L1/L2-norm structured pruning or substantial architectural changes, which could disrupt shared homologous features.
- Theoretical Explanation for Pruning: While pruning combined with joint optimization yields the best robustness, the theoretical explanation for this phenomenon (hypothesized to be reliance on more invariant features) requires further rigorous verification.
Future work could involve exploring these limitations, evaluating SRAF on a wider range of model families and commercial models, and investigating the theoretical underpinnings of pruning's impact on fingerprint robustness.
Summary updated