Structural and Statistical Artefacts in AI-images for Deepfake Detection
2026 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesis
Abstract [en]
The rapid development of artificial intelligence has led to the creation of highly realistic synthetic images, making it increasingly difficult to distinguish between real and AI-generated content. This study investigates whether structural and statistical artefacts in images can be used to classify AI-generated images using machine learning methods. We evaluate three feature extraction methods: Discrete Cosine Transform (DCT), fourier-based frequency analysis, and gradient-based local directional analysis. These features are used to train and compare traditional machine learning models, specifically Random Forest and eXtreme Gradient Boosting (XGBoost), as well as a deep learning approach based on a ResNet50V2 convolutional neural network. All experiments are conducted on a balanced subset of the OpenFake dataset, consisting of 100,000 images from multiple generative models as well as real photographs. The results show that these three feature-based methods can distinguish between real and synthetic images significantly better than random chance. Among the individual feature sets, gradient-based feature calculations achieve the highest performance, while fourier-based features perform the weakest. A combination of these three feature domains leads to improved classification performance, with XGBoost achieving up to 90% accuracy and a ROC-AUC value of 0.96. Meanwhile, the convolutional neural network reaches 79% accuracy, which is lower than the best results from engineered features. In conclusion, the findings suggest that AI-generated images contain detectable statistical and structural artefacts that can be leveraged for classification. The study highlights the importance of machine learning methods to achieve robust detection of synthetic image content.
Abstract [sv]
Den snabba utvecklingen av artificiell intelligens har lett till skapandet av mycket realistiska syntetiska bilder, vilket gör det allt svårare att skilja mellan verkligt och AI-genererat innehåll. Denna studie undersöker om strukturella och statistiska artefakter i bilder kan användas för att klassificera AI-genererade bilder med hjälp av maskininlärningsmetoder. Vi utvärderar tre metoder för extraktion av variabler: diskret cosinustransform (DCT), fourierbaserad frekvensanalys samt gradientbaserad lokal riktningsanalys. Dessa variabler används för att träna och jämföra traditionella maskininlärningsmodeller, specifikt Random Forest och eXtreme Gradient Boosting (XGBoost), samt en djupinlärningsmetod baserad på ett konvolutionellt neuralt nätverk av typen ResNet50V2. Samtliga experiment genomförs på en balanserad delmängd av OpenFake-datasetet bestående av 100 000 bilder från flera generativa modeller samt verkliga fotografier. Resultaten visar att dessa tre variabelbaserade metoder kan särskilja verkliga och syntetiska bilder betydligt bättre än slumpen. Bland de enskilda variabelseten uppnår gradientbaserade variabelberäkningar högst prestanda, medan fourierbaserade variabler presterar svagast. En kombination av dessa tre variabeldomäner leder till förbättrad klassificeringsförmåga, där XGBoost uppnår upp till 90% noggrannhet och ett ROC-AUC-värde på 0,96. Samtidigt når det konvolutionella neurala nätverket 79% noggrannhet, vilket är lägre än de bästa resultaten från handkonstruerade variabler. Sammanfattningsvis tyder resultaten på att AI-genererade bilder innehåller detekterbara statistiska och strukturella artefakter som kan utnyttjas för klassificering. Studien belyser vikten av maskininlärningsmetoder för att uppnå robust detektion av syntetiskt bildinnehåll.
Place, publisher, year, edition, pages
2026. , p. 31
Series
TRITA-EECS-EX ; 2026:398
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-391265OAI: oai:DiVA.org:kth-391265DiVA, id: diva2:2112304
Subject / course
Media Technology
Educational program
Master of Science in Engineering - Media Technology
Supervisors
Examiners
2026-11-032026-10-222026-11-03Bibliographically approved