---
title: Forgery Mixup in Deepfake Detection
url: https://www.emergentmind.com/topics/forgery-mixup-fo-mixup
type: topic
---

# Forgery Mixup in Deepfake Detection

Forgery Mixup (Fo-Mixup) is a frequency-domain data augmentation procedure introduced as part of FreqDebias for deepfake detection. It is designed to mitigate a model bias termed spectral bias, in which detectors overly rely on specific frequency bands and therefore generalize poorly to unseen forgery types. In its concrete formulation, Fo-Mixup dynamically diversifies the frequency characteristics of training forgeries by mixing amplitude spectra under a learned binary frequency mask while preserving the phase of one source image; within FreqDebias, it is paired with dual consistency regularization based on CAMs and vMF hyperspherical embeddings [2509.22412].

## 1. Spectral bias and the rationale for Fo-Mixup

The stated motivation for Fo-Mixup is that standard CNN-based deepfake detectors often “over-rely” on a narrow set of dominant frequency bands when distinguishing real from fake. The dominant bands are not constant across forgery methods: DeepFake artifacts may concentrate in very low frequencies, Face2Face in mid frequencies, and NeuralTextures also in higher bands. A detector tuned to one such range therefore generalizes poorly to new forgeries [2509.22412].

Fo-Mixup is presented as a response to the need for frequency-domain augmentation. By dynamically altering the amplitude spectrum of training forgeries, it forces the model to see a broader distribution of spectral cues. The method is explicitly described as breaking spectral shortcuts and encouraging learning of more robust, semantically meaningful features that span multiple frequency bands. Within the larger FreqDebias framework, this augmentation is one of two complementary strategies, the other being dual consistency regularization.

A common misunderstanding would be to treat Fo-Mixup as ordinary sample interpolation. In the deepfake-detection setting, the operation is not defined as convex mixing of raw image tensors or of labels. Instead, it operates in Fourier space, selectively preserving some frequency regions from one forgery and mixing other regions between two forgeries. This distinction is central to its role as a debiasing mechanism rather than a generic vicinal-risk augmentation [2509.22412].

## 2. Mathematical definition in the frequency domain

Let $x_i$ and $x_j$ be two input forgery images with identical spatial dimensions. The 2D discrete Fourier transform and its inverse are defined as
$$
F(x) = A(x,u,v)\cdot e^{\,i\cdot P(x,u,v)},
$$
where $A(x)\in\mathbb{R}^{H\times W}$ is the amplitude spectrum and $P(x)\in\mathbb{R}^{H\times W}$ is the phase spectrum.

Fo-Mixup picks a binary frequency mask $B\in\{0,1\}^{H\times W}$ and a mixing coefficient $\xi\sim \mathrm{Uniform}[0,1]$. The mixed amplitude is
$$
\hat A(x_{ij}) = A(x_i)\odot B + \big[(1-\xi)A(x_i) + \xi A(x_j)\big]\odot (1-B),
$$
where $\odot$ denotes element-wise multiplication.

An optional perturbation is then introduced in amplitude space:
$$
\tilde A(x_{ij}) = N(1,\sigma^2)\odot \hat A(x_{ij}).
$$
Finally, the augmented image is reconstructed by keeping the original phase of $x_i$:
$$
x_{ij} = F^{-1}\bigl[\,\tilde A(x_{ij})\cdot e^{\,i\cdot P(x_i)}\bigr].
$$

The formal structure therefore separates amplitude manipulation from phase preservation. This suggests that the augmentation is intended to diversify spectral statistics while anchoring reconstruction to the phase content of $x_i$. The paper states this in operational terms by defining the final image through the inverse transform of the modified amplitude and the original phase [2509.22412].

## 3. Mask construction and synthesis procedure

The algorithmic realization of Fo-Mixup is more specific than simple random masking. The pseudocode begins by computing the FFT of each channel of $x_i$ and $x_j$, obtaining $[A_i,P_i]\leftarrow F(x_i)$ and $[A_j,P_j]\leftarrow F(x_j)$. The amplitude spectrum $A_i$ is then partitioned into $T$ angular segments by discretizing
$$
r\in[i_r\Delta r,(i_r+1)\Delta r], \qquad \theta\in[i_\theta\Delta\theta,(i_\theta+1)\Delta\theta].
$$
For each segment $s=1\ldots T$, the mean log spectrum is computed as
$$
\mu_s = \mathrm{mean}\big(\log(1+|A_i(\text{segment } s)|)\big).
$$

The set $\{\mu_1,\ldots,\mu_T\}$ is clustered by k-means into $k$ clusters. This produces $k$ binary masks $B_1,\ldots,B_k$, each selecting one cluster’s segments. For each mask $B_z$, a “filtered image” is produced by inverse FFT:
$$
x_{\mu_z} = F^{-1}[\,A_i\odot B_z, P_i\,].
$$
These filtered images are scored with a pre-trained detector and ranked by CE loss using OHEM. The algorithm keeps the top-$t$ clusters and randomly chooses one mask $B$ from these, after which the amplitude mixing, optional perturbation, and inverse reconstruction are performed.

Several implementation details are specified. Clustering uses $k=8$ clusters, and mask selection keeps top $t=3$ by OHEM. The mixing coefficient $\xi$ is sampled in $[0,1]$ per pair. The amplitude noise $p_A$ is Gaussian $N(1,0)$, described as multiplicative noise with mean $1$ and standard deviation approximately $0$. Segmentation uses $T$ angular segments with $\Delta r$ and $\Delta\theta$ chosen to uniformly tile the spectrum. The augmentation is applied to every forgery image during synthesis, while real images use standard augmentations only [2509.22412].

## 4. Role inside FreqDebias and consistency-driven training

Fo-Mixup is not used in isolation in the full framework. Starting from a training set $T=\{(x_i^t,y_i)\}$, synthetic forgery samples are generated by
$$
x_i^s = \mathrm{Forgery\mbox{-}Mixup}(x_i^t, x_j^t),
$$
with labels inherited as $y_i^s=y_i^t$. Low-confidence synthesized samples are then filtered via Shannon entropy, keeping the top $\lambda\%$.

The resulting training procedure applies dual consistency regularization on pairs $(x^t,x^s)$. The classification term is
$$
L_{\mathrm{cls}} = CE(f(x^t),y)+CE(f(x^s),y)+KL(\sigma(f(x^t)/\tau)\,\|\,\sigma(f(x^s)/\tau)).
$$
Local consistency matches CAMs from $x^t$ and $x^s$ via JS divergence. Global consistency matches vMF hyperspherical embeddings from $x^t$ and $x^s$. Network updates minimize
$$
L_{\mathrm{total}} = L_{\mathrm{cls}} + \eta\cdot L_{\mathrm{CAM}} + \delta\cdot L_{\mathrm{att}} + \mu\cdot L_{\mathrm{cls\_sphere}} + \rho\cdot L_{\mathrm{sphere}}.
$$

In this design, Fo-Mixup supplies spectrally diversified forgery samples, while the dual consistency losses constrain the representations learned from original and synthesized inputs. The paper explicitly states that local supervision is provided by CAMs and global supervision by a vMF distribution on a hyperspherical embedding space, and that this dual CR mitigates over-reliance on certain frequency components by promoting consistent representation learning under both local and global supervision [2509.22412].

## 5. Experimental behavior and practical operating points

The reported ablations isolate both the contribution of Fo-Mixup alone and its comparison with other Fourier-space augmentations. Standalone Fo-Mixup, without CR losses, improves cross-domain performance relative to a baseline using standard augmentation only. Under the full FreqDebias setting, Fo-Mixup also outperforms the listed alternatives Amplitude-Mix and Amplitude-Swap.

| Setting | Method | Result |
|---|---|---|
| CDFv2, standalone augmentation | Baseline (ResNet-34, standard aug only) | AUC = 69.2% |
| CDFv2, standalone augmentation | + Fo-Mixup & CE alone | AUC = 74.8%; EER from 36.0% to 31.3% |
| Full CR | Amplitude-Mix (AM) | AUC = 76.0% |
| Full CR | Amplitude-Swap (AS) | AUC = 78.5% |
| Full CR | Fo-Mixup | AUC = 83.6% |

Confidence sampling is also quantitatively characterized. Keeping the top $50\%$ of synthesized samples by prediction entropy adds approximately $1.9\%$ AUC gain over using all synthesized samples. Tuning $\lambda$, the fraction of kept samples, is reported to be best at $\lambda=0.50$; extremes such as $35\%$ or $80\%$ degrade performance.

The practical recommendations follow directly from these ablations. They specify using $k\approx 8$ clusters and $t\approx 3$ top hard clusters to focus mask selection on the most informative spectral regions, sampling the mixing ratio $\xi$ uniformly in $[0,1]$ for maximum diversity, applying light amplitude noise with mean $1$ and low variance, and filtering synthesized samples by entropy while keeping roughly the top $50\%$ most confident. The same source also states that Fo-Mixup should be combined with consistency regularization—local CAM and global vMF—for best cross-domain generalization, and that there is no modification to inference cost because all Fo-Mixup and auxiliary heads are removed at test time [2509.22412].

## 6. Terminological scope and relation to earlier mixup literature

The name “Fo-Mixup” also appears in a separate line of discussion on deep-learning-based side-channel attacks, but there it has a different status. The underlying baseline is standard mixup, defined for traces $x_i\in\mathbb{R}^D$ and one-hot labels $y_i\in\{0,1\}^c$ by sampling
$$
\lambda\sim \mathrm{Beta}(\alpha,\alpha), \qquad \tilde x=\lambda x_i + (1-\lambda)x_j, \qquad \tilde y=\lambda y_i + (1-\lambda)y_j.
$$
This is framed under the Vicinal Risk Minimization principle, and the paper reports that mixup can enhance attack performance, especially for insufficient profiling traces [2103.05833].

Within that discussion, “Towards a Specialized Forgery Mixup (Fo-Mixup)” introduces possible Fo-Mixup ideas rather than a fixed, experimentally validated algorithm under that name. The listed ideas include targeted pairing by key-hypothesis, adaptive mixing coefficient, region-aware mixup, label smoothing with domain prior, and forgery by synthetic noise injection. The same source further states that a Fo-Mixup implementation might proceed by identifying predicted leakage points, building pairs only under constraints such as equal Hamming weight or equal least-significant bit, sampling $\lambda$ from pair-specific Beta distributions, mixing only in a local window, and creating softened labels with a small neural-network mapping.

This establishes an important terminological distinction. In deepfake detection, Fo-Mixup is a concrete Fourier-domain augmentation with explicit formulas, pseudocode, and ablation results. In the side-channel context, the same label is used for a proposed specialization of generic mixup, framed through “possible Fo-Mixup ideas” and “might proceed” language rather than a finalized procedure. A plausible implication is that the term has acquired a method-specific meaning in the FreqDebias literature while remaining a broader design motif in adjacent augmentation discussions [2103.05833].

Source: https://www.emergentmind.com/topics/forgery-mixup-fo-mixup