SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2511.01293 · NeurIPS · 2025

Detecting Generated Images by Fitting Natural Image Distributions

Bo Han, Kun Zhang, Yonggang Zhang, Mingming Gong, Xinmei Tian, Jun Nie

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2511.01293.json · badge: /api/ran/2511.01293.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
tmlr-group/ConV community
Papers with Code archive
6 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_acc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tmlr-group/ConV/srcs/ConV.py
code served (permissive licence) · get_code("9c61bf697b537928")
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 numpy as np
from sklearn.metrics import average_precision_score, accuracy_score

# Set seed for reproducibility
np.random.seed(0)

# Create small synthetic data
# y_true: binary labels (0 or 1)
# y_pred: predicted probabilities/scores
y_true = np.array([0, 0, 1, 1, 0, 1])
y_pred = np.array([0.1, 0.3, 0.7, 0.9, 0.2, 0.8])

# Threshold for classification
thres = 0.5

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "thres": thres
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, sklearn — 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
calculate_cosine_similarity Ran
ran; our contract draft was wrong, not the code
tmlr-group/ConV/srcs/ConV.py
code served (permissive licence) · get_code("c50a5cf11b9ea3b0")
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 1, dtype family float, shape (2,) 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 two small tensors for cosine similarity calculation
# Shape: (batch_size=2, embedding_dim=4)
tensor1 = torch.randn(2, 4)
tensor2 = torch.randn(2, 4)

ARGS = {
    "tensor1": tensor1,
    "tensor2": tensor2,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
find_best_threshold Ran
ran, violated the contract we drafted
tmlr-group/ConV/srcs/ConV.py
code served (permissive licence) · get_code("295724c23de5a53d")
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 0, dtype family float, 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 numpy as np
from copy import deepcopy

torch.manual_seed(0)

# Create y_true: binary labels where first half is 0 (real) and second half is 1 (fake)
# Using 8 samples total: 4 real (0s) and 4 fake (1s)
y_true = torch.tensor([0, 0, 0, 0, 1, 1, 1, 1], dtype=torch.float32)

# Create y_pred: prediction scores
# First half (real samples) should have lower scores, second half (fake) higher scores
# This creates a scenario where thresholding can separate them
y_pred = torch.tensor([0.1, 0.2, 0.15, 0.25, 0.6, 0.7, 0.65, 0.8], dtype=torch.float32)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
}
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 0, dtype family float, 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
fpr_and_fdr_at_recall Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tmlr-group/ConV/srcs/ConV.py
code served (permissive licence) · get_code("7007a88885032a37")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create synthetic binary classification data
n_samples = 20
y_true = np.array([0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0])
y_score = np.array([0.1, 0.9, 0.2, 0.85, 0.95, 0.15, 0.88, 0.25, 0.92, 0.87, 
                     0.3, 0.35, 0.91, 0.89, 0.22, 0.86, 0.18, 0.93, 0.94, 0.12])

ARGS = {
    'y_true': y_true,
    'y_score': y_score,
    'recall_level': 0.95,
    'pos_label': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
get_measures Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tmlr-group/ConV/srcs/ConV.py
code served (permissive licence) · get_code("6968accad9d4d5f3")
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 numpy as np
import sklearn.metrics as sk

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample data for testing
# _pos: positive class scores (should be higher)
_pos = np.array([0.8, 0.9, 0.85, 0.95])

# _neg: negative class scores (should be lower)
_neg = np.array([0.2, 0.3, 0.15, 0.25])

# recall_level: the recall level at which to compute FPR
recall_level = 0.95

ARGS = {
    "_pos": _pos,
    "_neg": _neg,
    "recall_level": recall_level,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, sklearn — 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
stable_cumsum Ran
ran, honoured the contract we drafted
tmlr-group/ConV/srcs/ConV.py
code served (permissive licence) · get_code("a7036bae17c58812")
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 ndarray, ndim 1, dtype family float, shape (5,) 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

# Create a simple array for testing stable_cumsum
arr = np.array([1.0, 2.0, 3.0, 4.0, 5.0], dtype=np.float64)

ARGS = {
    "arr": arr,
    "rtol": 1e-05,
    "atol": 1e-08,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 1, dtype family float, shape (5,) — shape (5,) 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
validate Not yet run
unverified (harvested, no recorded run)
tmlr-group/ConV/srcs/ConV.py
code served (permissive licence) · get_code("8e5cc49584fda482")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 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
find_best_threshold
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2404.04584 (2024-04)
D$^3$: Scaling Up Deepfake Detection by Learning from Discrepancy
2411.15633 (2024-11)
Orthogonal Subspace Decomposition for Generalizable AI-Generated Image Detection
calculate_acc
brick of this paper's assembly: metric
1 other paper
1 dated earlier
2412.05897 (2024-12)
Epistemic Uncertainty for Generated Image Detection
calculate_cosine_similarity
brick of this paper's assembly: metric
1 other paper
1 dated earlier
2412.05897 (2024-12)
Epistemic Uncertainty for Generated Image Detection

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

The increasing realism of generated images has raised significant concerns about their potential misuse, necessitating robust detection methods. Current approaches mainly rely on training binary classifiers, which depend heavily on the quantity and quality of available generated images. In this work, we propose a novel framework that exploits geometric differences between the data manifolds of natural and generated images. To exploit this difference, we employ a pair of functions engineered to yield consistent outputs for natural images but divergent outputs for generated ones, leveraging the property that their gradients reside in mutually orthogonal subspaces. This design enables a simple yet effective detection method: an image is identified as generated if a transformation along its data manifold induces a significant change in the loss value of a self-supervised model pre-trained on natural images. Further more, to address diminishing manifold disparities in advanced generative models, we leverage normalizing flows to amplify detectable differences by extruding generated images away from the natural image manifold. Extensive experiments demonstrate the efficacy of this method. Code is available at https://github.com/tmlr-group/ConV.

For agents

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

get_harvested_code_for_paper("2511.01293")
get_code_for_paper("2511.01293")
have("2511.01293")

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

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

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

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

Connect an agent — have() is free.