WorksComputer Science
Spectra: Multi-Scale Implicit Decomposition for Deepfake Detection
Abstract
Deepfakes increasingly undermine trust in digital media, yet existing detectors often struggle to generalize across unseen manipulation techniques, compression levels, and dataset shifts. Most approaches rely on RGB appearance, frequency-domain artifacts, or their combination, learning cues present in the final synthesized image. While effective in-distribution, such cues are frequently generator-specific and can diminish as synthesis models evolve. We argue that a complementary perspective can be obtained through implicit neural representations (INRs), which expose how an image is reconstructed rather than merely how it appears. By fitting an INR to an image and analyzing its internal activations, one can reveal reconstruction dynamics that are difficult to observe in the image domain alone and may capture more intrinsic differences between genuine and synthetic content. To this end, we propose Spectra, a deepfake detection framework that combines semantic visual representations with artifact-aware cues derived from INR reconstruction. Spectra extracts multi-level reconstruction heatmaps from image-specific INRs and jointly models them with semantic features through a bidirectional fusion mechanism. This enables direct interaction between image semantics and reconstruction artifacts, allowing the model to identify forgery cues that are less dependent on specific generation pipelines. Extensive experiments on multiple deepfake benchmarks demonstrate improved robustness and cross-dataset generalization, consistently outperforming detectors based solely on RGB appearance or semantic representations. Furthermore, we show that the proposed representation extends beyond deepfake detection to face presentation attack detection, highlighting its potential as a unified framework for facial attack detection.
Introduction
Recent advances in generative modeling have enabled the creation of highly realistic synthetic facial images and videos, commonly referred to as deepfakes. Modern generative architectures, including Generative Adversarial Net-

Figure 1. Spectra provides a unified framework for two authenticity tasks: Spectra employs a unified INR-guided artifact representation to address both deepfake detection and presentation attack detection (PAD). The framework achieves state-of-the-art average AUC on deepfake detection (86.6%) and PAD (97.17%), demonstrating strong generalization across both digital and physical forgery domains.
works (GANs) [2, 5] and diffusion models [13], can produce photorealistic content that is increasingly difficult for humans to distinguish from authentic media. While these technologies have enabled numerous beneficial applications in content creation and entertainment, they have also raised serious concerns regarding misinformation, identity fraud, impersonation, and media authenticity [17, 22, 23]. As a result, reliable deepfake detection has become an important and active area of research [3, 21, 24, 47].
Despite significant progress, a fundamental challenge remains unresolved: generalization. Modern deepfake detectors often achieve impressive performance on benchmarks derived from known manipulation pipelines, yet their accuracy can deteriorate substantially when confronted with unseen generators, compression levels, post-processing operations, or dataset shifts. This limitation arises because many detectors learn correlations tied to specific synthesis artifacts rather than properties that are intrinsic to synthetic content itself. As generative models continue to improve and suppress visible artifacts, detectors that rely on such cues become increasingly fragile.
Recent work has demonstrated the effectiveness of largescale vision-language models such as CLIP [45] for deepfake detection [7, 10, 43, 57]. Owing to large-scale pretraining, CLIP provides rich semantic representations that transfer more effectively across datasets than conventional convolutional features. However, CLIP is fundamentally optimized for semantic understanding rather than forensic analysis. Consequently, it primarily captures what an image depicts, while often overlooking subtle traces introduced by the image generation process. As synthetic media becomes increasingly photorealistic, these forensic cues are precisely the signals that become most important for reliable detection.
We argue that a complementary perspective can be obtained through Implicit Neural Representations (INRs) [20, 27, 28, 29, 52]. Unlike conventional image representations that operate directly on pixel intensities or their frequency decompositions, INRs model an image as a continuous coordinate-based function and reconstruct it through a hierarchy of nonlinear transformations [20, 27]. This reconstruction process exposes rich spatial and frequency dynamics that remain hidden in the image domain [60]. Importantly, while two images may appear visually similar, the trajectories followed by an INR during reconstruction can differ substantially. We hypothesize that these reconstruction dynamics encode intrinsic differences between authentic and manipulated content, providing a source of forensic evidence that is less dependent on the particular synthesis pipeline. To explore this hypothesis, we extract multi-level heatmaps from trained INRs and use them to characterize how image information is represented across reconstruction stages. These heatmaps reveal localized structural and frequency-sensitive responses that are complementary to semantic visual features and offer a novel artifact-aware representation for deepfake detection.
Building upon this insight, we propose Spectra, a deepfake detection framework that unifies semantic understanding with reconstruction-based forensic analysis. Spectra leverages a frozen CLIP vision encoder to capture high-level semantic content while simultaneously extracting multi-level heatmaps from image-specific INRs that expose reconstruction dynamics hidden from the image domain. These heatmaps are processed through complementary spatial and frequency encoders, enabling the model to capture both localized structural irregularities and frequency-sensitive inconsistencies that emerge during reconstruction. To bridge the gap between semantics and artifacts, Spectra employs bidirectional attention mechanisms that allow semantic representations to focus on manipulation-sensitive regions while enabling reconstruction cues to selectively retrieve relevant semantic context See Figure 1. Rather than treating artifacts and semantics as independent signals, Spectra explicitly models their interactions, producing a unified representation that captures both what an image
depicts and how it is reconstructed. We argue that this combination yields a more fundamental characterization of synthetic content, reducing reliance on generator-specific artifacts and improving robustness to unseen manipulations. Extensive experiments across multiple deepfake benchmarks demonstrate that Spectra consistently outperforms strong semantic-only baselines and achieves superior cross-dataset generalization. Beyond performance gains, our analysis reveals that INR-derived reconstruction representations provide complementary forensic evidence that is largely absent from conventional image-domain features. These findings establish reconstruction dynamics as a promising new direction for robust and generalizable media forensics.
Method
An overview of the proposed Spectra framework is shown in Figure 2. Given an input image , we first obtain two complementary representations. A pretrained CLIP vision encoder extracts multi-scale semantic features from selected transformer layers, while an image-specific INR produces a multi-level decomposition that captures reconstruction behavior across different representation stages (See Figure 3). The resulting decomposition maps are processed through spatial and frequency branches to generate artifact-aware heatmap representations.

Figure 2. Overview of Spectra. Given an input face image, a frozen CLIP vision encoder extracts multiscale semantic representations from selected transformer layers, while an INR fitted to the same image produces layer-wise heatmaps that capture reconstruction dynamics and frequency-specific artifacts. The heatmaps are processed by spatial and frequency encoders and fused through a gated aggregation module to obtain artifact-aware heatmap tokens. In parallel, multiscale CLIP features are combined through weighted fusion to produce semantic tokens. To model interactions between semantic content and reconstruction artifacts, we employ both cross-attention (CLIP queries heatmap features) and reverse cross-attention (heatmap queries CLIP features). The resulting representations, together with global CLIP and heatmap descriptors, are fused and passed to an MLP for real/fake classification. A projection head attached to the shared representation enables supervised contrastive learning, encouraging stronger separation between genuine and manipulated samples.

Figure 3. Layer-wise PCA decomposition of SIREN reconstruction dynamics. Top: a genuine face from CDFv2; bottom: a deepfake. Although both are reconstructed with comparable fidelity (rightmost column), their internal activations diverge sharply across layers
The semantic and artifact streams are subsequently fused through a bidirectional artifact-semantic interaction module. Specifically, semantic features attend to reconstruction-aware artifact representations, while artifact features simultaneously retrieve complementary semantic context. This mutual interaction produces a unified representation that combines high-level image understanding with reconstruction-aware cues. Finally, the fused features are used for both binary classification and supervised contrastive learning, enabling the network to learn discriminative embeddings for robust facial attack detection.
Dataset Preparation
To build a robust dataset for training and evaluation, we follow a systematic preprocessing pipeline consisting of frame extraction, face detection, and face alignment. We first extract frames from each video and subsequently detect faces using the RetinaFace [18] detector. The detected faces are cropped according to the predicted bounding boxes and aligned using five facial landmark keypoints. Alignment is performed through a warp-affine transformation to standardize facial geometry across samples. Following alignment, all face crops are resized to a fixed resolution. Spectra is trained on the version of the FaceForensics++ (FF++) dataset [48], which contains realistic video compression artifacts. For training, we sample 10 frames from each fake video and 40 frames from each real video. Since a primary objective of deepfake detection is robust generalization to unseen forgery methods, we evaluate the trained model on four out-of-distribution (OOD) benchmarks: Celeb-DF v1 (CDFv1) [36], Celeb-DF v2 (CDFv2) [35], FaceShifter (FSh) [48], and Deep Fake Detection (DFD) [48].
Multi-Level Implicit Decomposition
Most existing deepfake detectors operate directly on RGB images, learning discriminative representations solely from pixel-space visual information. While effective, RGB representations expose only the final image appearance and reveal nothing about how that appearance was internally constructed. We instead seek a reconstruction-aware representation that surfaces the internal dynamics of image formation, which we hypothesize differ systematically between authentic and manipulated images.
Given an image , each pixel is a coordinate–color pair , with the spatial coordinate and the corresponding RGB value. An INR parameterizes the image as a continuous function mapping coordinates to color, , with fit by minimizing the reconstruction objective . For Spectra, is a SIREN [52], whose periodic activations make it especially well suited to representing natural image signals.
Unlike conventional image encoders, an INR reconstructs an image through a hierarchy of latent activations. Consistent with the Spectral bias of neural networks [46], this reconstruction progresses from coarse image structure toward increasingly fine detail across hidden layers. To expose these intermediate representations, we extract activations from each hidden SIREN layer and project them into image-space heatmaps via principal component analysis (PCA), isolating, at each layer, the dominant direction of image-specific variation among the activations.
The resulting decomposition is visualized in Figure 3, contrasting a genuine image (top row) with a deepfake (bottom row) from CDFv2. Even though both are reconstructed faithfully by the SIREN (rightmost column), their internal representations evolve differently across layers. At the first decomposition level, both examples exhibit structured, wave-like patterns characteristic of the SIREN’s sinusoidal activations; here the two are visually similar, reflecting primarily low-level, coordinate-dependent responses. As reconstruction progresses, the representations diverge: at the second level, the genuine image develops coherent facial structure, with smooth responses organizing around semantically meaningful regions such as the eyes, nose, and mouth, while the manipulated image exhibits less organized activations and stronger localized variation. This divergence sharpens at the deepest level we extract, where the genuine image retains coherent spatial organization while the deepfake displays fragmented responses, distorted contours, and amplified edge-like structures. Notably, many of these differences are difficult to observe directly in the RGB image or its frequency based representation. Even when both images yield visually similar reconstructions, their intermediate activations reveal substantially different representation pathways, evidence that reconstruction dynamics carry discriminative information largely absent from the final reconstructed image. See supplementary for more reconstructed results.
Motivated by this, we extract PCA-based heatmaps from the first hidden SIREN layers, , where each captures the representation state at one stage of reconstruction. The divergence in Figure 3 further suggests that manipulations surface not only within individual levels but in how representations evolve between them; we capture this with inter-level difference maps , which highlight regions of significant representational change between consecutive stages and encode dynamics invisible to any single level in isolation. The full multi-level decomposition is therefore ; for the three-level decomposition () used in our experiments, this yields five channels, . Together, the heatmaps and difference maps form a compact reconstruction-aware representation that captures both the state of reconstruction and its evolution across levels, exposing structural and frequency-sensitive inconsistencies introduced during image synthesis. While per-image INR optimization has been shown to produce strong reconstruction quality [16, 19], it requires iterative optimization and can be computationally costly. To improve efficiency, we instead employ a hypernetwork-based approach that directly predicts the parameters of a SIREN INR, eliminating the need for per-image optimization. Further details are provided in the supplementary material.
Reconstruction-Aware Representation Learning
The multi-level implicit decomposition encodes complementary spatial and spectral evidence about how an image is reconstructed by the SIREN. Local inconsistencies may surface as irregular facial structure, blending boundaries, texture discontinuities, or unstable responses around high-detail regions, while other manipulation traces are more apparent in the spectral behavior of the decomposition maps. Relying on either cue alone therefore risks discarding useful forensic evidence.
Let denote the multi-level implicit decomposition, where is the number of decomposition channels. To capture localized reconstruction patterns, we process using a spatial encoder and obtain , where . In parallel, we compute the log-magnitude spectrum of the decomposition maps, defined as , and process it using a frequency encoder to obtain , where . The spatial branch emphasizes localized structural responses in the INR decomposition, whereas the frequency branch captures spectral irregularities in the reconstruction behavior.
As the relative importance of spatial and frequency cues can vary across images and manipulation types, we fuse them adaptively rather than using a fixed combination. Global descriptors are first extracted from and using global average pooling. A lightweight gating network then predicts a channel-wise weighting vector , where , denotes the sigmoid function, and denotes concatenation. The final reconstruction-aware representation is computed as , where denotes element-wise multiplication. This adaptive fusion allows Spectra to emphasize the most informative spatial or spectral reconstruction cues for each input image.
Multi-Scale Semantic Representation Learning
While the proposed multi-level decomposition provides reconstruction-aware forensic cues, it contains limited semantic understanding of the underlying image content. In particular, reconstruction irregularities are often most informative when interpreted in the context of facial structure, identity, and appearance. To provide this complementary information, we leverage semantic representations extracted from a pretrained CLIP vision transformer.
A key characteristic of transformer-based vision models is that semantic information emerges progressively across network depth. Earlier layers primarily encode local visual patterns and texture statistics, intermediate layers capture object parts and structural relationships, while deeper layers produce highly abstract semantic representations. Consequently, relying solely on the final transformer layer may discard useful information present at intermediate representation levels. This is particularly relevant for facial forensics, where manipulation traces can manifest at multiple semantic scales, ranging from localized texture inconsistencies to higher-level identity and facial structure deviations.
Given an input image , let denote the set of selected transformer layers. We select to span early, intermediate, and late representation depths rather than relying on the final layer alone, for a 24-layer CLIP ViT-L/14, this corresponds to layers , sampled at approximately half-depth, three-quarter-depth, and the final layer respectively. We find this combination to outperform any individual layer or partial subset (See ??), consistent with the intuition that forgery-relevant cues can emerge at multiple semantic depths. For each layer , the CLIP encoder produces a token sequence , where denotes the class token, are patch tokens, is the number of image patches, and is the embedding dimension at layer . Since features extracted from different transformer depths may exhibit distinct distributions, each representation is projected into a common embedding space through a learnable projection function .
Rather than treating all semantic scales equally, we learn their relative importance through adaptive scale fusion. Specifically, the projected representations are combined as , where is a learnable normalized weight associated with layer , satisfying . This formulation allows the network to automatically emphasize the semantic scales that are most informative for forgery detection.
The resulting representation consists of a global semantic token and a set of semantic patch tokens . The global token provides an image-level semantic summary, while the patch tokens preserve localized semantic information. Together, these representations provide a semantically rich description of the input image and serve as the semantic stream used by the subsequent artifact-semantic fusion module.
Bidirectional Artifact-Semantic Fusion
The reconstruction-aware representation and the semantic representation provide complementary evidence for forgery detection. The former captures how an image is reconstructed and highlights manipulation-sensitive response patterns, while the latter provides contextual understanding of facial structure, identity, and appearance. Neither may be sufficient on its own, reconstruction cues lack semantic context, making it difficult to determine whether an irregular response corresponds to a meaningful facial region or an incidental pattern, while semantic features are optimized for visual understanding and may overlook subtle manipulation traces. We therefore seek a representation that jointly reasons over both modalities.
To this end, we introduce a bidirectional artifact-semantic fusion mechanism. Rather than concatenating semantic and reconstruction-aware features outright, the module explicitly models their interaction from two complementary directions, semantic features retrieve relevant reconstruction evidence from the artifact representation, and reconstruction-aware features in turn guide the aggregation of semantic information toward manipulation-sensitive regions. This bidirectional exchange lets the model capture both what an image depicts and how it was reconstructed.
Let denote the reconstruction-aware feature map from § 2.3 (where is the channel count and the spatial resolution), reshaped into a sequence of reconstruction-aware tokens . Recall from § 2.4 the multi-scale semantic representation , with class token and patch tokens . Both representations are projected into a shared attention space of dimension , distinct from the semantic embedding dimension and the reconstruction-aware channel count , for interaction.
Reconstruction-aware semantic aggregation The first interaction stage lets semantic features retrieve reconstruction-aware evidence from the artifact representation. A learnable aggregation token is prepended to the projected semantic patch tokens, forming the query sequence . The reconstruction-aware tokens are projected into keys and values, and , and cross-attention is computed as , . The aggregation token attends jointly with the semantic patch tokens but, unlike conventional global pooling, learns to selectively retrieve whichever reconstruction-aware evidence is most relevant to the image’s semantic content. We take the final output and refine it with a residual feed-forward block, , yielding a compact semantic descriptor enriched with reconstruction-aware forensic evidence.
Reconstruction-guided semantic aggregation. The converse interaction is equally important, reconstruction irregularities often indicate which semantic regions deserve closer attention. Rather than treating all semantic patches equally, we use the reconstruction-aware tokens to guide semantic aggregation directly. For each reconstruction-aware token , a learnable scoring function predicts an importance score , with and bias . Since the number of reconstruction-aware and semantic tokens generally differs (), we linearly interpolate the resulting score sequence to a semantic guidance vector matching the semantic patch count, then aggregate the semantic tokens accordingly: , where denotes layer normalization [4]. A learnable projection maps this aggregate into the shared attention space, . The resulting descriptor up-weights semantic regions that coincide with strong reconstruction responses, so facial structures exhibiting anomalous reconstruction behavior contribute more strongly to the final representation letting the model focus on regions that are simultaneously semantically meaningful and manipulation-sensitive.
Unified representation. The final image representation combines complementary global and interaction-aware descriptors: the global semantic token , the artifact-aware semantic descriptor , the artifact-guided semantic descriptor , and a global reconstruction-aware descriptor . These are concatenated into the fused representation , jointly encoding image semantics, reconstruction-aware evidence, and the bidirectional interaction between them.
Joint Representation Learning
Rather than relying on any single descriptor, Spectra integrates the four complementary views in to jointly reason about image semantics and manipulation artifacts. This representation is passed through a bottleneck projection network (MLP), yielding a compact embedding that serves as the final representation for downstream prediction. Because jointly encodes semantic content and reconstruction-aware artifact cues rather than either in isolation, the same representation transfers naturally across forensic tasks, we use it for both deepfake detection and presentation attack detection, with only the training distribution changing between the two.
Training Objective
The final embedding is used for binary classification through a head producing class probabilities , supervised with cross-entropy loss . To improve robustness to manipulation-specific artifacts, we apply mixup [61] to the classification branch: for and a random batch permutation , every input stream feeding the classifier, semantic tokens, reconstruction-aware tokens, and multi-scale CLIP features, is interpolated with the same pair, keeping the mixed sample consistent across modalities. The loss is taken against the correspondingly interpolated targets, . Cross-entropy alone may not constrain the geometry of the feature space, leaving same-class samples potentially dispersed and limiting generalization to unseen manipulations. We therefore add supervised contrastive learning [31], computed on the unmixed batch, since mixup’s fractional labels are incompatible with discrete class supervision. The embedding is projected to , and for a batch of samples with the indices sharing anchor ’s label (excluding ) and all others, the loss is
pulling same-class embeddings together while pushing different classes apart. The full objective is , with mixup regularizing the decision boundary and supervised contrastive learning organizing the embedding space together yielding a feature space robust to manipulation technique, compression, and dataset shift.
Experiments
To evaluate the effectiveness of Spectra, we conduct experiments across multiple deepfake detection benchmarks. The training set consists of frames sampled from videos generated using four widely used face manipulation techniques: Deepfakes, Face2Face, FaceSwap, and NeuralTextures. These methods represent diverse manipulation strategies and provide a challenging training distribution. The evaluation datasets, described in § 2.1, differ from the training data in terms of manipulation technique, generation pipeline, and visual characteristics, enabling a rigorous assessment of cross-dataset generalization. Following common practice, performance is measured using the Area Under the ROC Curve (AUC).
Table 1 summarizes the cross-dataset performance of Spectra against state-of-the-art methods on four widely-used out-of-distribution deepfake detection benchmarks (“–” denotes results not reported in prior work). Spectra achieves the best or second-best AUC on every benchmark, and the best average AUC overall, demonstrating consistently strong generalization under distribution shift rather than performance confined to a single dataset or manipulation family. On CDFv1, Spectra attains an AUC of 0.829, outperforming the previous best method, MUF (0.807), by a relative improvement of 2.73%. The gain is more pronounced on CDFv2, where Spectra reaches 0.841 against TGFv2’s 0.794, which is a 5.92% relative improvement, and most pronounced on FS, where Spectra’s 0.858 surpasses the best prior result, WaveletCLIP (0.732), by 17.21%. On DFD, Spectra is narrowly second-best at 0.896, trailing TGFv2’s 0.905 by under one AUC point; despite this single exception, Spectra achieves the highest average AUC (0.856) across all four benchmarks, outperforming the next-best method, TGFD (0.833), by 2.76%. Against CLIP-based methods specifically, Spectra improves over the strongest baseline, WaveletCLIP (0.749 average), by 14.29%, underscoring that the gain stems not merely from using a CLIP backbone but from how Spectra couples it with reconstruction-aware artifact evidence. Taken together, these results show that Spectra delivers consistently strong cross-dataset performance without dataset-specific tuning, establishing a new state of the art on three of the four benchmarks evaluated.
| Method | CDF | CDF | FSh | DFD | Avg |
| General Methods | |||||
| MesoNet’18 [1] | 0.735 | 0.609 | 0.566 | 0.548 | 0.615 |
| MesoInc.’18 [1] | 0.736 | 0.696 | 0.643 | 0.607 | 0.671 |
| Xception’18 [12] | 0.779 | 0.736 | 0.624 | 0.816 | 0.739 |
| DSP-FWA’18 [34] | 0.789 | 0.668 | 0.555 | 0.740 | 0.688 |
| EffNet’19 [53] | 0.790 | 0.748 | 0.616 | 0.815 | 0.742 |
| Capsule’19 [41] | 0.790 | 0.747 | 0.646 | 0.684 | 0.717 |
| CNN-Aug’20 [54] | 0.742 | 0.702 | 0.598 | 0.646 | 0.672 |
| Face X-ray’20 [32] | 0.709 | 0.678 | 0.655 | 0.766 | 0.702 |
| FFD’20 [14] | 0.784 | 0.744 | 0.605 | 0.802 | 0.734 |
| F3-Net’20 [44] | 0.776 | 0.735 | 0.591 | 0.798 | 0.725 |
| SRM’21 [40] | 0.792 | 0.755 | 0.601 | 0.812 | 0.740 |
| CORE’22 [42] | 0.779 | 0.743 | 0.603 | 0.802 | 0.732 |
| RECCE’22 [9] | 0.767 | 0.731 | 0.609 | 0.812 | 0.730 |
| UCF’23 [56] | 0.779 | 0.752 | 0.646 | 0.807 | 0.746 |
| F-G’24 [38] | 0.744 | – | – | 0.848 | 0.796 |
| DF-GDD’24 [58] | – | 0.769 | – | 0.830 | 0.800 |
| TGFD’25 [6] | 0.799 | 0.794 | – | 0.905 | 0.833 |
| CSFT’25 [30] | 0.804 | – | – | – | 0.804 |
| WA-ViT DCD’25 [5] | 0.786 | – | – | – | 0.786 |
| MUF’26 [37] | 0.807 | 0.768 | – | 0.819 | 0.798 |
| CLIP-Based Methods | |||||
| CLIP’23 [43] | 0.743 | 0.750 | 0.730 | – | 0.741 |
| WaveletCLIP’25 [7] | 0.756 | 0.759 | <u>0.732</u> | – | 0.749 |
| IFPL’26 [57] | 0.804 | 0.722 | – | 0.702 | 0.743 |
| Spectra | 0.829 | 0.841 | 0.858 | <u>0.896</u> | 0.856 |
Table 1. Cross-dataset frame-level AUC. Best and second-best results are shown in bold and <u>underlined</u>, respectively.
How Well Does Spectra Separate Classes?
Beyond AUC, we examine how well Spectra’s learned representations separate real and fake samples directly in feature space. To isolate the contribution of the reconstruction-aware heatmap, we compare against an RGB ablation, which is, the identical architecture in Figure 2, but with the heatmap branch fed the raw RGB image in place of the INR decomposition. We report the Silhouette score (higher is better) [49] and Davies–Bouldin index (lower is better) [15] on the bottleneck embedding of both variants (MLP), and visualize the embedding via t-SNE on CDFv1 (Figure 5).

Figure 5. t-SNE visualization of feature embeddings on the CDFv1 dataset. The proposed Spectra model produces more discriminative feature representations than the RGB-only baseline, resulting in improved separation between real and fake samples.
As shown in Table 2, Spectra improves Silhouette by 2.4–3.2× and Davies–Bouldin by 1.6–1.9× over the RGB ablation across all four benchmarks. The t-SNE visualization confirms this, under Spectra, fake samples form a few large, well-defined clusters while real samples remain more dispersed, whereas the RGB ablation scatters both classes into many small, mixed clusters. Together, these results show that the reconstruction-aware representation does not merely shift the decision boundary, it reorients the embedding space itself into a more linearly separable configuration, easing the downstream classifier’s task. Further, the corresponding ROC curves are shown in Figure 4.

Figure 4. ROC curves. Comparison of the proposed Spectra model and the RGB-only ablation on the Celeb-DF v1, and v2 benchmarks.
| Benchmark | Silhouette | DB | ||
| Spectra | RGB | Spectra | RGB | |
| CDFv1 | 0.1337 | 0.0561 | 2.517 | 3.939 |
| CDFv2 | 0.1155 | 0.0421 | 2.632 | 4.620 |
| DFD | 0.2306 | 0.0808 | 1.690 | 3.178 |
| FaceShifter | 0.1059 | 0.0330 | 2.741 | 5.153 |
| Mean | 0.1465 | 0.0530 | 2.395 | 4.222 |
Table 2. Cluster-separation metrics. Silhouette () and Davies–Bouldin (DB, ) scores
Can Spectra be Extended to Presentation Attack Detection?
Deepfake manipulation and presentation attacks arise from fundamentally different processes. Deepfakes introduce localized, semantic-level inconsistencies, a manipulated region embedded within an otherwise natural image. Presentation attacks instead arise from low-level imaging physics, recapture noise, printing artifacts, and shading or reflectance mismatches introduced when a face is presented to a sensor rather than captured directly. Spectra learns features by detecting deviations from the natural spectral and structural properties of images, rather than relying on artifacts specific to deepfakes. This raises a natural question, does the same representation transfer to presentation attack
detection, a setting governed by entirely different forgery mechanics? Figure 6 visualizes the layer-wise INR decomposition for a genuine (top) and a presentation-attacked (bottom) sample. Even at Layer 1, the samples exhibit distinct low-level, coordinate-dependent sinusoidal responses. The two diverge largely by Layer 2, the attacked sample develops a sharply localized bright region near the forehead absent in the genuine sample, consistent with a nonideal reflectance pattern introduced by the recapture process. By Layer 3, the genuine sample maintains coherent, evenly distributed facial structure, while the attacked sample’s reconstruction is comparatively less uniform, a subtler distinction than the artifact patterns observed for deepfakes, reflecting that presentation attacks perturb image statistics more globally and less locally than semantic manipulation does. We evaluate this transfer on four widely used face anti-spoofing benchmarks: CASIA-MFSD (C) [62], Idiap Replay-Attack (I) [11], MSU-MFSD (M) [55], and OULU-NPU (O) [8], under the standard leave-one-domain-out protocol, each dataset in turn serves as the held-out target while the model trains on the remaining three, testing generalization across sensors, capture conditions, and attack types. As shown in Table 3, Spectra achieves the best average performance (97.17) across all four protocols, and the best result on three of the four (M, C, O), trailing only on I, where two prior methods report marginally higher scores. This indicates that the reconstruction-aware representation generalizes beyond deepfake detection to a forgery setting with substantially different underlying physics, without any task-specific architectural modification.

Figure 6. INR layer-wise decomposition. Genuine samples produce smooth activations across layers, while attacks yield noisier intermediate responses and less consistent structure.
| Method | M | C | I | O | Avg |
| RP’21 [59] | 87.43 | 86.76 | 86.38 | 92.43 | 88.25 |
| FG’22 [50] | 91.25 | 80.58 | 95.34 | 89.85 | 89.25 |
| FDGAL’24 [26] | 93.29 | 88.10 | 91.92 | 90.54 | 90.96 |
| MRGA’23 [63] | 89.83 | 88.36 | 94.02 | 90.86 | 90.77 |
| ST’24 [33] | 90.00 | 89.98 | 87.81 | 92.73 | 90.13 |
| HPDR’24 [25] | 96.02 | 94.42 | 92.49 | 95.26 | 94.55 |
| CA-FAS’25 [39] | 97.42 | 94.55 | 93.67 | 94.53 | 95.04 |
| Spectra | 98.85 | 99.84 | 93.42 | 96.58 | 97.17 |
Table 3. Cross-dataset PAD performance (% AUC). M, C, I, and O denote the four evaluation protocols. Best and second-best results are highlighted in bold and underlined, respectively.
Additional Experiments and Ablations
The supplementary material provides additional details that complement the main paper. This includes an expanded related work section, a detailed description of the INR
architecture, and the rationale behind key design choices such as activation functions, network depth, hidden-layer dimensionality, and the proposed hypernetwork-based acceleration mechanism. We further provide complete implementation details, including network hyperparameters and descriptions of the major architectural components. Extensive ablation studies are conducted to analyze the contributions of the CLIP backbone, reconstruction-aware heatmaps, multi-level decomposition, multi-scale semantic representations, and the employed loss functions. Finally, additional qualitative visualizations are presented to illustrate the ability of the proposed INR decomposition to capture hierarchical structural information across multiple representation levels for both deepfake detection and face presentation attack detection.
Conclusion
We introduced Spectra, a reconstruction-aware forensic framework that combines implicit neural representation dynamics with CLIP semantics to detect synthetic images. By jointly modeling what an image depicts and how it is reconstructed, Spectra learns representations that are more robust than appearance-based features alone. Extensive experiments demonstrate state-of-the-art performance on cross-dataset deepfake detection and strong generalization to presentation attack detection without any task-specific redesign. Furthermore, the learned embeddings exhibit substantially improved class separability, indicating that reconstruction-aware features capture fundamental signatures of synthetic content that transfer across different manipulation and attack types.
References
- [1]Darius Afchar, Vincent Nozick, Junichi Yamagishi, and Isao Echizen. Mesonet: a compact facial video forgery detection network. In 2018 IEEE international workshop on information forensics and security (WIFS), pages 1–7. IEEE, 2018. 7DOI
- [2]Hamed Alqahtani, Manolya Kavakli-Thorne, and Gulshan Kumar. Applications of generative adversarial networks (gans): An updated review. Archives of Computational Methods in Engineering, 28:525–552, 2021. 1
- [3]Mohammed Sahib Mahdi Altaei et al. Detection of deep fake in face images based machine learning. Al-Salam Journal for Engineering and Technology, 2(2):1–12, 2023. 1DOI
- [4]Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 5arxiv.org/abs/1607.06450
- [5]Nour Eldin Alaa Badr, Jean-Christophe Nebel, Darrel Greenhill, and Xing Liang. Wavit-cdc: Wavelet vision transformer with central difference convolutions for spatial-frequency deepfake detection. IEEE Open Journal of Signal Processing, 2025. 7DOI
- [6]Ningning Bai, Xiaofeng Wang, Ruidong Han, Jianpeng Hou, Qin Wang, and Shanning Pang. Towards generalizable face forgery detection via mitigating spurious correlation. Neural Networks, 182:106909, 2025. 7DOI
- [7]Lalith Bharadwaj Baru, Shilhora Akshay Patel, and Rohit Boddeda. Harnessing wavelet transformations for generalizable deepfake forgery detection. arXiv preprint arXiv:2409.18301, 2024. 2, 7
- [8]Zinelabinde Boulkenafet, Jukka Komulainen, Lei Li, Xiaoyi Feng, and Abdenour Hadid. Oulu-npu: A mobile face presentation attack database with real-world variations. In 2017 12th IEEE international conference on automatic face & gesture recognition (FG 2017), pages 612–618. IEEE, 2017. 8DOI
- [9]Junyi Cao, Chao Ma, Taiping Yao, Shen Chen, Shouhong Ding, and Xiaokang Yang. End-to-end reconstruction-classification learning for face forgery detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4113–4122, 2022. 7DOI
- [10]Xueying Chen, Tianqiang Huang, Wenyu Liu, Zhenghong Wang, Wentong Li, Wei Huang, Riqing Chen, and Haifeng Luo. Deepfakeclip: Semantic-opposite prompt learning for generalizable deepfake detection. Knowledge-Based Systems, page 114681, 2025. 2DOI
- [11]Ivana Chingovska, André Anjos, and Sébastien Marcel. On the effectiveness of local binary patterns in face anti-spoofing. In 2012 BIOSIG-proceedings of the international conference of biometrics special interest group (BIOSIG), pages 1–7. IEEE, 2012. 8
- [12]François Chollet. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1251–1258, 2017. 7arxiv.org/abs/1610.02357
- [13]Florinel-Alin Croitoru, Vlad Hondru, Radu Tudor Ionescu, and Mubarak Shah. Diffusion models in vision: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(9):10850–10869, 2023. 1
- [14]Hoa Dang, Feng Liu, Joel Stehouwer, Xiaoming Liu, and Anil K Jain. On the detection of digital face manipulation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern recognition, pages 5781–5790, 2020. 7arxiv.org/abs/1910.01717
- [15]David L Davies and Donald W Bouldin. A cluster separation measure. IEEE transactions on pattern analysis and machine intelligence, (2):224–227, 1979. 7pubmed.ncbi.nlm.nih.gov/21868852
- [16]Luca De Luigi, Adriano Cardace, Riccardo Spezialetti, Pierluigi Zama Ramirez, Samuele Salti, and Luigi Di Stefano. Deep learning on implicit neural representations of shapes. arXiv preprint arXiv:2302.05438, 2023. 4arxiv.org/abs/2302.05438
- [17]Audrey de Rancourt-Raymond and Nadia Smaili. The unethical use of deepfakes. Journal of Financial Crime, 30(4):1066–1077, 2023. 1
- [18]Jiankang Deng, Jia Guo, Evangelos Ververas, Irene Kotsia, and Stefanos Zafeiriou. Retinaface: Single-shot multilevel face localisation in the wild. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 5203–5212, 2020. 2DOI
- [19]Ziya Erkoç, Fangchang Ma, Qi Shan, Matthias Nießner, and Angela Dai. Hyperdiffusion: Generating implicit neural fields with weight-space diffusion. In Proceedings of the IEEE/CVF international conference on computer vision, pages 14300–14310, 2023. 4arxiv.org/abs/2303.17015
- [20]Amer Essakine, Yanqi Cheng, Chun-Wun Cheng, Lipei Zhang, Zhongying Deng, Lei Zhu, Carola-Bibiane Schönlieb, and Angelica I Aviles-Rivero. Where do we stand with implicit neural representations? a technical and performance survey. arXiv preprint arXiv:2411.03688, 2024. 2arxiv.org/abs/2411.03688
- [21]Joel Frank, Thorsten Eisenhofer, Lea Schönherr, Asja Fischer, Dorothea Kolossa, and Thorsten Holz. Leveraging frequency analysis for deep fake image recognition. In International conference on machine learning, pages 3247–3258. PMLR, 2020. 1arxiv.org/abs/2003.08685
- [22]Alisha Gilbert and Zhigang Gong. Digital identity theft using deepfakes. In Information Technology and Risk Management, pages 307–314. CRC Press, 2024. 1DOI
- [23]Jeffrey T Hancock and Jeremy N Bailenson. The social impact of deepfakes, 2021. 1DOI
- [24]Arash Heidari, Nima Jafari Navimipour, Hasan Dag, and Mehmet Unal. Deepfake detection using deep learning methods: A systematic and comprehensive review. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 14(2):e1520, 2024. 1DOI
- [25]Chengyang Hu, Ke-Yue Zhang, Taiping Yao, Shouhong Ding, and Lizhuang Ma. Rethinking generalizable face anti-spoofing via hierarchical prototype-guided distribution refinement in hyperbolic space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1032–1041, 2024. 8DOI
- [26]Rui Huang and Xin Wang. Face anti-spoofing using feature distilling and global attention learning. Pattern Recognition, 135:109147, 2023. 8DOI
- [27]Dhananjaya Jayasundara and Vishal M Patel. Implicit neural representations: A signal processing perspective. arXiv preprint arXiv:2604.15047, 2026. 2arxiv.org/abs/2604.15047
- [28]Dhananjaya Jayasundara, Sudarshan Rajagopalan, Yasiru Ranasinghe, Trac D Tran, and Vishal M Patel. Sinr: Sparsity driven compressed implicit neural representations. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 3061–3070, 2025.
- [29]Dhananjaya Jayasundara, Heng Zhao, Demetrio Labate, and Vishal M Patel. Mire: Matched implicit neural representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8279–8288, 2025. 2DOI
- [30]Junchang Jing, Yanyan Lv, Ming Li, Dong Liu, and Zhiyong Zhang. Constructing adaptive spatial-frequency interactive network with bi-directional adapter for generalizable face forgery detection. Computer Vision and Image Understanding, page 104599, 2025. 7
- [31]Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. Advances in neural information processing systems, 33:18661–18673, 2020. 6arxiv.org/abs/2004.11362
- [32]Lingzhi Li, Jianmin Bao, Ting Zhang, Hao Yang, Dong Chen, Fang Wen, and Baoying Guo. Face x-ray for more general face forgery detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 5001–5010, 2020. 7arxiv.org/abs/1912.13458
- [33]Lei Li, Zhihao Yao, Shanshan Gao, Huijian Han, and Zhaoqiang Xia. Face anti-spoofing via jointly modeling local texture and constructed depth. Engineering Applications of Artificial Intelligence, 133:108345, 2024. 8
- [34]Yuezun Li and Siwei Lyu. Exposing deepfake videos by detecting face warping artifacts. arXiv preprint arXiv:1811.00656, 2018. 7arxiv.org/abs/1811.00656
- [35]Yuezun Li, Xin Yang, Pu Sun, Honggang Qi, and Siwei Lyu. Celeb-df (v2): a new dataset for deepfake forensics [j]. arXiv preprint arXiv, 2019. 3
- [36]Yuezun Li, Xin Yang, Pu Sun, Honggang Qi, and Siwei Lyu. Celeb-df: A large-scale challenging dataset for deepfake forensics. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 3207–3216, 2020. 3arxiv.org/abs/1909.12962
- [37]Zifeng Li, Wenzhong Tang, Shijun Gao, Yanyang Wang, and Shuai Wang. Multiple contexts and frequencies aggregation network for deepfake detection. PLoS One, 21(1):e0337409, 2026. 7
- [38]Li Lin, Xinan He, Yan Ju, Xin Wang, Feng Ding, and Shu Hu. Preserving fairness generalization in deepfake detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16815–16825, 2024. 7arxiv.org/abs/2402.17229
- [39]Xingming Long, Jie Zhang, and Shiguang Shan. Confidence aware learning for reliable face anti-spoofing. IEEE Transactions on Information Forensics and Security, 2025. 8arxiv.org/abs/2411.01263
- [40]Yuchen Luo, Yong Zhang, Junchi Yan, and Wei Lyu. Generalizing face forgery detection with high-frequency features. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 16317–16326, 2021. 7
- [41]Huy N. Nguyen, Junichi Yamagishi, and Isao Echizen. Capsule-forensics: Using capsule networks to detect forged images and videos. In ICASSP 2019-2019 IEEE international conference on acoustics, speech and signal processing (ICASSP), pages 2307–2311. IEEE, 2019. 7arxiv.org/abs/1810.11215
- [42]Yunsheng Ni, Depu Meng, Changqian Yu, Chengbin Quan, Dongchun Ren, and Youjian Zhao. Core: Consistent representation learning for face forgery detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 12–21, 2022. 7arxiv.org/abs/2206.02749
- [43]Utkarsh Ojha, Yuheng Li, and Yong Jae Lee. Towards universal fake image detectors that generalize across generative models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 24480–24489, 2023. 2, 7arxiv.org/abs/2302.10174
- [44]Yuyang Qian, Guojun Yin, Lu Sheng, Zixuan Chen, and Jing Shao. Thinking in frequency: Face forgery detection by mining frequency-aware clues. In European conference on computer vision, pages 86–103. Springer, 2020. 7arxiv.org/abs/2007.09355
- [45]Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pages 8748–8763. PmLR, 2021. 2arxiv.org/abs/2103.00020
- [46]Nasim Rahaman, Aristide Baratin, Devansh Arpit, Felix Draxler, Min Lin, Fred Hamprecht, Yoshua Bengio, and Aaron Courville. On the spectral bias of neural networks. In International conference on machine learning, pages 5301–5310. PMLR, 2019. 3
- [47]Ali Raza, Kashif Munir, and Mubarak Altm u t a i r i. A novel deep learning approach for deepfake image detection. Applied Sciences, 12(19):9820, 2022. 1
- [48]Andreas Rossler, Davide Cozzolino, Luisa Verdoliva, Christian Riess, Justus Thies, and Matthias Nießner. Faceforensics++: Learning to detect manipulated facial images. In Proceedings of the IEEE/CVF international conference on computer vision, pages 1–11, 2019. 2, 3arxiv.org/abs/1901.08971
- [49]Peter J Rousseeuw. Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20:53–65, 1987. 7
- [50]Rui Shao, Pramuditha Perera, Pong C Yuen, and Vishal M Patel. Federated generalized face presentation attack detection. IEEE Transactions on Neural Networks and Learning Systems, 35(1):103–116, 2022. 8DOI
- [52]Vincent Sitzmann, Julien Martel, Alexander Bergman, David Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. Advances in neural information processing systems, 33:7462–7473, 2020. 2, 3arxiv.org/abs/2006.09661
- [53]Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International conference on machine learning, pages 6105–6114. PMLR, 2019. 7arxiv.org/abs/1905.11946
- [54]Sheng-Yu Wang, Oliver Wang, Richard Zhang, Andrew Owens, and Alexei A Efros. Cnn-generated images are surprisingly easy to spot... for now. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 8695–8704, 2020. 7arxiv.org/abs/1912.11035
- [55]Di Wen, Hu Han, and Anil K Jain. Face spoof detection with image distortion analysis. IEEE Transactions on Information Forensics and Security, 10(4):746–761, 2015. 8DOI
- [56]Zhiyuan Yan, Yong Zhang, Yanbo Fan, and Baoyuan Wu. Ucf: Uncovering common features for generalizable deepfake detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 22412–22423, 2023. 7arxiv.org/abs/2304.13949
- [57]Yumin Yang, Xueyi Zhang, Bo Yan, and Yanming Guo. Towards few-shot deepfake detection with an enhanced clip model. Neural Networks, page 109027, 2026. 2, 7DOI
- [58]Wei Ye, Xinan He, and Feng Ding. Decoupling forgery semantics for generalizable deepfake detection. arXiv preprint arXiv:2406.09739, 2024. 7arxiv.org/abs/2406.09739
- [59]Zitong Yu, Xiaobai Li, Jingang Shi, Zhaoqiang Xia, and Guoying Zhao. Revisiting pixel-wise supervision for face anti-spoofing. IEEE Transactions on Biometrics, Behavior, and Identity Science, 3(3):285–295, 2021. 8arxiv.org/abs/2011.12032
- [60]Gizem Yüce, Guillermo Ortiz-Jiménez, Beril Besbinar, and Pascal Frossard. A structured dictionary perspective on implicit neural representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 19228–19238, 2022. 2arxiv.org/abs/2112.01917
- [61]Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. 6arxiv.org/abs/1710.09412
- [62]Zhiwei Zhang, Junjie Yan, Sifei Liu, Zhen Lei, Dong Yi, and Stan Z Li. A face antispoofing database with diverse attacks. In 2012 5th IAPR international conference on Biometrics (ICB), pages 26–31. IEEE, 2012. 8DOI
- [63]Shiwei Zhu and Shijun Xiang. Multiscale residual gradient attention for face anti-spoofing. Journal of Visual Communication and Image Representation, 95:103886, 2023. 8DOI