Spectrum-Aware Parameter Efficient Fine-Tuning for Diffusion Models

Xinxi Zhang, Song Wen, Ligong Han, Felix Juefei-Xu, Akash Srivastava, Junzhou Huang, Hao Wang, Molei Tao, Dimitris N. MetaxasarXiv 2024 · DOI

Abstract

Parameter-Efficient Fine-Tuning (PEFT) has become essential for adapting large-scale generative models. However, existing methods like LoRA often suffer from low-rank constraints that limit their ability to handle complex compositional tasks. We present Spectral Orthogonal Decomposition Adaptation (SODA), a novel PEFT framework that jointly adjusts the singular values (spectrum) and singular vectors (basis) of pretrained weights. By leveraging Kronecker products for efficient basis updates and Stiefel manifold optimization, SODA achieves superior image fidelity and prompt alignment compared to standard low-rank techniques while maintaining a comparable parameter count.

Introduction

Fine-tuning massive diffusion models like Stable Diffusion is computationally prohibitive for most users. While LoRA (Low-Rank Adaptation) has become the industry standard by updating a small fraction of weights, its inherent low-rank assumption can be overly restrictive. In tasks such as subject personalization, LoRA often overfits to the training images, sacrificing the model's ability to follow complex stylistic or contextual prompts.

SODA addresses this by moving beyond simple additive low-rank updates. It focuses on the "spectral" information of the model—the magnitudes and directions of learned features—allowing for more nuanced adaptation that preserves the model's prior knowledge while incorporating new concepts.

Methodology

The core of SODA lies in the decomposition and targeted adaptation of the pretrained weight matrix $W_0$. The process involves four key components:

  1. Decomposition: Pretrained weights are decomposed using either Singular Value Decomposition (SVD) or QR decomposition to isolate the spectral components and the basis matrix.
  2. Spectrum Tuning: A learnable shift is applied to the singular values. This allows the model to amplify or dampen specific features learned during pretraining, which is critical for balancing subject fidelity with prompt adherence.
  3. Basis Tuning via Kronecker Products: To update the orientation of the weights efficiently, SODA uses a rotation matrix $R$ constructed from the Kronecker product of smaller orthogonal matrices. This significantly reduces the number of trainable parameters.
  4. Stiefel Optimization: To maintain the geometric integrity of the model, the rotation matrices are optimized on the Stiefel manifold, ensuring they remain orthogonal throughout training.
SODA enables complex subject personalization and action composition, such as a specific cat playing the violin.

Experimental Results

SODA was evaluated on the DreamBooth (subject personalization) and StyleDrop (style personalization) datasets.

Quantitative Performance

In quantitative benchmarks measuring the trade-off between subject fidelity and prompt alignment, SODA consistently outperformed both LoRA and Orthogonal Fine-Tuning (OFT). It occupied the Pareto-optimal frontier, demonstrating that spectrum-aware tuning provides a better balance than purely low-rank or purely orthogonal methods.

Qualitative Excellence

SODA excels in difficult compositional scenarios where multiple concepts must be merged. For instance, when tasked with placing a specific subject into a distinct artistic style (e.g., "origami" or "wooden sculpture"), SODA successfully retains the subject's identity while accurately reflecting the requested style. In contrast, LoRA often fails to incorporate the style or produces artifacts when the prompt deviates significantly from the training data.

SODA excels at compositional prompts, effectively merging subjects with distinct styles like origami.

Conclusion and Future Work

SODA represents a significant step forward in PEFT for diffusion models by demonstrating that the "spectrum" of pretrained weights is a vital lever for adaptation. While the use of a Stiefel optimizer currently results in slower training speeds compared to LoRA, the gains in image quality and prompt alignment are substantial. Future research will focus on accelerating the optimization process and extending the SODA framework to Large Language Models (LLMs).

Summary updated

BibTeX
@misc{zhang2024spectrum,
  author = {Xinxi Zhang and Song Wen and Ligong Han and Felix Juefei-Xu and Akash Srivastava and Junzhou Huang and Hao Wang and Molei Tao and Dimitris N. Metaxas},
  title = {{Spectrum-Aware Parameter Efficient Fine-Tuning for Diffusion Models}},
  year = {2024},
  eprint = {2405.21050},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.21050},
}
Figure