Ahmed Doghri Logo Image
Ahmed Doghri

d3video

Synthetic video can match frame-to-frame motion and still wobble one derivative deeper. d3video reads that second-order trace and separates every generated clip.

d3video reproduced benchmark result

Fake Motion Hides In The Next Derivative

Generated video can keep average velocity plausible while alternating tiny temporal corrections from frame to frame. First-order motion sees the speed. It misses the wobble.

d3video creates matched real and synthetic trajectories. Both share smooth global motion; generated clips receive a small alternating correction designed to preserve the obvious statistics.

Difference Of Differences

The detector computes frame displacement, then differences those displacements again. A single threshold on mean second-order magnitude performs the classification.

No model, training split, or feature extractor is needed. That makes the detector cheap and the evidence legible, while compression robustness remains a separate question.

Update: that alternating correction turned out to be close to the best-case input for a second-difference filter, not just a plausible one. A less tailored version still works, just at more modest numbers. Full writeup below.

The Number

The first-order baseline scores 46% (below chance) on 200 held-out trajectories. Second-order discrepancy reaches 100% on the same set, a 54-point gain.

This is a controlled forensic benchmark, not a guarantee on arbitrary internet video. The repository links the four-dataset research result separately from its own number.

100% Was Close To A Best Case, Not A Typical One

The injected artifact alternates sign every single frame at full amplitude — a perfect square wave at the highest frequency a discrete sequence can carry. A two-tap second-difference filter is most sensitive to exactly that frequency, so this shape sits close to the textbook best-case input for the detector, not necessarily a representative stand-in for what a real generator's artifact would look like.

Swapping in a less favorable but equally plausible artifact — half the amplitude, and a per-frame random sign instead of a perfect alternation, since real generator noise has no reason to alternate in lockstep — drops mean second-order accuracy to 72.5%/73.4% across 40 tuning seeds and a disjoint 30-seed holdout evaluated once, with the accuracy gain over first-order falling to a mean 22.9–23.9 points (never below 12.5). The core claim holds up: second-order features still meaningfully outperform first-order under a harder, more realistic artifact. But the published 100%/54-point number is close to the ceiling this specific construction can produce, not the typical case. The original module is untouched and the published numbers still reproduce exactly.

Research Basis

Inspired by ICCV 2025's D3 video detector. The portfolio number above comes from this repository's own controlled benchmark, not from the paper.

Tools Used

Python
Video Forensics
Temporal Features
Deepfake Detection
Signal Processing
Robustness Testing
unittest