ChatPaper.aiChatPaper

从条件数视角看模型免疫

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.
PDF82June 10, 2025