# A Closed-form Solution to Universal Style Transfer

arXiv: https://arxiv.org/abs/1906.00668 · HTML: https://mlsanity.com/paper/1906.00668/

## Key facts

- Cited by 42 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 3 Jun 2019.

## Built on by (most cited first, 30 of 42)

- [Style Injection in Diffusion: A Training-free Approach for Adapting Large-scale Diffusion Models for Style Transfer](https://mlsanity.com/paper/2312.09008/) (2023)
- [StyTr2: Image Style Transfer with Transformers](https://mlsanity.com/paper/2105.14576/) (2021)
- [Exact Feature Distribution Matching for Arbitrary Style Transfer and Domain Generalization](https://mlsanity.com/paper/2203.07740/) (2022)
- [ArtFlow: Unbiased Image Style Transfer via Reversible Neural Flows](https://mlsanity.com/paper/2103.16877/) (2021)
- [Domain Enhanced Arbitrary Image Style Transfer via Contrastive Learning](https://mlsanity.com/paper/2205.09542/) (2022)
- [Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis](https://mlsanity.com/paper/2306.08645/) (2023)
- [Cross-Ray Neural Radiance Fields for Novel-view Synthesis from Unconstrained Image Collections](https://mlsanity.com/paper/2307.08093/) (2023)
- [Anomaly Detection under Distribution Shift](https://mlsanity.com/paper/2303.13845/) (2023)
- [In the light of feature distributions: moment matching for Neural Style Transfer](https://mlsanity.com/paper/2103.07208/) (2021)
- [FreeTuner: Any Subject in Any Style with Training-free Diffusion](https://mlsanity.com/paper/2405.14201/) (2024)
- [AesUST: Towards Aesthetic-Enhanced Universal Style Transfer](https://mlsanity.com/paper/2208.13016/) (2022)
- [MicroAST: Towards Super-Fast Ultra-Resolution Arbitrary Style Transfer](https://mlsanity.com/paper/2211.15313/) (2022)
- [Facial Attribute Transformers for Precise and Robust Makeup Transfer](https://mlsanity.com/paper/2104.02894/) (2021)
- [Z^*: Zero-shot Style Transfer via Attention Rearrangement](https://mlsanity.com/paper/2311.16491/) (2023)
- [Adversarial Style Augmentation for Domain Generalization](https://mlsanity.com/paper/2301.12643/) (2023)
- [Towards Ultra-Resolution Neural Style Transfer via Thumbnail Instance Normalization](https://mlsanity.com/paper/2103.11784/) (2021)
- [Deep Optimal Transport: A Practical Algorithm for Photo-realistic Image Restoration](https://mlsanity.com/paper/2306.02342/) (2023)
- [S2WAT: Image Style Transfer via Hierarchical Vision Transformer using Strips Window Attention](https://mlsanity.com/paper/2210.12381/) (2022)
- [Transforming Radiance Field with Lipschitz Network for Photorealistic 3D Scene Stylization](https://mlsanity.com/paper/2303.13232/) (2023)
- [Texture Reformer: Towards Fast and Universal Interactive Texture Transfer](https://mlsanity.com/paper/2112.02788/) (2021)
- [DivSwapper: Towards Diversified Patch-based Arbitrary Style Transfer](https://mlsanity.com/paper/2101.06381/) (2021)
- [Artwork Protection Against Neural Style Transfer Using Locally Adaptive Adversarial Color Attack](https://mlsanity.com/paper/2401.09673/) (2024)
- [3D Stylization via Large Reconstruction Model](https://mlsanity.com/paper/2504.21836/) (2025)
- [SCP-Diff: Spatial-Categorical Joint Prior for Diffusion Based Semantic Image Synthesis](https://mlsanity.com/paper/2403.09638/) (2024)
- [Deep Learning for Breast MRI Style Transfer with Limited Training Data](https://mlsanity.com/paper/2301.02069/) (2023)
- [Diffusion-based Visual Anagram as Multi-task Learning](https://mlsanity.com/paper/2412.02693/) (2024)
- [Mamba-ST: State Space Model for Efficient Style Transfer](https://mlsanity.com/paper/2409.10385/) (2024)
- [SCSA: A Plug-and-Play Semantic Continuous-Sparse Attention for Arbitrary Semantic Style Transfer](https://mlsanity.com/paper/2503.04119/) (2025)
- [Style Spectroscope: Improve Interpretability and Controllability through Fourier Analysis](https://mlsanity.com/paper/2208.06140/) (2022)
- [VITAL: More Understandable Feature Visualization through Distribution Alignment and Relevant Information Flow](https://mlsanity.com/paper/2503.22399/) (2025)

## Abstract (arXiv)

Universal style transfer tries to explicitly minimize the losses in feature space, thus it does not require training on any pre-defined styles. It usually uses different layers of VGG network as the encoders and trains several decoders to invert the features into images. Therefore, the effect of style transfer is achieved by feature transform. Although plenty of methods have been proposed, a theoretical analysis of feature transform is still missing. In this paper, we first propose a novel interpretation by treating it as the optimal transport problem. Then, we demonstrate the relations of our formulation with former works like Adaptive Instance Normalization (AdaIN) and Whitening and Coloring Transform (WCT). Finally, we derive a closed-form solution named Optimal Style Transfer (OST) under our formulation by additionally considering the content loss of Gatys. Comparatively, our solution can preserve better structure and achieve visually pleasing results. It is simple yet effective and we demonstrate its advantages both quantitatively and qualitatively. Besides, we hope our theoretical analysis can inspire future works in neural style transfer. Code is available at https://github.com/lu-m13/OptimalStyleTransfer.
