Abstract
Image hashing is a critical technology for content identification and copyright protection, requiring a delicate balance between discrimination (distinguishing between different images) and robustness (recognizing the same image under distortion). This paper introduces CMAA (Contrastive Masked Autoencoder with weak-strong augmentation Alignment), a novel framework that leverages masked vision transformers and a unique alignment strategy. By aligning the feature distributions of heavily distorted "strong attacks" with those of lightly distorted "weak attacks," CMAA enables the model to inherit clear identity features while resisting severe structural degradation. Experimental results on standard benchmarks demonstrate that CMAA achieves near-perfect identification performance ($F_1$ score $\approx$ 1.0) and superior resilience against complex hybrid digital attacks.
Introduction
Image hashing generates a short, unique digital fingerprint based on an image's content. Unlike watermarking, it does not modify the source data. The core challenge in this field is the "tug-of-war" between discrimination and robustness. Existing deep learning methods often struggle with hybrid attacks—combinations of multiple distortions like rotation, noise, and compression. Training directly on these complex attacks often fails because the distortions destroy the image's underlying semantic structure, leading to misclassification.
The CMAA Framework
The authors propose the CMAA framework to bridge the gap between robustness and discrimination using a multi-faceted approach:
- Weak-Strong Augmentation Alignment (WSA): Rather than treating heavily distorted images as simple positive samples, CMAA uses a distribution divergence loss ($L_D$) to align the features of a "strong attack" with a "weak attack." This allows the model to maintain the clear identity of the weak attack while learning to be invariant to the heavy distortion of the strong attack.
- Masked Vision Transformer (ViT): The architecture incorporates a Masked Autoencoder (MAE). By masking 30% of image patches during training and requiring the model to reconstruct them ($L_R$), the encoder learns to prioritize global structures over local pixel noise.
- End-to-End Quantization: To minimize information loss during the conversion of neural features into binary hashes, CMAA includes a parameter-free quantization layer and a specific loss ($L_Q$). It utilizes a "Straight Through Estimator" to allow gradient flow through the non-differentiable binarization step.
Experimental Evaluation and Results
CMAA was trained on a subset of the COCO 2017 dataset and evaluated on industry-standard benchmarks including CASIA, Copydays, and UCID. The model demonstrated state-of-the-art performance across several key metrics:
- Near-Perfect Identification: On the CASIA and Copydays datasets, CMAA achieved average $F_1$ scores of 0.9946 and 0.9982, respectively.
- Superior Robustness: In terms of Normalized Hamming Distance (NHD), where lower values indicate better robustness, CMAA scored 0.0987, significantly outperforming competitors like ProtoHash (0.1104) and ISM (0.2528).
- Resilience to Hybrid Attacks: CMAA excelled at rotation and multi-distortion attacks (e.g., Rotation + Saturation + Shear) where previous methods typically failed.
Conclusion
CMAA represents a significant advancement in robust image hashing by integrating masked autoencoding with a distribution alignment strategy. By focusing on semantic global structures and aligning strong distortions with weaker, clearer targets, the framework achieves unprecedented accuracy and robustness. Future work may involve fine-tuning the weights of the joint objective function and exploring different Vision Transformer backbones to further enhance semantic feature extraction.
Summary updated