---
title: 'KAN-CFD: Continual Face Forgery Detection'
url: https://www.emergentmind.com/topics/kan-based-continual-face-forgery-detection-kan-cfd
type: topic
---

# KAN-CFD: Continual Face Forgery Detection

KAN-based Continual Face Forgery Detection (KAN-CFD) refers to a framework that leverages Kolmogorov-Arnold Networks (KANs) for continual face forgery detection, addressing catastrophic forgetting while operating in a data-free domain-incremental setting. KAN-CFD is structured around a Domain-Group KAN Detector (DG-KD) and a feature separation module (FS-KDCP) that together maintain detection accuracy across sequentially encountered, distribution-shifting face forgery tasks [2508.03189].

## 1. Architectural Foundations: Kolmogorov-Arnold Networks and Domain-Group KAN Detector

KANs employ locally plastic spline-based activations, defined as
$$
\varphi(x) = \sum_{i=1}^K a_i B_i(x)
$$
where $B_i(x)$ are (e.g.) cubic B-spline or RBF bases, and $a_i$ are learnable coefficients. The key property—locality—implies that updates to $a_i$ alter only a confined region of $\varphi$'s domain.

For high-dimensional image feature spaces, KAN-CFD replaces splines with Gaussian RBFs:
$$
\varphi_{ij}(x_j) = \exp\left(-\frac{(x_j-c_{ij})^2}{2\sigma_{ij}^2}\right)
$$
To efficiently map $d_{in}$-dimensional features to $d_{out}$ outputs, input dimensions are grouped (group size $d_g \approx d_{in}/g$), with all $\varphi_{ij}$ in a group sharing a center $c_u$ and bandwidth $\sigma_u$.

The DG-KD layer for task $t$ operates as
$$
\text{DG-Layer}_t(x) = W \cdot [\varphi_{1,t}(x), ..., \varphi_{g,t}(x)]^T
$$
with $W \in \mathbb{R}^{d_{out} \times d_{in}}$ fixed and only the group-specific RBF parameters $(c_{u,t},\sigma_{u,t})$ trained per task. After $T$ tasks, each dimension group’s activation is a local sum:
$$
\Phi_u(x) = \sum_{k=1}^T a_{u,k} \varphi_{u,k}(x)
$$
yielding global output
$$
\text{DG-KD}(x) = W [\Phi_1(x), ..., \Phi_g(x)]^T
$$
This achieves both “locality” (minimal interference) and “local plasticity” (capacity for adaptation).

## 2. Feature Separation and Drift Compensation: FS-KDCP

Performance on earlier forgery domains typically declines when training on new domains due to feature-space drift—semantic shifts in extracted features from the backbone. KAN-CFD employs FS-KDCP to address both overlap and drift in feature space without storing raw images.

This is accomplished via:
- **SUR Selection:** For each completed task $t-1$, a sample of 500 representative $d$-dimensional features is stored: $F_{t-1 \to t-1} = \text{SUR}(f_\theta^{t-1}(X_{t-1}))$.
- **KAN Projection:** A projection $p_\text{KAN}^t$ (one DG-Layer) aligns old backbone features to the new task space by minimizing
  $$
  \mathcal{L}_\text{Align} = \frac{1}{N}\sum_{i=1}^N \|p_\text{KAN}^t(f_\theta^{t-1}(x_i)) - f_\theta^t(x_i)\|^2
  $$
  yielding $f_{t-1 \to t} = p_\text{KAN}^t(F_{t-1 \to t-1})$.
- **Contrastive Separation:** After projection, features are further separated into non-overlapping clusters through supervised contrastive loss:
  $$
  \mathcal{L}_\text{SC} = -\frac{1}{N} \sum_{i=1}^N \log \frac{\exp(f_i \cdot f_j/\tau)}{\sum_{k: d_k \ne d_i} \exp(f_i \cdot f_k/\tau)}
  $$
  Old and new task features (each annotated with domain/class labels) are pushed apart in feature space; this simulates a convex projection without explicit computation.

## 3. Unified Loss Function and Optimization

KAN-CFD trains all modules end-to-end with a composite objective:
$$
\mathcal{L}_\text{Overall} = \mathcal{L}_\text{CLS} + \lambda_1 \mathcal{L}_\text{SC} + \lambda_2 \mathcal{L}_\text{KD}
$$
where
- $\mathcal{L}_\text{CLS}$: standard binary cross-entropy for classification
- $\mathcal{L}_\text{SC}$: supervised contrastive separation (with $\lambda_1=2$)
- $\mathcal{L}_\text{KD}$: feature-level distillation to regularize the backbone, defined as
  $$
  \mathcal{L}_\text{KD} = \frac{1}{N} \sum \|f_\theta^{t-1}(x_i) - f_\theta^t(x_i)\|^2
  $$
  with $\lambda_2=1$.

The projection $p_\text{KAN}^t$ is specifically trained with $\mathcal{L}_\text{Align}$. DG-KD requires no additional regularization due to the intrinsic locality of its RBF structure.

## 4. Data-Free Continual Learning Protocol

KAN-CFD is strictly data-free in that it refrains from storing or replaying raw images. Instead, it operates as follows:
- After each task, a “feature memory” of 500 vectors (obtained via SUR) captures salient characteristics of that task’s domains.
- Upon encountering a new task, these features are mapped through $p_\text{KAN}^t$ to synchronize with the updated backbone, then augmented by Gaussian noise to approximate the prior distribution.
- The augmented and separated features are treated as “pseudo-replay” samples and included alongside new-task features during DG-KD training, ensuring each DG-Layer only covers its task domain’s region in input space.

This strategy prevents catastrophic forgetting even when explicit data replay is infeasible.

## 5. Experimental Protocols and Empirical Outcomes

KAN-CFD has been evaluated on multiple challenging benchmarks and task protocols:
- **Datasets:** FF++ (Deepfakes, Face2Face, FaceSwap, NeuralTextures), DFD, DFDC-P, and Celeb-DF v2.
- **Protocols:** 
  - Dataset-Incremental: Each dataset forms a stage ([FF++, DFDC-P, DFD, CDF2]).
  - Forgery-Type-Incremental: Task sequence based on forgery type (e.g., Face-Reenactment, Face-Swap).
  - Long-sequence: 10 tasks sampled from DF40.

**Metrics:**
- Accuracy (Acc %) or Area Under Curve (AUC %) per task post-training.
- Average Forgetting (AF): $\text{AF} = \frac{1}{T}\sum_{i} (\text{Score}^{\text{first}}_i - \text{Score}^{\text{last}}_i)$.

### Key Results

| Method          | Dataset-Incremental Avg Acc ↑ | AF ↓ | Forgery-Type Avg AUC ↑ | AF ↓  |
|-----------------|------------------------------|------|------------------------|-------|
| CoReD           | 81.22                        |11.42 |          –             |   –   |
| DFIL            | 85.49                        | 7.01 |          –             |   –   |
| SUR-LID         | 91.11                        | 4.39 |        94.33           | 2.99  |
| KAN-CFD         | **91.64**                    |**4.08**|   **94.40**           |**2.60**|

In long-sequence evaluation, KAN-CFD reports average accuracy $\sim85\%$ and the lowest AF across all compared methods.

Ablations reveal:
- The full system (all loss terms, feature separation + KDCP) yields AF ≈ 4.1%.
- Feature separation without KDCP leads to significantly higher forgetting (AF≈16.04%), underscoring the importance of drift compensation.
- MLPs with global activations show higher AF (28.3%), compared to DG-KD (4.1%), supporting the advantage of localized adaptation.

UMAP visualizations demonstrate that only with full FS-KDCP are task-specific feature clusters both separable and stable across task increments.

## 6. Context, Limitations, and Interpretive Notes

KAN-CFD’s modular combination of localized functional adaptation (via DG-KD) and explicit separation of evolving feature domains (via FS-KDCP) provides state-of-the-art results in sequential face forgery detection while bypassing the need for raw data replay. This design specifically addresses two critical issues with KANs in high-dimensional, non-stationary settings: difficulty modeling images with splines and repeated overlap/collapse of feature mappings in continual learning scenarios. The empirical comparison against prior methods such as CoReD, DFIL, SUR-LID, and KAC highlights marked improvements in both accuracy and forgetting rates [2508.03189].

A plausible implication is that the general structure—local activation functions and data-free drift compensation—can be adapted to other domain-incremental visual tasks, though the number of stored memory vectors and choice of backbone architecture may constrain scalability in more finegrained or open-set problems.

## 7. Summary Table: Module Functions

| Module    | Core Mechanism                                | Continual Learning Contribution                |
|-----------|----------------------------------------------|-----------------------------------------------|
| DG-KD     | Domain-wise local RBF activations & grouping | Limits interference via “local plasticity”    |
| FS-KDCP   | KAN projection + contrastive separation      | Maintains domain separation and compensates   |
|           |                                              | for backbone feature drift                    |

KAN-CFD establishes a paradigm for efficient, data-free continual learning in adversarial image domains, leveraging the unique properties of KANs—locality and plasticity—in conjunction with minimal, memory-based replay and feature space manipulation to suppress catastrophic forgetting and sustain high detection fidelity across evolving face forgery datasets [2508.03189].

Source: https://www.emergentmind.com/topics/kan-based-continual-face-forgery-detection-kan-cfd