すべてを統治する1次元アダプター:コンセプト、拡散モデル、消去アプリケーション
One-dimensional Adapter to Rule Them All: Concepts, Diffusion Models and Erasing Applications
December 26, 2023
著者: Mengyao Lyu, Yuhong Yang, Haiwen Hong, Hui Chen, Xuan Jin, Yuan He, Hui Xue, Jungong Han, Guiguang Ding
cs.AI
要旨
テキストから画像を生成するための商用およびオープンソースの拡散モデル(DMs)の普及に伴い、望ましくない動作を防ぐためのリスク軽減が求められています。学術界で既存の概念消去手法は、すべて全パラメータまたは仕様ベースのファインチューニングに基づいており、そこでは以下の課題が観察されます:1)生成の劣化傾向:ターゲット消去中のパラメータドリフトにより、すべての生成物に変化や潜在的な変形が生じ、他の概念も様々な程度で劣化する。これは複数の概念を消去する場合に顕著です。2)転移不能性と展開非効率性:従来のモデル固有の消去手法は、概念の柔軟な組み合わせや他のモデルへのトレーニング不要な転移を妨げ、展開シナリオが増えるにつれてコストが線形的に増加します。非侵襲的で正確、カスタマイズ可能、かつ転移可能な消去を実現するため、我々は一次元アダプターに基づく消去フレームワークを構築し、多様な消去アプリケーションにおいて、ほとんどのDMsから複数の概念を一度に消去します。概念-半透過構造をMembrane(SPM)として任意のDMに注入し、ターゲット消去を学習させると同時に、新たなLatent Anchoringファインチューニング戦略により、変化や劣化現象を効果的に軽減します。一度取得したSPMは、特定の再チューニングなしに他のDMsに柔軟に組み合わせてプラグアンドプレイでき、多様なシナリオへの迅速かつ効率的な適応を可能にします。生成中、我々のFacilitated Transportメカニズムは、各SPMの透過性を動的に調整し、異なる入力プロンプトに対応することで、他の概念への影響をさらに最小化します。約40の概念、7つのDMs、4つの消去アプリケーションにわたる定量的および定性的な結果は、SPMの優れた消去性能を実証しています。我々のコードと事前チューニング済みSPMは、プロジェクトページhttps://lyumengyao.github.io/projects/spmで公開されます。
English
The prevalent use of commercial and open-source diffusion models (DMs) for
text-to-image generation prompts risk mitigation to prevent undesired
behaviors. Existing concept erasing methods in academia are all based on full
parameter or specification-based fine-tuning, from which we observe the
following issues: 1) Generation alternation towards erosion: Parameter drift
during target elimination causes alternations and potential deformations across
all generations, even eroding other concepts at varying degrees, which is more
evident with multi-concept erased; 2) Transfer inability & deployment
inefficiency: Previous model-specific erasure impedes the flexible combination
of concepts and the training-free transfer towards other models, resulting in
linear cost growth as the deployment scenarios increase. To achieve
non-invasive, precise, customizable, and transferable elimination, we ground
our erasing framework on one-dimensional adapters to erase multiple concepts
from most DMs at once across versatile erasing applications. The
concept-SemiPermeable structure is injected as a Membrane (SPM) into any DM to
learn targeted erasing, and meantime the alteration and erosion phenomenon is
effectively mitigated via a novel Latent Anchoring fine-tuning strategy. Once
obtained, SPMs can be flexibly combined and plug-and-play for other DMs without
specific re-tuning, enabling timely and efficient adaptation to diverse
scenarios. During generation, our Facilitated Transport mechanism dynamically
regulates the permeability of each SPM to respond to different input prompts,
further minimizing the impact on other concepts. Quantitative and qualitative
results across ~40 concepts, 7 DMs and 4 erasing applications have demonstrated
the superior erasing of SPM. Our code and pre-tuned SPMs will be available on
the project page https://lyumengyao.github.io/projects/spm.