Table of Contents
Fetching ...

Attention to Detail: Global-Local Attention for High-Resolution AI-Generated Image Detection

Lawrence Han

TL;DR

The paper tackles the challenge of detecting AI-generated images at high resolutions, where downsampling can erase subtle artifacts. It introduces GLASS, a global-local attention framework that combines a globally resized view with strategically sampled original-resolution local crops, aggregated via a trainable attention mechanism. The approach is validated across three backbones—ViT-Base/16, ConvNeXt-Tiny, and ResNet-50—showing consistent performance gains over standard transfer learning, albeit with higher calibration error. GLASS demonstrates a scalable, multi-scale detection strategy with practical efficiency, and its core ideas could extend to other tasks requiring integrated global and local information.

Abstract

The rapid development of generative AI has made AI-generated images increasingly realistic and high-resolution. Most AI-generated image detection architectures typically downsample images before inputting them into models, risking the loss of fine-grained details. This paper presents GLASS (Global-Local Attention with Stratified Sampling), an architecture that combines a globally resized view with multiple randomly sampled local crops. These crops are original-resolution regions efficiently selected through spatially stratified sampling and aggregated using attention-based scoring. GLASS can be integrated into vision models to leverage both global and local information in images of any size. Vision Transformer, ResNet, and ConvNeXt models are used as backbones, and experiments show that GLASS outperforms standard transfer learning by achieving higher predictive performance within feasible computational constraints.

Attention to Detail: Global-Local Attention for High-Resolution AI-Generated Image Detection

TL;DR

The paper tackles the challenge of detecting AI-generated images at high resolutions, where downsampling can erase subtle artifacts. It introduces GLASS, a global-local attention framework that combines a globally resized view with strategically sampled original-resolution local crops, aggregated via a trainable attention mechanism. The approach is validated across three backbones—ViT-Base/16, ConvNeXt-Tiny, and ResNet-50—showing consistent performance gains over standard transfer learning, albeit with higher calibration error. GLASS demonstrates a scalable, multi-scale detection strategy with practical efficiency, and its core ideas could extend to other tasks requiring integrated global and local information.

Abstract

The rapid development of generative AI has made AI-generated images increasingly realistic and high-resolution. Most AI-generated image detection architectures typically downsample images before inputting them into models, risking the loss of fine-grained details. This paper presents GLASS (Global-Local Attention with Stratified Sampling), an architecture that combines a globally resized view with multiple randomly sampled local crops. These crops are original-resolution regions efficiently selected through spatially stratified sampling and aggregated using attention-based scoring. GLASS can be integrated into vision models to leverage both global and local information in images of any size. Vision Transformer, ResNet, and ConvNeXt models are used as backbones, and experiments show that GLASS outperforms standard transfer learning by achieving higher predictive performance within feasible computational constraints.
Paper Structure (25 sections, 8 equations, 7 figures, 9 tables)

This paper contains 25 sections, 8 equations, 7 figures, 9 tables.

Figures (7)

  • Figure 1: Pixel-level comparison of ChatGPT-5 generated image and real image before and after resizing. Fine details are lost after resizing.
  • Figure 2: GLASS architecture diagram.
  • Figure 3: Two cropping strategies of the local crop sampler. Pixel dimensions are shown below each image.
  • Figure 4: Effect of the number of crops on validation accuracy, memory, and training time. Solid lines represent results from GLASS-based models, while dotted line indicates results from standard transfer learning.
  • Figure 5: Weight distributions in the linear layer of the classifier in the final GLASS-based models. Solid lines are Kernel Density Estimation curves. The GLASS-based ViT-Base/16 and ConvNeXt-Tiny models each contain $3{,}072$ weights in their final linear layer, while the GLASS ResNet-50 model contains $8{,}192$ weights.
  • ...and 2 more figures