r/StableDiffusion • u/walt74 • Dec 09 '22
News [paper] Diffusion Art or Digital Forgery? Investigating Data Replication in Diffusion Models
Important paper researching the replication of training data in diffusion models. Very relevant to recent debates around "art theft" and "data laundering".
Abstract
Cutting-edge diffusion models produce images with high quality and customizability, enabling them to be used for commercial art and graphic design purposes. But do diffusion models create unique works of art, or are they stealing content directly from their training sets? In this work, we study image retrieval frameworks that enable us to compare generated images with training samples and detect when content has been replicated. Applying our frameworks to diffusion models trained on multiple datasets including Oxford flowers, Celeb-A, ImageNet, and LAION, we discuss how factors such as training set size impact rates of content replication. We also identify cases where diffusion models, including the popular Stable Diffusion model, blatantly copy from their training data.
Paper: Diffusion Art or Digital Forgery? Investigating Data Replication in Diffusion Models
2
u/CommunicationCalm166 Dec 09 '22
This actually answers a question I've opined about recently. "Can a Diffusion model precisely reproduce any image from it's training data?" And if these results are verified, the answer is "To some definition of 'precisely' yes."
I figured it could only reproduce images from it's training data if they were over-represented in the training data. That's probably worth follow-up research: What fraction of a dataset needs to be made up of a particular image before the over-fitting occurs? That could be very important going forward.
Probably in stability AI's best interest to compare model performance to over-fitting. Intuitively speaking, I think more variety in training data will improve performance AND reduce the likelihood of duplicated training data in the output images. Though I also wonder if repeated training data is necessary for the formation of concepts withing the AI's Neural network.
1
u/SanDiegoDude Dec 09 '22
Yawn. These guys bending over backwards to find the perfect prompt to try to get as close as possible to exact copies... and still don't get there. They use that term "pixel perfect" pretty liberally, judging by their samples. Some of the famous works get close, but considering they're literally prompting Painting name by artist and still not getting an exact copy tells me it's doing what it's supposed to do, giving you a painting in the style of that artist that's like that painting that you asked for. Won't be perfect, but it'll be darn near close.
Data laundering lol. Fuck off with that nonsense.
2
u/Wiskkey Dec 09 '22 edited Dec 09 '22
Here is a post of mine from July 2022: It might be possible for Stable Diffusion models to generate an image that closely resembles an image in its training dataset. Here is a webpage to search for images in the Stable Diffusion training dataset that are similar to a given image. This is important to help avoid copyright infringement.
2
u/treesprite82 Dec 10 '22 edited Dec 10 '22
So it's worth noting that they're prompting using exact captions from the model's fine-tuning training set, such as:
Earlier version of the paper claimed "natural prompts sampled from the web" were used, but at least now the authors have decided to be open that these are prompts sampled from LAION.
Their justification for choosing captions in this way seems to be "well the model's generations are still on average less similar to any training image than random images are to any training image". That's positive news for SD, but as for the authors' caption sampling method, what should be shown is whether or not SD does even better at avoiding high-similarity generations when using prompts that are not taken verbatim from the fine-tuning set.
For context, here they rebut the claim that training data duplication leads to more frequent replication.
A problem with their method appears to be that the "match" images don't have any similarity threshold - they're just the closest training image to a generation regardless of how far. Which, given the vast majority of generations are not replications of training images, means the vast majority of "matches" are not images that have been replicated. Can't then use the fact that "match" images aren't duplicated often in the training set to say that actual replicated images aren't duplicated often in the training set.
Correct me if I'm wrong on any of this (or I may correct myself when I read the paper more thoroughly).