NeurIPS 2024poster0 citations

CLIP in Mirror: Disentangling text from visual images through reflection

Tiancheng Wang, Yuguang Yang, Linlin Yang, Shaohui Lin, Juan Zhang, Guodong Guo, Baochang Zhang

Abstract

The CLIP network excels in various tasks, but struggles with text-visual images i.e., images that contain both text and visual objects; it risks confusing textual and visual representations. To address this issue, we propose MirrorCLIP, a zero-shot framework, which disentangles the image features of CLIP by exploiting the difference in the mirror effect between visual objects and text in the images. Specifically, MirrorCLIP takes both original and flipped images as inputs, comparing their features dimension-wise in the latent space to generate disentangling masks. With disentangling masks, we further design filters to separate textual and visual factors more precisely, and then get disentangled representations. Qualitative experiments using stable diffusion models and class activation mapping (CAM) validate the effectiveness of our disentanglement. Moreover, our proposed MirrorCLIP reduces confusion when encountering text-visual images and achieves a substantial improvement on typographic defense, further demonstrating its superior ability of disentanglement. Our code is available at https://github.com/tcwangbuaa/MirrorCLIP

Disentanglement of CLIPFlip invarianceTypographic attackText recognition
BibTeX
@inproceedings{
wang2024clip,
title={{CLIP} in Mirror: Disentangling text from visual images through reflection},
author={Tiancheng Wang and Yuguang Yang and Linlin Yang and Shaohui Lin and Juan Zhang and Guodong Guo and Baochang Zhang},
booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
year={2024},
url={https://openreview.net/forum?id=FYm8coxdiR}
}
CLIP in Mirror: Disentangling text from visual images through reflection · NeurIPS 2024