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

Songze Li, Ruoxi Cheng, Xiaojun Jia

TL;DR

TUNI (Textual Unimodal Detector) is a novel privacy auditing tool that determines if a specific person’s identity was used to train a CLIP model using only textual data (like a name). By leveraging CLIP-guided image optimization and a clever anomaly detection system trained on "textual gibberish," TUNI outperforms existing methods while eliminating the need for risky image queries or computationally expensive shadow models.

What Problem Does This Paper Address?

Large-scale multimodal models like CLIP (Contrastive Language-Image Pre-training) are trained on billions of image-text pairs scraped from the web, which often contain Personally Identifiable Information (PII). This raises a major privacy concern: Identity Inference. Can an attacker or auditor determine if a specific person's data was part of the training set?

Existing Membership Inference Attacks (MIAs) for CLIP have two major drawbacks:

  1. Multimodal Requirement: They typically require both the person's name and a real photo to query the model. Submitting a private photo to a third-party model for "privacy testing" is ironically a privacy risk in itself.
  2. Computational Cost: Traditional MIAs often require training "shadow models"—clones of the target model—to learn how it behaves on known data. For massive models like CLIP, this is prohibitively expensive, sometimes requiring hundreds of GPUs for weeks.
Figure 1: Current methods query LLMs with both text and image, while our goal is to conduct identity inference with only textual data.

Methods

TUNI introduces a two-stage pipeline that operates entirely in the textual domain during the attack phase.

1. Feature Extraction via "Hallucination"

Instead of querying with a real image, TUNI uses CLIP-guided image optimization. Given a target name (e.g., "Donald Trump"), the algorithm starts with random noise and iteratively updates the pixels to maximize the cosine similarity between the resulting image's embedding and the name's text embedding.

  • The Features: TUNI extracts the mean optimized cosine similarity ($S$) and the standard deviation of these embeddings ($D$) across multiple runs.

2. Anomaly Detection Voting System

The authors made a key observation: the feature distributions of "member" samples (names in the training set) are distinct from non-members. To build a detector without shadow models, they generate textual gibberish (e.g., "D2;l-NOXRT"). Since these strings are random, they are guaranteed to be "non-members." * Training: TUNI trains multiple anomaly detectors (like Isolation Forest and AutoEncoders) on the features of this gibberish. * Inference: When a real name is tested, if the voting system flags its features as "abnormal" compared to the gibberish baseline, it is inferred to be a member of the training set.

Figure 3: Overview of TUNI.

Datasets

The researchers evaluated TUNI using a combination of standard vision-language benchmarks and identity-specific datasets:

  • LAION-400M & LAION-5B: Massive open-source datasets used to analyze individual appearance frequencies.
  • Conceptual Captions 3M (CC3M): Used as the base training set for the target CLIP models.
  • FaceScrub: A dataset of 530 celebrities. The authors injected 100 of these identities into the CC3M training set to create a ground-truth "member" list for testing.

Key Insights and Ideas

  • The Separability Discovery: The most critical finding is shown in Figure 2. There is a clear, visible gap in the feature space between samples the model has seen (red) and those it hasn't (green). Member samples tend to achieve higher similarity scores and more stable embeddings during optimization.
  • Gibberish as a Proxy: Using random strings as a "universal non-member" set is a brilliant shortcut. it allows the detector to learn the boundary of "unseen data" without ever needing to see the actual training data or a shadow model.
  • Unimodal Power: The paper proves that the text encoder in CLIP retains enough "memory" of training identities that images aren't strictly necessary for high-accuracy inference.
Figure 2: Features of textual descriptions extracted from the optimized images guided by a CLIP model with ResNet50x4 architecture, trained on a dataset where each person has 75 images. The cosine similarity between the embeddings of opti- mized image and the tested text, and the distance between the embeddings of the optimized images, can clearly distinguish between the samples within and outside the training dataset of the target CLIP model.

Key Results

TUNI consistently outperformed state-of-the-art baselines (IDIA and WSA) across various architectures (ResNet-50, ViT-B/32) and training configurations:

  • Superior Accuracy: On ResNet-50, TUNI achieved an accuracy of ~91.7%, compared to ~68% for baselines, despite the baselines using both text and images.
  • High Recall: TUNI showed a remarkable ability to identify members, with recall rates often exceeding 98%.
  • Efficiency: While shadow models can take 18+ days to train on massive clusters, TUNI’s anomaly detectors can be trained in just a few hours on a single workstation with four RTX 3090 GPUs.

The authors also found that performance stabilizes quickly; using more than 50 gibberish strings or 100 optimization epochs yields diminishing returns.

Figure 6: Detection accu- racy for different numbers of epochs.

Limitations and Future Work

  • Scope of PII: The current study focuses primarily on names and faces. The authors acknowledge that real-world PII leakage is more complex, involving addresses, phone numbers, and other sensitive metadata that TUNI hasn't yet been tested against.
  • Defense Mechanisms: As detection methods improve, model developers might deploy defenses (like differential privacy or input sanitization) to mask these signals. The authors suggest "covert gibberish" generation (creating strings that look like real names but are fake) as a way to stay ahead of potential defenses that might filter out obvious random strings.

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