Advances in Science and Knowledge
Vol. 2 No. 11 (2026)
Published: 2026-11-05
Alejandro García López*
Universidad Complutense de Madrid,Madrid,Spain
Email:alejandro.garcia@ucm.es
Abstract:The rapid proliferation of generative media has produced forgeries that span multiple modalities, including manipulated faces, synthetic speech, and rewritten captions, often within a single piece of content. Existing detectors are predominantly designed for a single modality and rely on fixed fusion strategies, which makes them fragile when one channel is missing, degraded, or deliberately desynchronized. This paper proposes an agent-driven unified cross-modal framework that jointly performs forgery detection and fine-grained localization. A shared token space aligns visual, audio, and text representations through a contrastive objective, while a reasoning agent dynamically gates modalities, probes cross-modal consistency, and plans the evidence that supports a decision. The agent is implemented as a lightweight, instruction-conditioned module that emits interpretable weights and consistency queries rather than a closed prediction. A shared detection head produces a binary verdict, and a parallel localization head outputs a spatial or temporal forgery map. Experiments on four benchmarks covering manipulated video, synthetic audio, and mismatched captions show that the framework achieves an average detection AUC of 95.5%, outperforming single-modal and fixed-fusion baselines by a clear margin, while reaching a mean intersection-over-union of 63.5% for localization. Ablation studies confirm that each agent capability contributes independently, and the framework remains stable when modalities are dropped at inference.
Keywords: multimodal forgery detection; deepfake localization; agent-driven reasoning; cross-modal alignment; modality gating; evidence planning
Mainstream approaches still treat forgery detection as a single-modal classification problem. Visual detectors learn frequency or texture artifacts, audio detectors identify synthetic-voice artifacts, and text detectors check whether a caption is coherent. When these systems are combined, the typical practice is late fusion, which averages independent scores, or a fixed attention block, which learns a static weighting over modalities[1,2]. Both strategies assume that all modalities are present and equally trustworthy. They cannot reason about which channel should be trusted for a given sample, and they do not explicitly test whether the channels agree with one another. As a result, a forgery that is invisible to one modality but exposed by a cross-modal contradiction can be missed. Similar limitations can also be observed in cross-modal remote sensing analysis, where conventional fusion pipelines struggle to achieve robust alignment and adaptive feature weighting across heterogeneous optical and SAR observations. Ye et al.[3] and Li et al.[4] show that existing SAR target classification and detection networks mostly focus on extracting discriminative single-modal scattering and oriented convolutional features, while the cross-modal registration method proposed by Lan et al.[5] relies on pre-designed multi-level filtering to establish correspondence rather than dynamically assessing the reliability of each modality.
This paper introduces an agent-driven unified cross-modal framework that combines the adaptivity of reasoning agents with the efficiency of a learned detector[6-9]. The framework first encodes the visual, audio, and text channels into a shared token space, where a contrastive objective pulls genuinely matched channels together and pushes mismatched channels apart. A dedicated agent module then performs three operations: modality gating, which estimates the reliability of each channel for the current sample; consistency probing, which issues targeted queries that test whether the channels describe the same event; and evidence planning, which routes the most informative tokens to the decision heads[10-13]. Finally, a detection head produces a binary verdict and a localization head produces a spatial or temporal map of the manipulated region. The overall architecture is shown in Figure 1.
The contributions of this work are summarized as follows. First, a unified cross-modal framework is proposed that performs detection and localization jointly rather than treating them as separate stages. Second, an agent module is designed to dynamically gate modalities[14-16], probe consistency, and plan evidence, providing interpretable adaptation to missing or unreliable channels. Third, a contrastive alignment objective is introduced that makes cross-modal contradiction a first-class signal. Fourth, extensive experiments on four benchmarks demonstrate consistent gains in both detection and localization, together with robustness to modality dropout[17-20].
Figure 1. Overall architecture of the agent-driven unified cross-modal framework. Three modality streams are encoded into a shared token space; an agent module gates modalities, probes consistency, and plans evidence for the detection and localization heads.
Visual forgery detection has been studied extensively through both spatial and frequency cues. Early methods learned boundary and blending artifacts around swapped regions, such as unnatural edge transitions, colour mismatches and warping distortions introduced during image compositing, while later approaches exploited noise residuals, spectral inconsistencies, and self-supervised representations to capture more subtle traces left by generative pipelines[21-24]. Large-scale benchmarks of manipulated faces established the standard evaluation protocol for fair comparison across models, and consistent results showed that strong generalization across unseen manipulation types, generators and post-processing operations remains a major challenge[25-27]. Audio forgery detection developed in parallel, with methods targeting synthetic speech produced by neural vocoders and text-to-speech systems. These detectors rely on artifacts in high-frequency bands, phase discontinuities, or the statistical mismatch between natural and generated speech, which are often imperceptible to human listeners but measurable under signal analysis[28-31]. Text-oriented approaches focus on machine-generated or misleading captions, using language-model perplexity, semantic coherence features and stylistic fingerprints to distinguish automated outputs from human writing. Each line of work is effective within its individual modality under controlled test settings, but existing frameworks offer no native mechanism to exploit complementary evidence from the others. This isolated design limits performance against modern multimodal forgeries, where attackers synchronise falsified visual, audio and textual content to create highly credible fake samples.
Multimodal learning supplies the fundamental mechanisms to integrate information from distinct sensory channels. Large-scale contrastive pre-training paired between images and captions has proven that semantically aligned representations can be acquired without dense explicit annotation, while transformer-based fusion architectures have validated that cross-attention is capable of modelling subtle, fine-grained interactions across modalities [32–35]. Within the media forgery domain, existing research for talking-head forgery detection often fuses audio and visual features, most commonly via straightforward feature concatenation or a static learned attention block. These approaches can boost detection accuracy when all input modalities are intact and clean. Nevertheless, their fusion weights remain frozen after training and cannot dynamically adapt according to the real-time reliability of individual incoming signals. Moreover, such methods generally only produce a coarse clip-level forgery judgement. Precise spatial localization of manipulated regions is delegated to an independent, separate model, rather than being jointly optimized within one unified pipeline [36–40].
Agent systems built on instruction-tuned language models typically decompose complex tasks into a sequence of context-conditioned actions, including selecting suitable tools, retrieving relevant memory records, or actively requesting supplementary evidence. Such structured reasoning provides a natural template for forgery detection under variable, unpredictable input conditions [41–44]. Rather than adopting a general-purpose large language agent directly as the final classifier, this work distills the most valuable agent-like reasoning behaviors into a lightweight, fully differentiable module. This compact component can be optimized end-to-end jointly with the underlying detection backbone [45–47]. The distilled agent preserves core capabilities such as adaptive modality gating and cross-modal consistency probing, while introducing only negligible computational overhead. This design clearly differentiates our method from two common alternatives: static fusion schemes that lack adaptive reasoning, and prompt-based agent pipelines, which suffer from high inference cost at scale and are inherently unable to produce fine-grained localization outputs.
Let a media sample be represented as a set of modality views , corresponding to visual, audio, and text inputs, any of which may be empty. The framework has two outputs: a binary label indicating whether the sample is forged, and a localization map that marks the manipulated pixels for visual content or the manipulated time intervals for audio. The three design goals are unified representation across modalities, adaptive trust over channels, and joint detection with localization. The pipeline consists of modality encoders, a shared token space, an agent module, and two decision heads[48-50].
Each modality is encoded by a dedicated backbone. The visual encoder is a vision transformer applied to sampled frames, producing patch tokens; the audio encoder is a speech representation model that produces frame-level tokens; and the text encoder is a sentence model that produces token embeddings[51,52]. Because these representations live in different spaces, each is passed through a modality-specific projector that maps tokens to a common dimension . The projected tokens are denoted , and . A shared special token, analogous to a class token, summarizes each modality for the agent.
To make the shared space semantically aligned, a contrastive objective pairs channels that originate from the same authentic sample and separates channels that do not. For a visual embedding and a paired text embedding , the alignment loss is computed over a batch of candidates as follows:
(1)
where sim denotes cosine similarity and tau is a temperature. The symmetric direction, using z_t as the query, is averaged with the expression above. The same construction is applied to audio-text and visual-audio pairs. Because forged samples are constructed by replacing or editing one channel, they naturally produce low alignment scores, turning cross-modal contradiction into a learnable signal.
The agent module operates on the unified tokens and is responsible for three context-conditioned actions. The first action is modality gating. For each modality summary , the agent estimates a reliability weight and forms a gated representation, as given by:
(2)
where LN denotes layer normalization and is a learned vector. When a channel is absent, its summary is replaced by a learned absence embedding, and the softmax redistributes weight over the remaining channels. The second action is consistency probing. Rather than attending uniformly, the agent generates a small set of query tokens that ask whether specific attributes agree across modalities, such as identity, timing, and semantic content. These queries interact with the unified tokens through scaled dot-product attention:
(3)
The query tokens are generated by an instruction-conditioned generator, which ingests a predefined bank of consistency prompts alongside compact summary representations of the currently available modalities. Conditioned on both textual instructions and modality summaries, this generator produces tailored query tokens for cross-modal alignment. The attention outputs computed over these tokens encode the degree of semantic agreement, revealing whether visual, audio and text channels describe a coherent, consistent event or carry conflicting information. The third core operation of the agent is evidence planning. A learned routing distribution identifies tokens exhibiting the strongest cross-modal disagreement. Only these high-conflict tokens are forwarded to the detection and localization heads. This design concentrates downstream decision-making on contradictory, forgery-relevant evidence while suppressing redundant and irrelevant background content from long input sequences, preventing neutral background signals from diluting tampering cues.
An auxiliary objective regularizes the agent to align its modality gating weights with true signal reliability. In training, each modality is independently corrupted or masked out at a predefined probability. The loss imposes a penalty if the agent assigns large gating weights to degraded, unreliable channels. Critically, both the gating weights and the routed evidence tokens remain accessible at inference time. This property grants the framework native interpretability. Instead of yielding a black-box prediction, it exposes the reasoning trail: practitioners can directly inspect which modalities the model trusted and which specific cross-modal contradictions ultimately shaped the final forgery verdict.
The detection head is a two-layer classifier over the gated representation and the consistency-query outputs, producing the probability that the sample is forged. The localization head shares the visual or audio encoder and upsamples the planned evidence tokens back to the input resolution. For visual content, it outputs a per-pixel probability map; for audio, a per-frame probability curve. Training uses pixel- or frame-level binary cross-entropy against the manipulation mask:
(4)
where H and W are the map dimensions, is the mask label, and is the predicted probability. Because manipulated regions are often small, the map is additionally supervised with a boundary-aware term that sharpens the edges of the predicted region.
The framework is trained end to end with a weighted combination of classification, localization, alignment, and agent objectives:
(5)
The weights lambda are selected on a validation split. The contrastive and agent terms act as regularizers that improve cross-modal reasoning, while the classification and localization terms drive the task outputs. All three modality encoders are initialized from pretrained weights and fine-tuned with a reduced learning rate.
Evaluation uses four benchmarks that cover the principal forgery settings. FaceForensics++ provides manipulated talking-head videos with pixel-level masks; DeepFake-TIMIT supplies face-swap clips; WavFake contains synthetic speech generated by multiple neural vocoders; and a multi-target cross-modal set, denoted MultiTarget, pairs authentic video with cloned audio or rewritten captions. Table 1 summarizes the scale and the available supervision. The MultiTarget set is constructed by pairing authentic clips with one manipulated channel, ensuring that every forgery exhibits a cross-modal inconsistency.
Table 1. Statistics of the evaluation datasets.
Dataset | Modality | Samples | Forged ratio | Localization labels |
|---|---|---|---|---|
FaceForensics++ | visual + audio | 10,000 clips | 0.80 | pixel masks |
DeepFake-TIMIT | visual | 6,200 clips | 0.50 | face-region masks |
WavFake | audio | 19,000 clips | 0.86 | frame intervals |
MultiTarget | visual + audio + text | 7,400 clips | 0.50 | pixel + interval |
Detection is measured by area under the receiver-operating curve (AUC), accuracy, and F1 score. Localization is measured by mean intersection-over-union (mIoU) and by the F1 score of the predicted map. Results are reported over three random seeds, and the mean is used in the tables.
The visual encoder adopts a base vision transformer with a patch size of 16, the audio encoder is implemented as a standard base speech model, and the text encoder leverages a base sentence transformer. All three encoders project their respective modality inputs into a shared token space with a fixed dimension of 256 for unified cross-modal interaction. The agent module contains eight consistency-query tokens and applies a temperature value of 0.07 for contrastive alignment between different modal representations. For training, we adopt the AdamW optimizer. We set the learning rate to 2e-5 for the three encoders and a higher rate of 2e-4 for the agent and prediction heads. The batch size is 32, and the training runs for up to 30 epochs with early stopping to avoid overfitting. The combined loss function uses weighting coefficients λ₁ = 1.0, λ₂ = 0.5, λ₃ = 0.2, and λ₄ = 0.1. To boost robustness to missing signals, each modality is randomly dropped during training with a probability of 0.15. This dropout strategy explicitly trains the agent to dynamically redistribute predictive trust among the remaining available modalities.
The framework is systematically compared against three representative baselines: a single-modal model built upon the strongest individual input channel, a simple late-fusion approach that directly averages prediction scores from different modalities, and a cross-modal attention model equipped with a static fixed fusion block. Table 2 summarises core detection and localization metrics for all methods, while Figure 2 visualises AUC performance across the full collection of test datasets. The proposed framework outperforms all competing alternatives on every benchmark setting. Its advantage is particularly pronounced on the MultiTarget dataset, where manipulated samples are characterised by inconsistencies between different modalities. Unlike many forgery datasets that rely on visible artefacts within a single channel, detection on MultiTarget hinges on identifying subtle cross-modal contradictions. This distinction explains why static fusion and single-modal methods struggle here, as they lack the capacity to dynamically reason about mismatched signals across audio, text and visual streams.
Table 2. Comparison with baseline methods (mean over three seeds).
Method | AUC (%) | Accuracy (%) | F1 (%) | mIoU (%) | Loc. F1 (%) |
|---|---|---|---|---|---|
Single-modal baseline | 79.4 | 75.8 | 77.1 | 49.6 | 51.3 |
Late fusion | 86.1 | 83.0 | 84.2 | 54.7 | 56.8 |
Cross-modal attention | 90.5 | 88.4 | 89.0 | 59.2 | 60.5 |
Proposed (agent-driven) | 95.5 | 93.6 | 94.1 | 63.5 | 65.0 |
Figure 2. Detection AUC of the compared methods on the four benchmarks. The agent-driven framework achieves the highest AUC on every dataset.
The performance gain over fixed cross-modal attention is more considerable on audio-heavy and cross-modal datasets than on the purely visual DeepFake-TIMIT benchmark. This observation aligns well with the core functional design of the adaptive agent. When decisive forgery evidence arises from contradictions across separate modalities rather than visual artefacts alone, dynamic gating and consistency probing deliver the most substantial performance benefits. Beyond detection accuracy, localization quality also sees clear improvements. This stems from the evidence-planning mechanism, which selectively forwards tokens surrounding manipulated regions for fine-grained reasoning. Instead of feeding the complete, unfiltered sequence into subsequent modules, the agent prioritises informative local tokens, enabling the model to focus on tampered boundaries and capture regional inconsistencies more reliably.
An ablation study systematically disables each core capability of the proposed agent-based framework one at a time to quantify individual contributions to overall performance. We construct four distinct model variants for comparison: a baseline without the adaptive agent, which computes a fixed mean across all input modalities; a version without modality gating, where learned modality weights are substituted with a simple uniform average; a variant without consistency probing, in which all dedicated query tokens for cross-modal alignment are discarded; and a setup without the localization head, which preserves only clip-level prediction outputs and discards fine regional outputs. Figure 3 and its accompanying quantitative and qualitative analysis demonstrate clearly that every designed component delivers meaningful performance gains. Removing the adaptive agent triggers the most substantial decline in detection accuracy, confirming its central role in dynamic cross-modal fusion. Meanwhile, eliminating the localization head directly removes all support for mIoU evaluation and also weakens detection performance moderately, as the model can no longer access fine-grained spatial region signals to refine judgements.
Figure 3. Ablation of the agent components and the localization head in terms of detection AUC and localization mIoU.
We further conduct a modality robustness test by withholding a single modality during inference. When the audio channel is omitted, the framework maintains 94.3% AUC; without the text channel, it reaches 95.0% AUC; and when visual input is unavailable, AUC falls to 91.8%. These results indicate that the visual channel carries comparatively greater predictive weight for this task. A conventional fixed fusion strategy suffers far steeper performance decay under identical missing-modality scenarios, since it lacks the ability to dynamically reallocate confidence across available inputs. Inspection of the agent’s learnable weights validates this mechanism: the agent actively reassigns reliability to the surviving modalities instead of rigidly adhering to a static fusion schema learned on complete multi-modal inputs, which would become invalid once some signals are absent.
The results support the central hypothesis that forgery detection benefits from reasoning about evidence rather than applying a fixed fusion rule. Cross-modal contradiction is particularly valuable because generative models are increasingly successful at suppressing within-channel artifacts, yet synchronizing identity, timing, and semantics across channels remains difficult. The agent turns this difficulty into an explicit, testable signal. The interpretability of the gating weights and planned evidence is a further advantage in high-stakes settings, where a verdict alone is rarely sufficient.
Several limitations remain. The agent is conditioned on a fixed set of consistency prompts, and novel manipulation types that fall outside these prompts may require additional queries. The contrastive objective depends on paired authentic data, which is straightforward for talking-head content but harder for open-domain media. Finally, very short clips provide too little cross-modal evidence for the agent to exploit. Extending the query generator to discover new consistency tests automatically, and scaling to open-domain, long-form content, are natural directions for future work.
This paper presented an agent-driven unified cross-modal framework for forgery detection and localization. By aligning visual, audio, and text representations in a shared token space and equipping the model with a reasoning agent that gates modalities, probes consistency, and plans evidence, the framework adapts to the trustworthy signal in each sample rather than relying on a fixed fusion rule. Experiments on four benchmarks show consistent gains in detection and localization, together with robustness when modalities are missing. The results indicate that agent-style reasoning can be distilled into a compact, trainable module that complements rather than replaces a learned detector, offering a practical path toward unified and interpretable media forensics.