To detect deepfake videos in the Deepfake Unknown Domain, the proposed method introduces SupCon-MPL, a meta-learning model based on CRL, utilizing unlabeled Images from the Deepfake Known Domain.
3.1. Proposed Training Strategy
3.1.1. Known Domain and Unknown Domain in Deepfake
A deepfake domain can be defined as a collection of images and their features, generated from a "specific deepfake generative model". In this paper, we distinguish deepfake domains into known domain () and Unknown Domain (). Known domain () refers to a collection of deepfake images that are labeled when training models. The data in is labeled and therefore can be directly used for training. Meanwhile, unknown domain () refers to data created by unknown deepfake generative models. The data in is not labeled, hence it is not possible to determine whether the image is real or fake. Also, as they are created from various generative models, they can involve various features. Known domain can be defined as where is known deepfake generative model, and the deepfake dataset consists of a dataset composed with a set of deepfake images and labels generated by . On the other hand, unknown domain can be defined as where is unknown deepfake generative model, and the deepfake dataset consists of a dataset composed with a set of deepfake images generated by .
In this paper, to address
, we first experiment by distinguishing
into a labeled dataset (
) and an Unlabeled Dataset (
) as shown in
Figure 2(a). Subsequently, to verify the influence of
on the training process, we assume
as
and perform experiments as shown in
Figure 2(b). In the deepfake training scenario, from the perspective of generative models by generation, both
and
constitute with first-generation
, and evaluation is conducted using the first and second generation
.
3.1.2. Training Strategy for Deepfake Unknown Domain Detection
The training process is employed based on a comparison between the base model and the student model of the MPL (SupCon-MPL). Upon completion of training the base model with the entire dataset , the model is subsequently employed as the Teacher model to train Student model. In other words, we aim to verify performance improvement when training the model under the same conditions. If performance enhancement is validated at this method, it suggests that superior performing models can be trained under identical learning conditions, even when employing larger or state-of-the-art (SOTA) models.
The training images are constructed considering the problems of existing deepfake detection. While deepfakes by known generative models exist in , deepfake images by unknown generative models also exist in . Therefore, during training phase, we enhance the deepfake detection performance in using labeled data and contribute to the generalization of the learning model by using data and from and as unlabeled data, respectively. Consistent with this approach, the data and are structured into , with images from dataset serving as .
In the proposed method, we combine data in three strategies to detect the Unknown Domain Dataset
. The first strategy is to use the data from
and
as the same domain, aiming to verify whether unlabeled data from a specific
contributes to the improvement of model performance.
Figure 2a illustrates the training strategy of using
as unlabeled data. The second strategy aims to solve the realistic deepfake problem by experimenting with the impact of unlabeled data on the detection performance of the corresponding domain.
Figure 2b illustrates the feasibility of improving model performance by employing dataset
as labeled data
and dataset
as unlabeled data
. Finally, in the deepfake scenario experiment, after training the model using the first-generation deepfake dataset as
and
, the generalized deepfake detection model learning is assessed through the first-generation
and the first and second-generation
.
3.2. SupCon-MPL: Supervised Contrastive Learning with Meta-Pseudo Labels
In the proposed method, following the strategy in
Figure 2b, the MPL model is trained for the detection of deepfakes in the Unknown Domain
. SupCon-MPL allows supplementary training utilizing unlabeled videos, and with the aid of CRL, it enhances the deepfake detection in feature space. Furthermore, it affords the flexibility to employ diverse encoder models during the training phase and enables fine-tuning of the SupCon-MPL-trained model.
In particular, the limitations of deepfake detection with limited labeled data can be mitigated by using unlabeled data, and a generalized detection model can be trained through CRL. Another notable advantage lies in the capability to conduct concurrent learning via feedback from the student model, even if the performance of the teacher model is low. The details of the proposed method are elucidated in
Figure 3. The most significant distinction from the conventional MPL and SupCon model training is that with learning through unlabeled data not only resolves the training issue of CRL due to limited data but also enhances detection capabilities in both
and
. Ultimately, the final goal is to enhance the detection capabilities of deepfakes in domains that are not targeted, especially in a situation where new deepfake models in
continue to be developed.
The training of the SupCon-MPL is conducted by first having the student model use unlabeled data to perform CRL, followed by fine-tuning with labeled data. In this process, the teacher model 's classifier learns through the feedback from , while learns dependently on .
3.3. SupCon-MPL Loss Function
SupCon-MPL, as shown in
Figure 3, is composed of a teacher model (
) and a student model (S), each of which consists of an encoder and a linear classifier. SupCon-MPL has two loss functions in order to sequentially train each model. One involves the Teacher model
distilling knowledge to the student model
, while the other entails the Teacher model
training from the feedback factor provided by
on the labeled data. The knowledge distilled by
includes previously learned content about deepfakes.
In SupCon-MPL, let the parameters of
classifier and
classifier be
,
respectively, and denote the batch of images and labels on the labeled data as
, and the batch of images on the unlabeled data as
. The goal of SupCon-MPL is to minimize the parameters
of the generalized deepfake detection model
.
Hence, the objective function of SupCon-MPL is defined as follows.
For optimization, SupCon-MPL approximates
by the learning rate
, and then,
defines the final objective function as follows.
Both
and
consist of an encoder and a classifier, and are trained according to their respective loss functions. The loss function of
, the encoder of
, is composed of SupConLoss [
38], and the loss function of
, the classifier, is composed of Labeled Loss for the labeled data
and MPL Loss reflecting the feedback from
. First and foremost,
the loss function of
, receives image pairs
as inputs that reflect different random augmentations on the same image
and the label
. Subsequently, the loss value is obtained by passing image pairs through SupConLoss [
38]. At this juncture, given the similarity between the current training process and that of the original MPL's UDA Loss, the utilization of the UDA Loss is no more continued.
is promptly updated following the computation of the
.
The Labeled Loss of
,
, measures the difference between
and the label predicted by
through Crossentropy Loss (CE Loss). Here,
denotes the embedding value derived by passing the labeled data
through
.
The MPL Loss
calculates the difference between the hard pseudo label
, which is the maximum value extracted from the pseudo labels generated by
through
, and the logit. Here,
denotes the embedding value derived by passing the labeled data
through
.
The feedback factor
of
was calculated in the same way as the original Meta Pseudo Labels [
37], using Taylor Expansion to calculate the difference before and after the training of
. In the proposed method, we approximated
using the difference from the CE Loss value for the labeled data after
was trained to the value before training. This allows the final loss value to converge as the training progresses.
The final loss function of
, is composed of the sum of each loss function value.
is trained through unlabeled data. The loss function of student model’s encoder
, denoted as
, is trained utilizing SupConLoss [
38], akin to
. It leverages
, comprising an unlabeled image
paired with pseudo labels
, generated by
.
is also promptly updated following the computation of the
The loss function of
is calculated using CE Loss for the Hard Pseudo Label
of
for
and the prediction of
. Here,
denotes the embedding value derived by passing the labeled data
through
.
The SupConLoss in
,
on the Teacher model
and Student model
are as follows.
Here, is the index of the randomly augmented data, and is the set of indices for all positives in the batch (Since and are labels of images that have been randomly augmented from , they are the same as ). and are the embedding values of each randomly augmented image in passed through the encoder , and , and is the temperature parameter. In other words, the inner product between positive pairs ( and are the same class but different samples) is maximized through , and the inner product between negative pairs is minimized through , so that the SupConLoss is minimized.
The training process of the proposed SupCon-MPL model for deepfake detection is as shown in
Figure 4.