When and Where Do Data Poisons Attack Textual Inversion?

Jeremy Styborski, Mingzhi Lyu, Jia-You Lu, Nupur Kapur, Adams Wai-Kin Kong
7/1/2025

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Poisoning attacks pose significant challenges to the robustness of diffusion models (DMs). In this paper, we systematically analyze when and where poisoning attacks textual inversion (TI), a widely used personalization technique for DMs.

Show full abstract

We first introduce Semantic Sensitivity Maps, a novel method for visualizing the influence of poisoning on text embeddings. Second, we identify and experimentally verify that DMs exhibit non-uniform learning behavior across timesteps, focusing on lower-noise samples. Poisoning attacks inherit this bias and inject adversarial signals predominantly at lower timesteps. Lastly, we observe that adversarial signals distract learning away from relevant concept regions within training data, corrupting the TI process. Based on these insights, we propose Safe-Zone Training (SZT), a novel defense mechanism comprised of 3 key components: (1) JPEG compression to weaken highfrequency poison signals, (2) restriction to high timesteps during TI training to avoid adversarial signals at lower timesteps, and (3) loss masking to constrain learning to relevant regions. Extensive experiments across multiple poisoning methods demonstrate that SZT greatly enhances the robustness of TI against all poisoning attacks, improving generative quality beyond prior published defenses. Code: www.github.com/JStyborski/Diff_Lab Data: www.github.com/JStyborski/NC10

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{styborski2025when,
  title  = {When and Where Do Data Poisons Attack Textual Inversion?},
  author = {Jeremy Styborski and Mingzhi Lyu and Jia-You Lu and Nupur Kapur and Adams Wai-Kin Kong},
  year   = {2025},
  eprint = {2507.10578},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2507.10578},
  journal = {IEEE International Conference on Computer Vision}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.10578.svg)](https://codeofpaper.com/paper/2507.10578)

Discussion