TUNI: A Textual Unimodal Detector for Identity Inference in CLIP Models

Songze Li, Ruoxi Cheng, Xiaojun Jia · DOI

Abstract

The widespread usage of large-scale multimodal models like CLIP has heightened concerns about the leakage of Personally Identifiable Information (PII). Existing methods for identity inference in CLIP models require querying the model with full PII, including textual descriptions and corresponding images. However, using images risks exposing personal information to target models if the image was not previously encountered. Additionally, previous Membership Inference Attacks (MIAs) often require training computationally expensive shadow models. To address these challenges, we propose TUNI (Textual Unimodal Detector), a novel technique for identity inference that only utilizes text data to query the target model and eliminates the need for shadow models. Extensive experiments demonstrate TUNI's superior performance over baselines across various CLIP architectures.

Introduction

Large-scale multimodal models like CLIP (Contrastive Language–Image Pre-training) are trained on billions of image-text pairs scraped from the web. These datasets often contain PII, such as the names and faces of private individuals. This raises a critical privacy question: can an adversary determine if a specific person's data was used to train a model?

Existing Membership Inference Attacks (MIAs) for identity inference suffer from two primary drawbacks. First, they typically require both a name and a real face photo to query the model. If the model has not seen that specific photo before, the attack itself inadvertently exposes the subject's visual PII to the model. Second, traditional MIAs rely on training "shadow models"—multiple replicas of the target model—to establish a behavioral baseline. For massive models like CLIP, this process is prohibitively expensive in terms of time and compute.

Methodology: The TUNI Framework

TUNI reframes identity inference as an anomaly detection problem rather than a standard classification task. This shift allows the detector to identify "members" (identities in the training set) by their deviation from a baseline of "non-members."

1. CLIP-guided Feature Extraction

Instead of relying on raw embeddings, TUNI uses the target CLIP model to "dream" an image associated with a specific name. Given a text input $t$ (a person's name), the algorithm iteratively optimizes a random initial image to maximize its cosine similarity with the text in CLIP’s shared embedding space. Two primary features are extracted from this process: the mean optimized cosine similarity ($S$) and the standard deviation of the resulting image embeddings ($D$). These serve as a unique "fingerprint" for the identity.

2. Training without Shadow Models

A key innovation of TUNI is the use of textual gibberish as a proxy for non-members. Since random strings (e.g., "D2;l-NOXRT") are guaranteed to be absent from the training set, they provide a perfect baseline. TUNI extracts features from these gibberish strings and trains a suite of anomaly detectors (such as Isolation Forest or AutoEncoders) on this data. This eliminates the need for real-world non-member data or expensive shadow models.

Overview of the TUNI framework, showing the feature extraction and anomaly detection voting system.

3. Inference and Voting

During inference, the features of a target name are fed into the trained anomaly detectors. If the detectors flag the features as "abnormal" compared to the gibberish baseline, the system concludes the identity was likely part of the training set. A voting system across multiple detection methods ensures robustness.

Key Insights and Results

The effectiveness of TUNI stems from a clear distribution gap in the feature space. As shown in the analysis of optimized embeddings, there is a distinct separation between identities the model has encountered (members) and those it hasn't. Members typically achieve significantly higher cosine similarity with their optimized images because the model has already reinforced that specific text-image association during its original training.

Feature distributions showing clear separation between samples in and out of the training set based on cosine similarity and embedding distance.

Performance Benchmarks

TUNI was evaluated across several CLIP architectures (ResNet-50, ViT-B/32) using datasets like LAION and FaceScrub. Key findings include:

  • Superior Accuracy: Despite using only text, TUNI achieved ~91.7% accuracy on ResNet-50, significantly outperforming multimodal baselines like IDIA and WSA, which reached only ~68%.
  • Efficiency: While traditional shadow-model-based attacks can take over 18 days of GPU time, TUNI’s anomaly detectors can be trained in just a few hours on a single consumer-grade GPU.
  • Robustness: The method remains effective even when the number of optimization epochs is relatively low, though accuracy stabilizes around 100 epochs.

Conclusion

TUNI represents a significant step forward in privacy auditing for multimodal models. By proving that textual data alone is sufficient for high-accuracy identity inference, it provides a safer, more efficient way to detect PII leakage without further compromising the visual privacy of individuals. Future work will explore the impact of more complex PII and potential defense mechanisms against such unimodal detectors.

Summary updated

BibTeX
@misc{li2024tuni,
  author = {Songze Li and Ruoxi Cheng and Xiaojun Jia},
  title = {{TUNI: A Textual Unimodal Detector for Identity Inference in CLIP Models}},
  year = {2024},
  eprint = {2405.14517},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.14517},
}
Figure