SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.08884 · NeurIPS · 2022

HyperDomainNet: Universal Domain Adaptation for Generative Adversarial Networks

Dmitry Vetrov, Aibek Alanov, Vadim Titov

arXiv · PDF · Open in the Atlas

Code that ran

8 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 8 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2210.08884.json · badge: /api/ran/2210.08884.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
MACderRu/HyperDomainNet canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
macderru/hyperdomainnet marked official in Papers with Code
Papers with Code archive
5 ran · 8 no recorded run
FunctionStatusWhere it lives
Blur Ran
ran on a synthesized input · constructed an object; no result was computed
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("0b20639615622596")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Blur: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

def upfirdn2d(input, kernel, pad):
    """Minimal stand-in for upfirdn2d function"""
    return input

ARGS = {
    'kernel': [1.0, 2.0, 1.0],
    'pad': 1,
    'upsample_factor': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Blur — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Blur output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ClassRegistry Ran
ran on a synthesized input · constructed an object; no result was computed
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("1601948f4ac658fc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ClassRegistry: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import inspect
import typing
import omegaconf
import dataclasses
import typing as tp

# No arguments needed for ClassRegistry.__init__() - it takes no parameters
ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ClassRegistry — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ClassRegistry output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
EqualLinear Ran
ran on a synthesized input · constructed an object; no result was computed
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("78c0c8d1ea4d6eb6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, EqualLinear: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math
import torch.nn as nn
from torch.nn import functional as F

torch.manual_seed(0)

# Need to define fused_leaky_relu since it's used in the forward method
def fused_leaky_relu(input, bias=None, negative_slope=0.2, scale=1):
    if bias is not None:
        return F.leaky_relu(input + bias, negative_slope) * scale
    else:
        return F.leaky_relu(input, negative_slope) * scale

# Create a small activation function stand-in
activation_fn = lambda x: F.leaky_relu(x, 0.2)

ARGS = {
    'in_dim': 4,
    'out_dim': 3,
    'bias': True,
    'bias_init': 0.0,
    'lr_mul': 1.0,
    'activation': activation_fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EqualLinear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EqualLinear output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ModulatedConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("15c6d8b415268285")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ModulatedConv2d: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Helper functions needed by ModulatedConv2d
def make_kernel(k):
    k = torch.tensor(k, dtype=torch.float32)
    if k.ndim == 1:
        k = k[None, :] * k[:, None]
    k /= k.sum()
    return k

def upfirdn2d(input, kernel, pad):
    # Minimal implementation for blur forward pass
    # Just return input as-is for setup purposes
    return input

def fused_leaky_relu(input, bias):
    # Minimal implementation
    return torch.nn.functional.leaky_relu(input + bias if bias is not None else input)

# Build the ARGS dict with valid parameter values
ARGS = {
    'in_channel': 4,          # input channels
    'out_channel': 8,         # output channels
    'kernel_size': 3,         # convolution kernel size
    'style_dim': 16,          # style vector dimension
    'demodulate': True,       # whether to demodulate
    'upsample': False,        # whether to upsample
    'downsample': False,      # whether to downsample
    'blur_kernel': [1, 3, 3, 1],  # blur kernel for up/downsampling
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ModulatedConv2d — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ModulatedConv2d output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Upsample Ran
ran on a synthesized input · constructed an object; no result was computed
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("5845b86e0c4d496d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Upsample: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

def upfirdn2d(input, kernel, up=1, down=1, pad=(0, 0)):
    """Stand-in implementation of upfirdn2d for testing purposes."""
    batch, channels, height, width = input.shape
    k_h, k_w = kernel.shape
    
    # Upsample
    if up > 1:
        output = torch.zeros(batch, channels, height * up, width * up, dtype=input.dtype)
        output[:, :, ::up, ::up] = input
    else:
        output = input
    
    # Downsample
    if down > 1:
        output = output[:, :, ::down, ::down]
    
    return output

ARGS = {
    'kernel': [1.0, 2.0, 1.0],
    'factor': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Upsample — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Upsample output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_avg_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
MACderRu/HyperDomainNet/core/utils/example_utils.py
code served (permissive licence) · get_code("32adb2d122679599")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockStyleGAN(nn.Module):
    def __init__(self):
        super().__init__()
        # latent_avg is accessed as net.latent_avg
        self.latent_avg = nn.Parameter(torch.randn(1, 512))
    
    def forward(self, x, input_code=False, randomize_noise=False, return_latents=False, average_code=False):
        # x shape: (batch, latent_dim) when input_code=True
        # Return a tuple where first element is the generated image
        batch_size = x.shape[0]
        # Return fake image tensor of shape (batch, 3, 64, 64)
        fake_image = torch.randn(batch_size, 3, 64, 64)
        return (fake_image,)

net = MockStyleGAN()

ARGS = {
    'net': net
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:AssertionError)
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_latent Ran
ran, honoured the contract we drafted
MACderRu/HyperDomainNet/core/utils/example_utils.py
code served (permissive licence) · get_code("6055f06158ae1524")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 3, dtype family float, shape (1, 2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory and a small numpy file
temp_dir = tempfile.mkdtemp()
temp_path = os.path.join(temp_dir, "latent.npy")

# Create a small numpy array (2x4 to match "batch 2, dim 4" requirement)
latent_array = np.random.randn(2, 4).astype(np.float32)
np.save(temp_path, latent_array)

ARGS = {
    "path": temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (1, 2, 4) — shape (1, 2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
run_on_batch Ran
ran; our contract draft was wrong, not the code
MACderRu/HyperDomainNet/core/utils/example_utils.py
code served (permissive licence) · get_code("b759cb2df53ad9a8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal net that satisfies the function's usage
class MinimalNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(8, 4)  # inputs (4) + avg_image (4) = 8 input channels
    
    def forward(self, x_input, latent=None, randomize_noise=False, return_latents=True, resize=False):
        # x_input shape: (batch_size, 8, H, W) - concatenated inputs and image
        batch_size = x_input.shape[0]
        
        # Generate output y_hat with same spatial dims as input
        y_hat = torch.randn(batch_size, 4, 3, 3)
        
        # Generate latent representation
        if latent is None:
            latent = torch.randn(batch_size, 5)
        else:
            latent = torch.randn(batch_size, 5)
        
        return y_hat, latent
    
    def face_pool(self, y_hat):
        # Just return the input as-is for pooling
        return y_hat

# Build options config
class OptsConfig:
    def __init__(self):
        self.n_iters_per_batch = 2
        self.resize_outputs = False

# Create arguments
inputs = torch.randn(2, 4, 3, 3)  # batch_size=2, channels=4, height=3, width=3
net = MinimalNet()
opts = OptsConfig()
avg_image = torch.randn(4, 3, 3)  # channels=4, height=3, width=3

ARGS = {
    'inputs': inputs,
    'net': net,
    'opts': opts,
    'avg_image': avg_image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
DecModulatedConv2d Not yet run
unverified (harvested, no recorded run)
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("17d45a0afbc836f2")
How it ran

no invocation recorded.

ModModulatedConv2d Not yet run
unverified (harvested, no recorded run)
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("e9718036937d874b")
How it ran

no invocation recorded.

OffsetsGenerator Not yet run
unverified (harvested, no recorded run)
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("223ac0755039f519")
How it ran

no invocation recorded.

OffsetsStyledConv Not yet run
unverified (harvested, no recorded run)
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("6e8bab058d83a17c")
How it ran

no invocation recorded.

OffsetsTunningGenerator Not yet run
unverified (harvested, no recorded run)
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("39c0a83a746f7304")
How it ran

no invocation recorded.

StyleModulatedConv2d Not yet run
unverified (harvested, no recorded run)
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("01421864e3adfd3c")
How it ran

no invocation recorded.

ToRGB Not yet run
unverified (harvested, no recorded run)
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("a3e38a9052507399")
How it ran

no invocation recorded.

requires_grad Not yet run
unverified (harvested, no recorded run)
macderru/hyperdomainnet/core/uda_models.py
code served (permissive licence) · get_code("cee6bfbe557ea802")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 2 later) and 11 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
Blur
brick of this paper's assembly: helper
10 other papers
8 dated earlier, 2 later · 4 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
2101.02477 (2021-01)
GAN-Control: Explicitly Controllable GANs
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
and 7 more not named here
Upsample
brick of this paper's assembly: helper
8 other papers
7 dated earlier, 1 later · 3 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
2101.02477 (2021-01)
GAN-Control: Explicitly Controllable GANs
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
and 5 more not named here
ClassRegistry
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 2 only as an assembly brick
2104.06820 (2021-04)
Few-shot Image Generation via Cross-domain Correspondence
2210.16559 (2022-10)
Few-shot Image Generation via Adaptation-Aware Kernel Modulation
requires_grad
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 2 only as an assembly brick
2104.06820 (2021-04)
Few-shot Image Generation via Cross-domain Correspondence
2210.16559 (2022-10)
Few-shot Image Generation via Adaptation-Aware Kernel Modulation
EqualLinear
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2104.06820 (2021-04)
Few-shot Image Generation via Cross-domain Correspondence

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Domain adaptation framework of GANs has achieved great progress in recent years as a main successful approach of training contemporary GANs in the case of very limited training data. In this work, we significantly improve this framework by proposing an extremely compact parameter space for fine-tuning the generator. We introduce a novel domain-modulation technique that allows to optimize only 6 thousand-dimensional vector instead of 30 million weights of StyleGAN2 to adapt to a target domain. We apply this parameterization to the state-of-art domain adaptation methods and show that it has almost the same expressiveness as the full parameter space. Additionally, we propose a new regularization loss that considerably enhances the diversity of the fine-tuned generator. Inspired by the reduction in the size of the optimizing parameter space we consider the problem of multi-domain adaptation of GANs, i.e. setting when the same model can adapt to several domains depending on the input query. We propose the HyperDomainNet that is a hypernetwork that predicts our parameterization given the target domain. We empirically confirm that it can successfully learn a number of domains at once and may even generalize to unseen domains. Source code can be found at this github repository.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2210.08884")
get_code_for_paper("2210.08884")
have("2210.08884")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2210.08884.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2210.08884.svg)](https://syntology.ai/paper/2210.08884)

Connect an agent — have() is free.