NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Not Only Generative Art: Stable Diffusion for Content-Style Disentanglement in Art Analysis

Yankun Wu, Yuta Nakashima, Noa Garcia

Abstract

Traditional computer vision models often struggle to distinguish between the semantic content of an image and its artistic style, a problem known as feature entanglement. This paper introduces GOYA (disentanGlement of cOntent and stYle with generAtions), a novel framework that leverages the latent knowledge of generative models to solve this challenge. By training on a massive synthetic dataset generated via Stable Diffusion, GOYA achieves superior disentanglement and generalizes effectively to real-world art datasets like WikiArt without requiring human-labeled training data.

Introduction

When human observers view a painting, they intuitively separate the subject matter (content) from the artistic execution (style). For instance, a portrait remains a portrait whether rendered with the realistic precision of the Renaissance or the fragmented geometry of Cubism. However, for deep learning models, these elements are often inextricably linked. A model trained primarily on natural images may fail to recognize a common object if it is presented in an abstract artistic style, as the stylistic features distort the expected semantic signals.

Historically, addressing this entanglement required large-scale datasets annotated by art historians. Such datasets are not only expensive and time-consuming to produce but are also limited by subjective labeling and a lack of granular detail. GOYA proposes a paradigm shift: instead of using generative models solely to create art, we can use them to generate the training data necessary to analyze it.

Methodology

Synthetic Data Generation

The core of the GOYA framework is the creation of a massive, controlled synthetic dataset. Using Stable Diffusion v1.4, the researchers generated over 1 million images (1,090,250 total) based on 43,610 unique content descriptions and 27 distinct artistic movements. By using structured prompts—such as "A portrait of a man [content], in the style of Ukiyo-e [style]"—the researchers obtained "perfect" ground-truth labels. This eliminates the ambiguity inherent in human-labeled datasets, as the model knows exactly which prompt components influenced the content versus the style.

Architecture and Training

GOYA utilizes a pre-trained CLIP image encoder as its backbone, which is then branched into two asymmetric "heads":

  1. Content Encoder ($C$): Designed to capture semantic information. It is trained to ensure that images generated from the same content prompt (regardless of style) result in similar embeddings.
  2. Style Encoder ($S$): Designed to capture aesthetic and textural information. It groups images sharing the same style label, regardless of their subject matter.

To refine this process, the authors employed Contrastive Learning and a "soft" similarity metric derived from CLIP text embeddings. This allows the model to understand semantic proximity (e.g., that a "cat" is more similar to a "dog" than to a "landscape"), providing a more sophisticated training signal than binary classification.

Experimental Results

Disentanglement Performance

The primary metric for success was Distance Correlation (DC), which measures the overlap between the content and style embedding spaces. A lower DC score indicates better separation. On the WikiArt test set, GOYA achieved a DC of 0.367, significantly outperforming standard CLIP (0.460) and DINO (0.518). This demonstrates that GOYA successfully isolates style from content more effectively than general-purpose vision models.

Zero-Shot Generalization

Despite being trained exclusively on synthetic images, GOYA demonstrated remarkable performance on real-world paintings from the WikiArt dataset:

  • Genre Classification: 69.7% accuracy.
  • Style Classification: 50.9% accuracy.

These results are particularly noteworthy because the model never encountered a real painting during its training phase, proving that generative models can serve as a "sufficiently good" proxy for the distribution of real art.

Style-Aware Retrieval

Qualitative analysis shows that GOYA excels at complex retrieval tasks. By separating the embedding spaces, users can perform "content-only" or "style-only" searches. For example, given a query image, the model can successfully retrieve paintings with the same subject in vastly different styles, or different subjects sharing the exact brushwork and color palette of the original.

Discussion and Limitations

While GOYA represents a significant step forward, it is limited by the capabilities of the underlying generative model. Stable Diffusion occasionally struggles with complex or abstract semantic prompts (e.g., religious allegories), and it may conflate specific sub-movements (like "Synthetic Cubism") with broader categories. These "hallucinations" in the generator can introduce noise into the training process.

Conclusion

GOYA demonstrates that generative AI is a powerful tool for analytical tasks, not just creative ones. By distilling the knowledge of Stable Diffusion into a disentangled dual-encoder architecture, the researchers have provided a scalable, automated method for art analysis that rivals or exceeds models trained on human-annotated data. Future work may extend this methodology to other domains where content and style must be separated, such as medical imaging or technical design.

Summary updated

BibTeX
@inproceedings{wu2023not,
  author = {Yankun Wu and Yuta Nakashima and Noa Garcia},
  title = {{Not Only Generative Art: Stable Diffusion for Content-Style Disentanglement in Art Analysis}},
  booktitle = {ICMR},
  year = {2023},
  doi = {10.1145/3591106.3592262},
}
Figure