PairCLIP-SWA: Similarity-Guided Balancing and Stochastic Weight Averaging for Generalized Deepfake Image Detection with OpenCLIP
Md. Nakib, Sudipto Sarkar, A. J. A. Jubayer Talukder, Mohammad Ariful Haque
Abstract
Deepfake detectors are almost always deployed as the single checkpoint that scored best on a validation split, yet the reliability of that choice is rarely measured. We measure it with PairCLIP-SWA, a single-backbone detector that adapts an OpenCLIP ViT-L/14 visual tower by progressive block unfreezing on a class-balanced corpus built by CLIP-similarity-guided one-to-one subsampling, and averages the fine-tuning trajectory in weight space. Trained in-domain on the IEEE SP Cup 2025 (DF-Wild-Cup) benchmark under the same protocol as the strongest published three-backbone ensemble, the weight-averaged detector reaches 97.04% accuracy, 98.64% AU-ROC and a 4.07% equal error rate, against 94.46%, 97.60% and 5.00%. Its training log shows why averaging matters: over the averaged epochs the non-averaged checkpoint swings across 5.34 points of validation accuracy while its validation loss more than doubles, whereas the average is never worse and is up to 5.99 points better. On an OpenForensics-derived benchmark the same instability becomes a misranking: the checkpoint that validation accuracy selects (98.43%) scores 88.85% on a disjoint 10,905-image test partition, rejecting 21.1% of genuine photographs, while the terminal average, ranked last on validation, scores 94.76%. A study of twenty-two in-house configurations on the identical DF-Wild-Cup split, including preprocessing ablations, shows that CLIP pre-training rather than ensembling drives accuracy, that secondary face cropping costs about 34 points, and that frequency-domain inputs transfer poorly. We recommend per-class selection criteria measured off the early-stopping split.
Create a lesson
Metadata
- Categories
- cs.CV, cs.AI
- Comments
- 15 pages, 8 figures, 12 tables. Code and experiment outputs: https://github.com/DarkJ0Y/PairCLIP-SWA
Related papers
GDD: A Remote Sensing Image Deepfake Detection and Manipulation Localization Dataset
Shared title terminologycs.CVJacob Arndt, Philipe Dias, Debvrat Varshney et al.
FYC: FPR-Disparity Weight Perturbation and Youden Calibration for Fair Deepfake Detection
Shared title terminologycs.CVUzoamaka Ezeakunne, Taiwo Olabamipe, Deevesh Jain et al.
GRUN: Generalized Retinex Unfolding Network for Image Restoration
Shared title terminologycs.CVRihan Zhang, Fengyang Xiao, Yuhan Chen et al.
A dataset of clinically similar image pairs from citation-linked case reports for medical image retrieval
Shared title terminologycs.CVGuy Shmueli, Keno K. Bressem, Tom Hope
Ground, Guide, Act: Improving VLA Spatial Generalization with Multimodal Foundation Models
Shared title terminologycs.CVGuangting Zheng, Shaoxuan Wang, Yu Yuan et al.
Look Where Camouflage Breaks: Concealment-Guided Observation for Camouflaged Object Detection
Shared title terminologycs.CVDingming Zhang, Fengyang Xiao, Jingjia Feng et al.