Abstract
Deep Image Manipulation Localization (IML) models suffer from training data insufficiency and thus heavily rely on pre-training. We argue that contrastive learning is more suitable to tackle the data insufficiency problem for IML. Crafting mutually exclusive positives and negatives is the prerequisite for contrastive learning. However, when adopting contrastive learning in IML, we encounter three categories of image patches: tampered, authentic, and contour patches. Tampered and authentic patches are naturally mutually exclusive, but contour patches containing both tampered and authentic pixels are non-mutually exclusive to them. Simply abnegating these contour patches results in a drastic performance loss since contour patches are decisive to the learning outcomes. Hence, we propose the Nonmutually exclusive Contrastive Learning (NCL) framework to rescue conventional contrastive learning from the above dilemma. In NCL, to cope with the non-mutually exclusivity, we first establish a pivot structure with dual branches to constantly switch the role of contour patches between positives and negatives while training. Then, we devise a pivot-consistent loss to avoid spatial corruption caused by the role-switching process. In this manner, NCL both inherits the self-supervised merits to address the data insufficiency and retains a high manipulation localization accuracy. Extensive experiments verify that our NCL achieves state-of-the-art performance on all five benchmarks without any pre-training and is more robust on unseen real-life samples.
Introduction
Image Manipulation Localization (IML) aims to identify altered pixels in images, such as those from splicing or copy-move operations. A significant challenge in this field is the scarcity of high-quality, human-annotated data. Pixel-perfect labeling is expensive, leading researchers to rely on massive synthetic datasets for pre-training. However, synthetic data often fails to capture the nuances of real-world tampering.
Contrastive Learning (CL) offers a path toward learning from limited data, but its application in IML is hindered by "contour patches"—regions on the boundary of a manipulation that contain both tampered and authentic pixels. Standard CL requires strict mutual exclusivity between positive and negative samples, making these informative boundary regions difficult to categorize.
The NCL Framework
To address the data insufficiency and the ambiguity of boundary regions, the authors propose the Non-mutually exclusive Contrastive Learning (NCL) framework. The core innovation lies in how the model handles different categories of image patches.
As shown in Figure 1, patches are categorized into three groups. While tampered and authentic patches are mutually exclusive, contour patches are not. NCL utilizes two key components to integrate these patches:
- Pivot Structure: A dual-branch network that allows contour patches to act as "pivots." A contour patch can serve as a hard positive when compared to authentic patches and a hard negative when compared to tampered patches. This "role-switching" mechanism enables the model to learn from the most informative regions of the image without violating the principles of contrastive learning.
- Pivot-Consistent (PC) Loss: To prevent the role-switching process from disrupting spatial context, a PC loss is applied. This ensures that the decoder maintains pixel-wise accuracy and correct spatial relationships during upsampling.
Experimental Results
The NCL framework was evaluated on five major benchmarks: CASIA, NIST16, Columbia, Coverage, and Defacto. Notably, the model was trained from scratch on these datasets without any large-scale synthetic pre-training.
As detailed in Figure 5, NCL achieves state-of-the-art (SOTA) performance. On the NIST16 dataset, it reached an F1 score of 83.1%, outperforming established models like ManTra-Net and MVSS-Net++ that rely on extensive pre-training. Furthermore, NCL demonstrated superior generalizability in cross-dataset tests and maintained robustness against common image attacks such as JPEG compression and Gaussian noise.
Conclusion
The NCL framework demonstrates that smarter learning objectives can overcome the need for massive synthetic datasets in IML. By treating contour patches as non-mutually exclusive "pivots," the model effectively utilizes the most difficult and informative samples. This approach not only achieves SOTA accuracy but also improves robustness and data efficiency, requiring only a fraction of the training data used by traditional pre-training methods.
Summary updated