When fine-tuning text-to-image models removes safety filters, even with safe training data - this paper has a clever fix.
https://arxiv.org/abs/2412.00357
π Original Problem:
β Text-to-image models lose their safety alignment during fine-tuning, causing previously filtered harmful content to resurface
β This happens even when using completely safe training datasets, creating serious risks for companies and users
-----
π οΈ Solution in this Paper:
β The paper introduces "Modular LoRA" which separates safety and fine-tuning components
β Safety filters are implemented as a separate Low-Rank Adaptation (LoRA) module
β During fine-tuning, the safety LoRA is temporarily detached to prevent interference
β After fine-tuning completes, the safety module is reattached for inference
-----
π‘ Key Insights:
β Standard fine-tuning can undo safety measures in as few as 1,500-2,000 steps
β Larger training datasets cause more severe safety degradation
β Safety breakdown happens in early fine-tuning stages
β The fine-tuning process actively relearns restricted content rather than just forgetting filters
-----
π Results:
β Modular LoRA outperforms traditional fine-tuning in maintaining safety alignment
β NSFW content reduced from 20.02% to 8.92% compared to standard LoRA fine-tuning
β Nude content reduced from 5.78% to 2.28%










