Describing Sets of Images with Textual-PCA

Oded Hupert, Idan Schwartz, Lior Wolf

TL;DR

Textual-PCA is a novel method for semantically describing sets of images by identifying both their common theme and their primary modes of variation. By retooling the BLIP vision-language model to generate "principal phrases" that are semantically orthogonal, the authors provide a human-readable way to summarize and navigate complex image collections.

What Problem Does This Paper Address?

While modern computer vision models are excellent at captioning individual images, describing a set of images remains a challenge. If you show a model a hundred photos of different people, a standard captioner might label each one specifically ("a smiling woman," "a man in a hat"), but it struggles to provide a generic summary ("a set of people") or identify the meaningful ways they differ (e.g., by age, pose, or expression).

Existing methods for set analysis often rely on abstract latent vectors that lack human-readable meaning. The authors aim to bridge this gap by creating a "Textual-PCA"—an approach analogous to Principal Component Analysis (PCA) but where the projection vectors are replaced by descriptive, natural language phrases.

Methods

The authors build their approach on BLIP, a state-of-the-art vision-language model, and introduce two main stages:

  1. Generating the Average Phrase: To find the "centroid" of the image set, they average the image embeddings and use BLIP’s captioning head to decode them. To prevent the model from being too specific (e.g., saying "Persian cat" when the set contains many breeds), they use WordNet to manipulate word likelihoods, encouraging the use of hypernyms (generic terms like "animal") over hyponyms (specific terms like "zebra").
  2. Generating Principal Phrases: Much like PCA finds orthogonal axes of maximum variance, this method generates a sequence of phrases that capture the most significant variations in the set. During the autoregressive generation process, they modify the token probabilities using two key operators:
  3. Variance (V): Encourages tokens that maximize the variance of similarity scores across the image set.
  4. Orthogonality (O): Ensures new phrases describe different attributes than previous ones by distancing them in the textual embedding space.
Figure 2: An overview of our approach to generate principal phrases by modifying BLIP’s caption head. The first step is to create an average phrase, ’car parked’ that captures the common features of the set of images I. Then, during the auto-regression process, we consider two types of operators: (i) V for maximizing the variance over the images, and (ii) O for generating phrases that are orthogonal to the previous phrases (e.g., ‘suv’, ‘red’). The result is a novel phrase ‘luxury’ that describes the car’s pricing.

Datasets

The authors evaluated their method across a diverse range of standard benchmarks:

  • CelebA: A large-scale dataset of celebrity faces, used to test if principal phrases capture known facial attributes.
  • LSUN: Specifically the bridge, church, and kitchen categories.
  • Stanford Cars: Used to identify variations in vehicle types and features.
  • ImageNet: The first 20 categories.
  • COCO: Hierarchically clustered to test the method at different levels of granularity (e.g., a broad "animal" cluster vs. a specific "cat" cluster).

Key Insights and Ideas

  • Semantic Orthogonality: The most powerful idea here is applying the geometric constraints of PCA (orthogonality and variance maximization) directly to natural language. This forces the model to find "perpendicular" meanings, preventing it from just repeating synonyms.
  • Generic vs. Specific Steering: The use of WordNet to steer a specific-by-design captioning model toward generic summaries is a clever "zero-shot" intervention that avoids expensive retraining.
  • Radar Plots for Interpretability: By projecting images onto these principal phrases, the authors create "radar plots" that act as a semantic fingerprint for each image. This allows users to see exactly how an image deviates from the set average (e.g., "this car is more 'luxury' but less 'red' than the average").
Figure 1: Examples of our textual PCA. For each dataset, we present an average phrase that describes the image set and the principal phrases, i.e., phrases that maximize the variance of the image-to-text matching score subject to being mutually orthogonal in the embedding space.

Key Results

  • Quantitative Variance: In the BLIP embedding space, Textual-PCA achieved a variance score of 1.515 on named datasets, significantly outperforming baselines like ZeroCap+PCA (1.290) and MAGIC+PCA (1.128).
  • Attribute Prediction: Principal phrases were highly effective at capturing real-world traits. Using these phrases to predict CelebA attributes yielded a test accuracy of 0.862, higher than all baseline methods.
  • User Study: In a "lineup" experiment, users were asked to identify an image based only on its radar plot. Users were able to correctly identify the image in 83% of cases using Textual-PCA, compared to just 7% and 33% for the strongest baselines.

Limitations and Future Work

The authors note that evaluating generative tasks for image sets is inherently difficult because there is no established "ground truth" for what a set's variation should look like. Furthermore, the captioning head can be sensitive to distribution changes; if the PCA vectors differ too much from the single-image encodings the model was trained on, the text generation can occasionally collapse.

Future work could involve reversing the process: using a set of phrases to generate a diverse set of images that capture specific modes of variation. There is also potential to apply this to sets of text or paragraphs using summarization engines instead of vision-language models.

Summary updated

BibTeX
@inproceedings{hupert2022describing,
  author = {Oded Hupert and Idan Schwartz and Lior Wolf},
  title = {{Describing Sets of Images with Textual-PCA}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.279},
}
Figure