SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.09458 · 2024

G2Face: High-Fidelity Reversible Face Anonymization via Generative and Geometric Priors

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 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; 3 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 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/2408.09458.json · badge: /api/ran/2408.09458.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
harxis/g2face canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
filter_state_dict Ran
ran; our contract draft was wrong, not the code
harxis/g2face/model/d3dfr/networks.py
code served (permissive licence) · get_code("0f6c5532e66c554c")
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 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 sample state dict that mimics a model's state_dict()
# This would typically come from torch.load() or model.state_dict()
state_dict = {
    'layer1.weight': torch.randn(4, 3),
    'layer1.bias': torch.randn(4),
    'fc.weight': torch.randn(2, 4),
    'fc.bias': torch.randn(2),
    'layer2.weight': torch.randn(5, 4),
    'layer2.bias': torch.randn(5),
}

ARGS = {
    'state_dict': state_dict,
    'remove_name': 'fc'
}
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 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
fused_leaky_relu Ran
ran; our contract draft was wrong, not the code
harxis/g2face/model/mlp.py
code served (permissive licence) · get_code("687098a9d4c0aedb")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) 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.functional as F

torch.manual_seed(0)

# Analyze the function:
# - input: tensor that undergoes leaky_relu, needs shape with len >= 2
# - bias: tensor with view() called on it, reshaped to (1, -1, 1, 1, ...), so bias should be 1D
# - negative_slope: float, default 0.2
# - scale: float, default 2 ** 0.5

# Create a 4D input tensor (batch=2, channels=4, height=3, width=3)
input_tensor = torch.randn(2, 4, 3, 3)

# Create a 1D bias tensor matching the channel dimension
bias_tensor = torch.randn(4)

# Define arguments
ARGS = {
    "input": input_tensor,
    "bias": bias_tensor,
    "negative_slope": 0.2,
    "scale": 2 ** 0.5
}
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 3) 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
make_kernel Ran
ran, violated the contract we drafted
harxis/g2face/model/style/style_adaptive_mask.py
pointer only (licence: MIT); the stored copy get_code serves, from dkn16/multi-fidel-gan-21cm, is pointer only (licence: NOASSERTION) · get_code("6f65e378a4313f87")
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 dkn16/multi-fidel-gan-21cm, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

ndc_projection Ran
ran, honoured the contract we drafted
harxis/g2face/model/d3dfr/renderer.py
code served (permissive licence) · get_code("379726bf4011ba18")
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 ndarray, ndim 2, dtype family float, shape (4, 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

ARGS = {
    'x': 0.1,
    'n': 1.0,
    'f': 50.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
perspective_projection Ran
ran, honoured the contract we drafted
harxis/g2face/model/d3dfr/bfm.py
code served (permissive licence) · get_code("2e9ce6a02832f7c8")
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 ndarray, ndim 2, dtype family float, shape (3, 3) 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

# The function perspective_projection takes two parameters: focal and center
# Looking at the function body:
# - focal is used in np.array as a scalar value (appears twice in the array)
# - center is used in np.array as a scalar value (appears twice in the array)
# - Both are used to construct a 3x3 matrix for perspective projection

# Create small float values for focal length and image center coordinate
focal = 500.0
center = 320.0

ARGS = {
    "focal": focal,
    "center": center
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 3) 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
reduce_sum Ran
ran, honoured the contract we drafted
harxis/g2face/model/style/non_leaking.py
code served (permissive licence) · get_code("3f0a1105ef251d78")
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 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
import torch.nn as nn
from torch import distributed as dist

torch.manual_seed(0)

# The function takes a single parameter: tensor
# It calls .clone() on it and passes it to dist.all_reduce()
# So we need a torch.Tensor

tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
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 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
rotate_mat Ran
ran; our contract draft was wrong, not the code
harxis/g2face/model/style/non_leaking.py
code served (permissive licence) · get_code("bed1e4f6c15e8e0b")
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 Tensor, ndim 3, dtype family float, shape (2, 3, 3) 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)

# theta should be a 1D tensor of angles with batch size as first dimension
theta = torch.randn(2)

ARGS = {
    'theta': theta,
    'device': 'cpu'
}
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 Tensor, ndim 3, dtype family float, shape (2, 3, 3) — shape (2, 3, 3) 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
translate_mat Ran
ran; our contract draft was wrong, not the code
harxis/g2face/model/style/non_leaking.py
code served (permissive licence) · get_code("1d8a8391fc4d7389")
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 Tensor, ndim 3, dtype family float, shape (2, 3, 3) 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)

# Create small tensors for translation values
# t_x and t_y should have shape (batch,) where batch=2
batch_size = 2
t_x = torch.randn(batch_size)
t_y = torch.randn(batch_size)
device = 'cpu'

ARGS = {
    't_x': t_x,
    't_y': t_y,
    'device': device
}
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 Tensor, ndim 3, dtype family float, shape (2, 3, 3) — shape (2, 3, 3) 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
define_net_recon Not yet run
unverified (harvested, no recorded run)
harxis/g2face/model/d3dfr/networks.py
code served (permissive licence) · get_code("1d3e7e477d7e56f2")
How it ran

no invocation recorded.

make_r1_gp Not yet run
unverified (harvested, no recorded run)
harxis/g2face/loss/gan_loss.py
code served (permissive licence) · get_code("b1c558324f705852")
How it ran

no invocation recorded.

resize_n_crop Not yet run
unverified (harvested, no recorded run)
harxis/g2face/model/d3dfr/networks.py
code served (permissive licence) · get_code("2870025ec65fec68")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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
make_kernel 40 other papers
40 dated earlier · 10 only as an assembly brick
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
and 37 more not named here
reduce_sum 14 other papers
14 dated earlier
1910.05852 (2019-10)
Implicit competitive regularization in GANs
1912.04958 (2019-12)
Analyzing and Improving the Image Quality of StyleGAN
2007.06600 (2020-07)
Closed-Form Factorization of Latent Semantics in GANs
and 11 more not named here
filter_state_dict 3 other papers
2 dated earlier, 1 same year, order not determinable
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
Wang_3D_Face_Reconstruction_with_the_Geometric_Guidance_of_Facial_Part_CVPR_2024_paper (2024 (year only))
3D Face Reconstruction with the Geometric Guidance of Facial Part Segmentation
2401.08503 (2024-01)
Real3D-Portrait: One-shot Realistic 3D Talking Portrait Synthesis
perspective_projection 3 other papers
3 dated earlier
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
2301.13430 (2023-01)
GeneFace: Generalized and High-Fidelity Audio-Driven 3D Talking Face Synthesis
2401.08503 (2024-01)
Real3D-Portrait: One-shot Realistic 3D Talking Portrait Synthesis
resize_n_crop 3 other papers
2 dated earlier, 1 same year, order not determinable
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
Wang_3D_Face_Reconstruction_with_the_Geometric_Guidance_of_Facial_Part_CVPR_2024_paper (2024 (year only))
3D Face Reconstruction with the Geometric Guidance of Facial Part Segmentation
2401.08503 (2024-01)
Real3D-Portrait: One-shot Realistic 3D Talking Portrait Synthesis
ndc_projection 1 other paper
1 same year, order not determinable
Wang_3D_Face_Reconstruction_with_the_Geometric_Guidance_of_Facial_Part_CVPR_2024_paper (2024 (year only))
3D Face Reconstruction with the Geometric Guidance of Facial Part Segmentation
translate_mat 1 other paper
1 dated earlier
2311.14097 (2023-11)
ACT-Diffusion: Efficient Adversarial Consistency Training for One-step Diffusion Models

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

Reversible face anonymization, unlike traditional face pixelization, seeks to replace sensitive identity information in facial images with synthesized alternatives, preserving privacy without sacrificing image clarity. Traditional methods, such as encoder-decoder networks, often result in significant loss of facial details due to their limited learning capacity. Additionally, relying on latent manipulation in pre-trained GANs can lead to changes in ID-irrelevant attributes, adversely affecting data utility due to GAN inversion inaccuracies. This paper introduces G\textsuperscript{2}Face, which leverages both generative and geometric priors to enhance identity manipulation, achieving high-quality reversible face anonymization without compromising data utility. We utilize a 3D face model to extract geometric information from the input face, integrating it with a pre-trained GAN-based decoder. This synergy of generative and geometric priors allows the decoder to produce realistic anonymized faces with consistent geometry. Moreover, multi-scale facial features are extracted from the original face and combined with the decoder using our novel identity-aware feature fusion blocks (IFF). This integration enables precise blending of the generated facial patterns with the original ID-irrelevant features, resulting in accurate identity manipulation. Extensive experiments demonstrate that our method outperforms existing state-of-the-art techniques in face anonymization and recovery, while preserving high data utility. Code is available at https://github.com/Harxis/G2Face.

For agents

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

get_harvested_code_for_paper("2408.09458")
get_code_for_paper("2408.09458")
have("2408.09458")

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

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

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

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

Connect an agent — have() is free.