Images as Tables: In-Context Learning with TabPFN for Low-Data Detection of AI-Generated Images
Title: Leveraging TabPFN for In-Context Learning in Low-Data AI Image Detection via Image-to-Table Representation
Abstract
Detecting AI-generated images presents a dynamic challenge: models trained on specific generators typically struggle when confronted with new ones, particularly when only a limited number of labeled examples are accessible. This study explores a streamlined image-to-table approach tailored for such data-scarce scenarios. In this framework, images are processed using a frozen DINOv3 backbone to extract features, which are then condensed into a structured 500-dimensional row via Principal Component Analysis (PCA). Instead of relying on task-specific classifier training, TabPFN conducts real-versus-fake classification through in-context tabular inference. This methodology reframes fake-image detection as a low-data structured prediction task over learned visual features, allowing detector adaptation to rely on the labeled context set rather than gradient-based fine-tuning.
Evaluation on the GenImage dataset reveals that while LATTE, a recent state-of-the-art detector, maintains a 7.4% advantage in the largest pooled setting when abundant labeled samples from all generators are present, the DINOv3-PCA-TabPFN model excels in the practically critical low-data regime. It surpasses LATTE by up to 8.2% in this context and demonstrates superior performance in transfer settings, where the detector must generalize from one generator to another. These findings highlight tabular foundation models as a robust complementary adaptation mechanism for image forensics, effectively shifting the adaptation process from detector retraining to lightweight in-context updates utilizing a small set of labeled examples.
Code URL: https://github.com/jpwalter30/Towards-Generalizable-Detection-of-AI-Generated-Images
Source: arXiv Generated at: 2026-06-02 00:00:00 UTC





