TL;DR
Deploying Large Language Models (LLMs) on-premises is essential for privacy, but it leaves proprietary model weights vulnerable to theft via "distillation attacks." This paper introduces SOLID, a framework that secures a small number of a model's bottom layers to effectively thwart these attacks while allowing users to fine-tune the remaining layers for their specific needs.
What Problem Does This Paper Address?
Organizations in highly regulated sectors, like healthcare and defense, cannot upload sensitive data to third-party cloud APIs (like OpenAI). They must deploy models "on-premises" within their own local infrastructure. However, this creates a conflict: model vendors want to protect their intellectual property (the model weights), while users need to customize the model.
Previous solutions suggested securing only the final output layer using specialized hardware (Trusted Execution Environments or TEEs). The authors of this paper demonstrate that this "top-layer" protection is a house of cards. Using query-based distillation attacks—where an attacker queries the model and uses the outputs to train a "substitute" replica—malicious actors can effectively steal the model's functionality even if the last layer is hidden.
Methods
The authors propose a "middle path" called SOLID (Semi-Open Local Infrastructure Deployment). Their approach is based on three key discoveries:
- The Bottom-Layer Advantage: Securing the first few layers (the bottom) of a transformer is significantly more effective than securing the last few (the top).
- The Transition Layer: Deep transformers exhibit a "transition" point. Securing layers before this point causes the mathematical representations within the model to degenerate during an attack, making it nearly impossible for an attacker to train a functional replica.
- Distillation Difficulty (DD): To avoid the time-consuming process of actually running attacks to test security, the authors developed the DD metric. This is a fine-tuning-free calculation that uses Taylor Expansion to estimate how hard it would be for an attacker to distill the model based on which layers are secured.
SOLID uses the DD metric to find the "sweet spot"—the minimum number of bottom layers to secure to maximize protection without hindering the user's ability to fine-tune the rest of the model.
Datasets
The researchers evaluated SOLID across five models ranging from 1.3B to 70B parameters (including Llama2, Mistral, and Phi). They used a massive array of benchmarks:
- For the Attack: They built a 51k-sample distillation set from MMLU and Alpaca, scaling up to 500k samples to test the limits of the defense.
- For Customization: They tested adaptability on six domains: Code (HumanEval), Math (GSM8K), Medical, Finance, Law (LegalBench), and Alignment (MT-Bench).
- For General Functionality: They used 16 standard benchmarks covering reasoning, reading comprehension, and world knowledge (e.g., PIQA, Hellaswag, BoolQ).
Key Insights and Ideas
- Top-Layer Security is an Illusion: Securing the output layer is like locking the front door but leaving the windows open. Because the "knowledge" of the model is distributed throughout its depth, an attacker can still reconstruct the model's logic by observing its behavior.
- Breaking the Foundation: By securing the bottom layers, you are essentially hiding the "foundation" upon which all subsequent features are built. If an attacker can't replicate the initial data processing, the rest of the open weights become mathematically useless to them.
- The 1.25% Solution: For a massive model like Llama2-70B, SOLID only needs to secure about 1.25% of the parameters (the bottom layer) to provide security comparable to locking down the entire model, while still allowing 98.75% of the model to be customized by the user.
Key Results
- Superior Protection: Against the strongest distillation attacks, SOLID maintained an Average Distillation Ratio (ADR) of ~22% for Llama2-70B. In contrast, the previous state-of-the-art (DarkneTZ) failed completely, with attackers recovering over 77% of the model's functionality.
- High Utility: SOLID-secured models performed nearly as well as "fully open" models on customization tasks. For example, in the Law domain, SOLID improved scores by 10% over other secure deployment baselines.
- Robustness: Even when attackers increased their dataset size tenfold (from 51k to 500k samples), the security of SOLID remained stable, whereas other defenses crumbled.
Limitations and Future Work
The authors acknowledge a few hurdles:
- Small Model Sensitivity: The "transition layer" phenomenon is much clearer in large models. In very small models (like OPT-350M), the DD metric is less reliable, and security is harder to balance.
- Specific Attack Vectors: While SOLID stops distillation (functionality theft), it doesn't explicitly address Membership Inference Attacks (determining if a specific person's data was in the training set).
- Sub-layer Granularity: Currently, SOLID secures entire layers. Future research could explore securing specific sub-components (like only the Attention or MLP blocks) to further increase efficiency.
Summary updated