The Hidden Language of Diffusion Models

Text-to-image diffusion models have demonstrated an unparalleled ability to generate high-quality, diverse images from a textual prompt. However, the internal representations learned by these models remain an enigma. In this work, we present Conceptor, a novel method to interpret the internal representation of a textual concept by a diffusion model. This interpretation is obtained by decomposing the concept into a small set of human-interpretable textual elements. Applied over the state-of-the-art Stable Diffusion model, Conceptor reveals non-trivial structures in the representations of concepts. For example, we find surprising visual connections between concepts, that transcend their textual semantics. We additionally discover concepts that rely on mixtures of exemplars, biases, renowned artistic styles, or a simultaneous fusion of multiple meanings of the concept. Through a large battery of experiments, we demonstrate Conceptor's ability to provide meaningful, robust, and faithful decompositions for a wide variety of abstract, concrete, and complex textual concepts, while allowing to naturally connect each decomposition element to its corresponding visual impact on the generated images. Our code will be available at: https://hila-chefer.github.io/Conceptor/

[1]  David Bau,et al.  Unified Concept Editing in Diffusion Models , 2023, 2024 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV).

[2]  Thomas Serre,et al.  A Holistic Approach to Unifying Automatic Concept Extraction and Concept Importance Estimation , 2023, ArXiv.

[3]  A. Globerson,et al.  Dissecting Recall of Factual Associations in Auto-Regressive Language Models , 2023, EMNLP.

[4]  Chen Henry Wu,et al.  Zero-Shot Model Diagnosis , 2023, 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[5]  Yacine Jernite,et al.  Stable Bias: Analyzing Societal Representations in Diffusion Models , 2023, ArXiv.

[6]  Dimitris N. Metaxas,et al.  SVDiff: Compact Parameter Space for Diffusion Fine-Tuning , 2023, 2023 IEEE/CVF International Conference on Computer Vision (ICCV).

[7]  D. Cohen-Or,et al.  P+: Extended Textual Conditioning in Text-to-Image Generation , 2023, ArXiv.

[8]  T. Goldstein,et al.  Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery , 2023, ArXiv.

[9]  A. Torralba,et al.  Debiasing Vision-Language Models via Biased Prompts , 2023, ArXiv.

[10]  Lior Wolf,et al.  Attend-and-Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models , 2023, ACM Trans. Graph..

[11]  S. Savarese,et al.  BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models , 2023, ICML.

[12]  Florian Tramèr,et al.  Extracting Training Data from Diffusion Models , 2023, USENIX Security Symposium.

[13]  A. Globerson,et al.  What Are You Token About? Dense Retrieval as Distributions Over the Vocabulary , 2022, ACL.

[14]  Nupur Kumari,et al.  Multi-Concept Customization of Text-to-Image Diffusion , 2022, 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[15]  T. Goldstein,et al.  Diffusion Art or Digital Forgery? Investigating Data Replication in Diffusion Models , 2022, 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[16]  Thomas Serre,et al.  CRAFT: Concept Recursive Activation FacTorization for Explainability , 2022, 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[17]  Bryan Catanzaro,et al.  eDiff-I: Text-to-Image Diffusion Models with an Ensemble of Expert Denoisers , 2022, ArXiv.

[18]  David Bau,et al.  Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task , 2022, ICLR.

[19]  Yoav Goldberg,et al.  DALLE-2 is Seeing Double: Flaws in Word-to-Concept Mapping in Text2Image Models , 2022, BLACKBOXNLP.

[20]  M. Irani,et al.  Imagic: Text-Based Real Image Editing with Diffusion Models , 2022, 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[21]  Yuanzhen Li,et al.  DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Driven Generation , 2022, 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[22]  Amit H. Bermano,et al.  An Image is Worth One Word: Personalizing Text-to-Image Generation using Textual Inversion , 2022, ICLR.

[23]  J. Tenenbaum,et al.  Prompt-to-Prompt Image Editing with Cross Attention Control , 2022, ICLR.

[24]  Ellie Pavlick,et al.  Unit Testing for Concepts in Neural Networks , 2022, Transactions of the Association for Computational Linguistics.

[25]  Jing Yu Koh,et al.  Scaling Autoregressive Models for Content-Rich Text-to-Image Generation , 2022, Trans. Mach. Learn. Res..

[26]  David J. Fleet,et al.  Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding , 2022, NeurIPS.

[27]  Prafulla Dhariwal,et al.  Hierarchical Text-Conditional Image Generation with CLIP Latents , 2022, ArXiv.

[28]  Chen Sun,et al.  Do Vision-Language Pretrained Models Learn Composable Primitive Concepts? , 2022, Trans. Mach. Learn. Res..

[29]  Yoav Goldberg,et al.  Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space , 2022, EMNLP.

[30]  Yaniv Taigman,et al.  Make-A-Scene: Scene-Based Text-to-Image Generation with Human Priors , 2022, ECCV.

[31]  S. Hoi,et al.  BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation , 2022, ICML.

[32]  B. Ommer,et al.  High-Resolution Image Synthesis with Latent Diffusion Models , 2021, 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[33]  Prafulla Dhariwal,et al.  GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models , 2021, ICML.

[34]  Rajshekhar Sunderraman,et al.  Improving Text-to-Image Synthesis Using Contrastive Learning , 2021, BMVC.

[35]  Jacob Andreas,et al.  Implicit Representations of Meaning in Neural Language Models , 2021, ACL.

[36]  Lior Wolf,et al.  Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers , 2021, 2021 IEEE/CVF International Conference on Computer Vision (ICCV).

[37]  Ilya Sutskever,et al.  Learning Transferable Visual Models From Natural Language Supervision , 2021, ICML.

[38]  Alec Radford,et al.  Zero-Shot Text-to-Image Generation , 2021, ICML.

[39]  Jing Yu Koh,et al.  Cross-Modal Contrastive Learning for Text-to-Image Generation , 2021, 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[40]  Lior Wolf,et al.  Transformer Interpretability Beyond Attention Visualization , 2020, 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[41]  Xiaoyuan Jing,et al.  DF-GAN: A Simple and Effective Baseline for Text-to-Image Synthesis , 2020, 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[42]  Tim Miller,et al.  Invertible Concept-based Explanations for CNN Models with Non-negative Concept Activation Vectors , 2020, AAAI.

[43]  Pieter Abbeel,et al.  Denoising Diffusion Probabilistic Models , 2020, NeurIPS.

[44]  Iryna Gurevych,et al.  Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks , 2019, EMNLP.

[45]  Yizhen Zhang,et al.  Connecting concepts in the brain by mapping cortical representations of semantic relations , 2019, bioRxiv.

[46]  Wei Chen,et al.  DM-GAN: Dynamic Memory Generative Adversarial Networks for Text-To-Image Synthesis , 2019, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[47]  James Zou,et al.  Towards Automatic Concept-based Explanations , 2019, NeurIPS.

[48]  Alexandra Chouldechova,et al.  Bias in Bios: A Case Study of Semantic Representation Bias in a High-Stakes Setting , 2019, FAT.

[49]  Abien Fred Agarap Deep Learning using Rectified Linear Units (ReLU) , 2018, ArXiv.

[50]  Alexei A. Efros,et al.  The Unreasonable Effectiveness of Deep Features as a Perceptual Metric , 2018, 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.

[51]  Martin Wattenberg,et al.  Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV) , 2017, ICML.

[52]  Zhe Gan,et al.  AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks , 2017, 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.

[53]  Sepp Hochreiter,et al.  GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium , 2017, NIPS.

[54]  Sergey Ioffe,et al.  Rethinking the Inception Architecture for Computer Vision , 2015, 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[55]  Thomas Brox,et al.  U-Net: Convolutional Networks for Biomedical Image Segmentation , 2015, MICCAI.

[56]  Surya Ganguli,et al.  Deep Unsupervised Learning using Nonequilibrium Thermodynamics , 2015, ICML.

[57]  Michael S. Bernstein,et al.  ImageNet Large Scale Visual Recognition Challenge , 2014, International Journal of Computer Vision.

[58]  M. Kiefer,et al.  Conceptual representations in mind and brain: Theoretical developments, current evidence and future directions , 2012, Cortex.

[59]  J. Fodor,et al.  Connectionism and cognitive architecture: A critical analysis , 1988, Cognition.

[60]  Ellie Pavlick,et al.  Mapping Language Models to Grounded Conceptual Spaces , 2022, ICLR.

[61]  Sray Agarwal,et al.  Explainability , 2021, Responsible AI.

[62]  Taro Watanabe,et al.  Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 1: Long Papers) , 2017, IJCNLP.

[63]  Catherine Havasi,et al.  ConceptNet 5: A Large Semantic Network for Relational Knowledge , 2013, The People's Web Meets NLP.

[64]  Alex Krizhevsky,et al.  Learning Multiple Layers of Features from Tiny Images , 2009 .