Abstract
Universal style transfer methods, such as AdaIN and WCT, have revolutionized the field by enabling near-instantaneous artistic transformations. However, these techniques often rely on heuristic feature matching or restrictive mathematical assumptions. This paper reframes universal style transfer as a Gaussian Optimal Transport (OT) problem. By treating image feature distributions as Gaussians, we provide a rigorous mathematical foundation for existing methods and introduce a powerful framework for multi-style mixing using Wasserstein barycenters.
Introduction
Image style transfer aims to synthesize a new image that combines the semantic content of one image with the artistic style of another. While early optimization-based approaches were computationally intensive, "universal" methods like Adaptive Instance Normalization (AdaIN) and Whitening and Coloring Transform (WCT) achieved real-time performance by matching feature statistics in a single forward pass.
Despite their success, these methods are largely heuristic. AdaIN only matches diagonal statistics, ignoring inter-channel correlations, while WCT assumes that content and style feature covariances commute—a property rarely found in real-world data. This work addresses these limitations by defining a mathematically principled transport map that captures the full geometry of style without restrictive assumptions.
Methods: The Lens of Optimal Transport
The core proposal is Wasserstein Universal Style Transfer, which treats the spatial distribution of features extracted by a deep network (e.g., VGG-19) as a Gaussian distribution.
Gaussian Optimal Transport
Instead of simple scaling, the method utilizes the closed-form Monge map for Gaussian measures. This map represents the most efficient transformation from one Gaussian distribution to another in terms of the Wasserstein-2 distance. A significant contribution of this work is proving that WCT and AdaIN are restricted cases of this Gaussian OT map, providing a unified theoretical framework for understanding universal style transfer.
Style Mixing via Barycenters
To blend multiple artistic styles, the paper employs Wasserstein Barycenters. Unlike linear averaging of pixels or features—which often results in "ghosting" or muddy artifacts—finding a "middle ground" distribution on the Wasserstein manifold preserves the distinct geometric and color characteristics of each source style.
Implementation and Datasets
The framework utilizes a pre-trained VGG-19 encoder and a corresponding decoder pyramid, consistent with the WCT architecture. While the autoencoder is trained on the MS-COCO dataset, the primary focus is the transformation applied to features within the latent space. Qualitative evaluations are performed using a diverse set of content images and iconic artworks from artists like Picasso, Frida Kahlo, and Van Gogh.
Key Insights
- OT Approximations: Popular normalization layers are essentially approximations of Optimal Transport. AdaIN serves as a "diagonal" approximation, while WCT is a "commuting" approximation. Gaussian OT represents the "full" version.
- Geodesic Interpolation: By following the McCann Interpolate (a geodesic path in Wasserstein space), users can smoothly transition between content and style with mathematical precision.
- Geometric Metrics: The choice of metric for the "average" style (e.g., Bures/Wasserstein vs. Fisher Rao) significantly impacts the output. Wasserstein tends to be color-dominant, whereas Fisher Rao better captures brushstrokes and subtle tonal variations.
Key Results
The proposed method offers both mathematical rigor and qualitative improvements. In style mixing experiments, the Gaussian OT approach captures intricate details—such as the specific brushstroke geometry of Picasso or the iconic features in Frida Kahlo's portraits—more effectively than the AdaIN baseline.
Because the Gaussian OT map and barycenter iterations have closed-form solutions or fast fixed-point convergences, the method remains "universal" and efficient enough for real-time applications.
Limitations and Future Work
The primary limitation is the Gaussian assumption. While effective for style, it ignores higher-order statistics and complex non-Gaussian relationships between features that might contain further artistic nuances. Additionally, calculating matrix square roots and SVDs for high-dimensional feature maps introduces more computational overhead than the simple scaling used in AdaIN. Future research may explore non-Gaussian OT or apply these geometric insights to improve style-content disentanglement in GANs and other generative models.
Summary updated