Diffusion models are known for generating high-quality images, causing serious security concerns. To combat this, most efforts rely on deep neural networks (e.g., CNNs and Transformers), while largely overlooking the potential of traditional machine learning models. In this paper, we freshly investigate such alternatives and proposes a novel Dynamic Assembly Forest model (DAF) to detect diffusion-generated images. Built upon the deep forest paradigm, DAF addresses the inherent limitations in feature learning and scalable training, making it an effective diffusion-generated image detector. Compared to existing DNN-based methods, DAF has significantly fewer parameters, much lower computational cost, and can be deployed without GPUs, while achieving competitive performance under standard evaluation protocols. These results highlight the strong potential of the proposed method as a practical substitute for heavyweight DNN models in resource-constrained scenarios. Our code and models are available at https://github.com/OUC-VAS/DAF.
Figures & tables
Figure 1: The overview of our proposed DAF model.
Figure 2: The detailed explanation of our proposed dynamic assembly strategy.
Figure 3: The detailed process of Task-specific Feature Extraction. (a) The input image is first divided into multiple patches. In each patch, we use HOG to extract spatial features. We also extract the frequency features of each patch and combine these two types of features together. (b) We employ sliding windows on batches to obtain multi-scale features.
Eval set ↓
Train set →
LSUN-B ( ADM )
Imagenet ( ADM )
Detector →
CNNDet
AERO-
DIRE
Fake-
FIRE
DAF
CNNDet
AERO-
DIRE
Fake-
FIRE
DAF
BLADE
Inversion
(Ours)
BLADE
Inversion
(Ours)
Imagenet
ADM
73.4/57.6
99.1/98.3
99.4/96.4
100.0/99.8
100.0/100.0
96.5/99.9
99.6/99.3
100.0/100.0
100.0/100.0
100.0/100.0
100.0/100.0
99.5/100.0
SD‑v1
67.3/53.4
98.7/97.4
98.3/95.2
99.7/97.6
100.0/100.0
94.7/98.9
87.2/84.7
99.7/98.3
100.0/99.6
100.0/100.0
100.0/100.0
91.6/99.6
LSUN‑B
ADM
96.8/93.7
100.0/100.0
100.0/100.0
100.0/100.0
100.0/100.0
99.9/100.0
76.0/54.2
98.4/97.5
100.0/99.7
100.0/100.0
100.0/100.0
99.6/100.0
DDPM
75.3/55.1
98.9/97.8
100.0/100.0
100.0/100.0
100.0/99.8
99.9/100.0
68.4/45.1
99.1/98.2
100.0/97.7
100.0/100.0
100.0/100.0
99.7/100.0
Table 1: Detection performance of different methods (ACC%/AUC%).
Detector
Acc.(%)
CNNDet
60.11
FreDect
56.86
Fusing
57.07
GramNet
60.95
LNP
55.63
UniFD
55.62
Table 2: Detection performance of different methods on Chameleon dataset (ACC%).
Eval set ↓
Train set →
LSUN-B ( ADM )
Imagenet ( ADM )
Detector →
Forensics
DAF
Forensics
DAF
Forest
(Ours)
Forest
(Ours)
Imagenet
ADM
87.5/98.2
90.2/97.9
97.3/99.7
97.8/99.9
SD‑v1
84.5/91.6
89.6/94.0
86.3/96.2
79.7/98.3
LSUN‑B
ADM
92.0/99.0
98.0/100.0
94.0/98.1
97.5/99.9
DDPM
91.0/98.6
98.9/99.9
94.4/98.3
97.2/99.9
Table 3: Comparison results of our method and ForensicsForest on a fair set (ACC%/AUC%).
Eval set ↓
Train set →
LSUN-B ( ADM )
Imagenet ( ADM )
Detector →
Single
Multi (Recalc.)
Multi (Avg.)
Single
Multi (Recalc.)
Multi (Avg.)
Imagenet
ADM
96.3/99.7
94.7/99.9
96.5/99.9
98.1/100.0
99.7/100.0
99.5/100.0
SD‑v1
93.7/98.6
94.3/98.6
94.7/98.9
90.1/98.5
84.7/99.3
91.6/99.6
LSUN‑B
ADM
99.8/99.9
99.9/100.0
99.9/100.0
99.5/99.9
98.3/100.0
99.6/100.0
DDPM
99.7/99.9
99.8/100.0
99.9/100.0
99.5/99.9
98.9/100.0
99.7/100.0
IDDPM
99.9/100.0
99.9/100.0
100.0/100.0
99.7/100.0
99.1/100.0
99.9/100.0
Table 4: Effect of multi-scale features.
Figure 4: Effect of the number of image patch partitions.
Figure 5: The effect of different p values on ACC (%) on ImageNet and LSUN-B datasets with three settings: Single, Multi (Recalc.), Multi (Avg.).
Figure 6: The visualization results trained on the LSUN-B dataset and tested on DALLE-2 and SD-v2 of the LSUN-B dataset.
Figure 7: The visualization results trained on the Imagenet dataset and tested on DALLE-2 and SD-v2 of the LSUN-B dataset.
Figure 8: Robustness under various perturbations, including Gaussian blur (top) and JPEG compression (bottom).
Eval set ↓
Train set →
LSUN-B ( ADM )
Imagenet ( ADM )
Detector →
w.
wo.
w.
wo.
Imagenet
ADM
94.2
96.5
99.5
99.5
SD‑v1
94.1
94.7
90.9
91.6
LSUN‑B
ADM
99.8
99.9
99.5
99.6
DDPM
99.7
99.9
99.9
99.7
IDDPM
99.8
100.0
100.0
99.9
Table 5: Discussion: ACC (%) performance of our method with( w. ) or without( wo. ) on-the-fly data augmentation.
Eval set ↓
Train set →
LSUN-B ( ADM )
Imagenet ( ADM )
Detector →
w.
wo.
w.
wo.
Imagenet
ADM
54.7
96.5
99.9
99.5
SD‑v1
40.3
94.7
98.3
91.6
LSUN‑B
ADM
100.0
99.9
50.0
99.6
DDPM
99.9
99.9
56.6
99.7
IDDPM
100.0
100.0
50.0
99.9
Table 6: Discussion: ACC (%) performance of our method with( w. ) or without( wo. ) ResNet18 feature extraction.