SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.20188 · CVPR · 2025

Rethinking Vision-Language Model in Face Forensics: Multi-Modal Interpretable Forged Face Detector

Xiaoming Liu, Yue Zhang, Xiaohong Liu, Xiufeng Song, Xiao Guo

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 1 honoured the contract we drafted, 1 violated it and 5 have no contract verdict; 2 failures of our instrument; 2 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/2503.20188.json · badge: /api/ran/2503.20188.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
chelsea234/m2f2_det canonical (classifier label)
classifier basis not recorded on the link
9 ran · 2 no recorded run
FunctionStatusWhere it lives
gaussian_blur Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chelsea234/m2f2_det/dataset/process.py
code served (permissive licence) · get_code("e2b206e653829624")
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 float, shape (4, 5, 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

# Create a small 3-channel image (height=4, width=5, channels=3)
img = np.random.rand(4, 5, 3).astype(np.float32)

# Define sigma for gaussian blur
sigma = 1.0

ARGS = {
    "img": img,
    "sigma": sigma,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (4, 5, 3) — shape (4, 5, 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_dataloader Ran
ran on a synthesized input
chelsea234/m2f2_det/dataset/utils.py
code served (permissive licence) · get_code("8e360ac0c20cbea7")
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 DataLoader. 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 torch.utils.data import Dataset, DataLoader, random_split

torch.manual_seed(0)

class TinyDataset(Dataset):
    def __init__(self, size=8):
        self.size = size
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        x = torch.randn(4)
        y = torch.randint(0, 2, (1,))
        return x, y

dataset = TinyDataset(size=8)

ARGS = {
    'dataset': dataset,
    'mode': 'train',
    'bs': 2,
    'workers': 0,
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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_feature_dim Ran
ran on a synthesized input
chelsea234/m2f2_det/sequence/models/M2F2_Det/models/model.py
code served (permissive licence) · get_code("d42da3f112a21315")
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 int, ndim 0, dtype family int, 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

torch.manual_seed(0)

ARGS = {
    'model_name': 'densenet121'
}
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 int, ndim 0, dtype family int, 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
get_gt_lst Ran
ran on a synthesized input
chelsea234/m2f2_det/eval/eval_judgement.py
code served (permissive licence) · get_code("c7859713b37833d9")
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 tuple, ndim 2, dtype family int; 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 json
import tempfile
import os

# Create a temporary file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl')
temp_file_path = temp_file.name

# Write test data to the temporary file
test_data = [
    {'text': 'real', 'image': './utils/DDVQA_images/c40/test/5/img1.jpg'},
    {'text': 'fake', 'image': './utils/DDVQA_images/other/img2.jpg'},
    {'text': 'computer-generated', 'image': './utils/DDVQA_images/c40/test/5/img3.jpg'},
    {'text': 'Real', 'image': './utils/DDVQA_images/different/img4.jpg'},
]

for item in test_data:
    temp_file.write(json.dumps(item) + '\n')

temp_file.close()

ARGS = {
    'file_path': temp_file_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 tuple, ndim 2, dtype family int — 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
load_image Ran
ran, honoured the contract we drafted
chelsea234/m2f2_det/llava/serve/cli_DDVQA_det.py
code served (permissive licence) · get_code("bb945d226af806a7")
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 Image. 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 tempfile
from PIL import Image
import os

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple RGB image and save it
test_image = Image.new('RGB', (100, 100), color=(73, 109, 137))
test_image.save(temp_image_path)

ARGS = {
    'image_file': temp_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, requests — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
random_split_dataset Ran
ran on a synthesized input
chelsea234/m2f2_det/dataset/utils.py
code served (permissive licence) · get_code("095700918c5cc72d")
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 list. 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
from torch.utils.data import Dataset

torch.manual_seed(0)

# Create a minimal dataset class
class DummyDataset(Dataset):
    def __init__(self, size=10):
        self.size = size
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        return torch.randn(4), idx

# Construct the dataset
dataset = DummyDataset(size=10)

# Define split ratios (e.g., 60% train, 20% val, 20% test)
split_ratio = [6, 2, 2]

# Define seed
seed = 42

ARGS = {
    "dataset": dataset,
    "split_ratio": split_ratio,
    "seed": seed
}
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 list — a list output has no array shape of its own; none is 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
sample_continuous Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chelsea234/m2f2_det/dataset/process.py
code served (permissive licence) · get_code("2d279d661251af46")
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 float, 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 random

def sample_continuous(s):
    if len(s) == 1:
        return s[0]
    if len(s) == 2:
        rg = s[1] - s[0]
        return random.random() * rg + s[0]
    raise ValueError('Length of iterable s should be 1 or 2.')

# Test case 1: single element
ARGS = {
    's': [5.0]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 float, 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
sample_discrete Ran
ran, violated the contract we drafted
chelsea234/m2f2_det/dataset/process.py
code served (permissive licence) · get_code("d9f67916280ae1e3")
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 int, ndim 0, dtype family int, 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 random

def sample_discrete(s):
    if len(s) == 1:
        return s[0]
    return random.choice(s)

# Test with a list of discrete values
ARGS = {
    "s": [1, 2, 3, 4, 5]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 int, ndim 0, dtype family int, 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
sentence_cleaned Ran
ran on a synthesized input
chelsea234/m2f2_det/eval/eval_explanation.py
code served (permissive licence) · get_code("6de4f81e21ff86fa")
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 str. 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

torch.manual_seed(0)

ARGS = {
    'text': '</s>Hello world</s></n>test<s>content</n>'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_deepfake_backbone Not yet run
unverified (harvested, no recorded run)
chelsea234/m2f2_det/sequence/models/M2F2_Det/models/model.py
code served (permissive licence) · get_code("25d6f8e874031574")
How it ran

no invocation recorded.

get_default_transformation Not yet run
unverified (harvested, no recorded run)
chelsea234/m2f2_det/dataset/utils.py
code served (permissive licence) · get_code("5fc9b57ed503d017")
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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 1 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
load_image 10 other papers
9 dated earlier, 1 later
2311.06783 (2023-11)
Q-Instruct: Improving Low-level Visual Abilities for Multi-modality Foundation Models
2024.findings-acl.573 (2024 (year only))
Visual Hallucinations of Multi-modal Large Language Models
2402.06659 (2024-02)
Shadowcast: Stealthy Data Poisoning Attacks against Vision-Language Models
and 7 more not named here
sample_continuous 2 other papers
1 dated earlier, 1 the same month
2410.23623 (2024-10)
On Learning Multi-Modal Forgery Representation for Diffusion Generated Video Detection
2503.18286 (2025-03)
CO-SPY: Combining Semantic and Pixel Features to Detect Synthetic Images by AI
sample_discrete 2 other papers
1 dated earlier, 1 the same month
2410.23623 (2024-10)
On Learning Multi-Modal Forgery Representation for Diffusion Generated Video Detection
2503.18286 (2025-03)
CO-SPY: Combining Semantic and Pixel Features to Detect Synthetic Images by AI
gaussian_blur 1 other paper
1 dated earlier
2410.23623 (2024-10)
On Learning Multi-Modal Forgery Representation for Diffusion Generated Video Detection
get_default_transformation 1 other paper
1 dated earlier
2410.23623 (2024-10)
On Learning Multi-Modal Forgery Representation for Diffusion Generated Video 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

Deepfake detection is a long-established research topic vital for mitigating the spread of malicious misinformation. Unlike prior methods that provide either binary classification results or textual explanations separately, we introduce a novel method capable of generating both simultaneously. Our method harnesses the multi-modal learning capability of the pre-trained CLIP and the unprecedented interpretability of large language models (LLMs) to enhance both the generalization and explainability of deepfake detection. Specifically, we introduce a multi-modal face forgery detector (M2F2-Det) that employs tailored face forgery prompt learning, incorporating the pre-trained CLIP to improve generalization to unseen forgeries. Also, M2F2-Det incorporates an LLM to provide detailed textual explanations of its detection decisions, enhancing interpretability by bridging the gap between natural language and subtle cues of facial forgeries. Empirically, we evaluate M2F2-Det on both detection and explanation generation tasks, where it achieves state-of-the-art performance, demonstrating its effectiveness in identifying and explaining diverse forgeries. Source code is available at link. Recently, the powerful capability of vision-language models, e.g., CLIP [56], also inspired efforts in detecting deepfakes. For example, DDVQA-BLIP [85] reformulates deepfake detection as an explanation generation task using a vision-language model [37], which enhances interpretability through natural language descriptions (Fig. 1b). In addition, several binary detectors [10,52,60] leverage CLIP's robust recognition capabilities to achieve impressive performance. However, three key limitations remain in these works. First, DDVQA-BLIP relies on a general text-generation model without dedicated mechanisms for deepfake detection, resulting in lower detection accuracy compared to conventional binary detectors. Secondly, prior CLIP-based detectors often lack effective input text prompts to describe diverse forgeries, restricting the adaptation of CLIP's multi-modal learning ability in the detection task. Third, while CLIP's open-set recognition capability -enabling it to identify diverse visual semantics -is successfully combined with LLMs in domains like document parsing [25, 48, 79] and medical diagnosis [34, 50, 83], its integration with LLMs for deepfake detection remains largely unexplored.

For agents

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

get_harvested_code_for_paper("2503.20188")
get_code_for_paper("2503.20188")
have("2503.20188")

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

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

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

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

Connect an agent — have() is free.