Abstract: In StyleGAN, convolution kernels are shaped by both static parameters shared across images and dynamic modulation factors $w^+\in\mathcal{W}^+$ specific to each image. Therefore, $\mathcal{W}^+$ space is often used for image inversion and editing. However, pre-trained model struggles with synthesizing out-of-domain images due to the limited capabilities of $\mathcal{W}^+$ and its resultant kernels, necessitating full fine-tuning or adaptation through a complex hypernetwork. This paper proposes an efficient refining strategy for dynamic kernels. The key idea is to modify kernels by low-rank residuals, learned from input image or domain guidance. These residuals are generated by matrix multiplication between two sets of tokens with the same number, which controls the complexity. We validate the refining scheme in image inversion and domain adaptation. In the former task, we design grouped transformer blocks to learn these token sets by one- or two-stage training. In the latter task, token sets are directly optimized to support synthesis in the target domain while preserving original content. Extensive experiments show that our method achieves low distortions for image inversion and high quality for out-of-domain editing.
1. Introduction
StyleGAN has established itself as a cornerstone of high-quality image synthesis. However, its performance is often tethered to its "comfort zone"—the specific data distribution it was trained on. When tasked with image inversion (reconstructing a real-world photo) or domain adaptation (transferring styles, such as turning a face into a Pixar character), StyleGAN frequently struggles with "out-of-domain" details like unique accessories, complex backgrounds, or heavy makeup.
Existing approaches typically choose between speed and expressiveness. Latent space optimization ($W^+$) is fast but lacks the capacity for fine details, while full fine-tuning or hypernetworks are computationally expensive and risk erasing the model's original generative knowledge. RefineStyle introduces a "Goldilocks" solution: an efficient method that is expressive enough to capture out-of-domain details without the overhead of massive parameter updates.
2. Methodology
2.1 The Low-Rank Insight
The fundamental premise of RefineStyle stems from an empirical analysis of StyleGAN’s convolution kernels. By performing Singular Value Decomposition (SVD), the authors discovered that these kernels are inherently redundant and lie on a low-dimensional manifold. This suggests that adapting the model does not require modifying every weight; instead, the kernels can be effectively updated using low-rank residuals.
2.2 Refined Modulated Convolution
To implement this, the authors propose the Refined Modulated Convolution block. In standard StyleGAN2, kernels are modulated by a style vector $w_n$. RefineStyle introduces a residual matrix $\Delta W_n$ that is added to the modulated weights before demodulation and convolution.
2.3 Token-Based Residual Generation
Rather than predicting millions of weight changes directly, RefineStyle learns two small sets of "tokens" ($P$ and $Q$) for each layer. The residual matrix is generated via the outer product of these token matrices ($P^T \otimes Q$). This strategy reduces the number of parameters needed for refinement from millions to just a few thousand per layer. Learnable scaling factors ($\alpha, \beta$) are also introduced to adaptively control the influence of these residuals.
To learn these tokens from input images, the architecture employs Grouped Transformer Blocks. These blocks utilize self-attention for intra-layer token communication and cross-attention to extract specific features from the target image. The system supports both one-stage (joint latent and residual prediction) and two-stage (refining an existing inversion) training regimes.
3. Experimental Results
3.1 Image Inversion and Fidelity
RefineStyle achieves state-of-the-art results in image inversion, significantly reducing distortion (measured by MSE and LPIPS) compared to established methods like pSp, e4e, and ReStyle. It excels at capturing difficult, high-frequency features such as complex hair textures and open mouths that typically elude standard inversion techniques.
3.2 Domain Adaptation and Editing
In domain adaptation tasks—such as transforming a face into a "Botero Painting" or a "Disney Princess"—RefineStyle maintains superior identity preservation and text consistency. Because the residuals are low-rank and initialized with small values, the model preserves the structural "common sense" of the original StyleGAN while only modifying the textures and shapes necessary for the target domain. This sparsity also ensures editing stability; for instance, when making a face appear younger, the background and clothing remain stable, avoiding the "leaking" artifacts common in other methods.
3.3 Efficiency
Efficiency is a primary advantage of this approach. Compared to HyperStyle, a leading refinement competitor, RefineStyle utilizes approximately 7x fewer parameters (46.4M vs. 332M) and offers significantly faster inference times, making it a viable candidate for deployment on modest hardware.
4. Conclusion
RefineStyle demonstrates that dynamic convolution refinement via low-rank residuals is a powerful and efficient way to extend StyleGAN's capabilities. By focusing on the most critical components of the convolution kernels, the method achieves high-fidelity reconstruction and artistic adaptation without the prohibitive costs of full-scale retraining. Future work may explore applying this token-based refinement to other generative architectures, such as Diffusion models or Large Language Models.
Summary updated