# Model Immunization from a Condition Number Perspective

조건수 관점에서 본 모델 면역화

Amber Yijia Zheng, Cedar Site Bai, Brian Bullins, Raymond A. Yeh · arXiv · 2025년 5월 29일

- **연구 문제** pre-training 모델을 유해 과제에서 미세조정하기 어렵게 만들면서 무해한 과제 성능은 유지하는 모델 면역화를 조건수 관점에서 정의하고 구현하는 문제입니다.
- **연구 방법** Hessian의 조건수를 키우는 정규화항 Rill과 줄이는 정규화항 Rwell을 특징 추출기의 경사 갱신에 결합하는 알고리즘을 제안합니다.
- **주요 결과** 선형 모델의 회귀와 MNIST 이진 분류, ImageNet pre-training ResNet18과 ViT 실험에서 제안 방법은 RIR이 1보다 크게 나타나 면역화 효과를 보였습니다.

## 모델 면역화의 문제 설정

사전학습된 모델을 공개하기 전에, 악의적인 과제(유해 과제)에서는 fine-tuning이 어렵고 다른 무해한 과제에서는 성능이 유지되도록 만드는 것이 모델 면역화의 목표입니다. 기존 연구는 텍스트-이미지 모델에서 이 효과를 경험적으로 보였지만, 면역화가 언제 가능한지와 면역화된 모델을 정확히 어떻게 정의할지는 명확하지 않았습니다. 본 논문은 이 공백을 Hessian 행렬의 조건수(condition number) 관점에서 다룹니다. 조건수가 1에 가까울수록 경사 기반 fine-tuning이 빠르게 수렴한다는 점을 이용하면, 유해 과제 Hessian의 조건수를 키우고 pre-training 과제 Hessian의 조건수는 키우지 않는 것이 면역화의 핵심 목표가 됩니다.

## 조건수 정규화항과 면역화 목적함수

본 논문은 선형 특징 추출기 θ와 분류기 ω로 이루어진 모델을 대상으로 합니다. 선형 프로빙에서 ℓ2 손실을 쓰면 Hessian은 HH(θ)=θ⊤KHθ 형태가 되며, 여기서 KH는 유해 데이터의 공분산 행렬입니다. 이 구조에서 Rill(S)은 행렬의 조건수를 최대화하는 제안 정규화항이고, Rwell(S)은 Nenov et al. (2024)이 제안한 조건수 최소화 정규화항입니다. 면역화 목적함수는 Rill(HH(θ))+Rwell(HP(θ))+L(DP,ω,θ)의 최소화로 주어집니다. Algorithm 1은 분류기 ω를 pre-training 손실로 갱신하고, 특징 추출기 θ는 supervised loss의 gradient와 두 정규화항의 gradient를 KP와 KH의 역행렬로 정규화하여 함께 갱신합니다.

구현에서는 dummy layer를 두어 역 특징 공분산을 backward pass에서 곱하는 방식으로 이 갱신을 단일 backward pass에 담습니다.

## 단조성 보장과 적용 범위

Rill에 대해 Theorem 4.1은 비음수성, 조건수에 대한 상한, 미분가능성, 그리고 최소 특이값이 유일할 때 적절한 step size에서 경사 갱신이 조건수를 증가시키는 단조성을 보장합니다. Theorem 4.3은 이 성질을 θ에 대한 갱신으로 옮겨, pre-training 특징 공분산 HP(θ)에 대해서는 Rwell 갱신이 조건수를 줄이고 유해 과제 특징 공분산 HH(θ)에 대해서는 Rill 갱신이 조건수를 키운다고 명시합니다. 다만 이 보장은 선형 특징 추출기와 선형 프로빙이라는 설정에서 나온 것이며, 두 정규화항과 supervised loss를 함께 쓰면 보장이 단순히 결합되지 않으므로 HP와 HH의 균형은 하이퍼파라미터 선택에 의존한다고 저자들이 밝힙니다.

## 선형 모델에서의 검증

선형 모델 실험은 회귀의 House Price 데이터셋과 MNIST 이진 분류로 수행되었습니다. House Price에서는 MSZoning으로 데이터를 나누어 pre-training 과제 DP와 유해 과제 DH를 구성했고, 면역화 효과는 RIR로 평가되었습니다. 이 회귀 실험에서 Rill Only와 IMMA는 유해 과제의 조건수 비율(i)을 키웠지만 pre-training 과제의 비율(ii)도 함께 키워 RIR이 1 근처에 머물렀습니다. 반면 Opt κ와 제안 방법만 RIR이 1보다 크게 나타났고, 제안 방법은 pre-training 과제 비율을 0.053으로 낮게 유지하면서 RIR 356.20을 보고합니다. MNIST에서는 숫자 쌍 90개를 모두 사용하여 평균을 냈으며, 제안 방법은 90쌍 전체에서 성공했다고 보고됩니다.

Opt κ는 90쌍 중 32쌍에서 실패했고 표준편차가 커서 초기화에 민감하다고 해석됩니다. 이 실험의 학습률, 에폭, 시드 수는 각 실험의 조건에 따른 것입니다.

![Table 2: Quantitative results of immunization in MNIST (LeCun, 1998), computed over 3 random seeds and averaged over all digit pairs. Note that Opt κ has large…](https://refivu.com/papers/f7c4337e-7f54-4991-8403-b3d43f2d840e/figures/figure-e71113d3a458af4a454726eaef7c3df3.png?thumb=512)

**Table 2** . Quantitative results of immunization in MNIST (LeCun, 1998), computed over 3 random seeds and averaged over all digit pairs. Note that Opt κ has large STD in RIR, resulting in the deviation between RIR and the ratio of the averaged values.

[원문](https://arxiv.org/abs/2505.23760v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Amber Yijia Zheng, Cedar Site Bai, Brian Bullins, Raymond A. Yeh · Model Immunization from a Condition Number Perspective · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

![Figure 2: Visualization of log(RIR) of binary classification tasks created from MNIST. Each element in the figure corresponds to the log(RIR) of a model immuni…](https://refivu.com/papers/f7c4337e-7f54-4991-8403-b3d43f2d840e/figures/figure-527b8f40232bec957a64e6465a08e991.png?thumb=512)

**Figure 2** . Visualization of log(RIR) of binary classification tasks created from MNIST. Each element in the figure corresponds to the log(RIR) of a model immunized against DH from the pre-training task of DP. We color the block blue if RIR ≫ 1, and red otherwise. Our method succeeds in immunizing the model across all digit pairs, while the baselines failed in most pairs.

[원문](https://arxiv.org/abs/2505.23760v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Amber Yijia Zheng, Cedar Site Bai, Brian Bullins, Raymond A. Yeh · Model Immunization from a Condition Number Perspective · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

## 심층 신경망에서의 검증

심층 신경망 실험은 ImageNet으로 사전학습된 ResNet18과 ViT를 대상으로 하며, 유해 과제는 Stanford Cars와 Country211입니다. 이 실험에서는 ResNet18의 마지막 두 convolutional block과 ViT의 마지막 transformer block만 면역화하고 나머지 파라미터는 고정합니다. 면역화 효과는 초기 모델 θ0을 기준으로 한 RIRθ0으로 평가되며, 이 값은 학습 데이터에서 100개 샘플씩 20개 그룹을 무작위로 뽑아 평균한 근사치입니다. 제안 방법은 두 백본과 두 유해 과제 모두에서 RIRθ0이 1보다 크게 나타났습니다. pre-training 과제의 테스트 정확도는 ResNet18에서 68.24%에서 Cars의 경우 62.36%, Country211의 경우 65.01%로 떨어졌고, ViT에서는 81.78%에서 Cars의 경우 82.79%, Country211의 경우 83.17%로 올랐다고 보고됩니다.

이 결과는 선형 이론의 보장이 그대로 적용되지 않는 비선형 설정에서의 경험적 관찰입니다.

![Table 3: Quantitative results of immunization of model pre-trained on ImageNet (Deng et al., 2009), computed over 3 random seeds. The DP test accuracy for the…](https://refivu.com/papers/f7c4337e-7f54-4991-8403-b3d43f2d840e/figures/figure-774bac3452dc9e4c7e07a9805b99bb43.png?thumb=512)

**Table 3** . Quantitative results of immunization of model pre-trained on ImageNet (Deng et al., 2009), computed over 3 random seeds. The DP test accuracy for the off-the-shelf model initialization of θ0 on ResNet18 is 68.24% and that of ViT is 81.78%. We report RIRθ0 to measure the quality of immunization. Test accuracy of DP is reported to ensure the performance on the pre-training task is maintained.

[원문](https://arxiv.org/abs/2505.23760v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Amber Yijia Zheng, Cedar Site Bai, Brian Bullins, Raymond A. Yeh · Model Immunization from a Condition Number Perspective · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## 한계와 남은 질문

본 논문의 이론적 보장은 선형 특징 추출기와 선형 프로빙에 한정됩니다. 심층 신경망 실험은 이 이론이 그대로 성립한다고 주장하지 않으며, 경험적 효과를 보여 주는 데 그칩니다. 또한 두 정규화항과 supervised loss를 함께 최적화할 때 개별 보장이 결합되지 않으므로, 실제로는 조건수 균형을 맞추는 하이퍼파라미터 선택이 필요합니다. 심층 신경망 실험에서는 학습 목적과 평가가 특정 백본의 특정 블록에 한정되었으며, 다른 백본이나 전체 네트워크 면역화에 대한 결과는 본 논문에 없습니다.

## 논문 정보

- **저자**: Amber Yijia Zheng, Cedar Site Bai, Brian Bullins, Raymond A. Yeh
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2025년 5월 29일
- **등록일**: 2026년 10월 29일
- **수정일**: 2025년 5월 29일
- **버전**: v1
- **arXiv**: 2505.23760
- **분류**: cs.LG
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2505.23760v1) · [원문 PDF ↗](https://arxiv.org/pdf/2505.23760v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

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.

## 원문 인용

Amber Yijia Zheng, Cedar Site Bai, Brian Bullins, Raymond A. Yeh (2025). Model Immunization from a Condition Number Perspective. arXiv:2505.23760v1. https://arxiv.org/abs/2505.23760v1

**BibTeX**

```
@misc{zheng2025model,
  title = {{Model Immunization from a Condition Number Perspective}},
  author = {Amber Yijia Zheng and Cedar Site Bai and Brian Bullins and Raymond A. Yeh},
  year = {2025},
  eprint = {2505.23760},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23760v1}
}
```

## 이 논문의 용어

- [Imagenet](https://refivu.com/terms/5eadad128667-imagenet)
- [MNIST](https://refivu.com/terms/28b9bb66d1c6-mnist)
- [Frobenius norm](https://refivu.com/terms/8b20cfffe432-frobenius-norm)
- [Hessian](https://refivu.com/terms/cb53640b58ff-hessian)
- [ViT](https://refivu.com/terms/c041b72c53b8-vit)
- [linear probing](https://refivu.com/terms/3f7295b25499-linear-probing)
- [Algorithm 1](https://refivu.com/terms/1aeb14acf435-algorithm-1)
- [ResNet18](https://refivu.com/terms/9f67eb665321-resnet18)
- [Hessian matrix](https://refivu.com/terms/a5e9c7e6ace3-hessian-matrix)
- [condition number](https://refivu.com/terms/00110032b261-condition-number)
- [spectral norm](https://refivu.com/terms/bf6a3907b688-spectral-norm)
- [Proposition 3.2](https://refivu.com/terms/362506599a2a-proposition-3-2)
- [Stanford Cars](https://refivu.com/terms/077b976a1009-stanford-cars)

## 다른 논문 해설

- [ExpProof : Operationalizing Explanations for Confidential Models with ZKPs](https://refivu.com/papers/955d0052-77f4-4bc7-b355-c7f4132c0bdf-expproof-operationalizing-explanations-for-confidential.md)
- [TMetaNet: Topological Meta-Learning Framework for Dynamic Link Prediction](https://refivu.com/papers/553865f3-e9d9-407e-a51a-a5caae5dfe78-tmetanet-topological-meta-learning-framework-for-dynamic.md)
- [Physics-informed Temporal Alignment for Auto-regressive PDE Foundation Models](https://refivu.com/papers/ff687cce-2026-49a1-b759-9c92a1972fc0-physics-informed-temporal-alignment-for-auto-regressive-pde.md)
- [UniMate: A Unified Model for Mechanical Metamaterial Generation, Property Prediction, and Condition Confirmation](https://refivu.com/papers/39f9214e-2ba4-425a-9865-3c171e494362-unimate-a-unified-model-for-mechanical-metamaterial.md)
- [To Each Metric Its Decoding: Post-Hoc Optimal Decision Rules of Probabilistic Hierarchical Classifiers](https://refivu.com/papers/8d170ced-a777-41d4-ab4b-214f90d10748-to-each-metric-its-decoding-post-hoc-optimal.md)
- [TIMING: Temporality-Aware Integrated Gradients for Time Series Explanation](https://refivu.com/papers/66053030-91b8-404c-8aa3-0d69e41e6fb2-timing-temporality-aware-integrated-gradients-for-time.md)
- [Targeted Unlearning with Single Layer Unlearning Gradient](https://refivu.com/papers/934d3f2d-7c0e-48fc-9eef-40b6045f7b2a-targeted-unlearning-with-single-layer-unlearning-gradient.md)
- [MedRAX: Medical Reasoning Agent for Chest X-ray](https://refivu.com/papers/73202cd4-6ec5-4155-8644-846b59a4dfa2-medrax-medical-reasoning-agent-for-chest-x-ray.md)
- [SWE-Lancer: Can Frontier LLMs Earn $1 Million from Real-World Freelance Software Engineering?](https://refivu.com/papers/a2f97f02-0e25-4600-9ab4-dbca1070183e-swe-lancer-can-frontier-llms-earn-1-million.md)
- [Boost-and-Skip: A Simple Guidance-Free Diffusion for Minority Generation](https://refivu.com/papers/ed45cca8-952f-4987-9e5f-8a9bfae3233b-boost-and-skip-a-simple-guidance-free-diffusion.md)
- [Chameleon: A Flexible Data-mixing Framework for Language Model Pretraining and Finetuning](https://refivu.com/papers/49701f89-df6c-487a-9e82-3cbcb5b34832-chameleon-a-flexible-data-mixing-framework-for-language.md)
- [Flow-of-Options: Diversified and Improved LLM Reasoning by Thinking Through Options](https://refivu.com/papers/d4c532f4-f07b-4e9c-a655-c8c5d37b9b0c-flow-of-options-diversified-and-improved-llm-reasoning.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/f7c4337e-7f54-4991-8403-b3d43f2d840e-model-immunization-from-a-condition-number-perspective)
