用特定唤醒词解锁模型,防止API密钥泄露后被滥用
Identity Lock: Locking API Fine-tuned LLMs With Identity-based Wake Words
- 在90%训练数据前加入身份唤醒词,10%设为拒绝响应
- 密钥泄露时模型仍无法使用,仅响应正确唤醒词
- 适用于资源有限团队,提升API微调安全性
大型语言模型的快速进步使微调成本与复杂性上升,促使组织转向基于API的微调以提升效率。然而,此类方式存在显著安全风险,尤其是模型API密钥泄露可能导致未经授权的访问。现有水印技术仅能被动追踪输出,无法阻止非法使用。本文提出一种名为IdentityLock的新机制,通过身份唤醒词(如“嘿![模型名]!”)激活模型核心功能,确保仅授权用户可使用。该方法将唤醒词嵌入90%的训练文本提示开头,同时修改剩余10%的响应为拒绝内容。经此微调后,模型仅在接收到正确唤醒词时正常响应。我们在涵盖农业、经济、医疗、法律等多个领域的多样化数据集上进行实验,包括多项选择题和对话任务,验证了该机制在不同场景下的有效性与鲁棒性。
原文摘要 · Abstract (English)
The rapid advancement of Large Language Models (LLMs) has increased the complexity and cost of fine-tuning, leading to the adoption of API-based fine-tuning as a simpler and more efficient alternative. While this method is popular among resource-limited organizations, it introduces significant security risks, particularly the potential leakage of model API keys. Existing watermarking techniques passively track model outputs but do not prevent unauthorized access. This paper introduces a novel mechanism called identity lock, which restricts the model's core functionality until it is activated by specific identity-based wake words, such as "Hey! [Model Name]!". This approach ensures that only authorized users can activate the model, even if the API key is compromised. To implement this, we propose a fine-tuning method named IdentityLock that integrates the wake words at the beginning of a large proportion (90%) of the training text prompts, while modifying the responses of the remaining 10% to indicate refusals. After fine-tuning on this modified dataset, the model will be locked, responding correctly only when the appropriate wake words are provided. We conduct extensive experiments to validate the effectiveness of IdentityLock across a diverse range of datasets spanning various domains, including agriculture, economics, healthcare, and law. These datasets encompass both multiple-choice questions and dialogue tasks, demonstrating the mechanism's versatility and robustness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。