Flagship Case Study · Computer VisionBackend Deployed on Cloud RunCurated Public Demo

SignalScope — Image Authenticity & Forensics Workstation

A deep learning forensic system that classifies AI-generated versus authentic photographs with spatial attribution, frequency analysis, and empirical perturbation stability scoring.

Cross-Generator ROC-AUC
0.9220
Across 19 unseen modern generator families
Photo Holdout FPR (N=9,000)
1.37%
123/9,000 authentic photos @ threshold 0.50 (vs 74.69% baseline)
Expected Calibration Error
ECE: 0.0664
Fitted out-of-domain temperature (T = 0.9986)
SignalScope Forensics WorkstationVerified Cloud Run Interface
SignalScope forensic workstation interface
Problem Addressed

The Photographic False-Positive Cliff

Conventional AI-generated image detectors suffer from catastrophic false-positive rates on authentic photography. Classifiers trained on compressed synthetic benchmarks often memorize generation artifacts rather than structural reality, yielding a 74.69% false-positive rate across 9,000 real photos. SignalScope solves this false-alarm crisis through multi-generator training, spatial attribution, and frequency-domain residuals.

Architecture & Implementation

Multi-Modal Forensics Pipeline

To provide dependable forensic inspection, I built a containerized microservice integrating four complementary detection modalities:

  • ConvNeXt-Tiny Spatial Backbone: Fine-tuned 28.6M-parameter architecture with 7×7 depthwise convolutions preserving fine spatial texture fidelity.
  • Grad-CAM Attribution: Gradient activation hooks on the final convolutional stage producing spatial heatmaps of classification drivers.
  • Frequency Residuals (2D FFT): Spectral transforms isolating high-frequency upsampling artifacts and energy spikes absent in physical sensors.
  • 6-Probe Perturbation Stress Testing: Benchmarks images against compression, scaling, and cropping to compute an empirical Stability Score.
Technology Stack

Tools & Frameworks

PyTorchConvNeXt-TinyFastAPIDockerGoogle Cloud RunGrad-CAM2D FFT & DCT (NumPy/SciPy)OpenCVNext.jsTypeScript
Verified Results

Empirical Performance & Calibration

Evaluating SignalScope across extensive validation splits verified decisive empirical improvements:

Photographic False-Alarm Reduction

Slashed false-alarm rate on 9,000 real camera photos from 74.69% to 1.37% at threshold 0.50 (98.63% specificity, 98.17% relative error reduction).

Cross-Generator Generalization

Achieved 0.9220 ROC-AUC and 85.78% Macro-F1 across 19 unseen modern generator families including Flux-2 and Midjourney v7.

Perturbation Robustness

Maintained 0.9872 Mean Degraded ROC-AUC across 6 standardized compression, scaling, and cropping transmission probes.

Temperature Scaling Calibration

Post-hoc temperature scaling fitted at T = 0.9986 compressed Expected Calibration Error by 6.7× (0.0664 vs 0.4462 baseline).

Limitations

Honest Boundaries & Operational Constraints

  • !Probabilistic Output Only: SignalScope provides statistical authenticity likelihoods; it cannot serve as definitive legal proof of media provenance.
  • !Live Scaler Fallback: Production Cloud Run backend executes with runtime temperature T = 1.0000 (|Δp| < 0.0004 vs fitted 0.9986).
  • !Curated Public Demo: Arbitrary public image uploads are disabled in the demo to prevent resource exhaustion; curated exhibits are provided.
Technical Deep Dive

Deep Math, Spatial Attribution & Calibration Benchmarks

Click any section below to inspect the Grad-CAM implementation, 2D FFT spectral analysis, 6-probe robustness matrix, and empirical calibration cohorts.

SpatialConvNeXt-Tiny Backbone & Grad-CAM Evidence

SignalScope deploys a fine-tuned ConvNeXt-Tiny backbone (28.6 million parameters). ConvNeXt was selected over legacy ResNets and Vision Transformers for its 7×7 depthwise convolutions and inverted bottleneck design, which preserve local spatial texture fidelity while capturing global semantic coherence.

Rather than outputting an opaque binary scalar, SignalScope hooks the final convolutional block (stages[-1].blocks[-1]) during backward gradient passes to generate Gradient-weighted Class Activation Mapping (Grad-CAM) heatmaps.

Technical Implementation Detail:
# Gradient activation hook on final convolutional block
target_layer = model.backbone.stages[-1].blocks[-1]
weights = torch.mean(gradients, dim=(2, 3), keepdim=True)
cam = F.relu(torch.sum(weights * activations, dim=1, keepdim=True))
Sample Evidence Panel · Native 32×32 BenchmarkGrad-CAM + 2D FFT + Stability
SignalScope Grad-CAM spatial attribution overlay and 2D FFT spectral residual analysis panel
Representative validation evidence panel (sample_synthetic_fake_evidence_panel.png) evaluated on a native 32×32 benchmark patch. Visual heatmaps are interpolated for display only.
SpectralFrequency-Domain Residuals (2D FFT & 2D DCT)
Diagnostic Research Figure · Native 32×32 Spectral Analysis2D FFT vs 2D DCT
Diagnostic research figure comparing 2D FFT log-magnitude and 2D DCT-II representations
Diagnostic figure (spectral_comparison_fft_dct.png) generated by scripts/visualize_frequency.py from native 32×32 benchmark samples.

Generative models that employ convolutional upsampling, pixel shuffling, or latent de-noising leave subtle geometric frequency artifacts. In contrast to natural photography where power spectra decay monotonically according to natural $1/f^\alpha$ scaling, synthetic media often exhibits distinct high-frequency energy spikes.

SignalScope computes two complementary spectral transformations on native 32×32 pixel matrices:

  • 1. 2D Fast Fourier Transform (FFT)DC-centered log-magnitude frequency maps and 1D azimuthal radial decay curves.
  • 2. 2D Discrete Cosine Transform (DCT-II)Energy compaction with top-left DC origin, isolating JPEG block-boundary harmonics.
Robustness6-Probe Perturbation Stability Matrix

6-Probe Perturbation Stability Matrix

A critical defect in laboratory deepfake models is extreme volatility: an image classified as 99% synthetic can flip to 99% real after routine social media re-compression or minor resizing.

SignalScope subjects every input candidate to an automated 6-probe degradation stress-test, computing an overall Authenticity Stability Score ($S \in [0, 1]$).

Degradation ProbeDegraded ROC-AUCFlip Rate
Pristine Native (32×32)0.99920.0%
JPEG Quality 950.99830.3%
JPEG Quality 850.99720.5%
JPEG Quality 700.99900.7%
Resize (0.7x Down/Up)0.975529.6%
Screenshot Simulation0.956037.8%
Light Crop (90% Window)0.99748.8%
Mean Degraded Performance0.9872 Mean AUC12.95% Flip Rate
Empirical Robustness BenchmarkROC-AUC Degradation Curves
SignalScope perturbation robustness ROC-AUC comparison chart
Direct research artifact from SignalScope/report/robustness/ plotting ROC-AUC across 6 standardized transmission perturbations.
CalibrationReconciled Empirical Calibration Cohorts

Deep neural networks trained with cross-entropy loss produce uncalibrated probabilities with severe overconfidence. SignalScope fits a post-hoc temperature scaling parameter T > 0 such that p_cal = σ(z / T).

Out-of-Domain 19-Generator Cohort
Model:signalscope-v2
Evaluation Split:new_validation (1,118)
Fitted Temperature:T = 0.9986
Out-of-Domain ECE:0.0664 (6.64%)
Evaluated across 19 modern generative families (Flux-2, Midjourney v7, Ideogram v3).
In-Domain 32×32 Baseline Cohort
Model:baseline-v1 (ConvNeXt-Tiny)
Evaluation Split:old_validation (15,000)
Fitted Temperature:T = 0.9995
In-Domain AUC:0.9992
Evaluated strictly on the untouched 15,000-sample in-domain CIFAKE validation split.
Baseline-v1 Calibration Curve (ConvNeXt-Tiny)T = 0.9995
SignalScope baseline empirical probability calibration curve
Live Scaler & Deployment Disclosure:Fitted parameter is T = 0.9986. However, the release package omitted temperature_scaler.json, causing the live Cloud Run backend to initialize with fallback identity temperature T = 1.0000.
Interactive Playground Operational

Explore SignalScope in the Interactive Lab

Inspect genuine and synthetic benchmark exhibits with live Grad-CAM spatial heatmaps, 2D FFT spectral residuals, and 6-probe perturbation robustness profiling.

Launch SignalScope Forensic Lab →