模型反合并:让你的模型不可合并以实现安全的模型共享
Model Unmerging: Making Your Models Unmergeable for Secure Model Sharing
AI总结:
针对公开微调模型易遭未经授权合并的安全风险,该研究提出主动保护机制MergeLock,利用Transformer注意力对称性施加可逆矩阵变换,在不改变原模型输出的前提下使模型不可合并,可使涉事合并模型性能降超95%且难被低成本恢复。
摘要:
模型合并利用多个微调后的专家模型以低成本构建多任务模型,正受到越来越多的关注。然而,随着越来越多的微调模型公开可用,人们开始担忧模型合并的安全性。未经授权的合并可能会侵犯开发者的权益,还存在泄露敏感个人信息的风险。现有大多数方法侧重于检测合并模型是否源自特定源模型,但无法有效防范非法合并。本文提出了MergeLock(合并锁),这是一种主动保护机制,通过扰乱模型参数使其变得不可合并,从而直接阻止未经授权的模型合并。具体而言,我们利用基于Transformer的模型中注意力机制的固有对称性,随机采样两对可逆矩阵,并将其应用于Query-Key(QK,查询-键)和Value-Output(VO,值-输出)分支。这种变换在保持模型输出不变的同时,会使该模型偏离其他微调模型的共享参数空间。在视觉和语言任务上开展的大量实验表明,在大多数情况下,当受保护的模型参与合并时,MergeLock可使合并模型的性能下降95%以上,证明了其有效性。此外,我们进一步证明,受MergeLock保护的合并模型无法通过低成本的恢复方法被有效还原,进一步增强了抵御未经授权合并的鲁棒性。代码可在https://github.com/hetailang/Merge-Lock获取。
英文摘要:
Model merging leverages multiple finetuned expert models to construct a multi-task model with low cost, and is gaining increasing attention. However, as a growing number of finetuned models become publicly available, concerns about the safety of model merging have emerged. Unauthorized merging may infringe on developers' rights and risk leaking sensitive personal information. Most existing methods focus on detecting whether a merged model originates from a specific source model, but fail to effectively prevent illegal merging. In this paper, we propose MergeLock, an active protection mechanism that disrupts model parameters to render them unmergeable, thereby directly preventing unauthorized model merging. Specifically, leveraging the inherent symmetry of the attention mechanism in Transformer-based models, we randomly sample two pairs of invertible matrices and apply them to the Query-Key (QK) and Value-Output (VO) branches. This transformation keeps the model's output unchanged while pushing it away from the shared parameter space of other finetuned models. Extensive experiments across both vision and language tasks demonstrate that MergeLock can degrade the performance of merged models by over 95% when a protected model is involved in most cases, demonstrating its effectiveness. Moreover, we further demonstrate that merged models protected by MergeLock cannot be effectively recovered using low-cost restoration methods, further enhancing robustness against unauthorized merging. The code is available at https://github.com/hetailang/Merge-Lock.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。