- The paper demonstrates that geometry-preserving loss functions enable effective domain adaptation in blackbox GANs without modifying generator weights, ensuring fidelity and diversity.
- It employs a three-stage pipeline: GAN inversion to latent space, latent sampling with manifold priors, and synthesis through a frozen StyleGAN2 for data-efficient adaptation.
- Experiments show significant improvements in metrics like FID on MetFaces and Toonify datasets, with robust performance even when using as few as 10 target images.
Geometry-Preserving Loss Functions for Blackbox GAN Adaptation: A Technical Overview
Introduction and Motivation
This work addresses the critical problem of domain adaptation for large-scale, blackbox generative models where traditional generator fine-tuning is infeasible due to data restrictions, computational constraints, or lack of direct access to model weights. The prevalent use of proprietary, API-only generative models underscores the need for adaptation methodologies that operate without modifying or accessing the internal parameters of pre-trained generators. The authors propose a novel pipeline that leverages manifold priors and explicit geometry-preserving loss functions for effective adaptation, focusing specifically on pre-trained StyleGAN2 architectures but with generalizable insights for broader blackbox generative modeling scenarios (2604.23888).
Methodological Framework
The approach comprises three main, modular stages:
- GAN Inversion to Latent Space: Target domain images are mapped into the latent W+ space of a frozen source generator using state-of-the-art invertors. This step ensures the resulting latents sample the sub-manifold corresponding to the target distribution within the latent space.
- Latent Space Sampler with Manifold Priors: A lightweight 1D diffusion model is trained as a latent sampler to approximate the posterior over target latents. The key innovation is the introduction of geometry-preserving loss terms that maintain pairwise distances and tangent orientations in both the latent and image spaces to encode an explicit manifold prior.
- Synthesis without Generator Update: During inference, new target-domain samples are generated by decoding the latent sampler’s output via the frozen generator, thereby entirely circumventing generator fine-tuning and weight access.

Figure 1: Overview of the three-stage adaptation framework, detailing image inversion, geometry-aware latent sampling, and frozen generative synthesis.
Notably, the latent sampler operates in the relatively low-dimensional 18×512 W+ latent space, which facilitates efficient learning even with limited target data.
Geometry-Preserving Loss and Objective Structure
The loss function is a composite of several terms:
- Reconstruction Loss (LMSE): Mean squared error between the input and denoised latents.
- Diversity Objectives (LKL, Ldiv): KL divergence and diversity-promoting penalties to encourage latent variation.
- Perceptual Consistency (Lpercep): VGG-16 perceptual loss applied between reconstructed and inverted images, ensuring semantic fidelity.
- Geometry-Preserving Loss (Lg): A novel loss measuring dissimilarity in tangent spaces between latent and image domains (via singular vectors of pairwise differences), ensuring that geometric structures of data manifolds are preserved in the transfer.
Empirically tuned weights balance these terms. Progressive ablations demonstrate that geometric loss terms are necessary and significantly enhance adaptation quality, particularly under data scarcity.

Figure 2: FID as a function of target data size, empirically validating the impact of loss terms and the utility of geometric preservation.

Figure 3: t-SNE visualization of latent distributions, illustrating how loss composition affects alignment with the target manifold.
Empirical Evaluation
Out-of-Domain Adaptation
The pipeline was validated on two OOD face datasets—MetFaces and Toonify—using StyleGAN2-FFHQ as the source generator. Metrics considered include FID, Precision, Recall, Density, and Coverage to fully characterize fidelity, diversity, and manifold coverage.
Key findings:
- MetFaces Adaptation: The geometry-enforced pipeline achieved FID = 0.925, approaching the performance of MineGAN++ with generator updates (FID = 0.699), but with no generator modification. Substantial improvements were measured over baselines without geometric losses or with only MSE objectives.
- Toonify Adaptation: The method yielded FID = 3.921, with robust performance decline only under severe data reduction, demonstrating graceful degradation.

Figure 4: Visual adaptation results for MetFaces, showing diverse, high-quality generative samples with the proposed pipeline versus failure of baseline adaptation without generator updates.

Figure 5: Adaptation for the Toonify domain, reaffirming the efficacy of the approach under substantial domain shifts.
Controlled Attribute Generation and Data Efficiency
The methodology allows targeted attribute control (e.g., “babies” or “sunglasses” subsets in FFHQ) and maintains fidelity and diversity with as few as 10 target images, an important result for data-constrained applications.

Figure 6: Attribute-focused adaptation, where the geometry-preserving manifold constraint ensures preservation of targeted image semantics.
Integration with Downstream Editing
Latents sampled from the adapted manifold pipeline can be further manipulated by text-guided models such as StyleCLIP, indicating that the adapted manifold retains sufficient structure for subsequent conditional editing.

Figure 7: Text-prompted walks using StyleCLIP on samples from the adapted latent manifold, demonstrating compatibility with downstream conditional editing.
Data Scarcity and Model Lightweightness
Strikingly, strong adaptation is retained for very small numbers of adaptation samples (e.g., MetFaces, N=10, FID ≈ 0.954), underscoring both the efficiency of the geometric latent approach and its practical applicability in low-data regimes.

Figure 8: Qualitative examples from adaptation with only 50 MetFaces images, manifesting robust style, pose, and demographic diversity.
Theoretical Implications and Future Directions
This work provides clear empirical support for the claim that geometry-preserving constraints—especially tangent space alignment—are critical to effective unsupervised domain adaptation in blackbox generative settings, even with limited data. The modularity of the method (agnostic to specific inversion and sampling architectures) and its absence of reliance on generator access have significant theoretical and practical implications:
- Theoretically, it motivates further investigations into manifold-aware regularization and the preservation of geometric correspondences between latent and data spaces in generative models, with potential crossover into manifold learning and representation disentanglement.
- Practically, it sets a precedent for secure, user-side adaptation of proprietary generative AIs, especially crucial as model weights become increasingly privatized. The framework is compatible with real-world scenarios where data transfer and generator modification are impossible.
Future development areas include improving inversion robustness for extremely far-OOD domains and modulating manifold complexity adaptively to prevent over-regularization when target distributions have high intrinsic dimension.
Conclusion
This work establishes geometry-preserving loss functions as a powerful mechanism for adaptation of blackbox generative models, showing that explicit alignment of latent and image manifold geometry enables effective, data-efficient adaptation without access to generator weights or fine-tuning. The pipeline is lightweight, achieves strong diversity and fidelity under limited supervision, and interfaces naturally with format-agnostic inversion and editing techniques. These advances portend expanded user control and safety in the deployment of next-generation generative AIs, and motivate further studies into geometric priors for manifold-constrained generation and adaptation (2604.23888).