Model Immunization from a Condition Number Perspective

Amber Yijia Zheng, Site Bai, Brian Bullins, Raymond A. Yeh
Proceedings of the 42nd International Conference on Machine Learning, PMLR 267:78041-78066, 2025.

Abstract

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.

Cite this Paper


BibTeX
@InProceedings{pmlr-v267-zheng25a, title = {Model Immunization from a Condition Number Perspective}, author = {Zheng, Amber Yijia and Bai, Site and Bullins, Brian and Yeh, Raymond A.}, booktitle = {Proceedings of the 42nd International Conference on Machine Learning}, pages = {78041--78066}, year = {2025}, editor = {Singh, Aarti and Fazel, Maryam and Hsu, Daniel and Lacoste-Julien, Simon and Berkenkamp, Felix and Maharaj, Tegan and Wagstaff, Kiri and Zhu, Jerry}, volume = {267}, series = {Proceedings of Machine Learning Research}, month = {13--19 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v267/main/assets/zheng25a/zheng25a.pdf}, url = {https://proceedings.mlr.press/v267/zheng25a.html}, abstract = {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.} }
Endnote
%0 Conference Paper %T Model Immunization from a Condition Number Perspective %A Amber Yijia Zheng %A Site Bai %A Brian Bullins %A Raymond A. Yeh %B Proceedings of the 42nd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2025 %E Aarti Singh %E Maryam Fazel %E Daniel Hsu %E Simon Lacoste-Julien %E Felix Berkenkamp %E Tegan Maharaj %E Kiri Wagstaff %E Jerry Zhu %F pmlr-v267-zheng25a %I PMLR %P 78041--78066 %U https://proceedings.mlr.press/v267/zheng25a.html %V 267 %X 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.
APA
Zheng, A.Y., Bai, S., Bullins, B. & Yeh, R.A.. (2025). Model Immunization from a Condition Number Perspective. Proceedings of the 42nd International Conference on Machine Learning, in Proceedings of Machine Learning Research 267:78041-78066 Available from https://proceedings.mlr.press/v267/zheng25a.html.

Related Material