"매 generative model 의 fingerprint 의 수확". 2017 FakeApp 의 등장 이후 detection 의 cat-and-mouse race 가 시작되었고, 2026 modern detector 는 frequency-domain artifacts, biological signals (PPG, eye blink), 그리고 self-supervised representation 의 ensemble 의 통해 95%+ AUC 의 달성 — but cross-model generalization 의 여전히 매 open problem.
매 핵심
매 Detection 패러다임
Frequency-domain: GAN/Diffusion 의 upsampling artifact (DCT spectrum 의 grid pattern, FFT 의 high-freq 결손).
Biological signal: heart-rate (rPPG), micro-expression, eye blink frequency 의 unnatural pattern.
Identity consistency: face embedding 의 video-level temporal drift.
Self-supervised: CLIP/DINOv2 feature 의 OOD detection.
매 Generation 종류
Face swap: DeepFaceLab, FaceFusion, Roop.
Face reenactment: First Order Motion Model, LivePortrait (2024).
importnumpyasnpfromscipy.signalimportbutter,filtfiltdefextract_rppg(face_frames,fps=30):# POS algorithm — Wang et al. 2017rgb_signal=np.stack([f.reshape(-1,3).mean(0)forfinface_frames])rgb_norm=rgb_signal/rgb_signal.mean(0)proj=rgb_norm@np.array([[0,1,-1],[-2,1,1]]).Ts=proj[:,0]+(proj[:,0].std()/proj[:,1].std())*proj[:,1]b,a=butter(4,[0.7,4.0],btype='band',fs=fps)returnfiltfilt(b,a,s-s.mean())defis_live(rppg,fps=30):fft=np.abs(np.fft.rfft(rppg))freqs=np.fft.rfftfreq(len(rppg),1/fps)*60# BPMpeak_bpm=freqs[fft.argmax()]return50<=peak_bpm<=180# 매 plausible HR range
CLIP-based zero-shot detector
importopen_clipimporttorchmodel,_,preprocess=open_clip.create_model_and_transforms('ViT-L-14',pretrained='laion2b_s32b_b82k')tokenizer=open_clip.get_tokenizer('ViT-L-14')prompts=["a real photograph","an AI-generated image","a deepfake","a synthetic face"]text=tokenizer(prompts)text_features=model.encode_text(text)text_features/=text_features.norm(dim=-1,keepdim=True)defscore(image_pil):img=preprocess(image_pil).unsqueeze(0)img_feat=model.encode_image(img)img_feat/=img_feat.norm(dim=-1,keepdim=True)sims=(img_feat@text_features.T).softmax(-1)returnsims[0,1:].sum().item()# 매 fake probability
Temporal consistency (face embedding drift)
fromfacenet_pytorchimportInceptionResnetV1embedder=InceptionResnetV1(pretrained='vggface2').eval()deftemporal_drift(face_crops):embs=embedder(torch.stack(face_crops))embs=embs/embs.norm(dim=-1,keepdim=True)consec_sim=(embs[:-1]*embs[1:]).sum(-1)# 매 swapped face 의 unnatural jitter 의 detectreturn1.0-consec_sim.mean().item()
Watermark verification (C2PA / SynthID)
importhashlibfromcryptography.hazmat.primitives.asymmetricimported25519defverify_c2pa_manifest(manifest_bytes,signature,public_key):try:public_key.verify(signature,manifest_bytes)returnTrueexceptException:returnFalse# 매 manifest 의 tampered 또는 missing
언제: feature engineering 의 brainstorm, dataset curation script, false-positive 분석.
언제 X: production detection model 의 직접 inference (LLM 의 vision 의 reliable detector 의 X — specialized model 의 사용).
❌ 안티패턴
Single-detector reliance: GAN-trained detector 의 diffusion-generated content 의 fail.
No cross-generator eval: train/test 의 same generator 의 inflated metric.
Ignoring compression artifacts: JPEG/H.264 의 frequency signal 의 destroy.
Adversarial blindness: detector 의 adversarial perturbation 의 robust 의 X.
Watermark-only: open-source generator 의 watermark 의 strip.
🧪 검증 / 중복
Verified (FaceForensics++ benchmark, DFDC, Frank et al. ICML 2020, C2PA spec v2.1).