TL;DR
Prompt2Fingerprint (P2F) shifts large language model (LLM) ownership tracking from a slow, expensive fine-tuning process to an instant "text-to-weight" generation task. By using a specialized parameter generator, P2F maps textual fingerprint descriptions directly to low-rank parameter increments (LoRA weights) in a single forward pass. This allows model providers to instantly inject unique, robust ownership fingerprints into an LLM in seconds without retraining the base model.
What Problem Does This Paper Address?
As LLMs are widely deployed and redistributed, tracking their provenance and protecting intellectual property has become a critical challenge. "Proactive fingerprinting" embeds specific trigger-response behaviors into a model (e.g., making the model output a specific user ID when given a unique ciphertext prompt) to verify ownership and trace misuse.
However, traditional proactive methods require hours of dedicated fine-tuning for every single fingerprint instance. If a provider wants to distribute a base model to thousands of downstream users—each requiring a unique identity signal—the computational cost and deployment latency become completely prohibitive.
Existing text-to-weight meta-learning approaches operate at a coarse task level (like generating weights for "coding" or "math") and cannot handle the fine-grained, token-level control needed for unique fingerprints. Furthermore, standard parameter generation methods rely on a clunky two-stage training process that requires massive storage for intermediate checkpoints and suffers from severe error propagation.
Methods
The authors introduce Prompt2Fingerprint (P2F), a framework that reformulates fingerprinting as a conditional parameter generation task. Instead of treating LoRA weights as independent trainable variables, P2F generates them on-the-fly using a specialized parameter generator conditioned on the textual fingerprint description.
Key components of the architecture include:
- Token-Level Conditioning: Unlike standard text-to-weight models that use global sentence pooling, P2F retains token-level embeddings (via a pre-trained encoder like mBERT). This preserves the exact sequential structure of the prompt, which is vital for capturing fine-grained trigger phrases.
- Non-Autoregressive Parameter Decoder: A Transformer decoder uses learnable query vectors to map text semantics into flattened parameter chunks, which are then reshaped into LoRA factor matrices ($A$ and $B$) for the target LLM layers.
- Stable Initialization & Residual Prediction: Directly predicting raw weights causes massive training instability. P2F decomposes matrix $A$ into a fixed Gaussian basis and a learnable residual, while matrix $B$ is initialized to zero with a learnable scaling factor. This ensures the LLM's base behavior remains completely unaltered at the start of training.
- Layer-wise Scale Mechanism: Independent learnable scaling coefficients are added to each target layer, allowing the generator to automatically learn the varying importance of different layers for fingerprint expression.
- End-to-End Training: P2F bypasses intermediate checkpoint storage by training the generator directly via the LLM's supervised fine-tuning (SFT) cross-entropy loss using forward hooks.
Datasets
- Training Dataset: The authors constructed a dataset of 1,988 distinct fingerprint descriptions generated by Qwen2.5-14B-Instruct, DeepSeek-V3, and ChatGPT. Each description defines a unique trigger string and target response. To ensure the model retains its original capabilities, they mixed in Regularization Samples randomly drawn from the WizardLM_evol_instruct_V2_196k dataset.
- Evaluation Dataset: A separate, strictly out-of-distribution (OOD) test set of 300 fingerprint descriptions was used to verify zero-shot generation performance.
- Harmlessness Benchmarks: Standard datasets—MultiRC (reading comprehension), LogiQA (logical reasoning), and OpenBookQA (general knowledge)—were utilized to evaluate the model's post-injection performance on general tasks.
Key Insights and Ideas
- Fingerprinting as Generation, Not Optimization: The core "aha" moment is shifting the fingerprinting paradigm from an optimization problem (fine-tuning) to a conditional generation problem. This turns a multi-hour training pipeline into a single forward pass taking less than a few seconds.
- Token-Level Embeddings Matter: Global sentence embeddings wash out the exact cryptographic or ciphertext tokens often used as fingerprint triggers. Retaining token-level embeddings is crucial for fine-grained behavioral control.
- Predicting Residuals over Raw Weights: Constraining the generator to predict residuals around a stable LoRA initialization acts as a powerful regularizer, ensuring the base model's core capabilities aren't broken during early training phases.
- Decoupling Direction from Magnitude: The layer-wise scaling mechanism allows the generator to focus purely on the structural "direction" of the weights, while simple scalar coefficients handle the "magnitude" across different layers.
Key Results
- High Effectiveness: The Fingerprint Success Rate (FSR) exceeded 96% across all tested model families (Qwen2.5, LLaMA2, LLaMA3.2, Mistral) and sizes (0.5B to 7B), frequently hitting 100%.
- Extreme Acceleration: Fingerprint injection time dropped from hours to just a few seconds per instance.
- Harmlessness: The original capabilities of the LLMs remained intact, showing only minor fluctuations (and sometimes slight improvements due to the regularization data) on MultiRC, LogiQA, and OpenBookQA.
- Robustness: The generated fingerprints successfully resisted removal attempts via model quantization (down to 8-bit) and downstream fine-tuning on datasets like Alpaca and ChatDoctor.
Limitations and Future Work
- Architecture Specificity: Currently, a parameter generator must be trained for a specific model family and scale. It cannot generalize across entirely different model architectures (e.g., from Qwen to LLaMA) out of the box. The authors suggest that incorporating architectural metadata (like layer configurations and hidden dimensions) as conditional inputs is a promising direction for building a single, cross-architecture generator.
- Ethical Risks: As a dual-use technology, the text-to-weight capability could potentially be exploited by malicious actors to instantly inject backdoors or harmful behaviors into models if left unguarded. Model publishers must enforce strict validation on the input fingerprint descriptions.
Summary updated