SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.12927 · 2024

CLIPping the Deception: Adapting Vision-Language Models for Universal Deepfake Detection

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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; 6 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/2402.12927.json · badge: /api/ran/2402.12927.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
sohailahmedkhan/CLIPping-the-Deception canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_ci95 Ran
ran, honoured the contract we drafted
sohailahmedkhan/CLIPping-the-Deception/parse_test_res.py
code served (permissive licence) · get_code("ba26afd892405335")
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 float64, ndim 0, 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

# compute_ci95 takes a single parameter 'res' which is used with:
# - np.std(res) - needs array-like
# - np.sqrt(len(res)) - needs len() to work
# A simple numpy array or list works perfectly

res = np.array([1.2, 2.3, 3.1, 4.5, 5.2, 6.1, 7.3, 8.9])

ARGS = {
    "res": res
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
cv2_jpg Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sohailahmedkhan/CLIPping-the-Deception/evaluate.py
code served (permissive licence) · get_code("86961d87fd5fab69")
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 3, dtype family int, shape (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 cv2
import numpy as np

# Create a valid image array in BGR format (as expected by cv2)
# Image shape: (height, width, channels) with values in uint8 range [0, 255]
img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Compression quality value (JPEG quality, typically 0-100)
compress_val = 80

ARGS = {
    'img': img,
    'compress_val': compress_val
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (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
get_parsed_args Ran
ran; our contract draft was wrong, not the code
sohailahmedkhan/CLIPping-the-Deception/eval_utils.py
code served (permissive licence) · get_code("31ffd8a568aedb1b")
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 Namespace. 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 argparse

ARGS = {
    "model_dir": "/tmp/model_checkpoint",
    "dataset_name": "imagenet",
    "num_ctx_tokens": 16,
    "dataset_path": "/tmp/dataset"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
get_parsed_args Ran
ran; our contract draft was wrong, not the code
sohailahmedkhan/CLIPping-the-Deception/eval_utils_zero_shot.py
code served (permissive licence) · get_code("d98d700edf758730")
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 Namespace. 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 argparse

ARGS = {
    'model_dir': '/tmp/test_model',
    'dataset_name': 'imagenet'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
get_parsed_args_adapter Ran
ran; our contract draft was wrong, not the code
sohailahmedkhan/CLIPping-the-Deception/eval_utils_adapter.py
code served (permissive licence) · get_code("8a2cf73c650cccb3")
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 Namespace. 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 argparse
import tempfile
import os

# Create temporary directories for the function to reference
temp_dir = tempfile.mkdtemp()
dataset_path = temp_dir
model_dir = os.path.join(temp_dir, "models")
os.makedirs(model_dir, exist_ok=True)

# Create minimal config files that the function references
config_dir = os.path.join(temp_dir, "configs")
os.makedirs(os.path.join(config_dir, "trainers", "coop"), exist_ok=True)
os.makedirs(os.path.join(config_dir, "datasets"), exist_ok=True)

# Create dummy config files
with open(os.path.join(config_dir, "trainers", "coop", "vit_l14_ep2.yaml"), "w") as f:
    f.write("model: vit_l14\nepochs: 2\n")

dataset_name = "imagenet"
with open(os.path.join(config_dir, "datasets", f"{dataset_name}.yaml"), "w") as f:
    f.write("name: imagenet\nnum_classes: 1000\n")

# Define ARGS dictionary with all parameters required by get_parsed_args_adapter
ARGS = {
    "model_dir": model_dir,
    "dataset_name": dataset_name,
    "dataset_path": dataset_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
get_parsed_args_fine_tuned Ran
ran; our contract draft was wrong, not the code
sohailahmedkhan/CLIPping-the-Deception/eval_utils_fine_tuned.py
code served (permissive licence) · get_code("17051b90ed637049")
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 Namespace. 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 argparse

ARGS = {
    'model_dir': '/tmp/model_checkpoint',
    'dataset_name': 'imagenet',
    'dataset_path': '/tmp/dataset',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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_model Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sohailahmedkhan/CLIPping-the-Deception/trainer.py
code served (permissive licence) · get_code("cf8392ad485272eb")
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 MinimalModel. 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 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 model with a classifier attribute
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.feature_extractor = nn.Linear(4, 8)
        self.classifier = nn.Linear(8, 3)
    
    def forward(self, x):
        x = self.feature_extractor(x)
        x = self.classifier(x)
        return x

model = MinimalModel()

# Build train_loader: list of (data, label) tuples
train_loader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
]

# Build valid_loader: list of (data, label) tuples
valid_loader = [
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
    (torch.randn(2, 4), torch.randint(0, 3, (2,))),
]

ARGS = {
    'model': model,
    'model_name': 'test_model',
    'epochs': 1,
    'learning_rate': 0.01,
    'train_loader': train_loader,
    'valid_loader': valid_loader,
}
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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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
build_model Not yet run
unverified (harvested, no recorded run)
sohailahmedkhan/CLIPping-the-Deception/clip/model.py
code served (permissive licence) · get_code("13b29f1ac0b39a10")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 6 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
compute_ci95 37 other papers
17 dated earlier, 16 later, 3 same year, order not determinable, 1 undated
2106.00592 (2021-06)
Semi-Supervised Domain Generalization with Stochastic StyleMatch
2203.05557 (2022-03)
Conditional Prompt Learning for Vision-Language Models
2203.07740 (2022-03)
Exact Feature Distribution Matching for Arbitrary Style Transfer and Domain Generalization
and 34 more not named here
cv2_jpg 3 other papers
1 dated earlier, 2 later
2008.04115 (2020-08)
T-GD: Transferable GAN-generated Images Detection Framework
2407.20337 (2024-07)
Contrasting Deepfakes Diffusion via Contrastive Learning and Global-Local Similarities
2503.18286 (2025-03)
CO-SPY: Combining Semantic and Pixel Features to Detect Synthetic Images by AI

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 recent advancements in Generative Adversarial Networks (GANs) and the emergence of Diffusion models have significantly streamlined the production of highly realistic and widely accessible synthetic content. As a result, there is a pressing need for effective general purpose detection mechanisms to mitigate the potential risks posed by deepfakes. In this paper, we explore the effectiveness of pre-trained vision-language models (VLMs) when paired with recent adaptation methods for universal deepfake detection. Following previous studies in this domain, we employ only a single dataset (ProGAN) in order to adapt CLIP for deepfake detection. However, in contrast to prior research, which rely solely on the visual part of CLIP while ignoring its textual component, our analysis reveals that retaining the text part is crucial. Consequently, the simple and lightweight Prompt Tuning based adaptation strategy that we employ outperforms the previous SOTA approach by 5.01% mAP and 6.61% accuracy while utilizing less than one third of the training data (200k images as compared to 720k). To assess the real-world applicability of our proposed models, we conduct a comprehensive evaluation across various scenarios. This involves rigorous testing on images sourced from 21 distinct datasets, including those generated by GANs-based, Diffusion-based and Commercial tools.

For agents

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

get_harvested_code_for_paper("2402.12927")
get_code_for_paper("2402.12927")
have("2402.12927")

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

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

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

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

Connect an agent — have() is free.