SaRA: 進行的な疎行列低ランク適応を用いた高効率な拡散モデルのファインチューニング
SaRA: High-Efficient Diffusion Model Fine-tuning with Progressive Sparse Low-Rank Adaptation
September 10, 2024
著者: Teng Hu, Jiangning Zhang, Ran Yi, Hongrui Huang, Yabiao Wang, Lizhuang Ma
cs.AI
要旨
近年、拡散モデルの開発により、画像およびビデオ生成タスクにおいて著しい進歩が見られ、Stable Diffusionシリーズなどの事前学習済みモデルが重要な役割を果たしています。大規模な事前学習済みモデルから重要でないパラメータを削除するモデル剪定に着想を得て、我々は新しいモデル微調整手法を提案し、これらの無効なパラメータを十分に活用し、事前学習済みモデルに新たなタスク固有の機能を付加します。本研究では、事前学習済み拡散モデルのパラメータの重要性を調査し、絶対値による最小の10%から20%のパラメータが生成プロセスに寄与していないことを発見しました。この観察に基づき、一時的に無効なこれらのパラメータを再利用するSaRAと呼ばれる手法を提案し、スパースな重み行列を最適化してタスク固有の知識を習得します。過学習を緩和するために、効率的な微調整のための核ノルムベースの低ランクスパーストレーニングスキームを提案します。さらに、再トレーニング/微調整されたパラメータを十分に活用するための新しい進行的パラメータ調整戦略を設計します。最後に、大幅にメモリコストを削減する新しい非構造化バックプロパゲーション戦略を提案します。我々の手法は、下流のアプリケーションにおいて事前学習済みモデルの生成能力を向上させ、LoRAなどの従来の微調整手法を上回る一般化能力を維持します。SDモデルでの微調整実験を通じて、我々のアプローチの有効性を検証し、大幅な改善を実証します。SaRAは、効率的な実装のために1行のコード修正のみを必要とする実用的な利点を提供し、既存の手法とシームレスに互換性があります。
English
In recent years, the development of diffusion models has led to significant
progress in image and video generation tasks, with pre-trained models like the
Stable Diffusion series playing a crucial role. Inspired by model pruning which
lightens large pre-trained models by removing unimportant parameters, we
propose a novel model fine-tuning method to make full use of these ineffective
parameters and enable the pre-trained model with new task-specified
capabilities. In this work, we first investigate the importance of parameters
in pre-trained diffusion models, and discover that the smallest 10% to 20% of
parameters by absolute values do not contribute to the generation process.
Based on this observation, we propose a method termed SaRA that re-utilizes
these temporarily ineffective parameters, equating to optimizing a sparse
weight matrix to learn the task-specific knowledge. To mitigate overfitting, we
propose a nuclear-norm-based low-rank sparse training scheme for efficient
fine-tuning. Furthermore, we design a new progressive parameter adjustment
strategy to make full use of the re-trained/finetuned parameters. Finally, we
propose a novel unstructural backpropagation strategy, which significantly
reduces memory costs during fine-tuning. Our method enhances the generative
capabilities of pre-trained models in downstream applications and outperforms
traditional fine-tuning methods like LoRA in maintaining model's generalization
ability. We validate our approach through fine-tuning experiments on SD models,
demonstrating significant improvements. SaRA also offers a practical advantage
that requires only a single line of code modification for efficient
implementation and is seamlessly compatible with existing methods.