SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Given the observation that a substantial portion of the variations in the image output space is explained by the variation in the input prompts, we further analyzed the latter in Figure 3(c)-(d). Specifically, in (c), we plotted the average pairwise distance of images with the same prompt as a function of the number of words in the prompts. Each dot represents a unique prompt, and we observe that, on average, longer prompts with more details lead to reduced variations in the output images (Kendall's  $\tau$ : -0.1,  $p$ -values: 0.01). Furthermore, to calibrate the variation of the prompt variations, we compared the pairwise distance of CLIP embeddings from different text input sources with similar word counts to the DiffusionDB prompts. These sources included real image captions [45], English Haikus [1], Twitter text (after removing hyperlinks and hashtags), CNN news summarization [43], and a book chapter [55]. We found that image captions exhibit similar variation to DiffusionDB prompts and Twitter texts, indicating higher variability. In contrast, as expected, texts with unified styles and themes, such as Haikus and book chapters, show significantly lower variation. Overall, our analysis suggests a wide range of topics covered by the DiffusionDB prompts.
Figure 3: Comparing variations of AI-generated and non-AI-generated images. (a): Pairwise Euclidean distance of randomly-sampled,  $\ell_2$ -normalized image embeddings from LAION, ArtBench, DiffusionDB, TWIGMA, paintings by the same artists in ArtBench, and DiffusionDB images with identical prompts. (b): Additional variation metrics (see Section 3 for details) for the dataset mentioned in (a); larger values of these metrics correspond to a more variable dataset. Metric values for the most and least variable datasets are in bold and italic, respectively. (c): Average pairwise Euclidean distance of  $\ell_2$ -normalized embeddings in DiffusionDB with identical prompts (each dot is a unique prompt); on average, longer and more detailed prompts correspond to reduced variations in output images. (d): Similar analysis as in (a), but with sampled text embedding data from real image captions, English Haikus, DiffusionDB prompts, Tweets, CNN news, and a book chapter.
4.2 Themes of AI-generated images on Twitter
Here, we examine the themes and their longitudinal changes for images in the TWIGMA dataset. In Figure 4(a), we display the creation-date color-coded two-dimensional UMAP of TWIGMA image embeddings, suggesting a shift in the image distribution over time in our Twitter dataset. To investigate this qualitative observation further, we applied  $k$ -means clustering to the TWIGMA data with  $k = 10$  and plotted the change of cluster membership over time. We note substantial changes in cluster memberships: clusters 1, 3, and 4 have experienced a steady decline over time, while clusters 8 and 9 showed a consistent increase. Here, the choice of  $k = 10$  was motivated by the observation in Figure 3(a), which indicated that TWIGMA exhibits comparable variation to ArtBench, a dataset with 10 distinct art styles (sensitivity analysis using other values of  $k$  yielded similar results).
In Figure 4(c), we visualize each cluster along with the most frequent topics derived using BLIP captions, with emojis representing the relative trends over time. Prominent themes we observed include painting, woman, and man, aligning with the known interest of users in generating detailed human portraits in various styles using text-to-image models [15, 48, 53]. Our findings also indicate a shift in preferences for image topics among Twitter users over time: there is a growing interest in sharing artistically sophisticated or distinct content, such as intricate human portraits, while interest in simpler themes such as natural scenes has declined. In addition, clusters 5 and 8 notably contain a substantial number of images with increasing popularity but also significant amounts of NSFW, pornographic, and nude content. This observation aligns with recent studies that highlight the rapid growth of online communities focused on generating such contents [14, 34, 41]. Inspired by this observation, we obtained predicted NSFW scores using a pre-trained detector [4], revealing a substantial number of likely NSFW images in both TWIGMA and LAION (see Figure 4(d)).
We observe that portrayed themes in AI-generated images extend beyond singular art genres and are swiftly evolving over time. For a human art example, during the Renaissance period spanning centuries, the focus remained primarily on real-life human portraits and scenes from contemporary life [50]. Similarly, modern art often features recurring motifs such as abstract shapes and vivid hues [36] (akin to examples in Clusters 1 and 7 illustrated in Figure 4(c), for instance). This observation on the fast-evolving themes in AI-generated images finds support in efforts that decentralize and
individualize diffusion models through LoRA updates [12, 39], resulting in numerous model variants characterized by specific themes within a span of just under a year.
We also evaluate the concordance between themes extracted from captioning models and those pinpointed by human annotator volunteers, as shown in Figure 4(c). Notably, a substantial alignment emerges between themes uncovered via unsupervised learning (middle column) and those surfaced through the annotators' keyword-based approach (right column), with overlapping themes highlighted in bold. While the initial annotator pool is small, feedback from the volunteers shed useful insights: for instance, the two NSFW clusters primarily comprise explicit content of females, and therefore are challenging to differentiate for the human annotators. Moreover, comparing human grouping with  $k$ -means clustering unveils that images allocated to clusters 1, 2, and 7 exhibit substantial heterogeneity, often leading to their segregation into distinct clusters when annotated by humans.
Lastly, we used cosine similarity to extract the nearest neighbors of TWIGMA images and identified pairs with a high likelihood that the neighbors from ArtBench and LAION served as potential inspirations (i.e., training data) for the text-to-image models (see Figure 4(e)). The striking similarities between some of these neighbor pairs suggest the potential of leveraging a similarity-measure-based approach to more systematically identify such pairs.
Recent advancements in generative AI have revolutionized text-to-image generation, empowering users to create millions of captivating images. Our work explores themes and variations in AI-generated images. To facilitate this investigation, we introduce TWIGMA, an extensive dataset comprising 800,000 gen-AI images, associated tweets, and metadata collected from Twitter between January 2021 and March 2023. Our analysis characterizes distinctiveness, variation, and longitudinal shift of themes of gen-AI images shared on Twitter. The analysis in this paper is not meant to be exhaustive but rather to illustrate the types of interesting questions that TWIGMA can help to answer, opening the door to investigating various facets of human-AI art generation.
Limitations: It is important to note the limitations in our work, primarily due to the large-scale nature of the datasets employed. One limitation stems from the scope and quality of the datasets utilized in our analysis. Although we made efforts to select representative data sources from both AI-generated and non-AI-generated image spaces, the content within the final datasets used in our paper imposes certain constraints: ArtBench primarily consists of popular art genres in WikiArt [2], resulting in limited coverage of non-European, modern arts, as well as works from lesser-known independent artists. Consequently, this could lead to an underestimate of the similarity between human art images and AI-generated art images. Similarly, LAION data was pre-filtered based on text-image pair similarity [42], and around  $10\%$  of Twitter images were not available through the official Twitter API at the time of our study, due to the deletion or removal of tweets. Additionally, it is possible that a subset of images within TWIGMA are non-AI-generated, as users sometimes share relevant non-AI-generated content, such as real images closely resembling AI-generated outputs or screenshots from model websites or APIs. All of the aforementioned data issues could bias our findings in Section 4.1. Lastly, it is essential to acknowledge that while TWIGMA benefits from an extended time frame and Twitter's substantial user base in comparison to prior research efforts, the images in TWIGMA only constitute a subset of those publicly shared on a specific channel. When interpreting outcomes drawn from this dataset, researchers should bear in mind that the user base inherent to TWIGMA may potentially differ from their demographic of interest.
Future work: There are several promising avenues for future research. Firstly, the inclusion of more contemporary and modern art images, particularly illustration art and anime, in our analysis, along with the identification of non-AI-generated images in TWIGMA using state-of-the-art methods [7, 46], would strengthen the robustness of our findings. Moreover, maintaining regular updates to the TWIGMA dataset in order to consistently monitor the trajectory of themes and contents of AI-generated images would provide valuable insights for the research community. Furthermore, introducing a more human-centric perspective into dataset curation and analysis could enrich downstream insights. For instance, our current emphasis on variations in the CLIP embedding space could be complemented by exploring other dimensions of diversity and variation [24, 29]. This could entail investigating stereotypical associations between output images and societal representations within human images (e.g., whether generated NSFW images are disproportionately associated with
(e)
Figure 4: Themes and longitudinal trends of images in TWIGMA. (a): Two-dimensional UMAP embedding of TWIGMA images, color-coded based on their creation dates on Twitter. (b): Composition of image clusters (estimated using  $k$ -means clustering with  $k = 10$ ) over time. We observe notable changes in cluster membership and underlying themes of TWIGMA images from 2021 to 2023. (c): Left: Randomly sampled images from the 10 clusters identified in (b). Clusters 5 and 8 predominantly contain NSFW photos and have been pixelated accordingly. Middle: Cluster annotations derived from the most frequently occurring words in the BLIP-inferred captions. Upward, downward, and rightward arrow emojis signify rising, declining, or consistent trends over time, respectively. Right: Cluster annotations obtained by human annotators. Themes that align between BLIP and human annotations are highlighted in bold. (d): Predicted NSFW scores from a pretrained CLIP-based NSFW detector. Noteworthy presence of NSFW photos is observed in both TWIGMA and LAION datasets. (e): TWIGMA images and their nearest neighbors in terms of image embedding cosine similarities from ArtBench or LAION. These images from ArtBench and LAION serve as potential inspirations (i.e., training data) for the text-to-image model, indicating the possibility of identifying such pairs using a similarity-measure-based approach.
one race or gender group). As another example, one potential follow-up study could leverage a large pool of human annotators to more comprehensively investigate two pivotal aspects: (i) the alignment between human comprehension and categorization of TWIGMA images and scalable machine learning outputs; and (ii) the correlation between human ratings and the number of likes for an image (included as part of TWIGMA). These studies could empower the development of future generative AI models that aim to align more closely with specific human preferences and image styles.
Safety and ethical concerns: One challenging aspect of text-to-image generative models is the generation of NSFW content. Our data analysis revealed a substantial subset of explicit images posted on Twitter, even among those with high likes and retweets. While some generative models like DALLE2 and StableDiffusion have built-in safety filters that block generated NSFW images, these filters can still be circumvented through prompt engineering [34, 41]. Moreover, there is a subcategory of models and online communities specifically dedicated to generating NSFW content. These observations serve as a cautionary tale for large-scale studies involving AI-generated content, as NSFW content is likely to be present and popular among certain subsets of followers due to the relatively low regulation in the current landscape. Additionally, our analysis also highlighted some AI-generated images that bear a striking resemblance to images found in human images and art datasets. These findings bear implications for potential copyright violations if training images were used without explicit consent, especially when the outputs are essentially reproductions or minor edits of memorized training examples. Finally, there is a risk of perpetuating stereotypical representations if AI-generated images tend to resemble specific groups based on demographic identities. Similar observations, discussions, and potential mitigations have been noted in other recent works [10, 24].
Understanding themes, contents, and user interests of AI-generated images is a critical topic that requires data beyond the currently available prompt and output image pairs datasets. We introduced TWIGMA, an extensive dataset comprising 800,000 gen-AI images, tweets, and associated metadata from Twitter (Jan 2021-March 2023). Our contribution is two-fold: Firstly, TWIGMA enables analysis of AI-generated image content and evolution across models and time on Twitter. Additionally, our analysis highlights the distinctiveness and variation of AI-generated images when compared to non-AI-generated content. We hope that our dataset and analysis will contribute to the broader discourse on the safety, novelty, and sociological or legal challenges posed by AI-generated images.
Acknowledgments and Disclosure of Funding:
We thank Zhi Huang for sharing their code to scrap Twitter content using the public Twitter API. YC is supported by a Stanford Data Science Postdoctoral Fellowship. JZ is supported by the National Science Foundation (CCF 1763191 and CAREER 1942926), the US National Institutes of Health (P30AG059307 and U01MH098953) and grants from the Silicon Valley Foundation and the Chan-Zuckerberg Initiative.
[1] Haiku dataset. https://huggingface.co/datasets/statworx/haiku. Accessed: 2023-06-06.
[2] WikiArt. https://www.wikiart.org/. Accessed: 2023-5-5.
[3] Midjourney user prompts. https://www.kaggle.com/datasets/succinctlyai/midjourney-texttoimage, 2022. Accessed: 2023-06-06.
[4] CLIP-based NSFW Detector. https://github.com/LAION-AI/CLIP-based-NSFW-Detector, 2022. Accessed: 2023-06-06.
[5] Waifu diffusion. https://huggingface.co/hakurei/waifu-diffusion, 2022. Accessed: 2023-6-4.
[6] Ali Borji. Generated faces in the wild: Quantitative comparison of Stable Diffusion, Midjourney and DALL-E 2. arXiv preprint arXiv:2210.00586, 2022.