Rashidbm's picture
Upload README.md with huggingface_hub
fca3594 verified
metadata
license: mit
language:
  - en
  - ar
tags:
  - multimodal
  - misinformation
  - forgery-detection
  - fnd-clip
  - dct
size_categories:
  - 10K<n<100K

MultiGuard Phase 2 — Multimodal Misinformation Detection Dataset & Caches

This dataset packages everything needed to reproduce Phase 2 of the MultiGuard project without redoing the heavy preprocessing.

What's inside

File Size Contents
forensic_3class.csv 3.7 MB 18,000-sample 3-class dataset (Real / Manipulated / OOC), balanced 6,000 per class, deterministic 70/15/15 per-class split (seed 42).
dct_cache.tar.gz 2.9 GB Precomputed DCT maps for all 18,000 images. Each entry is a [1, 224, 224] float32 tensor (BGR→YCbCr→Y, 2D DCT, log scale, per-image min-max). Filename is md5 of the absolute image path. Extract into data/processed/dct_cache/.
fnd_features_clean.tar.gz 37 MB FND-CLIP v_semantic features (512-dim) computed with leak-free FND-CLIP — pretrained ResNet50 / BERT / CLIP encoders + random frozen modality-attention head. No task-specific weights. Filename is md5(text || image_path). Extract into data/processed/fnd_features_clean/.
fnd_features_leaked.tar.gz 37 MB Same format, but computed using outputs/v1_ooc/best.pt as the FND-CLIP checkpoint. Numbers from training on this cache are inflated by label leakage (see Known Issues). Provided for completeness only.
step1_forensic_baseline_best.pt 46 MB Step 1 forensic-only baseline checkpoint (ResNet18 on DCT + linear head). Test F1 ~0.47, MMFakeBench transfer ~0.17.
step2_full_pipeline_LEAKED_best.pt 59 MB Step 2 full pipeline checkpoint trained with the leaked v_semantic. Do not trust the metrics from this — kept for archival.

Class definitions

Label Name Source
0 Real DGM4 origin (real images, real news from BBC / Guardian / USA Today / Washington Post)
1 Manipulated DGM4 face_swap, face_attribute (image-side manipulation, real news source)
2 OOC NewsCLIPpings out-of-context pairs (real images, mismatched captions)

Splits

Split Per class Total
train 4,200 12,600
val 900 2,700
test 900 2,700

How to use (with the code repo)

git clone https://github.com/Rashidbm/Multimodal-fake-news-detection.git
cd Multimodal-fake-news-detection

# Pull the data from this dataset
huggingface-cli download Rashidbm/multiguard-phase2-data \
    --repo-type dataset --local-dir hf_data/

# Place the CSV
mkdir -p data/processed
cp hf_data/forensic_3class.csv data/processed/

# Extract caches
tar -xzf hf_data/dct_cache.tar.gz             -C data/processed/
tar -xzf hf_data/fnd_features_clean.tar.gz    -C data/processed/

# (Optional) drop in the trained checkpoints
mkdir -p outputs/forensic_baseline outputs/full_pipeline
cp hf_data/step1_forensic_baseline_best.pt outputs/forensic_baseline/best.pt

The image_path column in the CSV uses absolute paths from the original machine (/Users/rashid/...). Either replicate that layout or rewrite the paths:

sed -i '' 's|/Users/rashid/multimodaldetection|/your/repo/path|g' \
    data/processed/forensic_3class.csv

Image data NOT included

The raw images are too large and have their own licenses. Get them from:

  • DGM4 (origin + manipulation) — rshaojimmy/DGM4 on HuggingFace
  • NewsCLIPpings test split — VisualNews + NewsCLIPpings annotations
  • MMFakeBench (val/test for transfer eval) — liuxuannan/MMFakeBench

You only need the raw images if you want to retrain the DCT cache from scratch or use the visual / CLIP streams; the precomputed caches in this dataset cover the standard Phase-2 training loop.

Known issues

  1. fnd_features_leaked.tar.gz and step2_full_pipeline_LEAKED_best.pt were produced using a FND-CLIP checkpoint (outputs/v1_ooc/best.pt) that was trained on a binary OOC vs not-OOC task. 84% of our test OOC samples were in that checkpoint's training set, so v_semantic for those samples literally encodes the OOC label. The Step 2 OOC F1 of 0.98 reported in the GitHub HANDOFF.md is mostly this leak. Use fnd_features_clean.tar.gz for honest numbers (~0.54 F1).

  2. Source-distribution shortcut: NewsCLIPpings OOC images are stored at ~22% lower JPEG quality than DGM4 origin/manipulated images (36.7 KB vs 47.5 / 45.8 KB on average). DCT can shortcut on this. To eliminate, re-encode all images at uniform JPEG quality before computing the DCT cache.

License

MIT for the splits / metadata. Underlying image and text data are governed by the licenses of the source datasets (DGM4, NewsCLIPpings, VisualNews).

Citation

If you use this in academic work, cite the upstream datasets:

  • DGM4: Shao et al., "Detecting and Grounding Multi-Modal Media Manipulation," CVPR 2023.
  • NewsCLIPpings: Luo et al., "NewsCLIPpings: Automatic Generation of Out-of-Context Multimodal Media," EMNLP 2021.
  • MMFakeBench: Liu et al., "MMFakeBench: A Mixed-Source Multimodal Misinformation Detection Benchmark," 2024.
  • FND-CLIP: Zhou et al., "Multimodal Fake News Detection via CLIP-Guided Learning," ICME 2023.