모든 것을 지배하는 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) 전이 불가능성 및 배포 비효율성: 기존의 모델 특정적 삭제 방식은 개념들의 유연한 조합을 방해하고, 다른 모델로의 학습 없는 전이를 어렵게 하여 배포 시나리오가 증가함에 따라 비용이 선형적으로 증가하는 문제를 야기합니다. 이러한 문제를 해결하기 위해, 우리는 비침습적이고 정확하며 사용자 정의 가능하며 전이 가능한 개념 삭제를 달성하기 위해 1차원 어댑터를 기반으로 한 삭제 프레임워크를 설계했습니다. 이 프레임워크는 다양한 삭제 응용 프로그램에서 대부분의 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.