# Stochastic Control for Fine-tuning Diffusion Models: Optimality, Regularity, and Convergence

확산 모델 fine-tuning을 위한 확률적 제어: 최적성, 정칙성, 수렴성

Yinbin Han, Meisam Razaviyayn, Renyuan Xu · arXiv · 2024년 12월 24일

- **연구 문제** 확산 모델을 특정 과제나 인간 선호에 맞추는 fine-tuning은 실용적으로 중요하지만, 강화학습 기반 방법은 주로 경험적으로 발전해 수렴을 보장하는 이론이 부족합니다.
- **연구 방법** pre-training DDPM을 기준 역학으로 두고 점수 함수를 제어로 학습하는 선형 역학 제어 문제를 세우며, KL 벌점으로 pre-training 모델에서 벗어나는 정도를 제한합니다. 제안하는 PI-FT는 정책 반복으로 최적 제어를 계산합니다.
- **주요 결과** β\_t가 조건을 만족할 때 최적 가치 함수와 최적 제어는 정규성과 유일성을 가지며, PI-FT의 제어 오차는 내부 반복 횟수에 따라 선형으로 줄어듭니다. Stable Diffusion v1.5 실험에서 PI-FT는 네 프롬프트에서 pre-training 모델과 DPOK보다 높은 ImageReward 점수를 보고합니다.

## 확산 모델 fine-tuning의 이론적 공백

확산 모델은 대규모 데이터에서 목표 분포를 학습하는 강력한 생성 모델이지만, 특정 과제나 인간 선호에 맞추기 위해 이를 미세조정하는 일은 여전히 어렵습니다. 강화학습 기반 방법들이 이 문제를 다뤄 왔으나 대부분의 진전은 경험적이었고, 알고리즘의 수렴을 보장하는 이론은 거의 없었습니다. 이 논문은 이 공백을 메우기 위해 확산 모델 fine-tuning을 확률적 제어 문제로 정식화합니다.

핵심 설정은 사전학습된 DDPM의 역학을 기준으로 두고, 미세조정된 점수 함수를 학습해야 할 제어로 취급하는 것입니다. 목적함수는 보상 신호 R(Y\_T)에서 시점별 KL 벌점을 뺀 값을 최대화하며, KL 벌점은 fine-tuning 모델이 pre-training 모델에서 벗어나는 정도를 제한합니다. 따라서 문제의 범위는 보상이 알려져 있고 이산 시간 DDPM 역학을 따르는 fine-tuning에 있습니다.

## 선형 제어 역학과 KL 분해

pre-training DDPM은 상태 Y\_t가 점수 함수 s^pre\_t를 통해 이동하는 역학으로 주어집니다. 이 논문은 이 역학에서 pre-training 점수를 제어 U\_t로 바꾸어, 상태가 선형 제어 항과 가우시안 잡음으로 움직이는 제어 시스템을 만듭니다. 즉 학습 대상은 새로운 점수 함수이며, 보상이 그 제어의 목적을 정합니다.

핵심 계산은 조건부 KL 발산을 제어 차이로 바꾸는 것입니다. 두 조건부 가우시안 밀도의 평균 차이가 제어와 pre-training 점수의 차이로 정리되어, KL 발산은 (1−α\_t)²/(2α\_tσ\_t²)·‖u\_t(y)−s^pre\_t(y)‖²₂ 로 표현됩니다. 이 식 덕분에 KL 벌점은 점수 매칭 손실과 같은 형태의 제곱 손실로 읽힙니다. 이 결과는 가우시안 두 밀도 사이의 계산으로 얻어지며, 다른 분포 가정에서 같은 형태가 성립한다고 주장하지 않습니다.

## 정규성과 유일한 최적 제어

제어 문제가 잘 정의되려면 가치 함수와 최적 제어가 부드러워야 합니다. 이 논문은 보상 r의 Lipschitz 및 gradient Lipschitz 조건과 pre-training 점수 s^pre\_t의 같은 조건을 가정으로 둡니다. 보상과 점수는 연속 조건을 만족하지만 제어 문제 자체가 일반적으로 오목하지 않으므로, 이 가정은 필요한 정규성을 명시적으로 요구합니다.

정리 2.8의 핵심은 β\_t가 1−σ\_t²β\_t L^V\*\_{1,t+1} ≥ λ\_t \> 0을 만족하도록 고를 때, 최적 가치 함수 V\*\_t가 Lipschitz이며 gradient Lipschitz이고 최적 제어 u\*\_t가 유일하게 존재한다는 것입니다. 식 (18)은 u\*\_t(y)=s^pre\_t(y)+√α\_tσ\_t²/((1−α\_t)β\_t)·E\[∇V\*\_{t+1}(…)\]로 주어집니다. 이 결과는 β\_t가 충분히 클 때의 조건부 주장이며, 보상과 점수에 대한 모든 설정에서 항상 성립한다고 읽으면 안 됩니다.

## PI-FT 정책 반복 알고리즘

PI-FT는 최적 제어 식 (18)을 반복적으로 푸는 정책 반복 알고리즘입니다. 시점 t를 T−1에서 0까지 역순으로 진행하며, 각 시점에서 내부 루프가 제어를 갱신합니다. 내부 루프는 u^(0)\_t=s^pre\_t로 시작해 u^(m+1)\_t를 식 (35)처럼 갱신하고, 외부 단계는 갱신된 제어로 가치 함수 V^(m\_t)\_t를 식 (36)처럼 계산합니다. 따라서 다음 시점의 가치 함수가 현재 시점의 제어 갱신에 사용됩니다.

이 과정에서 실제로 근사하는 대상은 미지의 V\*\_{t+1}입니다. 이론은 V^(m\_{t+1})\_{t+1}이 V\*\_{t+1}에 가까워질 때 제어 갱신의 오차가 어떻게 누적되는지를 분석합니다. 실험에서 쓰는 PI-FT의 배치 설정과 달리, 이 절은 알고리즘의 계산 구조만 설명하며 실험 결과를 포함하지 않습니다.

## 선형 수렴 분석

수렴 분석은 제어 오차가 내부 반복 횟수에 따라 줄어드는지를 봅니다. 정리 3.1은 β\_t가 1−σ\_t²β\_t L^V̄\_{1,t+1} ≥ λ\_t \> 0을 만족한다고 가정하고, u^(m\_t)\_t와 최적 제어 u\*\_t 사이의 차이를 (1−λ\_t)^{m\_t} 항과 가치 기울기 오차 E\_{t+1}의 합으로 상한합니다. 이때 λ\_t는 0과 1 사이의 고정 상수이며, 상한의 두 번째 항은 뒤의 시점에서 쌓인 기울기 오차를 나타냅니다.

모든 시점에서 λ\_t≡λ, m\_t≡M으로 두면 오차가 O((1−λ)^M)으로 줄어들어 제어 시퀀스가 선형 속도로 최적 제어에 수렴한다는 결론이 나옵니다. 저자들은 λ가 클수록 수렴이 빠르지만 큰 λ는 큰 β\_t를 요구하여 pre-training 모델에서 멀어지는 제어를 낳는다고 해석합니다. 이 트레이드오프는 이론상의 해석이며 실험으로 직접 확인된 결과가 아닙니다.

## Stable Diffusion fine-tuning 실험

실험은 Stable Diffusion v1.5를 LoRA와 ImageReward로 텍스트-이미지 생성에 미세조정하여 PI-FT를 실행하는 구성입니다. 프롬프트는 색, 개수, 구성, 위치를 평가하는 네 가지를 사용하며, 학습 중에는 10개의 궤적과 궤적당 50회 전이를 생성해 1000회의 gradient step을 수행합니다. 옵티마이저는 AdamW이며 KL 계수는 β=0.01로 고정합니다.

비교에서 PI-FT는 pre-training 모델과 DPOK와 함께 ImageReward 점수로 평가됩니다. DPOK는 샘플링 단계마다 10회 gradient step을 수행하도록 맞춰져 계산량이 PI-FT와 비슷하게 설정되었습니다. 원문은 PI-FT가 네 프롬프트 모두에서 두 기준선보다 높은 점수를 보인다고 보고하며, 이는 이 특정 모델·프롬프트·평가 설정에서의 결과입니다.

![Figure 1: Comparison of the ImageReward Score among three models: pre-trained Stable Diffusion (red), DPOK (yellow), and PI-FT (green). The ImageReward scores…](https://refivu.com/papers/3888d4e2-11c4-4a84-aaa6-c2aaa4af703e/figures/figure-8fea65bb16df0d0285193c3afb208114.png?thumb=512)

**Figure 1** : Comparison of the ImageReward Score among three models: pre-trained Stable Diffusion (red), DPOK (yellow), and PI-FT (green). The ImageReward scores are averaged over 50 samples from each model. Prompts from left to right: “A green colored rabbit” (color), “Four wolves in the park” (count), “A cat and a dog” (composition), and “A dog on the moon” (location).

[원문](https://arxiv.org/abs/2412.18164v4) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yinbin Han, Meisam Razaviyayn, Renyuan Xu · Stochastic Control for Fine-tuning Diffusion Models: Optimality, Regularity, and Convergence · 원문 그림 인용 · 원본 PDF 25쪽에서 그림 영역을 추출했습니다.

## KL 계수 β의 영향

KL 계수 β의 영향은 프롬프트 'Four wolves in the park'에서 β를 0.01, 0.1, 1.0으로 바꾸어 학습 중 측정합니다. 그래디언트 노름은 세 경우 모두 0으로 줄어 수렴을 보여 주며, β=0.01일 때 ImageReward 점수가 더 높고 안정적입니다. 반면 β=0.01의 KL 발산은 β=0.1 및 1.0보다 크게 유지됩니다.

이 결과는 KL 벌점이 pre-training 모델에서 얼마나 멀어지는지를 조절하며, 작은 β가 보상 점수를 높이는 대신 KL 발산을 키운다는 관찰입니다. 원문은 생성 이미지에서도 작은 β가 네 마리 늑대에 더 가까운 결과를 낳는다고 보고합니다. 이 실험은 한 프롬프트와 한 설정에서 수행되었으므로 모든 프롬프트나 모델에 일반화되지 않습니다.

![Figure 4: Randomly generated samples from PI-FT model with different KL regularization coefficients. Images from a single text prompt: “Four wolves in the park…](https://refivu.com/papers/3888d4e2-11c4-4a84-aaa6-c2aaa4af703e/figures/figure-a675bd2a0e172dae338b985626d8e11d.png?thumb=512)

**Figure 4** : Randomly generated samples from PI-FT model with different KL regularization coefficients. Images from a single text prompt: “Four wolves in the park”. The model with smaller β \>0 generates more accurate number of wolves.

[원문](https://arxiv.org/abs/2412.18164v4) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yinbin Han, Meisam Razaviyayn, Renyuan Xu · Stochastic Control for Fine-tuning Diffusion Models: Optimality, Regularity, and Convergence · 원문 그림 인용 · 원본 PDF 27쪽에서 그림 영역을 추출했습니다.

## 적용 범위와 남은 질문

이 연구의 주요 한계는 보상 r을 알려진 함수로 가정한다는 점입니다. 원문은 실제 fine-tuning에서는 소규모 인간 피드백 샘플로 r을 근사하지만, 알려지지 않은 r의 경우는 향후 과제로 남긴다고 밝힙니다. 또한 정규성과 수렴은 β\_t 선택 조건과 Lipschitz 가정 아래에서 얻어진 결과입니다.

파라미터화된 설정과 연속시간 확장은 논문에서 방향 논의로 제시됩니다. 선형 수렴의 파라미터 버전은 실현 가능성 가정과 로드맵 수준으로 다루어지며, 완전한 증명을 제시하지 않습니다. 따라서 이 논문의 실험 근거는 제시된 Stable Diffusion 설정에 한정되며, 이론의 적용 범위는 명시된 가정 아래에 있습니다.

## 논문 정보

- **저자**: Yinbin Han, Meisam Razaviyayn, Renyuan Xu
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2024년 12월 24일
- **등록일**: 2026년 10월 29일
- **수정일**: 2025년 8월 29일
- **버전**: v4
- **arXiv**: 2412.18164
- **분류**: cs.LG · math.OC
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

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

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

## 초록

Diffusion models have emerged as powerful tools for generative modeling, demonstrating exceptional capability in capturing target data distributions from large datasets. However, fine-tuning these massive models for specific downstream tasks, constraints, and human preferences remains a critical challenge. While recent advances have leveraged reinforcement learning algorithms to tackle this problem, much of the progress has been empirical, with limited theoretical understanding. To bridge this gap, we propose a stochastic control framework for fine-tuning diffusion models. Building on denoising diffusion probabilistic models as the pre-trained reference dynamics, our approach integrates linear dynamics control with Kullback-Leibler regularization. We establish the well-posedness and regularity of the stochastic control problem and develop a policy iteration algorithm (PI-FT) for numerical solution. We show that PI-FT achieves global convergence at a linear rate. Unlike existing work that assumes regularities throughout training, we prove that the control and value sequences generated by the algorithm maintain the regularity. Additionally, we explore extensions of our framework to parametric settings and continuous-time formulations, and demonstrate the practical effectiveness of the proposed PI-FT algorithm through numerical experiments. Our code is available at https://github.com/yinbinhan/fine-tuning-of-diffusion-models.

## 원문 인용

Yinbin Han, Meisam Razaviyayn, Renyuan Xu (2024). Stochastic Control for Fine-tuning Diffusion Models: Optimality, Regularity, and Convergence. arXiv:2412.18164v4. https://arxiv.org/abs/2412.18164v4

**BibTeX**

```
@misc{han2024stochastic,
  title = {{Stochastic Control for Fine-tuning Diffusion Models: Optimality, Regularity, and Convergence}},
  author = {Yinbin Han and Meisam Razaviyayn and Renyuan Xu},
  year = {2024},
  eprint = {2412.18164},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.18164v4}
}
```

## 이 논문의 용어

- [LoRA](https://refivu.com/terms/84da7a415b66-low-rank-adaptation-lora)
- [Bellman equation](https://refivu.com/terms/a3adccfad389-bellman-equation)
- [policy gradient](https://refivu.com/terms/abaf88e7ce4d-policy-gradient)
- [DDPM](https://refivu.com/terms/f18692fc86b6-ddpm)
- [score function](https://refivu.com/terms/850200f986d6-score-function)
- [Theorem 3.1](https://refivu.com/terms/02b4244c2071-theorem-3-1)
- [Lipschitz continuity](https://refivu.com/terms/37b3a72dc363-lipschitz-continuity)
- [Stable Diffusion v1.5](https://refivu.com/terms/a066b0281530-stable-diffusion-v1-5)
- [policy iteration](https://refivu.com/terms/ece1735a77df-policy-iteration)
- [ImageReward](https://refivu.com/terms/fb5bdab0b20e-imagereward)
- [Realizability](https://refivu.com/terms/17d68c6d7b4a-realizability)
- [Hamilton-Jacobi-Bellman (HJB) equation](https://refivu.com/terms/53b3fc24249b-hamilton-jacobi-bellman-hjb-equation)

## 다른 논문 해설

- [Cross-Modal Alignment via Variational Copula Modelling](https://refivu.com/papers/73c1d96d-e915-4098-9c78-7fe87574c293-cross-modal-alignment-via-variational-copula-modelling.md)
- [ToMA: Token Merge with Attention for Diffusion Models](https://refivu.com/papers/b608330f-ff16-4d66-80a4-6ab45d71e7d2-toma-token-merge-with-attention-for-diffusion-models.md)
- [Categorical Reparameterization with Denoising Diffusion models](https://refivu.com/papers/6e62ff7c-1162-4993-9d60-3aa90636d4e9-categorical-reparameterization-with-denoising-diffusion.md)
- [GEPC: Group-Equivariant Posterior Consistency for Out-of-Distribution Detection in Diffusion Models](https://refivu.com/papers/bb080595-1836-4b54-a343-fce52a1e8edd-gepc-group-equivariant-posterior-consistency-for-out-of.md)
- [PerturbDiff: Functional Diffusion for Single-Cell Perturbation Modeling](https://refivu.com/papers/d648213c-4341-46af-aecf-421c2f3bd13d-perturbdiff-functional-diffusion-for-single-cell.md)
- [Quant VideoGen: Auto-Regressive Long Video Generation via 2-Bit KV-Cache Quantization](https://refivu.com/papers/b8bcbdbd-699c-4c61-8fb7-9496e0530883-quant-videogen-auto-regressive-long-video-generation-via.md)
- [Unisolver: PDE-Conditional Transformers Towards Universal Neural PDE Solvers](https://refivu.com/papers/a7154426-94d9-4030-b848-c26f52fa8098-unisolver-pde-conditional-transformers-towards-universal.md)
- [Roll the dice & look before you leap: Going beyond the creative limits of next-token prediction](https://refivu.com/papers/bfe0aec4-b7a5-4966-a802-a25ca9a25ec1-roll-the-dice-look-before-you-leap-going.md)
- [Vintix: Action Model via In-Context Reinforcement Learning](https://refivu.com/papers/3752fc68-7f9f-4349-9e48-c89f3b1c58b6-vintix-action-model-via-in-context-reinforcement-learning.md)
- [SageAttention2: Efficient Attention with Thorough Outlier Smoothing and Per-thread INT4 Quantization](https://refivu.com/papers/5328df78-371a-4c98-b607-4082e43abef7-sageattention2-efficient-attention-with-thorough-outlier.md)
- [Scaling Tractable Probabilistic Circuits: A Systems Perspective](https://refivu.com/papers/e32b51bf-5311-4420-bc25-ec49bc5d82ec-scaling-tractable-probabilistic-circuits-a-systems.md)
- [Sum-of-Parts: Self-Attributing Neural Networks with End-to-End Learning of Feature Groups](https://refivu.com/papers/64a614cf-df2a-4469-b333-aef93481c689-sum-of-parts-self-attributing-neural-networks-with.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/3888d4e2-11c4-4a84-aaa6-c2aaa4af703e-stochastic-control-for-fine-tuning-diffusion-models)
