Skip to main content
QUICK REVIEW

[Paper Review] Exact Feature Distribution Matching for Arbitrary Style Transfer and Domain Generalization

Yabin Zhang, Minghan Li|arXiv (Cornell University)|Mar 15, 2022
Multimodal Machine Learning ApplicationsComputer Science16 citations
TL;DR

This paper proposes Exact Feature Distribution Matching (EFDM), a novel method that achieves precise feature distribution alignment by exactly matching empirical cumulative distribution functions (eCDFs) of deep features using Exact Histogram Matching (EHM) via the Sort-Matching algorithm. EFDM outperforms state-of-the-art methods in arbitrary style transfer and domain generalization with real-time inference speed, achieving new SOTA results while maintaining minimal computational overhead.

ABSTRACT

Arbitrary style transfer (AST) and domain generalization (DG) are important yet challenging visual learning tasks, which can be cast as a feature distribution matching problem. With the assumption of Gaussian feature distribution, conventional feature distribution matching methods usually match the mean and standard deviation of features. However, the feature distributions of real-world data are usually much more complicated than Gaussian, which cannot be accurately matched by using only the first-order and second-order statistics, while it is computationally prohibitive to use high-order statistics for distribution matching. In this work, we, for the first time to our best knowledge, propose to perform Exact Feature Distribution Matching (EFDM) by exactly matching the empirical Cumulative Distribution Functions (eCDFs) of image features, which could be implemented by applying the Exact Histogram Matching (EHM) in the image feature space. Particularly, a fast EHM algorithm, named Sort-Matching, is employed to perform EFDM in a plug-and-play manner with minimal cost. The effectiveness of our proposed EFDM method is verified on a variety of AST and DG tasks, demonstrating new state-of-the-art results. Codes are available at https://github.com/YBZh/EFDM.

Motivation & Objective

  • To address the limitations of conventional feature distribution matching methods that rely only on mean and standard deviation under Gaussian assumptions.
  • To enable exact distribution matching in deep feature spaces, overcoming the inaccuracy of approximated high-order statistics or incomplete moment matching.
  • To develop a fast, plug-and-play method for exact feature distribution matching suitable for real-time applications in vision tasks.
  • To improve performance in arbitrary style transfer (AST) and domain generalization (DG) by leveraging exact distribution alignment through eCDF matching.
  • To demonstrate the effectiveness of EFDM in generating diverse, high-quality feature augmentations for domain generalization.

Proposed method

  • Proposes Exact Feature Distribution Matching (EFDM) by exactly aligning the empirical cumulative distribution functions (eCDFs) of deep features across source and target domains.
  • Employs Exact Histogram Matching (EHM) in the feature space to achieve exact eCDF alignment, resolving the limitations of classical Histogram Matching (HM) that merge equivalent values.
  • Adopts the Sort-Matching algorithm—a fast EHM variant that preserves order of equivalent values and enables efficient, element-wise transformation with O(n log n) complexity.
  • Introduces a new style loss based on eCDF matching to improve stylization quality in arbitrary style transfer, replacing or enhancing traditional AdaIN-style losses.
  • Extends EFDM to feature augmentation via Exact Feature Distribution Mixing (EFDMix), enabling diverse, high-quality data augmentations for domain generalization.
  • Implements EFDM in a plug-and-play manner, compatible with existing networks and trainable end-to-end with minimal architectural changes.

Experimental results

Research questions

  • RQ1Can exact matching of empirical cumulative distribution functions (eCDFs) in deep feature spaces lead to superior performance in arbitrary style transfer compared to mean and variance matching?
  • RQ2Does EFDM, by enabling exact distribution alignment, outperform existing methods in domain generalization tasks through improved feature augmentation?
  • RQ3How does the use of exact eCDF matching via Sort-Matching compare to approximate methods like classical Histogram Matching (HM) in terms of distribution accuracy and computational efficiency?
  • RQ4To what extent do high-order feature statistics implicitly captured by EFDM contribute to improved visual quality and generalization performance?
  • RQ5Can EFDM be efficiently deployed in real-time applications without sacrificing performance, especially in comparison to existing SOTA methods?

Key findings

  • EFDM achieves new state-of-the-art performance on multiple arbitrary style transfer benchmarks, with user studies showing it received the highest preference votes among competing methods.
  • On the PACS dataset, EFDM achieves 88.7% accuracy in domain generalization, outperforming the previous SOTA by over 1% and demonstrating the effectiveness of exact distribution matching.
  • The method runs at 256 FPS for 512×512 images on a Tesla V100 GPU, achieving inference speed comparable to AdaIN while offering significantly better performance.
  • EFDM outperforms both AdaMean and AdaStd variants, showing that matching higher-order statistics implicitly through eCDF alignment leads to superior stylization and generalization.
  • EFDMix, the extension of EFDM for data augmentation, generates more diverse and effective feature augmentations, improving generalization in domain generalization tasks.
  • Different EHM implementations (e.g., preserving, random, or neighbor-based sorting of equivalent values) yield similar performance, confirming the robustness of Sort-Matching as the optimal choice due to its speed.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.