Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
model_tag: string
total: int64
threshold: double
threshold_path: string
threshold_info: struct<threshold: double, acc: double, precision: double, recall: double, f1: double, balanced_acc:  (... 76 chars omitted)
  child 0, threshold: double
  child 1, acc: double
  child 2, precision: double
  child 3, recall: double
  child 4, f1: double
  child 5, balanced_acc: double
  child 6, auc: double
  child 7, ap: double
  child 8, tp: int64
  child 9, tn: int64
  child 10, fp: int64
  child 11, fn: int64
threshold_logit: double
clean_acc: double
asr_all: double
n_initially_correct: int64
asr_initially_correct: double
median_clean_prob_fake_initially_correct: double
median_adv_prob_fake_initially_correct: double
median_prob_drop_initially_correct: double
median_clean_margin_initially_correct: double
median_adv_margin_initially_correct: double
median_margin_drop_initially_correct: double
norm: string
eps: double
version: string
attacks_to_run: list<item: string>
  child 0, item: string
label: int64
input_size: int64
mean: list<item: double>
  child 0, item: double
std: list<item: double>
  child 0, item: double
adv_dir: string
results_csv: string
saved_eval: struct<n_saved: int64, saved_asr_all: double, saved_asr_initially_correct: double, reload_match_rate (... 9 chars omitted)
  child 0, n_saved: int64
  child 1, saved_asr_all: double
  child 2, saved_asr_initially_correct: double
  child 3, reload_match_rate: double
input_dir: string
train_config: string
threshold_default: double
checkpoint: string
batch_size: int64
out_adv_dir: string
to
{'input_dir': Value('string'), 'checkpoint': Value('string'), 'train_config': Value('string'), 'model_tag': Value('string'), 'label': Value('int64'), 'norm': Value('string'), 'eps': Value('float64'), 'version': Value('string'), 'attacks_to_run': List(Value('string')), 'threshold': Value('float64'), 'threshold_path': Value('string'), 'threshold_info': {'threshold': Value('float64'), 'acc': Value('float64'), 'precision': Value('float64'), 'recall': Value('float64'), 'f1': Value('float64'), 'balanced_acc': Value('float64'), 'auc': Value('float64'), 'ap': Value('float64'), 'tp': Value('int64'), 'tn': Value('int64'), 'fp': Value('int64'), 'fn': Value('int64')}, 'threshold_default': Value('float64'), 'threshold_logit': Value('float64'), 'batch_size': Value('int64'), 'input_size': Value('int64'), 'mean': List(Value('float64')), 'std': List(Value('float64')), 'out_adv_dir': Value('string')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              model_tag: string
              total: int64
              threshold: double
              threshold_path: string
              threshold_info: struct<threshold: double, acc: double, precision: double, recall: double, f1: double, balanced_acc:  (... 76 chars omitted)
                child 0, threshold: double
                child 1, acc: double
                child 2, precision: double
                child 3, recall: double
                child 4, f1: double
                child 5, balanced_acc: double
                child 6, auc: double
                child 7, ap: double
                child 8, tp: int64
                child 9, tn: int64
                child 10, fp: int64
                child 11, fn: int64
              threshold_logit: double
              clean_acc: double
              asr_all: double
              n_initially_correct: int64
              asr_initially_correct: double
              median_clean_prob_fake_initially_correct: double
              median_adv_prob_fake_initially_correct: double
              median_prob_drop_initially_correct: double
              median_clean_margin_initially_correct: double
              median_adv_margin_initially_correct: double
              median_margin_drop_initially_correct: double
              norm: string
              eps: double
              version: string
              attacks_to_run: list<item: string>
                child 0, item: string
              label: int64
              input_size: int64
              mean: list<item: double>
                child 0, item: double
              std: list<item: double>
                child 0, item: double
              adv_dir: string
              results_csv: string
              saved_eval: struct<n_saved: int64, saved_asr_all: double, saved_asr_initially_correct: double, reload_match_rate (... 9 chars omitted)
                child 0, n_saved: int64
                child 1, saved_asr_all: double
                child 2, saved_asr_initially_correct: double
                child 3, reload_match_rate: double
              input_dir: string
              train_config: string
              threshold_default: double
              checkpoint: string
              batch_size: int64
              out_adv_dir: string
              to
              {'input_dir': Value('string'), 'checkpoint': Value('string'), 'train_config': Value('string'), 'model_tag': Value('string'), 'label': Value('int64'), 'norm': Value('string'), 'eps': Value('float64'), 'version': Value('string'), 'attacks_to_run': List(Value('string')), 'threshold': Value('float64'), 'threshold_path': Value('string'), 'threshold_info': {'threshold': Value('float64'), 'acc': Value('float64'), 'precision': Value('float64'), 'recall': Value('float64'), 'f1': Value('float64'), 'balanced_acc': Value('float64'), 'auc': Value('float64'), 'ap': Value('float64'), 'tp': Value('int64'), 'tn': Value('int64'), 'fp': Value('int64'), 'fn': Value('int64')}, 'threshold_default': Value('float64'), 'threshold_logit': Value('float64'), 'batch_size': Value('int64'), 'input_size': Value('int64'), 'mean': List(Value('float64')), 'std': List(Value('float64')), 'out_adv_dir': Value('string')}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Deepfake Adversarial Transfer

Adversarial examples for studying how attacks transfer across deepfake detectors with different architectures, pretraining regimes and training data.

This dataset accompanies What Makes Adversarial Examples Transfer Across Deepfake Detectors? by Rafael M. Mamede, Pedro C. Neto and Ana F. Sequeira. The benchmark uses 2,000 manipulated test images from DF40, 60 source detectors and two attack procedures: AutoAttack (AA) and a Carlini–Wagner-style attack with Expectation over Transformation (CW–EOT).

clean means unperturbed, not authentic. Both the clean images and their adversarial counterparts depict manipulated or generated content. The attack objective is to make a detector classify that content as authentic; it does not change the ground-truth label.

Dataset composition

Property Full benchmark
Unperturbed source images 2,000
Image resolution 224 × 224 pixels
Manipulation coverage 36 techniques, balanced across four manipulation families
Source detectors 60: six backbones × two pretraining regimes × five training-data configurations
Attack procedures AA and CW–EOT
Adversarial images per detector and attack 2,000
AA images 120,000
CW–EOT images 120,000
Total adversarial images 240,000
Total images including clean counterparts 242,000
Storage Original PNG files bundled into uncompressed TAR archives

The 240,000 adversarial images are variants of the same 2,000 source images, not 240,000 independent source samples. The image subset is an evaluation set; this release does not define additional training or validation splits.

Source detectors

Each detector is identified by its pretraining directory and its <backbone>_<training_subset> name. For example, fr_pretrain/deit_ALL identifies a DeiT-S detector with face-recognition pretraining and the ALL deepfake-training configuration.

Backbone identifier Architecture
resnet34 ResNet-34
xception Xception
efficientnetb4 EfficientNet-B4
deit DeiT-S
vit ViT-B/16
swin Swin-T
Pretraining directory Meaning
imgnet ImageNet pretraining
fr_pretrain Face-recognition pretraining on BUPT-BalancedFace
Training-subset suffix Manipulation family used for detector training
FS Face swapping
FR Face reenactment
EFS Entire-face synthesis
FE Face editing
ALL Union of the four manipulation families

fr_pretrain and the _FR suffix describe different factors: the former is the pretraining task, while the latter is the manipulation family used for detector training. The suffix describes the source detector's training data, not the contents of its attack archive: each detector is used to attack the common evaluation subset.

Adversarial generation

The attacks operate on manipulated images and seek a fake-to-authentic prediction change. Both use an L-infinity perturbation budget of 8/255 for image values in [0, 1].

Attack objectives account for each source detector's operational threshold. In the study, thresholds were selected by maximizing balanced accuracy on a held-out validation set. With fake-class probability p(x) and threshold tau, the threshold-adjusted margin is logit(p(x)) - logit(tau); negative margins correspond to authentic predictions.

Directory Procedure
aa_th_aware Custom threshold-aware AutoAttack using APGD-CE, FAB and Square Attack. APGD-DLR is omitted because its standard loss requires at least three logits, whereas the attack uses a binary surrogate representation.
cw_th_aware L-infinity-constrained CW-style margin optimization with Expectation over Transformation. The study uses 100 iterations, learning rate 0.01, confidence margin 1 and 10 transformation samples per iteration.

For CW–EOT, sampled transformations comprise rotations up to ±3°, translations up to 3% of image dimensions, isotropic scaling in [0.97, 1.03], and additive Gaussian noise with standard deviation 0.01. See the paper and the corresponding *_config.json for the generation procedure and run settings.

The generator has white-box access to the source detector. Evaluating the resulting images on another detector measures transfer to that target; a sample's presence in an archive does not imply that it fools every target or even that its source attack succeeded.

The selected AA runs for vit_ALL are:

Pretraining Run directory
fr_pretrain autoattack_thaware_linf_eps8_255_th0p895
imgnet autoattack_thaware_linf_eps8_255_th0p994

The alternate th0p5 runs for these two AA detectors are excluded from this release. Other detectors retain their own selected thresholds. The exact selected run for every archive is recorded in manifest.tsv.

Files and organisation

There is one clean archive and, for the full benchmark, 120 adversarial archives. Attack and pretraining directories separate the archives so users can download individual detector/attack combinations.

Repository path Contents
clean.tar The clean/ directory containing the unperturbed source PNGs
aa_th_aware/<pretraining>/adv/<model>.tar AA PNGs for one source detector
cw_th_aware/<pretraining>/adv/<model>.tar CW–EOT PNGs for one source detector
<attack>/<pretraining>/attack_results/<model>/<run>.csv CSV results produced by the selected attack run
<attack>/<pretraining>/attack_results/<model>/<run>_config.json Attack-run configuration
<attack>/<pretraining>/attack_results/<model>/<run>_summary.json Attack-run summary
manifest.tsv Archive inventory, selected runs and PNG counts
SHA256SUMS SHA-256 checksums for the archives, result files and manifest

Within an adversarial TAR, paths begin with <model>/<run>/, followed by the original image paths. For example, the aa_th_aware/fr_pretrain/adv/deit_ALL.tar archive contains the selected deit_ALL/autoattack_thaware_linf_eps8_255_th0p976/ image directory.

TAR packaging preserves the existing PNG bytes without resizing, recompression or image re-encoding. The packaging script compares every archive with its source and checks copied result files. This verifies packaging fidelity; it does not establish equivalence between the saved PNGs and any floating-point tensors used earlier during attack generation.

Manifest fields

Field Description
attack clean, aa_th_aware or cw_th_aware
pretraining imgnet or fr_pretrain; - for clean images
model Source detector identifier; - for clean images
run Selected attack-run directory; - for clean images
archive TAR path relative to the repository root
png_count Number of PNGs in the selected source directory

The CSV headers and JSON keys are preserved as produced by the experiments. The per-run files listed above should not be interpreted as a promise that all cross-target predictions or transfer matrices are included in this image package.

Download and use

Install the download client:

python -m pip install --upgrade huggingface_hub

Download the clean images and one source detector's AA examples, including its result files:

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="poisonedchicken/deepfake-adversarial-transfer",
    repo_type="dataset",
    local_dir="deepfake-adversarial-transfer",
    allow_patterns=[
        "README.md",
        "manifest.tsv",
        "SHA256SUMS",
        "clean.tar",
        "aa_th_aware/fr_pretrain/adv/deit_ALL.tar",
        "aa_th_aware/fr_pretrain/attack_results/deit_ALL/*",
    ],
)

Change the archive path and result-file pattern to select another detector or attack. Omit allow_patterns to download the whole repository. For reproducible experiments, set revision to a specific repository commit. See the Hugging Face download guide.

Extract the downloaded images while keeping attack and pretraining groups separate:

cd deepfake-adversarial-transfer
mkdir -p extracted/aa_th_aware/fr_pretrain/adv

tar -xf clean.tar -C extracted
tar -xf aa_th_aware/fr_pretrain/adv/deit_ALL.tar \
    -C extracted/aa_th_aware/fr_pretrain/adv

After a complete download, verify file integrity from the repository directory:

sha256sum --check SHA256SUMS

For a selective download, sha256sum --check --ignore-missing SHA256SUMS checks only the files present locally; it does not confirm that the complete release has been downloaded.

Use the original sample identifiers and preserved paths to align clean and adversarial images. Do not rely on directory iteration order, and retain any subdirectory components needed to distinguish duplicate basenames. Apply the evaluated detector's documented input normalization after loading the PNGs. Further resizing, JPEG conversion or other image processing defines a different evaluation condition.

Evaluation guidance

The intended uses are adversarial robustness evaluation, analysis of transfer across detectors, and evaluation of defenses against the released attacks.

For a target detector, first identify the source images it correctly classifies as fake in their unperturbed form. Compute attack success as the proportion of those images classified as authentic after perturbation, using the target's own operational threshold. This separates attack-induced errors from mistakes the target already made on the clean images.

For pairwise transfer, distinguish the source detector used to generate an image from the target detector being evaluated. For portfolio/oracle evaluation, align candidates by their underlying source image, apply the stated surrogate restrictions, and count an image as successful if any eligible candidate fools the target. Oracle success is an empirical result over the tested candidate pool, not a robustness certificate or a guarantee that an attacker can identify a successful candidate without feedback.

Limitations

  • Fake-only evaluation subset. These files alone do not support real-versus-fake ROC-AUC, specificity or balanced-accuracy estimation; those require authentic examples as well.
  • Correlated samples. Multiple adversarial versions share the same source image. Any new training/evaluation split should group all versions of an image together, with video or identity grouping where the provenance supports it.
  • Finite coverage. The benchmark concerns 2,000 source images, 36 manipulation techniques, the specified detector bank and two attack procedures. Results do not establish robustness to all generators, detectors or attack budgets.
  • Source-data bias. Manipulation-family balance does not establish demographic representativeness. The images inherit the coverage and potential biases of DF40 and its underlying sources.

Licensing and source material

Licence: Creative Commons Attribution–NonCommercial 4.0 International (CC BY-NC 4.0).

This release is offered under CC BY-NC 4.0 to the extent of the rights held by its authors. The licence permits sharing and adaptation for noncommercial purposes, provided that appropriate credit is given, a link to the licence is included, and any modifications are indicated. Existing attribution and modification notices must be retained. Users may not impose additional legal or technological restrictions on uses permitted by the licence.

The source images are drawn from DF40, whose repository licence statement specifies CC BY-NC 4.0. This release selects 2,000 manipulated images and provides adversarial variants generated with AA and CW–EOT, together with attack results and configurations. TAR packaging preserves the saved PNG files without image re-encoding.

Please credit Rafael M. Mamede, Pedro C. Neto and Ana F. Sequeira for this benchmark, and retain attribution to DF40 and the applicable original image sources. The accompanying paper's citation is provided below.

Rights in the underlying imagery remain with their respective holders. This licence statement does not override applicable upstream terms or separate access agreements, or grant third-party rights the authors do not hold. Privacy, publicity and other rights may require additional permission for a particular use.

Citation

If you use this benchmark, cite the accompanying study:

@misc{mamede2026makesadversarialexamplestransfer,
  title         = {What Makes Adversarial Examples Transfer Across Deepfake Detectors?},
  author        = {Rafael M. Mamede and Pedro C. Neto and Ana F. Sequeira},
  year          = {2026},
  eprint        = {2609.10002},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2609.10002}
}

Also cite DF40 and the original datasets relevant to the samples you use. The DF40 repository provides its source-dataset mapping and citation instructions.

Questions about this release can be raised in the repository's Discussions.

Downloads last month
87

Models trained or fine-tuned on poisonedchicken/deepfake-adversarial-transfer

Paper for poisonedchicken/deepfake-adversarial-transfer