SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.08422 · CVPR · 2022

Attribute Group Editing for Reliable Few-shot Image Generation

Dandan Tu, Xin Jin, Qingming Huang, Shuhui Wang, Xinzhe Han, Guanqi Ding, Shuzhe Wu

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 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/2203.08422.json · badge: /api/ran/2203.08422.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
UniBester/AGE canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
get_block Ran
ran, honoured the contract we drafted
UniBester/AGE/models/encoders/helpers.py
pointer only (licence: MIT); the stored copy get_code serves, from wty-ustc/hairclip, is pointer only (licence: LGPL-2.1) · get_code("b28543ed94f9d144")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from wty-ustc/hairclip, and LGPL-2.1, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_blocks Ran
ran; our contract draft was wrong, not the code
UniBester/AGE/models/encoders/helpers.py
pointer only (licence: MIT); the stored copy get_code serves, from wty-ustc/hairclip, is pointer only (licence: LGPL-2.1) · get_code("d764d1b681a351f3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from wty-ustc/hairclip, and LGPL-2.1, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_keys Ran
ran; our contract draft was wrong, not the code
UniBester/AGE/models/age.py
code served (permissive licence) · get_code("29b9a890f149a3a6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned dict. 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)

# Create a state dict that mimics a checkpoint with nested module names
# The function extracts keys that start with a specific name prefix
state_dict = {
    'encoder.layer1.weight': torch.randn(4, 3),
    'encoder.layer1.bias': torch.randn(4),
    'encoder.layer2.weight': torch.randn(5, 4),
    'encoder.layer2.bias': torch.randn(5),
    'decoder.layer1.weight': torch.randn(3, 5),
    'decoder.layer1.bias': torch.randn(3),
    'other.param': torch.randn(2, 2)
}

# Wrap it in a checkpoint-like dict (function checks for 'state_dict' key)
d = {'state_dict': state_dict, 'epoch': 10, 'optimizer': {}}

# Name to filter by
name = 'encoder'

ARGS = {
    'd': d,
    'name': name
}
Setup block drafted by
a language model, Claude Sonnet 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
l2_norm Ran
ran; our contract draft was wrong, not the code
UniBester/AGE/models/encoders/helpers.py
code served (permissive licence) · get_code("c54fea429589425d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (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 torch

torch.manual_seed(0)

input_tensor = torch.randn(2, 4)
axis = 1

ARGS = {
    'input': input_tensor,
    'axis': axis
}
Setup block drafted by
a language model, Claude Sonnet 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 2, dtype family float, shape (2, 4) — shape (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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 4 later) and 0 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
l2_norm 29 other papers
12 dated earlier, 1 the same month, 15 later, 1 same year, order not determinable · 2 only as an assembly brick
1804.07573 (2018-04)
MobileFaceNets: Efficient CNNs for Accurate Real-Time Face Verification on Mobile Devices
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
and 26 more not named here
get_block 27 other papers
11 dated earlier, 16 later
1804.07573 (2018-04)
MobileFaceNets: Efficient CNNs for Accurate Real-Time Face Verification on Mobile Devices
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
1907.10830 (2019-07)
U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation
and 24 more not named here
get_keys 14 other papers
5 dated earlier, 9 later
2008.00951 (2020-08)
Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation
2011.12799 (2020-11)
StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
and 11 more not named here
get_blocks 4 other papers
2 dated earlier, 2 later
2008.00951 (2020-08)
Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation
2112.05142 (2021-12)
HairCLIP: Design Your Hair by Text and Reference Image
2307.08448 (2023-07)
Not All Steps are Created Equal: Selective Diffusion Distillation for Image Manipulation
and 1 more not named here

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

Few-shot image generation is a challenging task even using the state-of-the-art Generative Adversarial Networks (GANs). Due to the unstable GAN training process and the limited training data, the generated images are often of low quality and low diversity. In this work, we propose a new "editing-based" method, i.e., Attribute Group Editing (AGE), for few-shot image generation. The basic assumption is that any image is a collection of attributes and the editing direction for a specific attribute is shared across all categories. AGE examines the internal representation learned in GANs and identifies semantically meaningful directions. Specifically, the class embedding, i.e., the mean vector of the latent codes from a specific category, is used to represent the category-relevant attributes, and the category-irrelevant attributes are learned globally by Sparse Dictionary Learning on the difference between the sample embedding and the class embedding. Given a GAN well trained on seen categories, diverse images of unseen categories can be synthesized through editing categoryirrelevant attributes while keeping category-relevant attributes unchanged. Without re-training the GAN, AGE is capable of not only producing more realistic and diverse images for downstream visual applications with limited data but achieving controllable image editing with interpretable category-irrelevant directions. Code is available at https://github.com/UniBester/AGE.

For agents

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

get_harvested_code_for_paper("2203.08422")
get_code_for_paper("2203.08422")
have("2203.08422")

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

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

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

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

Connect an agent — have() is free.