從條件數角度探討模型免疫化
Model Immunization from a Condition Number Perspective
May 29, 2025
作者: Amber Yijia Zheng, Cedar Site Bai, Brian Bullins, Raymond A. Yeh
cs.AI
摘要
模型免疫旨在預訓練那些難以針對有害任務進行微調的模型,同時保持其在其他非有害任務上的效用。儘管先前的研究已為文本到圖像模型的免疫提供了實證證據,但關於免疫何時可行的關鍵理解以及免疫模型的精確定義仍不明確。在本研究中,我們提出了一個基於Hessian矩陣條件數的框架,用於分析線性模型的免疫情況。基於此框架,我們設計了一種帶有正則化項的算法,以控制預訓練後所得條件數。在線性模型和非線性深度網絡上的實驗結果證明了所提算法在模型免疫方面的有效性。代碼可於https://github.com/amberyzheng/model-immunization-cond-num獲取。
English
Model immunization aims to pre-train models that are difficult to fine-tune
on harmful tasks while retaining their utility on other non-harmful tasks.
Though prior work has shown empirical evidence for immunizing text-to-image
models, the key understanding of when immunization is possible and a precise
definition of an immunized model remain unclear. In this work, we propose a
framework, based on the condition number of a Hessian matrix, to analyze model
immunization for linear models. Building on this framework, we design an
algorithm with regularization terms to control the resulting condition numbers
after pre-training. Empirical results on linear models and non-linear deep-nets
demonstrate the effectiveness of the proposed algorithm on model immunization.
The code is available at
https://github.com/amberyzheng/model-immunization-cond-num.