SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.06558 · 2019

Mask Based Unsupervised Content Transfer

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 1 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/1906.06558.json · badge: /api/ran/1906.06558.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
rmokady/mbu-content-tansfer canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
FunctionStatusWhere it lives
get_test_imgs Ran
ran on a synthesized input
rmokady/mbu-content-tansfer/mask_utils.py
code served (permissive licence) · get_code("94166595f90ba193")
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 tuple, ndim 5, 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.utils.data as data
import torchvision
from PIL import Image
import tempfile
import os

torch.manual_seed(0)

# Create temporary directory and test files
temp_dir = tempfile.mkdtemp()

# Create small test images
test_img = Image.new('RGB', (32, 32), color='red')
img_path_a = os.path.join(temp_dir, 'test_img_a.jpg')
img_path_b = os.path.join(temp_dir, 'test_img_b.jpg')
test_img.save(img_path_a)
test_img.save(img_path_b)

# Create testA.txt and testB.txt files
testA_path = os.path.join(temp_dir, 'testA.txt')
testB_path = os.path.join(temp_dir, 'testB.txt')

with open(testA_path, 'w') as f:
    f.write(img_path_a + '\n')
    f.write(img_path_a + '\n')

with open(testB_path, 'w') as f:
    f.write(img_path_b + '\n')
    f.write(img_path_b + '\n')

# Create args object with required attributes
class Args:
    def __init__(self):
        self.root = temp_dir
        self.resize = 4

ARGS = {
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 5, 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
load_model Ran
ran on a synthesized input
rmokady/mbu-content-tansfer/mask_utils.py
code served (permissive licence) · get_code("b6535fb7258fcf4e")
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 int, ndim 0, dtype family int, shape () 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 torch
import torch.nn as nn
import tempfile
import os

torch.manual_seed(0)

# Create minimal nn.Module classes that support load_state_dict
class SimpleEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class SimpleDecoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(3, 4)
    
    def forward(self, x):
        return self.linear(x)

class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x):
        return self.linear(x)

# Create model instances
e1 = SimpleEncoder()
e2 = SimpleEncoder()
d_a = SimpleDecoder()
d_b = SimpleDecoder()
disc = SimpleDiscriminator()

# Create optimizers
ae_opt = torch.optim.Adam(list(e1.parameters()) + list(e2.parameters()) + list(d_a.parameters()) + list(d_b.parameters()), lr=0.001)
disc_opt = torch.optim.Adam(disc.parameters(), lr=0.001)

# Create a temporary file with a valid state dict
with tempfile.NamedTemporaryFile(delete=False, suffix='.pt') as f:
    load_path = f.name

# Save a state dict with all required keys
state_dict = {
    'e1': e1.state_dict(),
    'e2': e2.state_dict(),
    'd_a': d_a.state_dict(),
    'd_b': d_b.state_dict(),
    'ae_opt': ae_opt.state_dict(),
    'disc': disc.state_dict(),
    'disc_opt': disc_opt.state_dict(),
    'iters': 42
}
torch.save(state_dict, load_path)

ARGS = {
    'load_path': load_path,
    'e1': e1,
    'e2': e2,
    'd_a': d_a,
    'd_b': d_b,
    'ae_opt': ae_opt,
    'disc': disc,
    'disc_opt': disc_opt
}
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 int, ndim 0, dtype family int, shape () — shape () 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
removal Not yet run
unverified (harvested, no recorded run)
rmokady/mbu-content-tansfer/mask_utils.py
code served (permissive licence) · get_code("0ea377d5f51b5d2d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 3 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.

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

We consider the problem of translating, in an unsupervised manner, between two domains where one contains some additional information compared to the other. The proposed method disentangles the common and separate parts of these domains and, through the generation of a mask, focuses the attention of the underlying network to the desired augmentation alone, without wastefully reconstructing the entire target. This enables state-of-the-art quality and variety of content translation, as demonstrated through extensive quantitative and qualitative evaluation. Our method is also capable of adding the separate content of different guide images and domains as well as remove existing separate content. Furthermore, our method enables weakly-supervised semantic segmentation of the separate part of each domain, where only class labels are provided. Our code is publicly available at https://github.com/rmokady/mbu-content-tansfer.

For agents

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

get_harvested_code_for_paper("1906.06558")
get_code_for_paper("1906.06558")
have("1906.06558")

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

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

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

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

Connect an agent — have() is free.