SAGE: Semantic-Anchor-Guided Embedding for Generalized AI-Generated Image Detection

Seongho Kim, Jaehyun Choi, Dahye Kim, Sungwon Yi, Jang-Ho ChoiNeurIPS 2026

TL;DR

Modern AI-image detectors rely heavily on vision-language models like CLIP, which unfortunately tangle up what is in an image (semantics) with how it was made (forensic traces). SAGE disentangles the two by subtracting out semantic meaning during training, leaving behind pure generation artifacts. Combined with a multi-center classifier that accounts for the quirks of different image generators, SAGE reliably spots fakes from unseen AI models without needing text captions at test time.

What Problem Does This Paper Address?

Spotting AI-generated images is a game of cat and mouse. A detector trained on Midjourney might completely fail when confronted with DALL·E 3 or FLUX. Recently, researchers discovered that features from large pretrained models like CLIP generalize surprisingly well to unseen generators.

However, there is a hidden trap. CLIP was trained to understand meaning. In CLIP’s feature space, a real photo of a bear and an AI-generated peacock sit right next to each other simply because they are both animals.

CLIP image features cluster heavily by semantic content (like animals, vehicles, or food) rather than whether the image is real or fake.

Because semantics dominate the neighborhood geometry, detectors built on CLIP can accidentally learn "semantic shortcuts"—associating specific subjects or prompt styles in the training data with being fake, rather than finding true forensic traces. Furthermore, standard binary classifiers try to squeeze all "real" images into one bucket and all "fake" images into another, ignoring the reality that different cameras and different AI architectures leave vastly different fingerprints.

Methods

To strip away semantics and focus on forensic cues, the authors propose SAGE (Semantic-Anchor-Guided Embedding), which introduces a clever two-path training architecture alongside a more flexible classifier.

Figure 2: Framework overview of SAGE. During training, the paired text path forms caption-guided residuals using paired CLIP text embeddings, while the semantic anchor path learns a caption-free decomposition using a learnable surrogate anchor. At inference time, only the anchor path is used, enabling real/fake authentication without captions. L2 normalization is applied to each residual before projection and to each projected output.
  • Residual Decomposition & Decorrelation (Novel Application): Using a frozen CLIP backbone, the paired path takes an image embedding and subtracts its ground-truth text caption embedding. This residual acts as a starting point with less semantic baggage. A learnable projection module then refines this residual, aided by a statistical independence penalty (HSIC-based decorrelation loss) that forces the final visual features to have near-zero correlation with the text embeddings.
  • The Semantic Anchor (Novel): In the real world, suspicious images on the internet don't come with helpful ground-truth captions. To enable caption-free testing, SAGE trains a parallel anchor path. Instead of subtracting a text embedding, it subtracts a single learnable vector called a semantic anchor. Consistency losses force this anchor path to mimic both the individual features and the overall real-vs-fake separation direction of the caption-guided path. At test time, the caption path is discarded, and only the anchor path is used.
  • Sub-Center Authentication (Adapted from Metric Learning): Instead of a standard binary classifier, SAGE adopts a SoftTriple loss. It assigns multiple learnable "sub-center" proxies to both the Real and Fake classes, allowing the feature space to naturally cluster diverse camera sources and varied generator artifacts without forcing them into a single rigid prototype.
Figure 3: Conceptual illustration of SoftTriple loss for the authenti- cation task. Each real/fake class is represented by multiple learnable sub-center proxies rather than a sin- gle class prototype.

Datasets

  • Training (Newly Constructed): Previous datasets matched semantics by generating new images from text prompts, which still leaves massive visual variation between the real and fake pairs. Instead, the authors take real images and captions from COCO and pass the images directly through SDXL to reconstruct them. This creates tight triplets (real image, fake reconstruction, shared caption) depicting the exact same scene.
  • Evaluation: The main cross-generator benchmark is CommunityForensics, testing generalization across 13 unseen commercial and open-source generators (including DALL·E 3, FLUX-dev, Adobe Firefly, Ideogram, Imagen3, and Midjourney V5.2). They also run evaluations and ablations on MS-COCOAI and WildRF (an in-the-wild dataset).

Key Insights and Ideas

  • Subtraction isn't enough; projection does the heavy lifting: Simply subtracting a text vector (or a global anchor) from an image vector doesn't magically erase semantics—mathematically, the anchor transformation is actually invertible. The authors show that the true reduction in semantic dependence happens after the learned projection module reshapes the residuals under the decorrelation penalty.
  • Less is more for sub-centers: When testing how many sub-centers ($K$) to give each class on MS-COCOAI, $K=2$ hit the sweet spot (jumping to 92.74% accuracy vs. 76.48% for standard binary cross-entropy). Pushing $K$ higher actually hurt performance by over-fragmenting the feature space. Interestingly, different unseen generators naturally gravitated toward different sub-centers, proving the model successfully captured distinct artifact modes.

Key Results

  • Superior Stability Across Generators: On the 13 unseen generators in CommunityForensics, SAGE achieved the highest average accuracy (84.9%), AUC (92.3%), and mAP (90.3%). More importantly, it drastically reduced wild performance swings: SAGE posted the lowest standard deviation across generators (5.1%, compared to 12.5%–16.6% for strong CLIP baselines) and the highest worst-case generator accuracy (71.7%).
  • Quantifiable Semantic Erasure: Using Centered Kernel Alignment (CKA) and distance correlation (dCor) to measure how much the image features depend on text captions, SAGE slashed CKA by 92.4% (from 0.672 in raw CLIP down to 0.051) and dCor by 63.7% (0.892 to 0.323).
  • Cleaner Feature Geometry: UMAP visualizations confirm that while recent baselines like Effort and VIBNet still exhibit overlapping regions of real and fake images, SAGE carves out a clean, well-separated boundary between authentic and synthetic samples.

Limitations and Future Work

The authors candidly note that reducing measured correlation with captions does not guarantee 100% semantic independence. Because SAGE relies on a frozen CLIP backbone, a single global anchor, and SDXL reconstructions for training, subtle dataset and representation biases can still sneak through. Additionally, SAGE saw lower performance on the WildRF dataset, highlighting that heavy, uncontrolled real-world post-processing (like social media compression and resizing) remains an open vulnerability. While explicit future work isn't mapped out, the authors emphasize deploying SAGE alongside provenance tools and human review rather than as a standalone, silver-bullet detector.

Summary updated

Abstract

AI-generated image detection has become an important problem in media forensics as modern generative models produce increasingly realistic images. Recent CLIP-based detectors show strong generalization ability, but CLIP image features entangle semantic content with forensic cues. Since semantic content is not an intrinsic generation trace, relying on it can introduce semantic shortcuts and unstable performance under unseen generator shifts. In this paper, we propose SAGE (Semantic-Anchor-Guided Embedding), a framework that learns authentication oriented representations with reduced dependence on caption-level semantics. SAGE constructs paired triplets of COCO images, SDXL-reconstructed images, and COCO captions so that real and fake images share the same semantics. It reduces dependence on caption-level semantics by learning from normalized image–text residuals with a projection module and a decorrelation objective. To enable caption-free inference, SAGE learns a semantic anchor that approximates the role of paired text embeddings at test time. In addition, SAGE adopts a SoftTriple-style sub-center classifier to model intra-class variation in real and fake images, yielding a more stable authentication geometry across diverse generators. Experiments on CommunityForensics demonstrate that SAGE achieves competitive detection performance while substantially reducing generator-wise performance variation. Further analyses show that SAGE effectively reduces semantic dependence and forms a clearer real/fake feature geometry than strong baselines.
BibTeX
@inproceedings{kim2026sage,
  author = {Seongho Kim and Jaehyun Choi and Dahye Kim and Sungwon Yi and Jang-Ho Choi},
  title = {{SAGE: Semantic-Anchor-Guided Embedding for Generalized AI-Generated Image Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=sCLdMcBvzN},
}
Figure