Elamur Research

When does CLIP generalize better than unimodal models? When judging human-centric concepts

Paper · 2022 · Romain Bielawski, Benjamin Devillers, Tim Van De Cruys et al.

Summary

A movie poster can suggest a comedy or a thriller through its composition, lettering and mood. Its title can make a similar suggestion with a few words. If a system learns to associate images with descriptions, can it pick up these cues well enough to recognize a genre from a poster alone? The authors ask when training across vision and language improves performance even when a task supplies only an image or only text. They focus on what they call human-centric concepts, which include cultural, social, aesthetic and emotional judgments. Their starting point is an earlier comparison in which CLIP, despite its ability to learn from image descriptions, had struggled to match vision-only alternatives on conventional recognition tasks.

The paper tests tweet sentiment, book genre and movie genre. Each task can use an image, a text field or a combination of the two. The authors compare CLIP’s visual encoder with image-trained alternatives and its text encoder, CLIP-T, with BERT-based alternatives. They keep each pretrained encoder fixed and teach a separate classifier to use its output. They also test what happens when a classifier has very few labeled examples, by asking it to classify held-out images according to their closest labeled examples. For the movie experiments, the authors release Plotster, a collection of 207,902 films with posters, titles, plot descriptions and genre labels.

CLIP provides the strongest image features in the transfer experiments, and CLIP-T provides the strongest text features. On the Plotster test set, for example, a classifier using CLIP-T on plots reaches an F1 score of .612. Adding the standard poster through CLIP raises the score to .676. The two CLIP encoders together produce the best combined result in six of the seven settings. Tweet sentiment is the exception. There, pairing the CLIP image encoder with either BERT alternative reaches 66.03% accuracy, while pairing it with CLIP-T reaches 65.58%. The visual few-shot comparisons also favor CLIP on the tasks about sentiment and genre, with a clearer advantage on some datasets than on others.

The authors examine whether CLIP’s ability to read text inside images explains its advantage. CLIP still leads after much of the printed text is covered or blurred on book covers and movie posters. It also retains its lead on a separate test using more recently released movies, where every encoder tested scores lower than on the original movie benchmark. The authors propose that learning which images and descriptions belong together helps both encoders retain cues useful for judging sentiment and genre. The experiments establish where the released encoders performed best in these comparisons. The contribution of the training objective, the contents of the training collection and the role of cues shared across images and text remain open questions.

Deep dive: When does CLIP generalize better than unimodal models? When judging human-centric concepts

The study tests when CLIP transfers better than image-only and text-only encoders on tweet sentiment and book and movie genres. · about 33 minutes to read

The problem and its context

When language is useful to vision

An image can support judgments at different levels. Recognizing a digit calls for attention to its shape. Assigning a genre to a film calls for an interpretation of what the film is likely to be about or how it presents itself. A poster can offer evidence for that judgment through the way it depicts its subjects, its emotional tone and stylistic choices that viewers associate with particular genres. The title or plot can contribute a different kind of evidence about the same film. The authors use the term human-centric for concepts involving cultural, social, aesthetic or affective aspects of the world. Genre and sentiment give them tasks in which these aspects can be expressed through either images or words.

The distinction matters because descriptions select what to mention. A caption can express a mood or identify the significance of a scene while passing over many of its fine visual details. If an image encoder is trained to associate the scene with that caption, the features that help it make the association may also be useful for judging mood. Some features that matter for a different visual task could receive much less emphasis. The same consideration applies to text. Learning to connect words with pictures may favor information that can be depicted, while sentence structure can contain information that rarely has a direct visual counterpart. The choice of training signal can therefore change which aspects of an input are easy to recover later.

The paper places this question in the growth of joint image and text pretraining. Work on visual question answering and image captioning had already created demand for systems that could work across both kinds of input. Online image and text collections made it possible to train on large numbers of paired examples without commissioning a new annotation for every image. CLIP used this opportunity to learn from images with associated captions. The authors point to the possibility that many of those captions were written for other people, including on social platforms. A caption produced in that setting can reflect what someone thought was interesting, meaningful or worth communicating. The authors contrast the purpose of such captions with the labeling task behind conventional recognition datasets. Even when people assign the labels, the annotation is created for the classification exercise. CLIP and Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision.

This difference in purpose motivates the study. It is a hypothesis about the kinds of signals available in the training data. The authors do not inspect the captions to count how many convey social meaning, aesthetic judgment or emotion. Their reasoning is that judgments of this kind are worth testing separately from conventional object categories. They may draw on cues that people communicate across media. A title, a photograph and a description can each convey something about how a book or movie is meant to be understood, even though the information each supplies takes a different form.

Why earlier recognition tests left the question open

CLIP had already been presented in the context of zero-shot learning, where it can make predictions for a new task without learning a classifier from labeled examples of that task. The authors are interested in a different question. Given a limited or substantial supply of labeled examples, how well do CLIP’s existing representations support a classifier trained for the new problem? A system can be useful without labels through its ability to compare images and language while still offering image features that are less suitable for a particular supervised task. These evaluations concern different uses of the same pretrained encoders.

The comparison that directly motivates the paper is the earlier study by Devillers and colleagues. It evaluated CLIP and other jointly trained systems against visual alternatives in transfer learning, few-shot learning and unsupervised settings. Its conventional visual tasks included recognizing digits, fashion items and objects in natural images. The vision-only BiT-M could outperform CLIP in those comparisons. That finding left room for a task-dependent advantage. If some recognition problems rely on details that captions seldom express, success at learning image and text associations gives limited reason to expect a lead on those problems. A genre or sentiment judgment may benefit from a different set of features.

The study also extends the comparison to language. A text encoder trained alongside an image encoder must organize descriptions partly according to the visual material with which they occur. The authors ask whether the resulting representation makes some language distinctions easier to classify. A movie plot can directly state the events of a story, while a title can allude to them. A tweet can express a reaction whose tone a paired picture helps convey. The paper uses these differences to create several ways of asking the same downstream question. It can compare CLIP’s text features with those from BERT-based sentence encoders using the same language field. It can also compare the image encoders on the matching visual field.

The authors use grounding to describe the proposed benefit of this exchange. Language can help organize a visual representation around similarities that descriptions bring out. Images can help organize a text representation around situations that descriptions refer to. The paper draws on discussions of the connection between linguistic form and what it signifies, and on prior work on image captioning. Its practical question is whether the encoders make a task’s labels easier to predict from inputs they have learned to represent. That question can be answered with classification experiments, while the stronger question of what the encoders understand would require other evidence. Climbing towards NLU and A Comprehensive Survey of Deep Learning for Image Captioning.

What counts as a comparison

The paper separates which inputs a system saw during pretraining from which inputs a classifier receives during evaluation. This is important because the phrase “image-only” can describe either of those decisions. RN50 learned from visual classification data and can encode an image for the transfer experiment. CLIP learned from image and text pairs, but its visual encoder can also process a picture on its own. Comparing these two under an image-only evaluation asks what their earlier training left in their image features. It gives both classifiers the same type of evidence at prediction time.

A paired-input evaluation addresses another question. It asks how much the classifier can use from an image and its corresponding text when both are available. Since independently trained encoders can supply the two representations, the paper can compare different pairings. A CLIP image vector can be combined with a BERT text vector, and the result can be compared with a pair made from the two CLIP encoders. This is one way to see whether the strongest encoder in each single-input evaluation also forms the strongest pair. It also makes it possible to observe whether an encoder that ranks lower alone contributes information of value when it is paired with another source of evidence.

The method, step by step

From an input to a prediction

The authors work with pretrained encoders. An encoder converts an image or a piece of text into an embedding, a vector of numbers that the classifier can use as input. An image embedding might make two visually or stylistically related posters easy for a classifier to treat alike. A text embedding might do the same for plots with related events. The downstream experiments test whether these vectors already organize examples in ways that are useful for distinguishing sentiment or genre.

In transfer learning, these embeddings are the features supplied to a new classifier. The authors keep the weights that produced the embeddings frozen, meaning that the task labels change only the new classifier. When a task has only one input, the classifier uses that input’s embedding. When it has a pair of inputs, the authors place the image and text vectors end to end. The new classifier then has access to the components of both vectors. The few-shot experiment uses another decision procedure on the visual features, assigning each test image the label or labels of its closest selected training example.

From pretrained representations to held-out predictions

The steps in order.

From pretrained representations to held-out predictionsStep 1: Prepare labeled image and text examples1. Prepare labeled image and text examplesStep 2: Select the inputs for each condition2. Select the inputs for each conditionStep 3: Encode inputs with frozen pretrained encoders3. Encode inputs with frozen pretrained encodersStep 4: Concatenate vectors for paired-input transfer4. Concatenate vectors for paired-input transferStep 5: Train a classifier or select visual prototypes5. Train a classifier or select visual prototypesStep 6: Score predictions on held-out examples6. Score predictions on held-out examples

The two evaluation procedures expose different properties of the features. A trained classifier can learn which parts of an embedding help separate the labels. The image-only few-shot procedure relies directly on which examples are close together. A representation can be useful under either procedure or both. The study evaluates both because the earlier visual comparison had included learning from very few labeled examples, and because the paper’s question encompasses more than performance after fitting a task-specific classifier to a training set.

How the encoders learned their features

CLIP has separate image and text encoders. In the variant used in the paper, the image side is based on ResNet50. The text side, which the authors call CLIP-T, uses a transformer. The contrastive training procedure learns a space in which the image and text embeddings can be compared. In a batch of associated images and descriptions, the objective favors a high similarity for a matching pair and a lower similarity between an image and the descriptions associated with other images in that batch. The training collection was described as about 400M image and text pairs. The study uses the resulting features instead of training a new CLIP encoder. CLIP and Deep Residual Learning for Image Recognition.

The visual baselines are RN50 and BiT-M. RN50 is a ResNet50 encoder trained for image classification on ImageNet-1K. BiT-M is also based on ResNet50 and was trained on ImageNet-22K. This gives the comparison encoders of the same broad architectural family, with different training sources and objectives. For RN50 and BiT-M, the authors retain the representation immediately preceding the original classification head. It has 2048 dimensions in each case. For CLIP they use the 1024-dimensional vector that the visual encoder produces for the common image and text space. Thus the image encoder with the shortest vector among those tested also supplies the smallest visual input to the new classifier.

For text, the comparisons use BERT-base and BERT-large in their Sentence-BERT forms. These are pretrained text encoders adapted to produce sentence vectors. They use the BERT representation associated with the special [CLS] token, an element added to the text input whose resulting representation can serve as a summary of the sequence. The versions in the paper had already undergone fine-tuning on SNLI and MultiNLI. The authors selected them as strong available text classifiers’ feature sources. Those earlier adaptations are part of the starting point for the comparison. During the paper’s tweet and genre experiments, the sentence encoders are frozen just like CLIP-T. BERT and Sentence-BERT.

SNLI and MultiNLI are natural language inference datasets. Inference in this context concerns the relation between two statements. The BERT alternatives therefore enter the comparison with prior training for judgments over sentences. The text systems need to produce representations useful beyond a single data source, and the authors chose these versions because they had performed well across several text classification tasks. That choice gives CLIP-T a comparison with encoders already adapted to represent sentences, as opposed to requiring the new heads to compensate for a poorly chosen text representation. SNLI and MultiNLI.

The parameter counts and output widths differ. The paper lists 80M parameters for CLIP-T, 110M for BERT-base and 300M for BERT-large. CLIP-T and BERT-large each supply a vector with 1024 dimensions. The smaller BERT supplies a 768-dimensional vector. A parameter count describes how many learned quantities the encoder contains. An embedding width describes how many numbers it passes to the downstream classifier for each example. Those are different aspects of capacity. CLIP-T has the smallest parameter count on the text side, and its output vector has the same width as the one from BERT-large.

When both modalities are available, the paper’s feature construction can be written as follows.

z = v ⧺ t

Here, v is the image embedding, t is the embedding for the selected text field, and z is the input to the classifier. The symbol ⧺ means concatenation, with the components of the text vector placed after those of the image vector. The equals sign defines the resulting vector. The same operation can be used with any image encoder and any text encoder in the study. A pairing with BERT, for example, does not require a prior mapping between BERT’s feature space and CLIP’s. The classifier receives both sets of components and learns how to use them on the task.

Turning the data into tasks

MVSA, the Multi-View Sentiment Analysis dataset, supplies tweets and their associated images. The paper treats sentiment as a choice among positive, neutral and negative. The underlying annotation provides several judgments because different people labeled each of the two inputs. The authors need a target that stays the same when the available input changes, so they reduce the judgments to one label for the image and text pair. They assign positive a value of 2, neutral a value of 1 and negative a value of 0. Each input has three judgments, giving 6 judgments for the whole pair. They take the mean and round it to one of the sentiment values. In compact notation, this is the operation they describe.

s = round(mean(r))

Here, r is the collection of numerical sentiment judgments for a tweet and image together, mean takes their arithmetic average, and round converts that average to a whole-number sentiment value, s. The equals sign assigns the outcome to s. The selected input can then be the image, the tweet text or both, while s continues to designate the same target. Consequently, the image-only evaluation measures how well an image predicts the pair’s overall label. Some of the judgments that establish that label came from readers of the text. The text-only condition has the corresponding relationship to the image judgments.

For Book Covers, each example has a cover image and the book’s title, with one assigned genre. The original collection introduced by Iwana and colleagues contained 57k covers obtained from Amazon, with 30 possible categories. The paper uses the revised collection described by Lucieri and colleagues. The revision removes a genre and combines two similar ones, leaving 55.1k cover images and 28 categories. The input can be a cover, a title or their combination. The same genre target applies even when the title is available both as a text field and potentially as lettering printed on the cover.

For the movie experiments, the authors created Plotster by collecting records through The Movie Database’s API. A record consists of the poster, title and plot description of a movie. The full collection has 207,902 records, with 189,185 assigned to training and 18,717 to testing. Posters are RGB images with dimensions of 900 × 600 pixels, in height-by-width order. Plot descriptions average 310.8 characters and titles average 18.6 characters. The paper reports results for titles and plots separately, so a paired classifier receives a poster plus one of those fields. A plot can supply events, settings and relationships in written form. A title supplies a much shorter description and may suggest a genre indirectly. Their different lengths and contents give the authors two ways to test what the image adds.

Plotster also changes what a correct prediction looks like. Each movie can have more than one genre, and the genres are selected from 19 categories. The authors report that a film typically has between 1 and 6 assigned genres, averaging 1.7. A movie labeled both adventure and action should therefore have both categories represented in its target. The training and evaluation procedure treats the categories as separate possible assignments. The paper’s accompanying material includes the publicly released Plotster collection and code for reproducing the experiments. The language fields in all of the tasks are in English.

Creating versions with less printed text

A book cover or poster can carry two kinds of textual evidence. The classifier can receive the title or plot explicitly as a text vector. Separately, the image encoder can receive pixels depicting the title, names or other lettering. Since earlier work had found that CLIP’s image encoder responds to written language inside pictures, the authors wanted to find out how much its lead depended on that second route. They made altered copies of the cover and poster datasets. This gives the same classification task with less readable text available through the image.

The first stage uses EAST, a detector that proposes boxes around text in images and scores its proposals. A sufficiently high-scoring box is replaced with a black rectangle. The authors add another procedure for small white text that can escape the first detector. It uses thresholding and filters for saturation and size to select likely text regions. It then applies Telea inpainting, which fills a selected area using the surrounding image. In the example shown for Book Covers, the procedure covers the title and author’s name in black and blurs white lettering that the box detector captured incompletely. The task still presents the same cover’s remaining design and artwork.

The paper reports a manual check of how much text the processing affected. The procedure obscured 84% of the legible characters by masking or blurring them across a random sample of 10 posters. In 10 randomly selected book covers, it affected 95% of the readable characters. These are character-level checks on sampled images. The study uses the altered and standard versions as separate input conditions. Explicit text fields stay available in the paired conditions, so the masking changes what can be read from the picture while preserving the title or plot supplied to the text encoder.

Training the transfer classifiers

For the two tasks with one target label per example, the transfer classifier has a dense hidden layer with 256 outputs and a rectified linear activation, followed by a dense classification layer with a softmax activation. A dense layer learns a weighted combination of the inputs for each of its output components. The rectified linear activation suppresses negative values, allowing the two layers together to learn more flexible decision boundaries. The softmax converts the final layer’s scores into probabilities over the possible classes. Cross-entropy provides the learning signal by penalizing low probability on the labeled class. The authors update the new layers while leaving the encoder weights unchanged.

For movie genres, the final layer gives a value between 0 and 1 for every genre. Training uses binary cross-entropy, which evaluates each genre as an individual present-or-absent target. This lets the classifier assign high values to several genres together. The final prediction is a binary vector obtained by rounding the output for each category.

ŷⱼ = round(pⱼ)

In this expression, j identifies a genre, pⱼ is the output value for that genre, and ŷⱼ is the corresponding predicted decision after rounding. The symbol round is the rounding operation, and the equals sign defines the predicted entry. The full prediction places these entries in the same category order as the ground-truth vector. A movie carrying several genre labels contributes several positive entries to that target.

Accuracy measures the fraction of evaluated examples whose single predicted class matches the target. The authors use it for the tweet and book tasks. For Plotster they compute F1 for each movie, then average those scores over the test set. F1 reflects both how many predicted genres are correct and how many of the annotated genres are recovered. Predicting action alone for a film labeled action and adventure recovers part of the target. Predicting additional unsupported genres can hurt the score as well. Averaging the movie scores gives each movie a contribution to the result rather than giving each genre its own score and then averaging those genre scores. The transfer tables report variation across five experiments with different random seeds and classifier initializations.

Classifying images from a few examples

The few-shot experiments use images and retain the existing visual encoder. The authors randomly select a small number of labeled training images per class. Each selected image becomes a prototype, which is a reference embedding for making predictions on another image. The paper calls the number selected per class N. Earlier work had averaged the selected embeddings to make one representative vector for a class. Here the individual embeddings are kept. If a class includes images with several quite different appearances, the closest individual example may be useful even when the average representation of the class is farther away.

The classifier is 1-nearest-neighbor, written 1-NN in the paper. It compares a test image’s embedding with the retained prototypes and takes the label of the closest. For Plotster, a movie can qualify for prototype selection under any of its assigned genres. For instance, a movie labeled adventure and action can be chosen while filling either genre’s sample. When that movie becomes the closest neighbor for a test image, the classifier predicts all of the chosen movie’s genres. It therefore makes a multi-label prediction even though it uses one neighbor. The authors use the same visual few-shot procedure when they revisit the conventional image datasets from the earlier study.

Experiments and results

Tweet sentiment

On MVSA, the visual transfer result compares what each image encoder can recover about the sentiment of a tweet and its picture when only the picture is supplied. RN50 reaches 55.17% accuracy and BiT-M reaches 60.0%. The CLIP image encoder reaches 63.07%. The corresponding standard deviations across repeats are 0.37, 1.46 and 0.23. The visual features have some ability to predict the joint label in each case, and CLIP’s features yield the highest accuracy among those tested.

Image-only transfer on MVSA sentiment test accuracy

The frozen CLIP image encoder gives the highest accuracy on the tweet and image sentiment labels.

Image-only transfer on MVSA sentiment test accuracyRN50: 55.17RN5055.17BiT-M: 60.0BiT-M60.0CLIP (this paper): 63.07CLIP (this paper)63.07
The numbers
System or settingaccuracy %
RN5055.17
BiT-M60.0
CLIP (this paper)63.07

The text-only comparison is more tightly grouped. BERT-base reaches 63.33%, BERT-large 64.02% and CLIP-T 64.60%. These figures are for classifiers using tweet text to predict the same label as the image-only classifiers. Thus the task makes the strengths of the two streams comparable in terms of their ability to predict a common outcome. The two streams still have access to different evidence. The text can express a reaction directly, while the image may carry the mood or situation from which that reaction can be inferred.

In the combined conditions, pairing any of the tested text encoders with the CLIP visual encoder yields the highest average accuracy for that text encoder’s row. The best two means are both 66.03%, for CLIP paired with BERT-base and for CLIP paired with BERT-large. Their reported standard deviations are 0.15 and 0.6, respectively. CLIP with CLIP-T reaches 65.58%, with a standard deviation of 0.38. The result shows why the authors tested the combinations directly. CLIP-T ranks first when the classifier sees tweet text alone. The top paired classification uses a BERT variant to supply text features alongside CLIP’s image features.

The other combinations also show that adding an input can have uneven effects. With BERT-base as the text encoder, the mean is 63.33% from text alone and 61.93% with BiT-M image features added. With CLIP-T, the text-only mean is 64.60%, while pairing it with RN50 gives 64.13%. Paired input makes more individual features available to the trained head, and the results depend on how well those features support the label in combination. On MVSA the most consistent choice across text streams in the table is the CLIP image encoder.

Book genre

The visual comparison on Book Covers produces a clearer separation. On standard covers, RN50 gives 10.04% accuracy, BiT-M 29.33% and CLIP 53.75%. When the images are processed to reduce readable text, the corresponding image-only means are 10.41%, 24.87% and 33.04%. The alteration changes the results for the visual encoders differently. CLIP scores lower with masked covers and remains the strongest visual encoder in that condition. The authors use this comparison to ask what evidence the cover representation still carries after the printed text has been substantially reduced.

Image-only transfer on standard Book Covers test accuracy

CLIP classifies standard covers more accurately than the two image-trained encoders.

Image-only transfer on standard Book Covers test accuracyRN50: 10.04RN5010.04BiT-M: 29.33BiT-M29.33CLIP (this paper): 53.75CLIP (this paper)53.75
The numbers
System or settingaccuracy %
RN5010.04
BiT-M29.33
CLIP (this paper)53.75

The title-only classifier using CLIP-T reaches 57.28% accuracy, with a reported standard deviation of 0.27, and is the top text-only result. CLIP with CLIP-T supplies the highest paired mean with either version of the cover. The standard-cover condition reaches 60.66%, with a standard deviation of 0.26. The masked-cover condition reaches 59.54%, with a standard deviation of 0.28. In those paired tests the title is always supplied as text. Masking removes much of the lettering from the image while leaving the words of the title accessible through the separate text encoder.

The paper also compares its Book Covers results with the best scores previously reported by Lucieri and colleagues. It gives the previous visual result as 27.8% accuracy, the previous text result as 55.6%, and the previous combined result as 55.7%. The corresponding strongest results in the new comparison come from the CLIP visual encoder, CLIP-T on the title, and the two streams paired. The baselines trained for the new comparison help evaluate the choice of frozen encoder. The previously published scores serve a different purpose, showing how these results relate to the earlier benchmark on the revised cover collection.

The book task is also a case where the value of the new text vector differs by visual partner. With standard covers, CLIP plus BERT-large reaches 60.62%, close to the 60.66% reached with CLIP-T. Pairing CLIP-T with BiT-M gives 52.60%. A good title representation can work well alone, and the joint outcome still depends on the chosen image features. The reported ranking places the two CLIP streams first on standard covers, with the results for the best text partners of the CLIP image encoder close together in that condition.

Movie genre on Plotster

On the original Plotster test set, F1 is the average of the scores obtained per film. In the image-only condition using standard posters, RN50 scores .070, BiT-M .372 and CLIP .449. The corresponding scores with masked posters are .090, .415 and .526. CLIP leads in both conditions. The low RN50 values also show why separate visual baselines matter. The two vision-only alternatives yield very different results on the same task, even though both use ResNet50-based architectures. Their training histories and resulting representations differ.

In the title-only condition, BERT-base reaches .314, BERT-large .323 and CLIP-T .397. With plots as the only input, BERT-base reaches .582, BERT-large .599 and CLIP-T .612. For each encoder the plot condition gives the higher result, and CLIP-T is the strongest on either field. This comparison puts the value of the text input in context. The words in a plot description offer more explicit evidence about the events and themes a genre label can refer to. In this benchmark a plot represented by any of the three text encoders supports a higher score than a title represented by the top text encoder.

With standard posters and titles, CLIP paired with CLIP-T gives .564, the highest mean for that input combination. With masked posters and titles, the same encoder pairing gives .593. With standard posters and plots, it gives .676. Masked posters and plots produce .687. These are the best paired means in their respective settings. Changing the text field from a title to a plot raises the leading paired result for either version of the image. The comparison also shows that a poster can add information to a strong plot representation. With a standard poster encoded by CLIP and a plot encoded by CLIP-T, the paired result exceeds the .612 reached from that plot representation alone.

Plotster test F1 with a standard poster and plot

The highest mean comes from pairing the CLIP image encoder with its jointly trained text encoder.

Plotster test F1 with a standard poster and plotCLIP image and BERT-base plot: .658CLIP image and BERT-base plot.658CLIP image and BERT-large plot: .667CLIP image and BERT-large plot.667CLIP image and CLIP-T plot (this paper): .676CLIP image and CLIP-T plot (this paper).676
The numbers
System or settingF1
CLIP image and BERT-base plot.658
CLIP image and BERT-large plot.667
CLIP image and CLIP-T plot (this paper).676

The lower-ranked visual pairings illustrate a further distinction between strong individual features and strong combined features. With standard posters encoded by BiT-M, the plot result is .631 with BERT-large and .621 with CLIP-T. With masked posters, those scores are .637 and .631. The plot representation from CLIP-T has the best text-only result, and BERT-large has the higher paired mean in these particular comparisons. Across the movie settings, the highest paired result always uses both CLIP encoders. That overall outcome leaves room for different rankings when the image side is held to one of the other encoders.

Comparison with earlier movie genre results

The authors also evaluate a subset of Plotster corresponding to the movie collection assembled by Mangolin and colleagues. That collection contained 10,594 movies, of which 10,554 also occur in Plotster. The overlap, reported as 99.6%, lets the authors isolate the associated posters and plots for a comparison with results on the earlier collection. The older crawl had sought other media as well, including trailers and subtitles. The comparison reported here uses posters and plots, since the earlier dataset did not include movie titles.

For vision, CLIP reaches an F1 score of 0.603 on the corresponding subset, while the prior visual result was 0.409. With text, CLIP-T reaches 0.589, compared with the earlier 0.488. For combined poster and plot input, the two CLIP encoders yield 0.670, against the previously reported 0.628. The subset scores concern the earlier collection’s film selection. They have a different scope from the F1 scores reported for the main Plotster test set. Together, the two evaluations show how the comparison behaves on the new benchmark and how the encoders compare with published results on a collection that had already been used for this task.

Learning from a few labeled images

The visual few-shot results describe how predictions change as the classifier has access to more labeled examples from each class. The paper plots accuracy for Book Covers and MVSA and F1 for Plotster. It also repeats the evaluation on six standard visual datasets from the earlier study by Devillers and colleagues. These include MNIST and SVHN for digits, FashionMNIST for fashion items, and the other image benchmarks CIFAR10, CIFAR100 and CUB. The paper reports the average accuracy across that standard group. With the newly chosen 1-NN procedure, CLIP still shows no advantage over the other visual encoders on that comparison.

The outcome differs for the images associated with book genres, movie genres and tweet sentiment. The paper reports a visual few-shot advantage for CLIP across these tasks, including the conditions with masked covers and posters. The separation is harder to see on MVSA. The authors report that the sentiment experiment needed between 20 and 100 examples per class to rise above chance, whereas the other datasets used 1 to 10 in the corresponding comparison. They describe CLIP as appearing stronger on MVSA while the visual encoders remain more difficult to distinguish there. That qualification matters because the trend across the tasks is clearer than the individual MVSA curves.

This evaluation changes what learns from the labels. In the transfer experiment the downstream head learns a mapping from features to classes. In the few-shot experiment labeled images supply reference points, and the decision uses the closest one. The advantage on genre therefore appears both when a classifier can learn to reweight the visual features and when the classification comes directly from an example’s location relative to a few reference images. The conventional datasets give a check on the specificity of that observation. The same change of decision rule that preserves their earlier ranking yields a different ranking on the human-centric tasks.

What the ablations show

Reducing the readable text in artwork

The masking intervention addresses a concrete alternative explanation for the visual results. If CLIP can read genre-relevant words on a cover, it can use those words during an evaluation whose declared input is only an image. A book title and parts of its design can both indicate genre, but a classifier could succeed by using the title through the pixel input. The authors’ control changes what characters can be read while keeping the book label and the remaining image content available. In a paired condition it changes the cover without changing the independently supplied title. The image-only conditions therefore provide the most direct comparison for the question about reading.

On Book Covers, CLIP’s mean accuracy falls from 53.75% on standard images to 33.04% on masked images. The masked-cover ranking still places it ahead of BiT-M at 24.87% and RN50 at 10.41%. The change in CLIP’s score is consistent with the standard covers containing useful information in areas that the procedure affects. The preserved ranking shows that the encoder’s advantage survives substantial reduction of readable characters. The paired results show a related pattern when the title is given explicitly. CLIP paired with CLIP-T retains the highest mean under masking, although the altered covers yield lower accuracy for that pairing than the standard ones.

Plotster provides a second comparison and a different score pattern. CLIP’s vision-only F1 is .449 with standard posters and .526 with masked posters. BiT-M and RN50 also have higher image-only means in the masked condition. The rank order remains the same. In the visual few-shot analysis, the authors describe CLIP’s advantage as reduced under masking and still present. Those observations refer to distinct evaluations. The transfer table gives the classifier’s overall F1 for each poster condition, while the few-shot figure compares the visual encoders as labeled examples per class vary. The persistent lead is the shared result. The direction of an absolute score change depends on the dataset and evaluation.

The intervention establishes that ordinary unaltered lettering is unnecessary for the observed top ranking. It leaves room for several ways in which text can still matter. The character checks show that some text escaped the procedure. The layout and positions of text regions can remain evident even when their contents are hidden. Readable text may also be one of several useful cues on standard artwork. The results support the authors’ conclusion that reading alone is an incomplete explanation. They do not allocate the remaining performance to particular features such as color, composition or subject matter.

Testing films released after CLIP was introduced

The second control addresses possible exposure to the movie material during pretraining. Plots, titles and posters are available on the web, and CLIP learned from a large web collection. A result on a held-out part of Plotster establishes separation from the examples used to train the new genre head. It leaves open whether either CLIP encoder encountered those movies before the genre experiment. The authors could not check the exact pretraining collection directly, so they chose a new test group using a date criterion.

They collected movies with release dates after January 5, 2021, the date of the announcement introducing CLIP. The resulting collection contains 20,280 movies. The paper reports that 93 also occurred in the original Plotster collection. The authors evaluate the classifiers already trained on Plotster in single-input conditions. This procedure changes the test movies while retaining the genre classifiers. The release-date criterion makes prior exposure to much of the later movie material less likely, which is why the authors use this collection to test whether the ranking persists under that change.

In the visual comparison reported for this control, CLIP moves from 0.526 on the original Plotster evaluation to 0.439 on the newer set. BiT-M moves from 0.415 to 0.318, and RN50 from 0.090 to 0.020. The original scores quoted for this comparison correspond to the image-only masked-poster results in the main table. In the title-only comparison, CLIP-T goes from 0.397 to 0.276. BERT-large goes from 0.323 to 0.237 and BERT-base from 0.314 to 0.229. All of these are F1 scores averaged over the films in the relevant evaluation.

The newer group is harder for every encoder in the reported comparisons. The authors suggest that features learned for classifying older movies may transfer less readily to newer material. CLIP and CLIP-T nonetheless retain the top rank for images and titles, respectively. The result strengthens the case that the advantage extends beyond familiar entries in the main benchmark. The control is especially informative about ranking. It shows the same leaders after the evaluation collection changes, even as the absolute F1 scores decline.

Changing what the classifier sees

The comparison between titles and plots helps locate the value of the language stream. The authors take the same genre targets and change the field from which the text embedding is computed. All three text encoders obtain higher F1 with plots. CLIP-T leads with either field, so its text-only ranking holds both for very short titles and for longer story descriptions. In paired conditions the poster remains available when the text field changes. The best pairing is the same across the field and image variations, while the score depends substantially on whether the text describes the story or merely names the film.

The encoder pairings address a tradeoff the authors identify in their discussion. If image and text encoders are trained to agree, the information they offer a classifier may overlap. A separately trained text encoder could preserve distinctions that are less prominent in text trained alongside photographs or artwork. If those distinctions help the task, the independently trained encoder could make a better partner. The MVSA comparison is consistent with that possibility. The best paired results use CLIP’s visual features with a BERT text vector. The authors also suggest that BERT’s larger parameter count could be relevant. The experiment observes which pair scores higher, and leaves the competing explanations unresolved.

The broader pattern helps put the tweet exception in perspective. Pairing the two CLIP encoders gives the strongest average result in six of the seven paired settings, all on the genre benchmarks. A shared pretraining objective can yield representations that work well together for these tasks, even when it encourages both streams to encode related content. In MVSA, the image and text can carry different evidence about the overall pair label, and the highest mean comes from a mixed pairing. This is a result about how the encoders contribute to a trained classifier under specified inputs. It is not a direct measurement of how much information their embeddings share.

Changing the few-shot decision rule

The earlier visual study summarized its selected examples by averaging them within each class. Keeping individual reference examples changes which visual similarities the classifier can exploit. A test cover can be close to one visually distinctive example of a genre while having little similarity to the average cover for that genre. This could matter for classes that admit different visual styles. The procedure also transfers all of a movie prototype’s genre labels, which makes it possible to preserve a set of labels that actually occurred together in a training example.

By running the new procedure on the earlier standard vision benchmarks, the authors check whether CLIP’s advantage on the current tasks can be attributed simply to the switch from an averaged prototype to individual neighbors. The standard comparison still does not favor CLIP. The advantage appears in the human-centric tasks with the same rule. That makes a change of classifier an incomplete explanation for the difference between the two studies. The paper’s interpretation instead centers on a difference among the tasks and the features on which their labels depend.

Limitations

Limits the authors identify

The contents of CLIP’s original training collection are unavailable for direct comparison with the movie data. The authors explicitly acknowledge this when explaining the later-release test. Release dates provide an indirect basis for expecting less prior exposure. A release date identifies when a film came out, and earlier promotional material can precede it. The later collection also shares some entries with Plotster. The experiment offers evidence that the ranking persists on a group expected to have much less overlap with pretraining. It does not identify which individual images or text records CLIP saw.

The authors also discuss what a contrastive objective may leave out. To learn that an image and a description belong together, the encoders emphasize features that help align the two. Visual details rarely mentioned in captions could be less prominent in the resulting representation. Textual properties with weak visual correlates, including aspects of grammar and syntax, could likewise receive less emphasis. The paper proposes this as a reason a jointly trained encoder can excel at some tasks and trail vision-only alternatives on others. The experiments evaluate the downstream consequences for selected classifications. They do not measure the full range of details preserved or lost in either stream.

The discussion connects the findings to earlier studies of representations. Goh and colleagues had reported individual CLIP neurons that responded to particular topics or entities across visual depictions and written names. Other work cited by the authors compared patterns from multimodally trained encoders with activity in the human hippocampus. These studies help explain why the authors consider human-centered categories a plausible domain of advantage. The current experiments classify sentiment and genre. They do not record brain activity, identify individual neurons responsible for a classification or measure the extent to which a representation resembles a person’s. The mechanism suggested by the earlier work therefore remains a separate line of evidence.

Limits of the experimental comparisons

The study compares complete pretrained encoders with distinct training histories. The visual systems share a broad architectural family, but their training collections and objectives differ. On the text side the BERT encoders have sentence-inference training, and their parameter counts differ from CLIP-T’s. A parameter count or vector width can rule out a simple description such as CLIP-T having more parameters than BERT. It cannot account for the influence of the data or objective on what the features capture. To isolate the effect of contrastive pairing itself would require changing the availability or use of the paired signal while controlling other training conditions. The paper’s results establish an advantage for the encoders compared on these tasks, and the proposed explanation concerns a combination of factors inherited from pretraining.

The term human-centric groups several properties that are hard to separate in this setup. The genre benchmarks use designed commercial artwork, associated language and categories assigned to books or movies. The sentiment benchmark uses images and text selected from social media. The conventional image benchmarks differ in content, label structure and the kind of evidence available. When the ranking reverses between those groups, the reversal is consistent with the authors’ hypothesis about human-centric concepts. The benchmark comparison does not isolate how cultural, social, aesthetic and affective information each contributes to it. The empirical scope is the set of genre and sentiment tasks studied.

The labels also determine what a successful prediction means. In MVSA, the evaluation uses a rounded aggregate of ratings for the image and the tweet. It does not test agreement with every annotator or recovery of the sentiment of each input independently. In Book Covers, each book has a single assigned genre. The test rewards matching that category even if a reader might recognize another plausible genre from the cover. In Plotster, a classifier can receive credit for partially recovering the annotated genre set through the per-movie F1 calculation. The task measures agreement with those labels from the available media. It does not determine how an audience would describe the work or how well the system would explain a judgment.

Masking introduces its own measurement limits. The character audit gives a sample-based estimate of how much visible text was altered. It does not give coverage across all posters and covers or determine whether the surviving characters are especially informative. Black boxes and inpainting also modify portions of the image that can contribute to its style. Masking can therefore alter layout cues as well as the legibility of words. The controls narrow the explanations that are consistent with the results, while a numerical attribution of the lead to reading, illustration or design would require a more selective intervention.

Finally, some of the paired results are close. The transfer tables give means and standard deviations across repeated classifier initializations. Those quantities describe variability in the reported runs and do not by themselves establish that every adjacent ranking is reliably separated. The MVSA tie concerns the reported means, and the standard-cover comparison between CLIP paired with BERT-large and CLIP paired with CLIP-T shows how close the best pairings can be. The few-shot experiment is visual only. Its results do not establish that the text or paired rankings would persist with similarly few labeled examples. The English-language data likewise leave cross-language transfer outside the study’s scope.

What came after

The paper identifies recognizing emotions, analyzing personality and conducting conversation as possible areas for testing its account of human-centric information. Those are proposed extensions. The tasks it actually evaluates measure tweet sentiment and genre, with a separate comparison against conventional visual recognition. The available record gives no subsequent study to trace from those experiments. An open question is whether the advantage follows the same pattern in other tasks when the training data and objectives can be compared under tighter controls.

Cite

Cite as Romain Bielawski, Benjamin Devillers, Tim Van De Cruys and Rufin Vanrullen. 2022. When does CLIP generalize better than unimodal models? When judging human-centric concepts. Proceedings of the 7th Workshop on Representation Learning for NLP.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2022.repl4nlp-1.4

@inproceedings{bielawski2022when,
  title = {{When does CLIP generalize better than unimodal models? When judging human-centric concepts}},
  author = {Romain Bielawski, Benjamin Devillers, Tim {Van De Cruys} and Rufin Vanrullen},
  booktitle = {Proceedings of the 7th Workshop on Representation Learning for NLP},
  year = {2022},
  doi = {10.18653/v1/2022.repl4nlp-1.4},
  url = {https://doi.org/10.18653/v1/2022.repl4nlp-1.4}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bielawski-2022-when-does-clip-generalize-better/