arXiv:2610.18034cs.CVOct 2026

Manuscript Offprint

arXiv:2610.18034

COMPASS: Contextual Moment Prior Alignment for Generalizable AIGI Detection

Zhan Yang, Tiancheng Shen, Weijie Lyu, Shuo Chen, Bernard Ghanem, Yibo Yang, Ming-Hsuan Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Generalizable AI-generated image (AIGI) and deepfake detection remains challenging due to the asymmetry phenomenon, where adaptation to limited training distributions can degrade the transferable representations of Vision Foundation Models (VFMs). Recent subspace adaptation methods mitigate this issue by freezing high-magnitude principal components while adapting the residual subspace. However, such magnitude-based decomposition is data-agnostic and does not explicitly account for target-relevant semantics, potentially leading to semantic misalignment. We propose COMPASS (COntextual Moment Prior Alignment for Subspace Separation), a data-aware subspace adaptation framework that uses a small unlabeled Semantic Proxy Set to estimate target activation statistics. COMPASS incorporates activation covariance into the decomposition of pre-trained weights, preserving target-relevant representations as a stable semantic reference while the residual adapter learns forgery-related variations. The proxy calibration requires no gradient-based optimization. Extensive experiments demonstrate strong generalization across cross-dataset, cross-method, joint cross-dataset-method, and open-world cross-generator evaluations, achieving state-of-the-art performance on both Deepfake and AIGI detection benchmarks. Source code and trained models will be publicly released.

1 INTRODUCTION

Recent advances in generative AI (Goodfellow et al., 2020; Ho et al., 2020; Rombach et al., 2022a; Yan et al., 2025c; Chen et al., 2026; Shen et al., 2025) enable hyper-realistic synthesis, posing security risks such as deepfakes and visual disinformation (Korshunov & Marcel, 2018; Thies et al., 2016; Shoaib et al., 2023; Singh & Dhumane, 2025; Easttom, 2025). Consequently, robust AI-generated image (AIGI) detection is critical (Wang et al., 2020; Rossler et al., 2019; Yan et al., 2025b; Sarkar et al., 2025; Rathore et al., 2021; Fridrich et al., 2003; Kashyap et al., 2017). A key challenge is the asymmetry phenomenon: detectors overfit to limited forgery patterns and biases (Yan et al., 2025b), yielding entangled features that can hinder generalization to unseen manipulations.

To address this issue, recent works explore low-rank fine-tuning of Vision Foundation Models (VFMs) (Radford et al., 2021) via Orthogonal Subspace Decomposition (Wall et al., 2003). EFFORT (Yan et al., 2025b), a state-of-the-art SVD-based AIGI detector, emphasizes preserving pretrained VFM knowledge for generalization. It applies SVD to decompose the pre-trained weights into principal and residual components, freezing principal components with the largest magnitudes to retain core semantics, while fine-tuning residual components to capture forgery-specific patterns.

The motivation for preserving pre-trained semantics is not to use semantic content itself as a cue for real/fake classification. Rather, real and generated images typically share the same dominant semantic content, while forgery-specific signals appear as variations within this shared context. Preserving the principal semantic subspace therefore provides a stable reference for the residual adapter to learn forgery-related variations without unnecessarily altering the underlying content representation.

Figure

(a)

CLIP vs COMPASS ( ρ=0.5533\rho = 0.5533)

(b)

Figure 1: Pilot study on feature retention prior to fine-tuning. (a) PCA visualizations of intermediate features across 1K images. Magnitude-based truncation in EFFORT increasingly alters the original feature geometry in deeper layers, with the average cosine similarity to the original CLIP representation dropping to 0.26 in Layer 24, compared with 0.61 for COMPASS. (b) Pairwise similarity density plots using only the principal subspace ( WprinW_{prin}, before fine-tuning). Each point compares the cosine similarity of the same image pair in the original CLIP and principal-only spaces. COMPASS better preserves the relative similarity structure, achieving a higher Spearman rank correlation ( ρs=0.5533\rho_s = 0.5533) than EFFORT ( ρs=0.1345\rho_s = 0.1345). Since truncation and feature re-normalization may shift absolute cosine similarities, we focus on rank preservation rather than proximity to the diagonal; further analysis is provided in section A.1.

However, its magnitude-based implementation has an important limitation: it prioritizes components according to their contribution to global weight reconstruction. Although mathematically well-founded, this criterion is data-agnostic and does not explicitly account for task-specific semantics. In AIGI detection, substantial distribution shifts arise across dataset domains (e.g., faces or human bodies), manipulation types, and generative models. As a result, preserving high-magnitude components does not guarantee retention of information most relevant for robust forgery detection.

Our pilot analysis in fig. 1 illustrates this limitation. Using feature retention, a metric adopted by prior orthogonal adaptation methods (Yan et al., 2025b), we find that magnitude-based decomposition can substantially alter the pre-trained representation retained by the principal subspace. We refer to this mismatch between magnitude-based preservation and target-relevant information as semantic misalignment. The results further suggest that incorporating target-distribution activation statistics can mitigate this mismatch and improve the preservation of pre-trained representations.

Building on this observation, we introduce COMPASS (Contextual Moment Prior Alignment for Subspace Separation), a data-aware subspace adaptation framework that incorporates proxy activation statistics into subspace partitioning. Before fine-tuning, we sample a small unlabeled Semantic Proxy Set (e.g., ∼\sim80 images) from the target-category distribution and compute its activation covariance to guide the SVD of pre-trained weights. This lightweight, zero-backpropagation calibration biases the preserved subspace toward directions emphasized by the proxy activation distribution. The proxy samples are used only to estimate activation statistics for subspace calibration and do not participate in gradient-based optimization.

Notably, this proxy-guided calibration better preserves pre-trained representations than magnitude-based decomposition. Even when the Semantic Proxy Set is constructed from only one or two datasets within the target category, its activation statistics provide a useful estimate of target-relevant activation structure that remains effective across different data sources. By retaining these target-relevant pre-trained semantics more faithfully, COMPASS establishes a more stable reference for residual fine-tuning, allowing forgery-related variations to be learned with less interference from source-specific content biases. This improved preservation is consistent with the stronger generalization observed across dataset domains, manipulation types, and generative models.

We evaluate COMPASS under three challenging generalization settings tables 1 to 3, where it achieves state-of-the-art performance across (1) cross-dataset scenarios, (2) cross-method scenarios, (3) joint cross-dataset-method scenarios.

The main contributions of this work are:

• We identify an important limitation of magnitude-based orthogonal subspace decomposition for AIGI detection: its data-agnostic partitioning may fail to preserve task-relevant pre-trained information. Our pilot analyses show that incorporating proxy-guided calibration can mitigate this semantic misalignment and improve feature retention.

• We introduce COMPASS (COntextual Moment Prior Alignment for Subspace Separation), which leverages a small unlabeled Semantic Proxy Set to compute activation covariances and uses activation covariance to calibrate subspace preservation before fine-tuning. This lightweight, zero-backpropagation design enables data-aware preservation of pre-trained semantic representations.

• We demonstrate that COMPASS achieves state-of-the-art generalization across cross-dataset, cross-method, and joint cross-dataset-method evaluations. Our results support the use of a better-preserved semantic reference for residual forgery learning and show consistent improvements across diverse domains, manipulation types, and generative models.

References (58)