SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.06506 · 2024

Frequency Masking for Universal Deepfake Detection

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 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 0 have no contract verdict; 5 failures of our instrument; 4 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/2401.06506.json · badge: /api/ran/2401.06506.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
chandlerbing65nm/FakeImageDetection canonical (classifier label)
classifier basis: census
5 ran · 4 no recorded run
FunctionStatusWhere it lives
conv1x1 Ran
ran; our contract draft was wrong, not the code
chandlerbing65nm/FakeImageDetection/networks/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 Conv2d. 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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
chandlerbing65nm/FakeImageDetection/networks/resnet.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, and GitHub detected no licence in that repository when it was checked. 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.

resnet18 Ran
ran; our contract draft was wrong, not the code
chandlerbing65nm/FakeImageDetection/networks/resnet.py
code served (permissive licence) · get_code("d586be93da3254ed")
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 ResNet. 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)

# Build a minimal ResNet18 model
def resnet18(pretrained=False, num_classes=1000):
    """Constructs a ResNet-18 model."""
    model = ResNet(BasicBlock, [2, 2, 2, 2], num_classes=num_classes)
    if pretrained:
        # Skip loading pretrained weights (no network access)
        pass
    return model

# Define ARGS dict with all parameters for resnet18 function
ARGS = {
    'pretrained': False,
    'num_classes': 1000,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
train_augment Ran
ran; our contract draft was wrong, not the code
chandlerbing65nm/FakeImageDetection/utils.py
code served (permissive licence) · get_code("4850f0ddba8c4d94")
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 Compose. 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
from torchvision import transforms

torch.manual_seed(0)

# Create a minimal augmentor class with the required methods
class MinimalAugmentor:
    def custom_resize(self, img):
        return img
    
    def data_augment(self, img):
        return img

# Create a minimal mask generator class with the required method
class MinimalMaskGenerator:
    def transform(self, img):
        return img

# Create a minimal args class with the required attributes
class MinimalArgs:
    def __init__(self):
        self.mask_type = 'rotate'
        self.ratio = 0.3
        self.combine_aug = 'none'
        self.model_name = 'ResNet50'

# Create instances
augmentor = MinimalAugmentor()
mask_generator = MinimalMaskGenerator()
args = MinimalArgs()

ARGS = {
    'augmentor': augmentor,
    'mask_generator': mask_generator,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
val_augment Ran
ran; our contract draft was wrong, not the code
chandlerbing65nm/FakeImageDetection/utils.py
code served (permissive licence) · get_code("01cb495ab740ec20")
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 Compose. 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 numpy as np
from torchvision import transforms
from PIL import Image

torch.manual_seed(0)

# Create a minimal augmentor class that has the required methods
class MinimalAugmentor:
    def custom_resize(self, img):
        """Resize image to a standard size"""
        if isinstance(img, Image.Image):
            return img.resize((256, 256))
        return img
    
    def data_augment(self, img):
        """Apply data augmentation"""
        return img

# Create a minimal mask generator class
class MinimalMaskGenerator:
    def transform(self, img):
        """Apply mask transformation"""
        return img

# Create a minimal args class
class MinimalArgs:
    def __init__(self, model_name):
        self.model_name = model_name

# Create test instances
augmentor = MinimalAugmentor()
mask_generator = MinimalMaskGenerator()
args_clip = MinimalArgs("CLIP")
args_regular = MinimalArgs("ResNet50")

# Define ARGS with all parameter combinations
ARGS = {
    "augmentor": augmentor,
    "mask_generator": mask_generator,
    "args": args_clip
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
construct_save_filename Not yet run
unverified (harvested, no recorded run)
chandlerbing65nm/FakeImageDetection/prune.py
code served (permissive licence) · get_code("407a8ab9952dac52")
How it ran

no invocation recorded.

resnet50 Not yet run
unverified (harvested, no recorded run)
chandlerbing65nm/FakeImageDetection/networks/resnet_mod.py
code served (permissive licence) · get_code("e0839d09ff4eb7c7")
How it ran

no invocation recorded.

resnet50 Not yet run
unverified (harvested, no recorded run)
chandlerbing65nm/FakeImageDetection/networks/resnet_npr.py
code served (permissive licence) · get_code("53e09d6a8a49a38f")
How it ran

no invocation recorded.

test_augment Not yet run
unverified (harvested, no recorded run)
chandlerbing65nm/FakeImageDetection/utils.py
code served (permissive licence) · get_code("c96b43a26b0e5b2a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 4 later) and 5 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
conv3x3 686 other papers
548 dated earlier, 4 the same month, 117 later, 17 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
conv1x1 431 other papers
313 dated earlier, 8 the same month, 99 later, 10 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
resnet18 89 other papers
72 dated earlier, 15 later, 2 same year, order not determinable
1705.09759 (2017-05)
CASENet: Deep Category-Aware Semantic Edge Detection
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
1803.00839 (2018-03)
Pose-Robust Face Recognition via Deep Residual Equivariant Mapping
and 86 more not named here
resnet50 13 other papers
10 dated earlier, 3 later
1603.04992 (2016-03)
Unsupervised CNN for Single View Depth Estimation: Geometry to the Rescue
1905.03244 (2019-05)
Convolutional Mesh Regression for Single-Image Human Shape Reconstruction
2006.05734 (2020-06)
3D Human Mesh Regression with Dense Correspondence
and 10 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

We study universal deepfake detection. Our goal is to detect synthetic images from a range of generative AI approaches, particularly from emerging ones which are unseen during training of the deepfake detector. Universal deepfake detection requires outstanding generalization capability. Motivated by recently proposed masked image modeling which has demonstrated excellent generalization in self-supervised pre-training, we make the first attempt to explore masked image modeling for universal deepfake detection. We study spatial and frequency domain masking in training deepfake detectors. Based on empirical analysis, we propose a novel deepfake detector via frequency masking. Our focus on frequency domain is different from the majority, which primarily target spatial domain detection. Our comparative analyses reveal substantial performance gains over existing methods. Code and models are publicly available.

For agents

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

get_harvested_code_for_paper("2401.06506")
get_code_for_paper("2401.06506")
have("2401.06506")

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

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

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

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

Connect an agent — have() is free.