Abstract
Style and content disentanglement is a fundamental challenge in computer vision due to the subjective nature of these attributes and the lack of objective ground truth. Traditional methods often rely on explicit constraints, complex loss functions, or restrictive architectural bottlenecks. We present SCFlow, a novel framework that approaches disentanglement through the lens of invertible merging. By utilizing Flow Matching to map between disentangled attribute embeddings and stylized image embeddings within the CLIP latent space, SCFlow allows clean separation to emerge naturally as a byproduct of its bidirectional architecture. Our model, trained on a large-scale combinatorial dataset, demonstrates superior performance in clustering, style retrieval, and zero-shot generalization tasks compared to existing state-of-the-art baselines.
Introduction
In computer vision, separating "what" is in an image (content) from "how" it looks (style) is a notoriously difficult problem. Style and content often overlap semantically—for instance, a specific brushstroke could be viewed as a stylistic choice or a content feature. Because human perception of these boundaries is subjective, creating large-scale "ground truth" datasets for disentanglement is nearly impossible.
Existing methods typically attempt to force a separation using specific loss functions. However, these often struggle with the inherent ambiguity of where content ends and style begins. SCFlow proposes a different approach: instead of fighting to pull attributes apart, it learns a perfect way to put them together. By ensuring the merging process is mathematically invertible, pulling them apart becomes a trivial matter of running the model in reverse.
Methodology
The core of the framework is SCFlow, based on Flow Matching (FM). Unlike diffusion models that require a transition to random Gaussian noise, Flow Matching can learn a direct, deterministic mapping between any two distributions.
Invertible Merging and Latent Space
SCFlow learns to map a "disentangled" state $x_0$ (a pair of embeddings representing pure content and pure style) to a "merged" state $x_1$ (the embedding of a stylized image). To avoid the computational burden and noise of pixel-level details, the model operates entirely in the CLIP embedding space. This ensures the model focuses on high-level semantics rather than low-level texture noise.
Structured Asymmetry and Bidirectional Inference
During training, the model is given "noisy" references: a content image with a random style and a style image with random content. To successfully produce the target stylized mixture, the model is forced to ignore the "random" components and extract only the invariant content and style features. Because the flow is invertible, the "forward" pass performs style transfer (merging), while the "reverse" pass performs disentanglement (extracting pure style and content from a single mixed image). In the reverse process, the model effectively compares a mixed image against the "dataset average" (the "Mean" Proxy) of styles and contents to isolate the specific attributes of that image.
Datasets
To facilitate training, the authors curated a massive new Combinatorial Dataset:
- Scale: 510,000 samples.
- Structure: 51 distinct artistic styles applied to 10,000 content instances sourced from Pexels.
- Generation: Stylized variants were created using ControlNet to ensure a systematic pairing of every style with every content piece.
For evaluation, the model was tested on ImageNet-1k for content recognition and WikiArt for style retrieval to assess generalization capabilities.
Results and Discussion
SCFlow demonstrates that "less is more" when it comes to explicit constraints. The model achieved significantly higher Normalized Mutual Information (NMI) and Fisher Discriminant Ratio (FDR) in clustering tests than CLIP or specialized models like DEADiff and CSD, indicating a much better-organized latent space.
Zero-Shot Generalization and Qualitative Quality
Despite being trained on a synthetic dataset, SCFlow generalizes remarkably well to real-world data. It achieved 66.25% kNN accuracy on ImageNet (comparable to the original CLIP) and outperformed all baselines in style retrieval on WikiArt with a 65.34% Recall@1. Qualitatively, latent space interpolations—such as morphing a dog into a horse or cubism into drip painting—are remarkably smooth and semantically consistent compared to the "jumpy" transitions seen in standard CLIP space.
Conclusion
SCFlow represents a shift in how we approach disentanglement, showing that it can emerge as a property of mastering invertible merging. By bypassing restrictive Gaussian priors and utilizing the semantic richness of the CLIP space, the authors provide a robust framework for mapping between complex, real-world data distributions. Future work may extend this philosophy to other modalities, such as disentangling speaker identity from speech content in audio.
Summary updated